
/* ═══════════════════════════════════════════════════════
       HAMBURGER + MOBILE/TABLET NAV
    ═══════════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    gap: 0;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
    z-index: 210;
    border-radius: 10px;
    transition: background 0.2s;
}

.nav-hamburger:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* The 3 bars */
.hb-bar {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    transition: transform 0.38s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.2s ease,
        width 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.hb-bar:nth-child(1) {
    transform: translateY(-7px);
}

.hb-bar:nth-child(2) {
    transform: translateY(0);
}

.hb-bar:nth-child(3) {
    transform: translateY(7px);
    width: 14px;
}

/* Open state — morphs to X */
.nav-hamburger.open .hb-bar:nth-child(1) {
    transform: translateY(0) rotate(45deg);
}

.nav-hamburger.open .hb-bar:nth-child(2) {
    opacity: 0;
    transform: translateX(6px);
}

.nav-hamburger.open .hb-bar:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
    width: 22px;
}

/* ═══════ MOBILE MENU — CLEAN ═══════ */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 190;
}

.mobile-menu.open {
    display: block;
}

.mob-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 14, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: mobFadeIn 0.28s ease both;
}

@keyframes mobFadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.mob-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #08090F;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    animation: mobSlideDown 0.38s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes mobSlideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.mob-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mob-x {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.mob-x:hover {
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
}

.mob-nav-links {
    display: flex;
    flex-direction: column;
}

.mob-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 24px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.15s, background 0.15s;
}

.mob-nav-link:last-child {
    border-bottom: none;
}

.mob-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.mob-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.mob-nav-link svg {
    opacity: 0.25;
    flex-shrink: 0;
}

.mob-nav-btns {
    padding: 16px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mob-btn-g {
    padding: 13px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.mob-btn-g:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.mob-btn-s {
    padding: 13px;
    background: var(--blue);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
}

.mob-btn-s:hover {
    background: var(--blue-bright);
}

/* ── RESPONSIVE — show hamburger, hide desktop nav ── */
@media (max-width: 900px) {
    nav {
        padding: 0 24px;
    }

    .nav-center {
        display: none !important;
    }

    .nav-right {
        display: none !important;
    }

    .nav-hamburger {
        display: flex !important;
    }
}

/* ═══════════════════════════════════════
   NAV
═══════════════════════════════════════ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 0 52px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Start fully transparent at top */
    background: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    /* Smooth transition on ALL properties — like Pitch */
    transition:
        height 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        background 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        backdrop-filter 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        padding 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Scrolled state — added via JS */
nav.scrolled {
    height: 64px;
    background: rgba(6, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Nav logo animation */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.85;
}

/* Nav logo img scales slightly on scroll */
.nav-logo img {
    transition: height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    height: 38px;
}

nav.scrolled .nav-logo img {
    height: 32px;
}

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

.nav-link {
    padding: 7px 15px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
    letter-spacing: -0.15px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 15px;
    right: 15px;
    height: 1.5px;
    border-radius: 1px;
    background: #fff;
    transform: scaleX(0);
    transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: left center;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.active {
    color: #fff;
}

.nav-link.active::after {
    transform: scaleX(1);
    background: var(--blue-bright);
}

.nav-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-ghost {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    letter-spacing: -0.15px;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-1px);
}

.btn-solid {
    padding: 8px 20px;
    background: var(--blue);
    border: none;
    border-radius: 9px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.15px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
}

.btn-solid:hover {
    background: var(--blue-bright);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45);
}

.btn-solid:active {
    transform: translateY(0);
}

/* Nav link entrance animation on page load */
@keyframes navFadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav .nav-logo {
    animation: navFadeDown 0.5s 0.0s ease both;
}

nav .nav-center {
    animation: navFadeDown 0.5s 0.08s ease both;
}

nav .nav-right {
    animation: navFadeDown 0.5s 0.16s ease both;
}


/* ═══════════════════════════════════════
   MOBILE
═══════════════════════════════════════ */
@media (max-width: 768px) {
    nav {
        padding: 0 20px;
    }

    .nav-center {
        display: none;
    }
}

/* ═══════════════════════════════════════
   MOB-PANEL FIX (mob-nav-row removed)
═══════════════════════════════════════ */
.mob-panel {
    padding-top: 76px; /* account for fixed nav bar height */
}

/* Ensure anchor tags in mob-nav-btns look like buttons */
a.mob-btn-g,
a.mob-btn-s {
    cursor: pointer;
    display: block;
    text-align: center;
}

/* ═══════════════════════════════════════
   DROPDOWN & ACCORDION CUSTOM STYLING
═══════════════════════════════════════ */

/* Desktop Dropdown Menu */
.nav-dropdown-wrapper {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chevron-icon {
    transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0.7;
}

.nav-dropdown-wrapper:hover .chevron-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(8, 9, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(4px);
}

.nav-dropdown-menu a {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
    letter-spacing: -0.15px;
}

.nav-dropdown-menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Mobile sub-menu accordion styling */
.mob-nav-dropdown-wrapper {
    display: flex;
    flex-direction: column;
}

.mob-nav-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
}

.mob-nav-link-main {
    flex: 1;
    padding: 17px 24px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.2px;
    transition: color 0.15s, background 0.15s;
}

.mob-nav-link-main:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.mob-dropdown-toggle {
    width: 54px;
    height: 54px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.mob-dropdown-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.mob-dropdown-toggle svg {
    transition: transform 0.2s ease;
}

.mob-dropdown-toggle.active svg {
    transform: rotate(180deg);
}

.mob-dropdown-submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
    transition: max-height 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.mob-dropdown-submenu.open {
    max-height: 180px; /* enough to cover 3 items */
}

.mob-submenu-link {
    display: block;
    padding: 12px 24px 12px 40px;
    font-size: 14.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: color 0.15s, background 0.15s;
}

.mob-submenu-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.mob-submenu-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.07);
    font-weight: 700;
}

.nav-dropdown-menu a.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 600;
}
