/* ==========================================================================
   TÜRKOL YAZILIM — Başlık katmanı
   turkol.css'ten SONRA yüklenir. Header ile ilgili tüm yükseltmeler burada;
   turkol.css'teki eski header kuralları burada geçersiz kılınır.

   İçerik
     1. Jetonlar
     2. Hap kabuk (kaydırınca incelme)
     3. Logo — vektörel karo işareti ve mikro animasyon
     4. Navigasyon + kayan gösterge
     5. Dil değiştirici
     6. Hamburger
     7. Mobil tam ekran cam menü
     8. JS yok — güvenli geri dönüş
     9. Hareket kısıtı
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Jetonlar — yalnızca başlık kapsamında
   -------------------------------------------------------------------------- */
.tk-header {
    --tk-hd-h: 76px;          /* mobil çubuk yüksekliği */
    --tk-hd-pill: 64px;       /* hap yüksekliği */
    --tk-hd-pill-sm: 56px;    /* kaydırınca incelmiş hap */
}

/* --------------------------------------------------------------------------
   2. Hap kabuk
   -------------------------------------------------------------------------- */
.tk-header__inner {
    position: relative;
    gap: 18px;
}

@media (min-width: 1024px) {
    .tk-header {
        padding-top: 14px;
        transition: transform .42s var(--tk-ease), opacity .28s var(--tk-ease),
                    padding-top .34s var(--tk-ease);
    }
    .tk-header.is-stuck { padding-top: 8px; }

    .tk-header__inner {
        height: var(--tk-hd-pill);
        padding-inline: 12px;
        border-radius: var(--tk-r-pill);
        background: rgba(255, 255, 255, .78);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
                backdrop-filter: saturate(180%) blur(16px);
        border: 1px solid rgba(227, 231, 240, .9);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8),
                    0 1px 2px rgba(10, 22, 51, .04),
                    0 10px 30px rgba(10, 22, 51, .07);
        transition: height .34s var(--tk-ease),
                    background-color .34s var(--tk-ease),
                    border-color .34s var(--tk-ease),
                    box-shadow .34s var(--tk-ease);
    }
    .tk-header.is-stuck .tk-header__inner {
        height: var(--tk-hd-pill-sm);
        background: rgba(255, 255, 255, .94);
        -webkit-backdrop-filter: saturate(200%) blur(20px);
                backdrop-filter: saturate(200%) blur(20px);
        border-color: rgba(213, 220, 236, .95);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9),
                    0 2px 6px rgba(10, 22, 51, .07),
                    0 18px 46px rgba(10, 22, 51, .13);
    }

}

/* --------------------------------------------------------------------------
   3. Logo — karo işareti vektöre alınır, kelime markası PNG'den gelir.
   PNG'nin (doğal 344×60) işaret bölgesi x 4,37–60,68 / y 10,91–48,46 aralığı
   kırpılır; yerine aynı ölçüde, orijinalden ölçülmüş satır içi SVG konur.
   Böylece karolar tek tek canlanabilir ve işaret retina ekranda keskinleşir.
   Kelime markası dokunulmadan aynı yerde kalır.
   -------------------------------------------------------------------------- */
.tk-logo {
    --tk-logo-h: 30px;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    flex: none;
    padding-left: 0;
    border-radius: var(--tk-r-sm);
}

.tk-logo__mark {
    display: block;
    flex: none;
    width:  calc(var(--tk-logo-h) * 56.31 / 60);
    height: calc(var(--tk-logo-h) * 37.55 / 60);
}
.tk-logo__mark svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.tk-logo img {
    flex: none;
    height: var(--tk-logo-h);
    width: auto;
    max-width: none;
    margin-left: calc(var(--tk-logo-h) * -60.68 / 60);
    -webkit-clip-path: inset(0 0 0 calc(var(--tk-logo-h) * 62 / 60));
            clip-path: inset(0 0 0 calc(var(--tk-logo-h) * 62 / 60));
}

@media (min-width: 1024px) {
    .tk-logo { padding-left: 8px; }
}

