/* Xidmet xeritesi (#xidmet-xeritesi) — views/service_map_section.php + assets/js/xmap.js
 *
 * Masaustu (>=1024px): solda AfeLabs merkezi -> ortada istiqamet kartlari (SVG cizgilerle
 * merkeze bagli) -> sagda secilen istiqametin detay paneli.
 * Tablet / telefon: merkez ustte, istiqametler yerel <details> akordeonu (JS'siz).
 * Bilincli olarak backdrop-filter ve sonsuz animasyon YOK: telefon GPU'sunu yormaz.
 */

.xm-section {
    position: relative;
    padding: clamp(3.5rem, 8vw, 6rem) 0;
    --xm-ink: #f8fafc;
    --xm-text: rgba(203, 213, 225, 0.9);
    --xm-muted: rgba(148, 163, 184, 0.9);
    --xm-card: rgba(15, 23, 42, 0.6);
    --xm-panel: #0b1220;
    --xm-soft: rgba(148, 163, 184, 0.07);
    --xm-line: rgba(148, 163, 184, 0.16);
    --xm-brand: #2dd4bf;
}
body.theme-light .xm-section {
    --xm-ink: #0f172a;
    --xm-text: #475569;
    --xm-muted: #64748b;
    --xm-card: rgba(255, 255, 255, 0.86);
    --xm-panel: #ffffff;
    --xm-soft: #f5f8fb;
    --xm-line: rgba(15, 23, 42, 0.09);
    --xm-brand: #0d9488;
}

