/* =========================================
   DBT HEADER REFRESH
   Designer Feedback - May 2026
========================================= */

/* -----------------------------------------
   HEADER SHELL
----------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    background: transparent;
    border: 0;
    backdrop-filter: none;

    transition:
        background .3s ease,
        padding .3s ease,
        transform .3s ease;
}

.site-header.scrolled {
    padding-top: 14px;
}

/* -----------------------------------------
   HEADER CONTAINER
----------------------------------------- */

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 32px;

    min-height: 96px;

    transition:
        background .3s ease,
        border-color .3s ease,
        border-radius .3s ease,
        box-shadow .3s ease,
        padding .3s ease;
}

.site-header.scrolled .header-inner {
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(20px);

    border: 1px solid rgba(217, 225, 232, 0.10);

    border-radius: 22px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.28);

    padding-left: 28px;
    padding-right: 28px;

    max-width: 1000px;

    margin-inline: auto;
}

/* -----------------------------------------
   LOGO
----------------------------------------- */

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 44px;
    width: auto;

    transition:
        transform .25s ease,
        opacity .25s ease;
}

.site-header.scrolled .logo img {
    transform: scale(.96);
}

/* -----------------------------------------
   DESKTOP NAVIGATION
----------------------------------------- */

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 28px;

    flex: 1;
}

.nav-group {
    display: flex;
    align-items: center;

    gap: 28px;

    margin-left: auto;
}

.nav-group > a,
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    font-size: 15px;
    line-height: 1;

    cursor: pointer;

    padding: 8px 0;

    color: var(--color-text-secondary);

    transition: all .25s ease;
}

.nav-group > a:hover,
.nav-dropdown-toggle:hover {
    color: var(--color-accent-teal);
}

.nav-dropdown-toggle {
    background: transparent;
    border: none;
    font-family: inherit;
    font-weight: 600;
}

.nav-dropdown {
    position: relative;

    padding: 18px 0;
    margin: -18px 0;
}

/* -----------------------------------------
   DROPDOWNS
----------------------------------------- */

.dropdown-menu {
    position: absolute;

    top: calc(100% - 2px);
    left: -20px;

    min-width: 280px;

    padding: 18px;

    display: none;

    z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: grid;
    gap: 4px;
}

.dropdown-label {
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dropdown-menu a {
    border-radius: 10px;
    line-height: 1.35;
}

/* -----------------------------------------
   ACTIONS
----------------------------------------- */

.nav-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* -----------------------------------------
   MOBILE
----------------------------------------- */

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(217, 225, 232, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--color-text-primary);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 86px;
    left: 4%;
    right: 4%;
    z-index: 999;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.97) !important;
    border: 1px solid rgba(217, 225, 232, 0.12);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
    padding: 22px;
    backdrop-filter: blur(18px);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-inner,
.mobile-nav-section {
    display: grid;
    gap: 12px;
}

.mobile-nav-section {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(217, 225, 232, 0.12);
}

.mobile-nav-label {
    color: var(--color-accent-teal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.mobile-nav a {
    border-bottom: 0 !important;
    color: var(--color-text-secondary) !important;
    font-weight: 700;
}

.mobile-nav-cta {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
    padding: 14px 18px;
    border-radius: 999px;
    background: var(--color-accent-yellow);
    color: #111827 !important;
}

/* -----------------------------------------
   RESPONSIVE
----------------------------------------- */

@media (max-width: 860px) {

    .site-header.scrolled {
        padding-top: 6px;
    }

    .header-inner {
        min-height: 82px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .site-header.scrolled .header-inner {
        padding-left: 18px;
        padding-right: 18px;
        border-radius: 18px;
    }

    .logo img {
        height: 40px;
    }
}

@media (max-width: 520px) {
    .header-inner {
        min-height: 76px;
    }

    .site-header.scrolled .header-inner {
        padding-left: 14px;
        padding-right: 14px;
    }

    .logo img {
        height: 36px;
    }

    .mobile-nav {
        top: 78px;
    }
}

/* =====================================================
   Mobile Header Enforcement
   Ensures desktop navigation never displays on mobile/tablet
===================================================== */

@media (max-width: 980px) {

    .site-header {
        background: rgba(15, 23, 42, 0.94) !important;
        backdrop-filter: blur(18px) !important;
    }

    .site-header .header-inner {
        min-height: 76px;
        gap: 16px;
        padding-left: 0;
        padding-right: 0;
    }

    .site-header .main-nav,
    .site-header .nav-group,
    .site-header .nav-actions {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .site-header .mobile-menu-toggle {
        display: inline-flex !important;
        visibility: visible !important;
        pointer-events: auto !important;
        flex-shrink: 0;
    }

    .site-header .logo img {
        height: 38px;
        max-width: 160px;
    }

    .mobile-nav {
        top: 82px;
        left: 4%;
        right: 4%;
        z-index: 1001;
    }

    .mobile-nav.active {
        display: block !important;
    }
}

@media (max-width: 520px) {

    .site-header .header-inner {
        min-height: 72px;
    }

    .site-header .logo img {
        height: 34px;
        max-width: 145px;
    }

    .mobile-nav {
        top: 76px;
        left: 12px;
        right: 12px;
        max-height: calc(100vh - 92px);
    }
}