/* Karolar sırayla canlanır — yalnızca imleçli aygıtta ve hover/odakta */
.tk-logo__karo {
    transform-box: fill-box;
    transform-origin: 50% 50%;
}
@media (hover: hover) {
    .tk-logo:hover .tk-logo__karo,
    .tk-logo:focus-visible .tk-logo__karo {
        animation: tkKaro .58s var(--tk-ease) both;
    }
    .tk-logo:hover .tk-logo__karo:nth-child(2),
    .tk-logo:focus-visible .tk-logo__karo:nth-child(2) { animation-delay: .07s; }
    .tk-logo:hover .tk-logo__karo:nth-child(3),
    .tk-logo:focus-visible .tk-logo__karo:nth-child(3) { animation-delay: .14s; }
    .tk-logo:hover .tk-logo__karo:nth-child(4),
    .tk-logo:focus-visible .tk-logo__karo:nth-child(4) { animation-delay: .21s; }
}

/* Karolar bitişik olduğu için büyüme payı küçük tutuldu; asıl hareket
   içeri çekilip geri yerleşme. */
@keyframes tkKaro {
    0%   { transform: scale(1);    opacity: 1;   }
    32%  { transform: scale(.86);  opacity: .58; }
    68%  { transform: scale(1.04); opacity: 1;   }
    100% { transform: scale(1);    opacity: 1;   }
}

/* --------------------------------------------------------------------------
   4. Navigasyon + kayan gösterge
   -------------------------------------------------------------------------- */
.tk-nav { margin-left: auto; }

.tk-nav a {
    font-size: .93rem;
    font-weight: 500;
    color: var(--tk-ink);          /* beyaz üzerinde 9.7:1 */
}

@media (min-width: 1024px) {
    .tk-nav ul {
        position: relative;
        gap: 2px;
    }

    .tk-nav a {
        position: relative;
        z-index: 1;
        padding: 10px 14px;
        line-height: 1.28;
        border-radius: var(--tk-r-pill);
        transition: color .22s var(--tk-ease);
    }
    /* Arka planı artık gösterge çiziyor */
    .tk-nav a:hover,
    .tk-nav a:focus-visible { background: transparent; color: var(--tk-blue); }
    .tk-nav a[aria-current="page"] { color: var(--tk-blue); font-weight: 600; }

    .tk-nav__ind {
        position: absolute;
        left: 0;
        top: 50%;
        z-index: 0;
        width: var(--tk-ind-w, 0px);
        height: var(--tk-ind-h, 38px);
        margin-top: calc(var(--tk-ind-h, 38px) / -2);
        border-radius: var(--tk-r-pill);
        background: linear-gradient(180deg,
            rgba(45, 62, 255, .11), rgba(86, 181, 255, .13));
        box-shadow: inset 0 0 0 1px rgba(45, 62, 255, .12),
                    0 2px 10px rgba(45, 62, 255, .12);
        opacity: 0;
        pointer-events: none;
        transform: translate3d(var(--tk-ind-x, 0px), 0, 0);
        transition: none;
    }
    /* Geçişler ancak ilk konum yerleştikten sonra açılır (soldan süzülme yok) */
    .tk-nav.is-ind-gecis .tk-nav__ind {
        transition: transform .42s var(--tk-ease),
                    width .42s var(--tk-ease),
                    opacity .24s linear;
    }
    .tk-nav.is-ind .tk-nav__ind { opacity: 1; }
}

@media (max-width: 1023px) {
    .tk-nav__ind { display: none; }
}

/* --------------------------------------------------------------------------
   5. Dil değiştirici — aktif dil dolu, hedef dil soluk.
   Hover'da dolu hap diğer tarafa kayar: "tıklarsan oraya geçersin".
   -------------------------------------------------------------------------- */