/* Ton paleti: --xm-c vurgu (acik temada bir ton koyu ki okunakli kalsin) */
.xm--teal    { --xm-c: #2dd4bf; --xm-c-l: #0d9488; }
.xm--cyan    { --xm-c: #22d3ee; --xm-c-l: #0891b2; }
.xm--sky     { --xm-c: #60a5fa; --xm-c-l: #2563eb; }
.xm--violet  { --xm-c: #a78bfa; --xm-c-l: #7c3aed; }
.xm--pink    { --xm-c: #f472b6; --xm-c-l: #db2777; }
.xm--orange  { --xm-c: #fb923c; --xm-c-l: #ea580c; }
.xm--amber   { --xm-c: #fbbf24; --xm-c-l: #b45309; }
.xm--emerald { --xm-c: #34d399; --xm-c-l: #059669; }
body.theme-light .xm-branch,
body.theme-light .xm-detail { --xm-c: var(--xm-c-l); }

.xm-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

/* ── Baslik ── */
.xm-head { max-width: 760px; margin: 0 auto clamp(2rem, 5vw, 3rem); text-align: center; }
.xm-kicker {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.xm-title {
    margin: 0.7rem 0 0;
    font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
}
.xm-lead { margin: 0.9rem auto 0; font-size: 0.97rem; line-height: 1.7; }

/* ── Yerlesim: telefon once ── */
.xm-map { position: relative; display: flex; flex-direction: column; gap: 1rem; }
.xm-list { display: grid; gap: 0.7rem; }
.xm-lines, .xm-detail { display: none; }

/* ── Merkez: AfeLabs ── */
.xm-hub {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 24px;
    background: radial-gradient(120% 90% at 0% 0%, #0f3a3f 0%, #071318 60%, #050c10 100%);
    border: 1px solid rgba(45, 212, 191, 0.35);
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.08), 0 24px 60px -28px rgba(0, 240, 255, 0.55);
}
.xm-hub-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(45, 212, 191, 0.12); }
.xm-hub-icon svg { width: 24px; height: 24px; }
.xm-hub-title {
    display: block;
    margin-top: 0.85rem;
    font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}
.xm-hub-title b { font-weight: 700; }
.xm-hub-sub { display: block; margin-top: 0.4rem; font-size: 0.8rem; font-weight: 500; }
.xm-hub-text { margin: 0.75rem 0 0; font-size: 0.82rem; line-height: 1.6; }
.xm-hub-stats { display: block; margin-top: 0.85rem; font-size: 0.75rem; }
.xm-hub-stats b { font-weight: 700; }

/* ── Istiqamet karti ── */
.xm-branch {
    position: relative;
    border-radius: 16px;
    background: var(--xm-card);
    border: 1px solid var(--xm-line);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.xm-branch[open],
.xm-branch.is-active {
    border-color: color-mix(in srgb, var(--xm-c) 50%, transparent);
    box-shadow: 0 14px 34px -22px color-mix(in srgb, var(--xm-c) 80%, transparent);
}
.xm-branch-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0.85rem;
    cursor: pointer;
    list-style: none;
    border-radius: 16px;
    -webkit-tap-highlight-color: transparent;
}
.xm-branch-btn::-webkit-details-marker { display: none; }
.xm-branch-btn::marker { content: ""; }
.xm-branch-btn:focus-visible { outline: 2px solid var(--xm-c); outline-offset: 3px; }
.xm-glyph {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--xm-c) 14%, transparent);
}
.xm-glyph svg { width: 20px; height: 20px; }
.xm-branch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.xm-branch-line { display: flex; align-items: baseline; gap: 0.55rem; }
.xm-branch-num, .xm-p-num {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.xm-branch-title {
    font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
}
.xm-branch-sub { font-size: 0.75rem; line-height: 1.35; }
.xm-chev {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--xm-ink) 7%, transparent);
    transition: transform 0.25s ease, background 0.25s ease;
}
.xm-chev svg { width: 14px; height: 14px; }
.xm-branch[open] .xm-chev { transform: rotate(90deg); background: color-mix(in srgb, var(--xm-c) 16%, transparent); }

/* ── Panel (telefonda kartin icinde, masaustunde sagdaki .xm-detail'de) ── */
.xm-panel { padding: 0 1rem 1.1rem; }
.xm-p-top { display: flex; gap: 1rem; align-items: flex-start; position: relative; }
.xm-p-top .xm-glyph, .xm-p-num, .xm-p-title, .xm-p-art { display: none; }
.xm-p-head { flex: 1; min-width: 0; }
.xm-desc { margin: 0; font-size: 0.86rem; line-height: 1.65; }
.xm-p-h {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 1.15rem 0 0.7rem;
    font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
}
.xm-p-h svg { width: 18px; height: 18px; flex: none; }

.xm-services { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.xm-services li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0.8rem;
    border-radius: 14px;
    background: var(--xm-soft);
    border: 1px solid var(--xm-line);
}
.xm-s-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--xm-c) 12%, transparent);
}
.xm-s-ico svg { width: 17px; height: 17px; }
.xm-s-txt { min-width: 0; }
.xm-services strong { display: block; font-size: 0.86rem; font-weight: 600; line-height: 1.35; }
.xm-services .xm-s-txt span { display: block; margin-top: 0.15rem; font-size: 0.77rem; line-height: 1.45; }

.xm-gains { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.xm-gains li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 82px;
    padding: 0.7rem 0.5rem;
    text-align: center;
    border-radius: 14px;
    background: var(--xm-soft);
    border: 1px solid var(--xm-line);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}
.xm-gains svg { width: 22px; height: 22px; }

.xm-meta { display: grid; gap: 0.2rem; }
.xm-chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.xm-chips li {
    padding: 0.42rem 0.75rem;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 600;
    background: var(--xm-soft);
    border: 1px solid var(--xm-line);
}
.xm-chips--soft li { border-radius: 999px; font-weight: 500; }

.xm-benefit {
    display: flex;
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    font-size: 0.82rem;
    line-height: 1.55;
    background: color-mix(in srgb, var(--xm-c) 9%, transparent);
}
.xm-benefit svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

.xm-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--xm-line);
}
.xm-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, #14b8a6, #0e7490);
    box-shadow: 0 12px 28px -14px rgba(13, 148, 136, 0.9);
    transition: filter 0.2s ease, transform 0.2s ease;
}
.xm-cta svg { width: 18px; height: 18px; flex: none; }
.xm-cta .xm-cta-arrow { margin-left: auto; }
.xm-cta:hover { filter: brightness(1.08); }
.xm-cta:active { transform: scale(0.98); }
.xm-cta2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.xm-cta2 svg { width: 17px; height: 17px; }
.xm-cta2 { min-height: 44px; } /* parmakla rahat dokunma alani */
.xm-cta:focus-visible, .xm-cta2:focus-visible { outline: 2px solid var(--xm-brand); outline-offset: 3px; }

