/* Site üst navigasyon */

/* Viewport’a sabit: sayfa kayarken üstte kalır (görünüm aynı) */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.2);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 2rem);
    max-width: 90rem;
    margin: 0 auto;
    padding: 1.5rem 2.5rem;
    min-height: 4.75rem;
}

.site-header__brand {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 0.28rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    width: 11rem;
}

.btn-primary--nav {
    padding: 0.55rem 1.35rem;
    gap: 0;
    flex-shrink: 0;
    text-align: center;
    width: 11rem;
}


.site-header__logo-img {
    display: block;
    height: 7rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.site-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.site-header__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(0.75rem, 2.5vw, 2rem);
    margin: 0;
    padding: 0;
    
}

.site-header__links a {
    display: inline-block;
    padding: 0.35rem 0;
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
    font-weight: 500;
    color: var(--text-on-hero);
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.site-header__links a:hover,
.site-header__links a:focus-visible {
    color: var(--accent-teal);
}

.site-header__links a.is-active {
    color: var(--accent-teal);
    font-weight: 600;
}

/* index’te tam ekran menü (site-header--has-overlay) bu düzeni kullanmaz */
@media (max-width: 768px) {
    .site-header:not(.site-header--has-overlay) .site-header__inner {
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }

    .site-header:not(.site-header--has-overlay) .site-header__nav {
        order: 3;
        flex: 1 1 100%;
    }

    .site-header:not(.site-header--has-overlay) .site-header__links {
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.15rem;
        scrollbar-width: none;
    }

    .site-header:not(.site-header--has-overlay) .site-header__links::-webkit-scrollbar {
        display: none;
    }
}

/* Açık (beyaz) sayfalar — Hizmetlerimiz, Referanslar vb. */
.site-header--light {
    background: #ffffff;
    border-bottom: none;
    box-shadow: none;
}

.site-header--light .site-header__inner {
    border-bottom: none;
    box-shadow: none;
}

.site-header--light .site-header__logo-img {
    filter: none;
}

.site-header--light .site-header__links a {
    color: #1a1a1a;
    font-weight: 600;
}

.site-header--light .site-header__links a:hover,
.site-header--light .site-header__links a:focus-visible {
    color: var(--accent-orange);
}

.site-header--light .site-header__links a.is-active {
    color: var(--accent-orange);
    font-weight: 700;
}

.site-header--light a.btn-primary.btn-primary--nav {
    background: #111111;
    color: #ffffff;
    box-shadow: 0 0.2rem 0.85rem rgba(0, 0, 0, 0.12);
}

.site-header--light a.btn-primary.btn-primary--nav:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}

/* ——— Ana sayfa (index): tablet / mobil tam ekran menü ——— */

/* Menü açıkken üst bar + X her zaman overlay üstünde */
.site-header--has-overlay.is-nav-open {
    transform: none;
    -webkit-transform: none;
}

.site-header--has-overlay.is-nav-open .site-header__brand {
    position: relative;
    z-index: 275;
}

.site-header--has-overlay.is-nav-open .site-header__inner {
    position: relative;
    z-index: 270;
}

.site-header--has-overlay .site-header__menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 280;
    transition: background 0.2s ease;
}

.site-header--has-overlay .site-header__menu-btn:hover,
.site-header--has-overlay .site-header__menu-btn:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.site-header--has-overlay .site-header__menu-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 1.25rem;
}

.site-header--has-overlay .site-header__bar {
    display: block;
    height: 2px;
    width: 100%;
    background: #ffffff;
    border-radius: 1px;
    transition:
        transform 0.25s ease,
        opacity 0.2s ease;
}

.site-header--has-overlay.is-nav-open .site-header__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.site-header--has-overlay.is-nav-open .site-header__bar:nth-child(2) {
    opacity: 0;
}

.site-header--has-overlay.is-nav-open .site-header__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.site-header--has-overlay .site-header__nav-cta {
    display: none;
}