.tk-header__cta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.tk-dil {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px;
    border-radius: var(--tk-r-pill);
    border: 1px solid var(--tk-line);
    background: rgba(255, 255, 255, .7);
    font-family: var(--tk-font-mono);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    overflow: hidden;
    transition: border-color .22s var(--tk-ease), background-color .22s var(--tk-ease);
}
.tk-dil::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    border-radius: var(--tk-r-pill);
    background: var(--tk-blue);
    transition: transform .3s var(--tk-ease), background-color .22s var(--tk-ease);
}
.tk-dil b,
.tk-dil span {
    position: relative;
    z-index: 1;
    display: block;
    min-width: 30px;
    padding: 5px 2px;
    text-align: center;
    line-height: 1;
    font-weight: 700;
    transition: color .24s var(--tk-ease);
}
.tk-dil b    { color: #fff; }                 /* #2D3EFF üzerinde 6.5:1 */
.tk-dil span { color: var(--tk-gray-600); opacity: 1; }   /* beyaz üzerinde 5.2:1 */

.tk-dil:hover,
.tk-dil:focus-visible { border-color: rgba(45, 62, 255, .38); background: #fff; }
.tk-dil:hover::before,
.tk-dil:focus-visible::before { transform: translateX(100%); background: var(--tk-blue-700); }
.tk-dil:hover b,
.tk-dil:focus-visible b { color: var(--tk-gray-600); }
.tk-dil:hover span,
.tk-dil:focus-visible span { color: #fff; }   /* #1B2CD6 üzerinde 8.9:1 */

/* --------------------------------------------------------------------------
   6. Hamburger
   -------------------------------------------------------------------------- */
.tk-burger {
    position: relative;
    z-index: 3;
    border-radius: var(--tk-r);
    background: rgba(255, 255, 255, .7);
    transition: background-color .22s var(--tk-ease), border-color .22s var(--tk-ease);
}
.tk-burger:hover { border-color: rgba(45, 62, 255, .35); background: #fff; }
html.tk-menu-acik .tk-burger { background: #fff; border-color: rgba(45, 62, 255, .3); }

/* --------------------------------------------------------------------------
   7. Mobil tam ekran cam menü
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .tk-header__inner { gap: 12px; }

    /* Hamburger sağ kenara — logo solda kalır.
       DOM sırası logo → hamburger → nav → cta. Mobilde nav `position: fixed`
       (akıştan çıkmış) ve `.tk-header__cta` gizli olduğu için satırda yalnız
       bu ikisi kalıyor; `margin-left: auto` aradaki tüm boşluğu yiyor ve
       hamburger sağ oluğa oturuyor. Menü açıkken de orada kalır — kapatma
       düğmesinin sağ üstte olması beklenen davranış.
       JS yokken hamburger zaten gizli (§8), bu kural oraya karışmaz. */
    .tk-burger { margin-left: auto; }

    html.js .tk-nav {
        position: fixed;
        inset: 0 auto auto 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        margin: 0;
        z-index: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        justify-content: safe center;   /* taşarsa üstten kırpılmasın */
        padding: calc(var(--tk-hd-h) + 20px) var(--tk-gutter) 148px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background:
            radial-gradient(120% 60% at 100% 0%, rgba(86, 181, 255, .16), transparent 60%),
            radial-gradient(90% 50% at 0% 100%, rgba(45, 62, 255, .12), transparent 62%),
            linear-gradient(180deg, rgba(255, 255, 255, .93), rgba(246, 248, 253, .9));
        -webkit-backdrop-filter: blur(22px) saturate(180%);
                backdrop-filter: blur(22px) saturate(180%);
        border-bottom: 0;
        box-shadow: none;
        transform: none;
        opacity: 0;
        visibility: hidden;
        /* visibility anında açılır, kapanırken gecikir: panel açılır açılmaz
           odak alabilir, kapanırken solma animasyonu görünür kalır. */
        transition: opacity .3s var(--tk-ease), visibility 0s linear .3s;
    }
    html.js .tk-nav.is-open {
        opacity: 1;
        visibility: visible;
        transition: opacity .3s var(--tk-ease), visibility 0s linear 0s;
    }

    .tk-nav ul { flex-direction: column; align-items: stretch; gap: 0; }

    .tk-nav li { border-bottom: 1px solid rgba(227, 231, 240, .9); }
    .tk-nav li:first-child { border-top: 1px solid rgba(227, 231, 240, .9); }

    .tk-nav a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 17px 4px;
        border-radius: 0;
        font-family: var(--tk-font-display);
        font-size: 1.22rem;
        font-weight: 600;
        letter-spacing: -.02em;
        line-height: 1.25;
        color: var(--tk-ink-900);          /* cam yüzeyde ≥7:1 */
        background: none;
        transition: color .2s var(--tk-ease), transform .24s var(--tk-ease);
    }
    .tk-nav a::after {
        content: '';
        flex: none;
        width: 8px;
        height: 8px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        transform: rotate(45deg);
        color: var(--tk-blue);
        opacity: .4;
        transition: transform .24s var(--tk-ease), opacity .24s var(--tk-ease);
    }
    .tk-nav a:hover,
    .tk-nav a:focus-visible { color: var(--tk-blue); background: none; }
    .tk-nav a:hover::after,
    .tk-nav a:focus-visible::after { opacity: 1; transform: translateX(4px) rotate(45deg); }
    .tk-nav a[aria-current="page"] { color: var(--tk-blue); }
    .tk-nav a[aria-current="page"]::after { opacity: 1; }

    /* CTA menü listesinde değil, alt çubukta */
    .tk-nav .tk-nav__cta { display: none; }

    /* Öğeler sırayla belirir */
    html.js .tk-nav.is-open li {
        animation: tkMenuOge .42s var(--tk-ease) both;
    }
    html.js .tk-nav.is-open li:nth-child(1) { animation-delay: .06s; }
    html.js .tk-nav.is-open li:nth-child(2) { animation-delay: .115s; }
    html.js .tk-nav.is-open li:nth-child(3) { animation-delay: .17s; }
    html.js .tk-nav.is-open li:nth-child(4) { animation-delay: .225s; }
    html.js .tk-nav.is-open li:nth-child(5) { animation-delay: .28s; }
    html.js .tk-nav.is-open li:nth-child(6) { animation-delay: .335s; }

    /* Alt çubuk: dil değiştirici + CTA. Panel tam ekran olduğu için bu de
       tam ekran bir katman; içeriği alta hizalı, boşluğu tıklama geçirmez. */
    html.js .tk-header__cta { display: none; }
    html.js .tk-nav.is-open ~ .tk-header__cta {
        display: flex;
        position: fixed;
        inset: 0 auto auto 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        z-index: 2;
        align-items: flex-end;
        gap: 10px;
        padding: 0 var(--tk-gutter) 30px;
        pointer-events: none;
        animation: tkMenuOge .42s var(--tk-ease) .37s both;
    }
    html.js .tk-nav.is-open ~ .tk-header__cta > * { pointer-events: auto; }
    html.js .tk-nav.is-open ~ .tk-header__cta .tk-dil {
        flex: none;
        height: 50px;
        padding: 4px;
        font-size: .74rem;
        background: #fff;
    }
    html.js .tk-nav.is-open ~ .tk-header__cta .tk-dil b,
    html.js .tk-nav.is-open ~ .tk-header__cta .tk-dil span {
        min-width: 38px;
        padding: 12px 2px;
    }
    html.js .tk-nav.is-open ~ .tk-header__cta .tk-btn {
        flex: 1;
        height: 50px;
    }

    /* Menü açıkken başlık çubuğu şeffaflaşır; cam panel tek yüzey olur. */
    html.tk-menu-acik .tk-header {
        background: transparent;
        -webkit-backdrop-filter: none;
                backdrop-filter: none;
        border-bottom-color: transparent;
        box-shadow: none;
    }
    /* Panel açıkken başlık asla gizlenmez (hero sayfası dahil) */
    html.js.tk-menu-acik .tk-header.is-gizli {
        transform: none;
        opacity: 1;
        pointer-events: auto;
    }
}

/* Sayfa kaydırması kilitli */
html.tk-menu-acik { overflow: hidden; }

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

/* --------------------------------------------------------------------------
   8. JS yok — menü ve bağlantılar her koşulda çalışır
   -------------------------------------------------------------------------- */
html:not(.js) .tk-header { position: static; }
html:not(.js) .tk-main { padding-top: 0; }

@media (max-width: 1023px) {
    html:not(.js) .tk-burger { display: none; }
    html:not(.js) .tk-header__inner {
        height: auto;
        flex-wrap: wrap;
        padding-block: 12px;
    }
    html:not(.js) .tk-nav {
        position: static;
        width: 100%;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: none;
        -webkit-backdrop-filter: none;
                backdrop-filter: none;
        padding: 0;
        box-shadow: none;
        max-height: none;
        overflow: visible;
    }
    html:not(.js) .tk-header__cta { display: flex; }
}

/* --------------------------------------------------------------------------
   9. Hareket kısıtı — her şey durur, hiçbir şey kaybolmaz
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .tk-header,
    .tk-header__inner,
    .tk-nav,
    .tk-nav a,
    .tk-nav a::after,
    .tk-nav.is-ind-gecis .tk-nav__ind,
    .tk-dil,
    .tk-dil::before,
    .tk-dil b,
    .tk-dil span,
    .tk-burger {
        transition: none !important;
    }
    .tk-logo:hover .tk-logo__karo,
    .tk-logo:focus-visible .tk-logo__karo,
    html.js .tk-nav.is-open li,
    html.js .tk-nav.is-open ~ .tk-header__cta {
        animation: none !important;
    }
}