/* ── Tablet: iki sutun kart ── */
@media (min-width: 640px) and (max-width: 1023px) {
    .xm-list { grid-template-columns: 1fr 1fr; align-items: start; }
    .xm-gains { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Masaustu: merkez -> kartlar -> panel ── */
@media (min-width: 1024px) {
    .xm-map {
        display: grid;
        grid-template-columns: clamp(170px, 15vw, 210px) clamp(270px, 25vw, 320px) minmax(0, 1fr);
        column-gap: clamp(2.5rem, 5vw, 4.5rem);
        align-items: start;
    }
    .xm-map > .xm-detail { margin-left: calc(clamp(2.5rem, 5vw, 4.5rem) * -0.55); }
    .xm-hub {
        align-self: start; /* dikey konumu xmap.js verir: kart listesinin ortasi */
        position: relative;
        z-index: 1;
        padding: 1.4rem 1.2rem;
        text-align: center;
    }
    .xm-hub-icon { margin: 0 auto; }
    .xm-hub-title { font-size: clamp(1.7rem, 2.2vw, 2.1rem); }
    .xm-hub-text { display: none; }
    .xm-list { position: relative; z-index: 1; gap: 0.6rem; }
    .xm-branch .xm-panel { display: none; }
    .xm-branch-btn { padding: 0.7rem 0.8rem; }
    .xm-branch-btn:hover { background: color-mix(in srgb, var(--xm-c) 7%, transparent); }
    .xm-chev { transform: none !important; }
    .xm-branch.is-active {
        background: linear-gradient(135deg, #0f766e, #155e75);
        border-color: rgba(45, 212, 191, 0.6);
        box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25), 0 16px 34px -16px rgba(13, 148, 136, 0.9);
        transform: translateX(6px);
    }

    .xm-lines {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: visible;
        pointer-events: none;
        z-index: 0;
    }
    .xm-lines path {
        fill: none;
        stroke: rgba(45, 212, 191, 0.35);
        stroke-width: 1.5;
        stroke-linecap: round;
        transition: stroke 0.3s ease, stroke-width 0.3s ease;
    }
    body.theme-light .xm-lines path { stroke: rgba(13, 148, 136, 0.3); }
    .xm-lines path.is-active { stroke: #2dd4bf; stroke-width: 2.6; }
    body.theme-light .xm-lines path.is-active { stroke: #14b8a6; }
    .xm-lines circle { fill: #2dd4bf; }

    .xm-detail {
        display: block;
        position: relative;
        z-index: 1;
        padding: 1.6rem 1.7rem 1.4rem;
        border-radius: 26px;
        background: var(--xm-panel);
        border: 1px solid var(--xm-line);
        box-shadow: 0 30px 70px -40px rgba(15, 23, 42, 0.45);
    }
    .xm-detail[hidden] { display: none; }
    .xm-detail .xm-panel { display: block; padding: 0; }
    .xm-detail .xm-p-top { min-height: 72px; padding-bottom: 0.4rem; }
    .xm-detail .xm-p-art { display: none !important; }
    .xm-detail .xm-p-top .xm-glyph { display: grid; width: 60px; height: 60px; border-radius: 18px; }
    .xm-detail .xm-p-top .xm-glyph svg { width: 28px; height: 28px; }
    .xm-detail .xm-p-num {
        display: inline-block;
        padding: 0.15rem 0.5rem;
        border-radius: 999px;
        background: color-mix(in srgb, var(--xm-c) 16%, transparent);
    }
    .xm-detail .xm-p-title {
        display: block;
        margin: 0.35rem 0 0.4rem;
        font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
        font-size: clamp(1.35rem, 1.9vw, 1.7rem);
        font-weight: 700;
        line-height: 1.15;
    }
    .xm-detail .xm-p-art {
        display: grid;
        place-items: center;
        position: absolute;
        right: 0;
        top: -0.3rem;
        width: 88px;
        height: 88px;
        border-radius: 26px;
        background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--xm-c) 22%, transparent), color-mix(in srgb, var(--xm-c) 6%, transparent));
        opacity: 0.9;
    }
    .xm-detail .xm-p-art svg { width: 42px; height: 42px; opacity: 0.75; }
    .xm-detail .xm-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xm-detail .xm-gains { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .xm-detail .xm-meta { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
    .xm-detail .xm-meta > div + div { padding-left: 1.5rem; border-left: 1px solid var(--xm-line); }
    .xm-detail .xm-actions { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
    .xm-detail .xm-cta { flex: 0 1 380px; }
    .xm-detail.is-in .xm-panel { animation: xmIn 0.3s ease both; }
}

/* ── Masaustu: butun bolme tek ekrana sigsin ──
 * --xm-h: harita yuksekligi = ekran - ust menu (~110px) - bolme basligi - bosluklar.
 * Kartlar bu yuksekligi esit paylasir; panel ayni yukseklikte, icerigi tasarsa
 * yalniz panelin ici kayar (overscroll zinciri acik: sayfa kaydirmasi takilmaz). */
@media (min-width: 1024px) {
    .xm-section {
        --xm-h: clamp(430px, calc(100svh - 300px), 620px);
        padding: clamp(1.5rem, 3vh, 2.5rem) 0 clamp(2rem, 4vh, 3rem);
        scroll-margin-top: 100px;
    }
    .xm-head { margin-bottom: clamp(1rem, 2.4vh, 1.75rem); max-width: 900px; }
    .xm-title { margin-top: 0.35rem; font-size: clamp(1.5rem, 2.3vw, 2.1rem); }
    .xm-lead { margin-top: 0.45rem; font-size: 0.9rem; line-height: 1.5; }

    .xm-list { height: var(--xm-h); display: flex; flex-direction: column; gap: 0.4rem; }
    .xm-branch { flex: 1 1 0; min-height: 0; display: flex; }
    .xm-branch-btn { flex: 1; padding: 0.35rem 0.7rem; gap: 0.7rem; }
    .xm-glyph { width: 34px; height: 34px; border-radius: 10px; }
    .xm-glyph svg { width: 18px; height: 18px; }
    .xm-branch-title { font-size: 0.92rem; }
    .xm-branch-sub { font-size: 0.72rem; }
    .xm-chev { width: 24px; height: 24px; }

    .xm-hub { padding: 1.1rem 1rem; }
    .xm-hub-icon { width: 38px; height: 38px; }
    .xm-hub-title { margin-top: 0.6rem; }

    .xm-detail {
        height: var(--xm-h);
        overflow-y: auto;
        overscroll-behavior: auto;
        padding: 1.15rem 1.3rem 1rem;
        scrollbar-width: thin;
        scrollbar-color: color-mix(in srgb, var(--xm-c, #2dd4bf) 45%, transparent) transparent;
    }
    .xm-detail .xm-p-top { min-height: 0; gap: 0.85rem; }
    .xm-detail .xm-p-top .xm-glyph { width: 48px; height: 48px; border-radius: 14px; }
    .xm-detail .xm-p-top .xm-glyph svg { width: 24px; height: 24px; }
    .xm-detail .xm-p-title { margin: 0.2rem 0 0.25rem; font-size: clamp(1.15rem, 1.5vw, 1.4rem); }
    .xm-detail .xm-desc { font-size: 0.82rem; line-height: 1.5; }
    .xm-detail .xm-p-h { margin: 0.8rem 0 0.45rem; font-size: 0.84rem; }
    .xm-detail .xm-services { gap: 0.4rem; }
    .xm-detail .xm-services li { padding: 0.45rem 0.6rem; gap: 0.55rem; border-radius: 11px; }
    .xm-detail .xm-s-ico { width: 28px; height: 28px; border-radius: 8px; }
    .xm-detail .xm-s-ico svg { width: 15px; height: 15px; }
    .xm-detail .xm-services strong { font-size: 0.8rem; }
    .xm-detail .xm-services .xm-s-txt span {
        font-size: 0.72rem;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    /* "Ne qazandirir?" bir sira yatay etiket: ikon + yazi */
    .xm-detail .xm-gains { gap: 0.4rem; }
    .xm-detail .xm-gains li {
        flex-direction: row;
        justify-content: flex-start;
        min-height: 0;
        padding: 0.5rem 0.6rem;
        gap: 0.45rem;
        text-align: left;
        font-size: 0.74rem;
        border-radius: 11px;
    }
    .xm-detail .xm-gains svg { width: 17px; height: 17px; flex: none; }
    .xm-detail .xm-chips { gap: 0.35rem; }
    .xm-detail .xm-chips li { padding: 0.3rem 0.6rem; font-size: 0.72rem; }
    .xm-detail .xm-benefit { display: none; } /* masaustunde yer acmak icin; telefonda gorunur */
    /* Dugmeler panelin altinda sabit: icerik kaysa da hep gorunur */
    .xm-detail .xm-actions {
        position: sticky;
        bottom: -1rem;
        z-index: 2;
        margin: 0.8rem -1.3rem -1rem;
        padding: 0.75rem 1.3rem 0.9rem;
        gap: 0.6rem;
        background: var(--xm-panel);
        border-top: 1px solid var(--xm-line);
        box-shadow: 0 -10px 18px -14px rgba(15, 23, 42, 0.35);
    }
    .xm-detail .xm-cta { flex: 1 1 auto; padding: 0.65rem 1rem; font-size: 0.84rem; white-space: nowrap; min-width: 0; }
    .xm-detail .xm-cta span { overflow: hidden; text-overflow: ellipsis; }
    .xm-detail .xm-actions { flex-wrap: nowrap; }
    .xm-detail .xm-cta2 { flex: none; white-space: nowrap; font-size: 0.8rem; }
}
/* Alcak ekran (laptop, tarayici yakinlastirmasi): aciklama satirlari gizlenir */
@media (min-width: 1024px) and (max-height: 820px) {
    .xm-lead { display: none; }
    .xm-section { --xm-h: clamp(400px, calc(100svh - 250px), 560px); }
    .xm-branch-sub { display: none; }
    .xm-detail .xm-services .xm-s-txt span { display: none; }
}

/* ════════════════════════════════════════════════════════════════════
 * Telefon / tablet (<1024px): addim-addim acilan xerite (xmap.js)
 * Liste kartlari -> detal ekrani (sagdan) -> bottom sheet (asagidan).
 * Ekranlar <body> altinda: .xm-app (renk degiskenleri burada da tanimli).
 * z-index 10050+: sitenin alt menusu (9990) ve elan seridi (9999) ustunde.
 * ════════════════════════════════════════════════════════════════════ */
.xm-app {
    --xm-ink: #f8fafc;
    --xm-text: rgba(203, 213, 225, 0.9);
    --xm-muted: rgba(148, 163, 184, 0.9);
    --xm-card: #111a2b;
    --xm-bg: #070b14;
    --xm-soft: rgba(148, 163, 184, 0.08);
    --xm-line: rgba(148, 163, 184, 0.16);
    --xm-brand: #2dd4bf;
    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}
.xm-app.is-light {
    --xm-ink: #0f172a;
    --xm-text: #475569;
    --xm-muted: #64748b;
    --xm-card: #ffffff;
    --xm-bg: #f1f6f8;
    --xm-soft: #f5f8fb;
    --xm-line: rgba(15, 23, 42, 0.08);
    --xm-brand: #0d9488;
    --xm-c: var(--xm-c-l);
}

@media (max-width: 1023px) {
    /* Liste karti: sol renk serit, toxunanda sixilir ve rengle isiqlanir */
    .xm-branch { overflow: hidden; }
    .xm-branch::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--xm-c);
    }
    .xm-branch-btn { padding: 0.75rem 0.85rem 0.75rem 1rem; transition: transform 0.14s ease, background 0.2s ease; }
    .xm-branch-btn:active,
    .xm-branch.is-pressed .xm-branch-btn {
        transform: scale(0.975);
        background: color-mix(in srgb, var(--xm-c) 12%, transparent);
    }
    .xm-branch.is-pressed {
        border-color: color-mix(in srgb, var(--xm-c) 60%, transparent);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--xm-c) 18%, transparent), 0 12px 26px -14px color-mix(in srgb, var(--xm-c) 80%, transparent);
    }
    .xm-branch.is-pressed .xm-chev { background: var(--xm-c); }
}

/* Detal ekrani: sagdan sola 300 ms */
.xm-screen {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    background: var(--xm-bg);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.25, 1);
    will-change: transform;
}
.xm-screen.is-open { transform: none; }
.xm-app-bar {
    flex: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: calc(env(safe-area-inset-top, 0px) + 0.7rem) 1rem 0.7rem;
    background: var(--xm-bg);
}
.xm-app-bar-title {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.xm-app-btn {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--xm-line);
    border-radius: 14px;
    background: var(--xm-card);
    cursor: pointer;
    box-shadow: 0 6px 16px -10px rgba(15, 23, 42, 0.35);
}
.xm-app-btn svg { width: 20px; height: 20px; }
.xm-app-btn--ghost { visibility: hidden; }
.xm-app-btn:focus-visible { outline: 2px solid var(--xm-brand); outline-offset: 2px; }
.xm-app-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 1rem 1.5rem;
}
.xm-app-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.3rem 1.2rem;
    border-radius: 24px;
    background: radial-gradient(120% 120% at 100% 0%, #115e59 0%, #0b2f33 45%, #061417 100%);
    box-shadow: 0 22px 44px -26px rgba(13, 148, 136, 0.9);
}
.xm-app-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.xm-app-hero-txt { flex: 1; min-width: 0; position: relative; z-index: 1; }
.xm-app-hero-num { display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.xm-app-hero-title {
    margin: 0.3rem 0 0;
    font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.12;
}
.xm-app-hero-desc { margin: 0.55rem 0 0; font-size: 0.82rem; line-height: 1.5; }
.xm-app-hero-icon {
    flex: none;
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(94, 234, 212, 0.35), rgba(45, 212, 191, 0.08));
    border: 1px solid rgba(153, 246, 228, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 28px -12px rgba(0, 0, 0, 0.5);
    transform: rotate(-8deg);
}
.xm-app-hero-icon svg { width: 36px; height: 36px; }
.xm-app-h {
    margin: 1.3rem 0 0.7rem;
    font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
}
.xm-app-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.xm-app-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.8rem 0.85rem;
    border: 1px solid var(--xm-line);
    border-radius: 18px;
    background: var(--xm-card);
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: transform 0.14s ease, border-color 0.2s ease;
}
.xm-app-item:active { transform: scale(0.98); border-color: color-mix(in srgb, var(--xm-c) 55%, transparent); }
.xm-app-item:focus-visible { outline: 2px solid var(--xm-c); outline-offset: 2px; }
.xm-app-item-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--xm-c) 13%, transparent);
}
.xm-app-item-ico svg { width: 21px; height: 21px; }
.xm-app-item-ico--lg { width: 52px; height: 52px; border-radius: 16px; }
.xm-app-item-ico--lg svg { width: 25px; height: 25px; }
.xm-app-item-txt { flex: 1; min-width: 0; }
.xm-app-item-txt strong { display: block; font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.xm-app-item-txt span { display: block; margin-top: 0.15rem; font-size: 0.76rem; line-height: 1.4; }
.xm-app-item-chev {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--xm-soft);
}
.xm-app-item-chev svg { width: 14px; height: 14px; }
.xm-app-gains { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 0.55rem; }
.xm-app-gains li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 92px;
    padding: 0.8rem 0.5rem;
    text-align: center;
    border-radius: 18px;
    background: var(--xm-card);
    border: 1px solid var(--xm-line);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}
