/* ==================== HEADER & NAVIGATION ==================== */
.header {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 100;
    padding: 18px 0;
    background: rgba(6, 7, 9, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateZ(0);
    will-change: transform, background-color, box-shadow, padding;
    backface-visibility: hidden;
    transition: padding 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.header.scrolled {
    padding: 12px 0;
    background: rgba(6, 7, 9, 0.92);
    border-bottom-color: var(--line-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.header .container.header-centered-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
    transition: var(--transition);
}

.header-center-logo {
    justify-self: center;
}

.logo-img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(229, 183, 87, 0.35));
    transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
    will-change: transform;
}

.header.scrolled .logo-img {
    transform: scale(0.88);
}

.logo:hover .logo-img {
    transform: rotate(5deg) scale(1.08);
    filter: drop-shadow(0 8px 20px rgba(229, 183, 87, 0.5));
}

.logo b {
    color: var(--gold);
    font-weight: 900;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-group-start {
    justify-self: end;
}

.nav-group-end {
    justify-self: end;
}

.nav-group-end-wrapper {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-group a,
.mobile-navbar a {
    position: relative;
    padding: 6px 14px;
    margin: -6px -4px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dashboard-btn,
.popover-dashboard-btn {
    display: none;
}

.nav-group a::after {
    content: '';
    position: absolute;
    inset-inline: 14px;
    bottom: 0px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transition: transform 0.25s var(--ease);
}

.nav-group a:hover,
.nav-group a.active {
    color: var(--gold-light);
    background: var(--gold-wash);
}

.nav-group a:hover::after,
.nav-group a.active::after {
    transform: scaleX(1);
}

.mobile-navbar {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Header Buttons & Badges */
.header-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.header-btn:hover {
    background: var(--gold-wash);
    border-color: var(--line-gold);
    color: var(--gold-light);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 20px rgba(229, 183, 87, 0.2), 0 0 15px rgba(229, 183, 87, 0.15);
}

.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    font-size: 16px;
    transition: var(--transition);
}

.hamburger-btn:hover {
    background: var(--gold-wash);
    border-color: var(--line-gold);
    color: var(--gold-light);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(229, 183, 87, 0.25);
}

@media (max-width: 992px) {
    .nav-group-end-wrapper {
        width: auto;
        justify-self: auto;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 12px 0;
    }

    .header .container.header-centered-layout {
        gap: 8px;
        padding-inline: 14px;
        min-width: 0;
        min-height: 44px;
    }

    .header-center-logo {
        min-width: 0;
        max-width: calc(100vw - 174px);
        gap: 6px;
        font-size: clamp(16px, 4.8vw, 20px);
        overflow: hidden;
        line-height: 1;
    }

    .header-center-logo > span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo-img {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .header-actions {
        gap: 6px;
    }

    .header-actions .header-btn,
    .header-actions .hamburger-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        flex: 0 0 40px;
        line-height: 1;
    }

}

@media (max-width: 380px) {
    .header .container.header-centered-layout {
        padding-inline: 10px;
        gap: 5px;
    }

    .header-center-logo {
        max-width: calc(100vw - 158px);
        font-size: 16px;
    }

    .logo-img {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .header-actions {
        gap: 4px;
    }

    .header-actions .header-btn,
    .header-actions .hamburger-btn {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
}