@media (min-width: 1025px) {
    .site-header--has-overlay .site-header__nav {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .site-header--has-overlay .site-header__nav .site-header__links {
        margin: 0;
    }
}

@media (max-width: 1024px) {
    .site-header--has-overlay .site-header__inner {
        flex-wrap: nowrap;
        align-items: center;
        padding: 1rem 1.15rem;
        gap: 0.75rem;
    }

    .site-header--has-overlay .site-header__brand {
        width: auto;
        max-width: min(11rem, 52vw);
    }

    .site-header--has-overlay .site-header__logo-img {
        height: clamp(4rem, 12vw, 5.5rem);
    }

    .site-header--has-overlay .site-header__menu-btn {
        display: inline-flex;
        margin-left: auto;
    }

    .site-header--has-overlay .site-header__cta-desktop {
        display: none;
    }

    .site-header--has-overlay .site-header__nav {
        position: fixed;
        inset: 0;
        z-index: 250;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        padding-top: max(5.5rem, calc(env(safe-area-inset-top, 0px) + 4.25rem));
        padding-right: clamp(1.15rem, 4vw, 1.75rem);
        padding-bottom: max(2rem, calc(env(safe-area-inset-bottom, 0px) + 1.25rem));
        padding-left: clamp(1.15rem, 4vw, 1.75rem);
        margin: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        background: rgba(8, 10, 14, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.28s ease,
            visibility 0.28s ease;
    }

    .site-header--has-overlay.is-nav-open .site-header__nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .site-header--has-overlay .site-header__links {
        flex: 1 1 auto;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        align-self: stretch;
        gap: clamp(0.65rem, 2.2vh, 1.1rem);
        width: 100%;
        max-width: 24rem;
        margin: 0 auto;
        min-height: 0;
        overflow: visible;
    }

    /* Overlay koyu zemin — .site-header--light masaüstü siyah linkleri burada ezmesin */
    .site-header--has-overlay .site-header__nav .site-header__links a {
        color: rgba(255, 255, 255, 0.96);
        font-size: clamp(1.05rem, 2.8vw, 1.2rem);
        font-weight: 600;
        padding: 0.55rem 0.5rem;
        flex-shrink: 0;
    }

    .site-header--has-overlay .site-header__nav .site-header__links a:hover,
    .site-header--has-overlay .site-header__nav .site-header__links a:focus-visible {
        color: var(--accent-teal);
    }

    .site-header--has-overlay .site-header__nav .site-header__links a.is-active {
        color: #ffffff;
        font-weight: 700;
        text-decoration: underline;
        text-underline-offset: 0.35em;
        text-decoration-thickness: 2px;
    }

    .site-header--has-overlay .site-header__nav-cta {
        display: inline-flex;
        flex-shrink: 0;
        align-self: center;
        width: min(100%, 20rem);
        max-width: 100%;
        justify-content: center;
        margin-top: clamp(1rem, 3vh, 1.75rem);
        box-sizing: border-box;
    }

    /* Beyaz header: hamburger koyu çizgi; overlay içi CTA turuncu */
    .site-header--light.site-header--has-overlay .site-header__menu-btn {
        background: rgba(0, 0, 0, 0.06);
    }

    .site-header--light.site-header--has-overlay .site-header__menu-btn:hover,
    .site-header--light.site-header--has-overlay .site-header__menu-btn:focus-visible {
        background: rgba(0, 0, 0, 0.11);
    }

    .site-header--light.site-header--has-overlay .site-header__bar {
        background: #1a1a1a;
    }

    .site-header--has-overlay .site-header__nav-cta.btn-primary--nav {
        background: var(--accent-orange);
        color: #ffffff;
        box-shadow: 0 0.25rem 1rem rgba(245, 124, 0, 0.28);
    }

    .site-header--has-overlay .site-header__nav-cta.btn-primary--nav:hover {
        background: var(--accent-orange-dark);
        color: #ffffff;
    }
}
