/* Site Header Styles */

:root {
    --h-height: 5rem;
    --h-easing: cubic-bezier(0.16, 1, 0.3, 1);
    --h-glass-bg: rgba(0, 0, 0, 0.4);
    --h-glass-blur: saturate(180%) blur(20px);
    --h-border: 1px solid rgba(255, 255, 255, 0.1);
    --h-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ─── Base Header ──────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 99999;
    height: var(--h-height);
    display: flex;
    align-items: center;
    transition: transform 0.6s var(--h-easing), opacity 0.5s ease;
    will-change: transform, opacity;
    pointer-events: none;
}

.site-header.header-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

/* ─── Header Container (Glass Pill) ────────────────────────────── */
.header-container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    pointer-events: auto;

    background: var(--h-glass-bg);
    backdrop-filter: var(--h-glass-blur);
    -webkit-backdrop-filter: var(--h-glass-blur);
    border: var(--h-border);
    box-shadow: var(--h-shadow);
    border-radius: 0 0 25px 25px;

    backface-visibility: hidden;
    will-change: max-width, padding, border-radius;
    transform: translate3d(0,0,0);

    transition:
        max-width 0.6s var(--h-easing),
        margin 0.5s var(--h-easing) 0.3s,
        padding 0.5s var(--h-easing) 0.3s,
        border-radius 0.5s var(--h-easing) 0.3s,
        background-color 0.5s ease,
        backdrop-filter 0.5s ease;
}

/* State: Sayfanın en üstünde (Şeffaf) */
.site-header.at-top .header-container {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* State: Scroll edildi (Pill formu) */
.site-header.scrolled .header-container {
    max-width: 900px;
    padding: 0.8rem 2.5rem;
    border-radius: 100px;
    margin-top: 15px;

    transition:
        margin 0.3s var(--h-easing),
        padding 0.3s var(--h-easing),
        border-radius 0.3s var(--h-easing),
        max-width 0.4s var(--h-easing) 0.1s;
}

/* Modal açıkken header pill formunu koru */
body.nav-open .site-header .header-container,
body.modal-open .site-header .header-container {
    background: var(--h-glass-bg);
    backdrop-filter: var(--h-glass-blur);
    -webkit-backdrop-filter: var(--h-glass-blur);
    border: var(--h-border);
    box-shadow: var(--h-shadow);
    border-radius: 100px;
    max-width: 900px;
    padding: 0.8rem 2.5rem;
    margin-top: 15px;
    opacity: 1 !important;
    pointer-events: auto;
}

.site-header.modal-active .header-container {
    background: var(--h-glass-bg);
    backdrop-filter: var(--h-glass-blur);
    -webkit-backdrop-filter: var(--h-glass-blur);
    border: var(--h-border);
    box-shadow: var(--h-shadow);
    border-radius: 100px;
    max-width: 900px;
    padding: 0.8rem 2.5rem;
    margin-top: 15px;
    opacity: 1 !important;
    pointer-events: auto;
}

body.nav-open .site-header .header-logo,
body.modal-open .site-header .header-logo {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    text-shadow: none;
}

.site-header.modal-active .header-logo {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    text-shadow: none;
    transition: font-size 0.5s var(--h-easing), letter-spacing 0.5s var(--h-easing);
}

/* Body kilitleme - sadece overflow, position JS yönetir */
body.nav-open,
body.modal-open {
    overflow: hidden !important;
}

/* ─── Header Logo ───────────────────────────────────────────────── */
.header-logo {
    font-family: 'Chillax', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 0.22em;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    transition:
        font-size 0.6s var(--h-easing) 0.3s,
        letter-spacing 0.6s var(--h-easing) 0.3s,
        text-shadow 0.6s ease 0.3s;
    backface-visibility: hidden;
}

.site-header.scrolled .header-logo {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    text-shadow: none;
}

/* Logo Image Styling */
.site-logo {
    display: block;
    object-fit: contain;
    height: auto;
    width: auto;
    max-width: 160px;
    max-height: 60px;
    transition: max-width 0.6s var(--h-easing) 0.3s, max-height 0.6s var(--h-easing) 0.3s;
}

.site-header.scrolled .site-logo {
    max-width: 120px;
    max-height: 45px;
}

/* ─── Hamburger (Sadece Mobil) ──────────────────────────────────── */
.header-left {
    position: absolute;
    left: 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
}

@media (min-width: 769px) {
    .header-left { display: none; }
}

.menu-hamburger {
    background: transparent;
    border: none;
    padding: 0;
    color: #fff;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.menu-hamburger:hover { transform: scale(1.1); opacity: 0.8; }

.menu-toggle-icon {
    width: 30px;
    height: 30px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-hamburger.open .menu-toggle-icon {
    transform: rotate(-45deg);
}

.menu-path {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-dasharray: 12 63;
}

.menu-hamburger.open .menu-path {
    stroke-dasharray: 20 300;
    stroke-dashoffset: -32.42px;
}

/* ─── Profile / Actions ─────────────────────────────────────────── */
.header-actions {
    position: absolute;
    right: 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
}

.profile-trigger {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.profile-initials,
.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s var(--h-easing);
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-initials {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(4px);
    font-family: 'Chillax', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    line-height: 1;
    padding: 0;
}

.profile-avatar {
    object-fit: cover;
    padding: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.site-header.scrolled .profile-initials,
.site-header.scrolled .profile-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    border-width: 1.5px;
}

.profile-trigger:hover .profile-initials,
.profile-trigger:hover .profile-avatar {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 8px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.profile-trigger:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* ─── Mobile Overrides ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .site-header {
        height: 3.5rem;
        padding: 0 10px;
    }

    .header-logo {
        font-size: 1.5rem;
        letter-spacing: 0.12em;
    }

    .site-header.scrolled .header-logo {
        font-size: 1.1rem;
    }

    .header-container {
        padding: 0.5rem 1rem;
        border-radius: 12px;
        transform: translate3d(0,0,0);
    }

    .header-actions {
        right: 1rem;
    }

    .site-header.scrolled .header-container {
        max-width: calc(100% - 32px);
        margin-top: 8px;
        padding: 0.5rem 1rem;
        border-radius: 16px;
    }

    .site-header.scrolled .header-logo {
        font-size: 1.1rem;
    }

    body.nav-open .site-header .header-container,
    body.modal-open .site-header .header-container {
        max-width: calc(100% - 32px);
        margin-top: 8px;
        padding: 0.5rem 1rem;
        border-radius: 16px;
    }

    .profile-trigger svg {
        width: 18px;
        height: 18px;
    }
}

/* ─── Navigation Modal ──────────────────────────────────────────── */
.ozkuy-modal.luxury-nav {
    z-index: 99998;
}

.luxury-nav-content {
    margin-top: 100px;
    max-width: 800px;
}

.luxury-nav-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 20px;
}

.luxury-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.luxury-menu-list li {
    margin-bottom: 10px;
}

.luxury-menu-list li a {
    font-family: 'Chillax', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: block;
    transition: all 0.4s var(--h-easing);
    opacity: 0.8;
    -webkit-tap-highlight-color: transparent;
}

.luxury-menu-list li a:hover {
    opacity: 1;
    transform: translateX(10px);
}

.luxury-action-grid {
    display: grid;
    gap: 15px;
}

.luxury-action-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 16px;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.luxury-action-item:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

.luxury-action-item strong {
    font-size: 1.1rem;
    font-family: 'Chillax', sans-serif;
}

.luxury-action-item span {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .luxury-nav-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .luxury-menu-list li a {
        font-size: 1.8rem;
    }

    .luxury-nav-content {
        margin-top: 60px;
    }
}