.xm-app-gains svg { width: 24px; height: 24px; }
.xm-app-meta { display: grid; gap: 0.2rem; margin-top: 0.4rem; }
.xm-app-meta .xm-p-h { display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0 0.6rem; font-size: 0.95rem; font-weight: 700; font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif; }
.xm-app-meta .xm-p-h svg { width: 18px; height: 18px; }
.xm-app-meta .xm-chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.xm-app-meta .xm-chips li { padding: 0.4rem 0.75rem; border-radius: 10px; font-size: 0.76rem; font-weight: 600; background: var(--xm-card); border: 1px solid var(--xm-line); }
.xm-app-meta .xm-chips--soft li { border-radius: 999px; font-weight: 500; }

/* Esas "Muraciet et" duymesi: ekranin altinda sabit */
.xm-app-foot {
    flex: none;
    padding: 0.75rem 1rem calc(env(safe-area-inset-bottom, 0px) + 0.85rem);
    background: linear-gradient(to top, var(--xm-bg) 70%, transparent);
}
.xm-app-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.95rem 1.2rem;
    border: 0;
    border-radius: 18px;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    box-shadow: 0 16px 30px -14px rgba(13, 148, 136, 0.95);
    transition: transform 0.14s ease, filter 0.2s ease;
}
.xm-app-cta svg { width: 20px; height: 20px; }
.xm-app-cta:active { transform: scale(0.98); filter: brightness(1.06); }
.xm-app-cta:focus-visible { outline: 2px solid var(--xm-brand); outline-offset: 3px; }

