/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 24px;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.nav.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    padding: 16px 24px;
}

.nav.scrolled::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    height: 44px;
}

/* Logo */
.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.2;
    max-width: 300px;
}

.nav.scrolled .nav__logo {
    color: #1e3a5f;
}

.nav__logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.nav.scrolled .nav__logo-img {
    filter: brightness(0) saturate(100%) invert(16%) sepia(45%) saturate(900%) hue-rotate(182deg);
}

/* Nav Links */
.nav__links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav__links a {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.25s ease;
}

.nav__links a:hover::after,
.nav__links a.active::after {
    width: 100%;
}

.nav.scrolled .nav__links a {
    color: var(--color-text);
}

.nav__links a:hover {
    color: var(--color-accent);
}

/* Nav Dropdown */
.nav__dropdown {
    position: relative;
}

.nav__dropdown-trigger {
    background: none;
    border: none;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    transition: color 0.2s ease;
}

.nav__dropdown-trigger:hover {
    color: var(--color-accent);
}

.nav.scrolled .nav__dropdown-trigger {
    color: var(--color-text);
}

.nav.scrolled .nav__dropdown-trigger:hover {
    color: var(--color-accent);
}

.nav__dropdown-arrow {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}



.nav__dropdown-menu {
    position: absolute;
    top: 100%;
    right: -16px;
    padding-top: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
}

.nav__dropdown:hover .nav__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0s;
}

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

.nav__dropdown-menu {
    list-style: none;
}

.nav__dropdown-menu > li {
    margin: 0;
}

.nav__dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 14px;
}

.nav__dropdown-menu > li:first-child {
    border-radius: 10px 10px 0 0;
}

.nav__dropdown-menu > li a::after {
    display: none;
}

.nav__dropdown-menu > li:last-child {
    border-radius: 0 0 10px 10px;
}

.nav__dropdown-menu > li a {
    display: block;
    padding: 14px 28px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.15s ease, color 0.15s ease;
}

.nav__dropdown-menu > li:first-child a {
    border-radius: 10px 10px 0 0;
}

.nav__dropdown-menu > li:last-child a {
    border-radius: 0 0 10px 10px;
}

.nav__dropdown-menu > li a:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.nav__dropdown-menu > li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Scrolled state: glass dropdown (works now — nav blur is on ::before) */
.nav.scrolled .nav__dropdown-menu {
    background: transparent;
    overflow: visible;
}

.nav.scrolled .nav__dropdown-menu::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.15);
    z-index: -1;
}

.nav.scrolled .nav__dropdown-menu > li a {
    color: var(--color-primary);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
}

.nav.scrolled .nav__dropdown-menu > li a:hover {
    background: rgba(59, 125, 216, 0.1);
}

.nav.scrolled .nav__dropdown-menu > li:first-child a,
.nav.scrolled .nav__dropdown-menu > li:last-child a {
    border-radius: 0;
    box-shadow: none;
}

.nav.scrolled .nav__dropdown-menu > li + li {
    border-top: 1px solid rgba(30, 58, 95, 0.08);
}

/* CTA Buttons in Nav */
.nav__cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav__cta .btn {
    padding: 10px 22px;
    font-size: 0.85rem;
}

.nav__cta .btn--outline-white {
    border-color: rgba(255, 255, 255, 0.6);
}

.nav.scrolled .nav__cta .btn--outline-white {
    color: #3b7dd8;
    border-color: #3b7dd8;
}

.nav.scrolled .nav__cta .btn--outline-white:hover {
    background: #3b7dd8;
    color: #fff;
}

/* Phone link in nav */
.nav__phone-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav__phone-link:hover {
    color: #fff;
}

.nav.scrolled .nav__phone-link {
    color: #1e3a5f;
}

.nav.scrolled .nav__phone-link:hover {
    color: #3b7dd8;
}

/* Blue CTA in nav */
.nav__schedule-btn {
    padding: 10px 22px !important;
    font-size: 0.85rem !important;
}

.nav__cta .btn--blue {
    background: #3b7dd8;
    border-color: #3b7dd8;
    color: #fff;
}

.nav__cta .btn--blue:hover {
    background: #2d6bc4;
    border-color: #2d6bc4;
}

.nav.scrolled .nav__cta .btn--blue {
    background: #3b7dd8;
    border-color: #3b7dd8;
    color: #fff;
}

.nav.scrolled .nav__cta .btn--blue:hover {
    background: #2d6bc4;
    border-color: #2d6bc4;
}

/* Hamburger */
.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.nav.scrolled .nav__hamburger span {
    background: var(--color-primary);
}

.nav__hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Drawer */
.nav__drawer {
    display: none;
}

/* ============================================
   RESPONSIVE NAV
   ============================================ */
@media (max-width: 968px) {

    .nav__links,
    .nav__cta {
        display: none;
    }

    .nav__hamburger {
        display: flex;
    }

    /* Shapeshifting: hamburger turns navy when open (over white drawer) */
    .nav__hamburger.open span {
        background: var(--color-primary) !important;
    }

    .nav__drawer {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--color-white);
        padding: 0 24px 32px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.35s ease, opacity 0.35s ease;
        z-index: 999;
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
    }

    .nav__drawer.open {
        transform: translateY(0);
        opacity: 1;
    }

    /* Drawer header — logo */
    .nav__drawer-header {
        display: flex;
        align-items: center;
        padding: 18px 0 16px;
        padding-right: 48px; /* space for hamburger/X */
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        margin-bottom: 8px;
    }

    .nav__drawer-logo {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        color: var(--color-primary);
    }

    .nav__drawer-logo img {
        width: 36px;
        height: 36px;
        filter: brightness(0) saturate(100%) invert(18%) sepia(30%) saturate(1200%) hue-rotate(185deg) brightness(95%);
    }

    .nav__drawer-logo span {
        font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
        font-weight: 700;
        font-size: 0.85rem;
        line-height: 1.2;
        color: var(--color-primary);
    }

    .nav__drawer ul {
        list-style: none;
        margin-bottom: 24px;
    }

    .nav__drawer ul li {
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav__drawer ul a {
        font-family: 'Inter', system-ui, sans-serif;
        font-size: 1.05rem;
        font-weight: 500;
        color: var(--color-text);
        text-decoration: none;
    }

    .nav__drawer ul a:hover {
        color: var(--color-accent);
    }

    .nav__drawer .btn-group {
        flex-direction: column;
    }

    .nav__drawer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Sub-page nav starts dark */
.nav--sub .nav__logo {
    color: var(--color-white);
}

.nav--sub .nav__links a {
    color: rgba(255, 255, 255, 0.85);
}