/* Bottom sheet: asagidan, ekranin ~80%-i */
.xm-app-scrim {
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: rgba(2, 6, 23, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.xm-app-scrim.is-open { opacity: 1; }
.xm-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10070;
    height: 80vh;
    height: 80dvh;
    display: flex;
    flex-direction: column;
    border-radius: 26px 26px 0 0;
    background: var(--xm-bg);
    box-shadow: 0 -20px 50px -20px rgba(2, 6, 23, 0.6);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.25, 1);
    will-change: transform;
}
.xm-sheet.is-open { transform: none; }
.xm-sheet-grip {
    flex: none;
    display: grid;
    place-items: center;
    height: 26px;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.xm-sheet-grip i { width: 44px; height: 5px; border-radius: 99px; background: var(--xm-line); }
.xm-sheet-head { flex: none; display: flex; align-items: center; gap: 0.85rem; padding: 0.2rem 1.1rem 0.6rem; }
.xm-sheet-head-txt { flex: 1; min-width: 0; }
.xm-sheet-kicker { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.xm-sheet-title {
    margin: 0.2rem 0 0;
    font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}
.xm-sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 1.1rem 1rem; }
.xm-sheet-body .xm-app-h { margin-top: 1rem; }
.xm-sheet-p { margin: 0; font-size: 0.9rem; line-height: 1.65; }
.xm-sheet-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.xm-sheet-checks li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    background: var(--xm-card);
    border: 1px solid var(--xm-line);
    font-size: 0.86rem;
    font-weight: 500;
}
.xm-sheet-checks svg { flex: none; width: 18px; height: 18px; }
.xm-app-foot--sheet { background: var(--xm-bg); border-top: 1px solid var(--xm-line); }

/* Ekranlarin yazi renkleri (site.css'teki "theme-light div/span { color: inherit }" kuralini asir) */
.xm-app .xm-app-bar-title,
.xm-app .xm-app-h,
.xm-app .xm-app-item-txt strong,
.xm-app .xm-app-gains li,
.xm-app .xm-sheet-title,
.xm-app .xm-sheet-checks li,
.xm-app .xm-app-meta .xm-p-h,
.xm-app .xm-app-meta .xm-chips li,
.xm-app .xm-app-btn { color: var(--xm-ink); }
.xm-app .xm-app-item-txt span,
.xm-app .xm-sheet-p,
.xm-app .xm-app-meta .xm-chips--soft li,
.xm-app .xm-app-item-chev { color: var(--xm-text); }
.xm-app .xm-app-item-ico,
.xm-app .xm-app-gains svg,
.xm-app .xm-sheet-checks svg,
.xm-app .xm-app-meta .xm-p-h svg,
.xm-app .xm-sheet-kicker { color: var(--xm-c, var(--xm-brand)); }
.xm-app .xm-app-hero-title { color: #fff; }
.xm-app .xm-app-hero-num { color: #5eead4; }
.xm-app .xm-app-hero-desc { color: rgba(226, 232, 240, 0.85); }
.xm-app .xm-app-hero-icon { color: #ccfbf1; }
.xm-app .xm-app-cta,
.xm-app .xm-app-cta span { color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .xm-screen, .xm-sheet, .xm-app-scrim { transition: none; }
    .xm-branch-btn, .xm-app-item, .xm-app-cta { transition: none; }
}

/* ── Renk kilidi ──
 * site.css'te "body.theme-light section, div, p, span, h1… { color: inherit }" kurali var
 * (ozgulluk 0,1,1); tek sinifli kurallar ona yeniliyor. Butun yazi renkleri burada
 * .xm-section on ekiyle (0,2,0+) verilir; sitenin baska hicbir yerini etkilemez. */
.xm-section .xm-kicker { color: var(--xm-brand); }
.xm-section .xm-title,
.xm-section .xm-branch-title,
.xm-section .xm-p-title,
.xm-section .xm-p-h,
.xm-section .xm-services strong,
.xm-section .xm-gains li,
.xm-section .xm-chips li { color: var(--xm-ink); }
.xm-section .xm-lead,
.xm-section .xm-desc,
.xm-section .xm-benefit { color: var(--xm-text); }
.xm-section .xm-branch-sub,
.xm-section .xm-services .xm-s-txt span,
.xm-section .xm-chev,
.xm-section .xm-chips--soft li { color: var(--xm-muted); }
.xm-section .xm-branch-num,
.xm-section .xm-p-num,
.xm-section .xm-glyph,
.xm-section .xm-s-ico,
.xm-section .xm-p-art,
.xm-section .xm-p-h svg,
.xm-section .xm-gains svg,
.xm-section .xm-benefit svg,
.xm-section .xm-branch[open] .xm-chev { color: var(--xm-c, var(--xm-brand)); }
.xm-section .xm-hub,
.xm-section .xm-hub-title,
.xm-section .xm-hub-stats b { color: #fff; }
.xm-section .xm-hub-icon,
.xm-section .xm-hub-title b { color: #2dd4bf; }
.xm-section .xm-hub-sub,
.xm-section .xm-hub-stats { color: rgba(204, 251, 241, 0.75); }
.xm-section .xm-hub-text { color: rgba(226, 232, 240, 0.82); }
.xm-section .xm-cta,
.xm-section .xm-cta span { color: #fff; }
.xm-section .xm-cta2,
.xm-section .xm-cta2 span { color: var(--xm-brand); }
@media (min-width: 1024px) {
    .xm-section .xm-branch.is-active .xm-branch-title,
    .xm-section .xm-branch.is-active .xm-branch-num,
    .xm-section .xm-branch.is-active .xm-glyph,
    .xm-section .xm-branch.is-active .xm-chev { color: #fff; }
    .xm-section .xm-branch.is-active .xm-branch-sub { color: rgba(236, 254, 255, 0.78); }
    .xm-section .xm-branch.is-active .xm-glyph,
    .xm-section .xm-branch.is-active .xm-chev { background: rgba(255, 255, 255, 0.14); }
}

@keyframes xmIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .xm-branch, .xm-chev, .xm-lines path, .xm-cta { transition: none; }
    .xm-detail.is-in .xm-panel { animation: none; }
    .xm-branch.is-active { transform: none; }
}
