/* ══════════════════════════════════════════════════════
   Navbar — Floating pill style
   ══════════════════════════════════════════════════════ */

.nav {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.45rem 0.45rem 1rem;
    gap: 0.15rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
    max-width: calc(100vw - 2rem);
    width: max-content;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    color: #18181b;
}

/* ── Scrolled state ── */
.nav.scrolled {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
    color: #18181b;
}

/* ── Brand / Logo ── */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    margin-right: 0;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.3s;
}

.nav-brand:hover {
    opacity: 0.8;
}

.nav-brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(39, 174, 96, 0.3);
    transition: border-color 0.3s;
}

.nav-brand:hover .nav-brand-logo {
    border-color: rgba(39, 174, 96, 0.7);
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.nav-brand-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: inherit;
}

.nav-brand-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #27ae60;
    margin-top: 1px;
}

/* ── Separator ── */
.nav-sep {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.12);
    margin: 0 0.4rem;
    flex-shrink: 0;
}

/* ── Desktop links ── */
.nav-desktop-links {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-right: 0.3rem;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.65);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border-radius: 100px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    color: #18181b;
    background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.08);
    font-weight: 600;
}

/* ── Dropdown ── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.nav-dropdown-chevron {
    width: 12px;
    height: 12px;
    transition: transform 0.25s;
    opacity: 0.5;
}

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

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 200px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 110;
}

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

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.65);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-dropdown-item i {
    font-size: 0.8rem;
    width: 1rem;
    text-align: center;
    color: #27ae60;
    opacity: 0.6;
}

.nav-dropdown-item:hover {
    background: rgba(39, 174, 96, 0.06);
    color: #18181b;
}

.nav-dropdown-item:hover i {
    opacity: 1;
}

.nav-dropdown-item.active {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    font-weight: 600;
}

.nav-dropdown-item.active i {
    opacity: 1;
}

/* ── CTA Button ── */
.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.2rem;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2ecc71, #27ae60, #219a52);
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
                0 2px 12px rgba(39, 174, 96, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-nav:hover {
    background: linear-gradient(135deg, #27ae60, #219a52, #1e8449);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
                0 4px 20px rgba(39, 174, 96, 0.4);
    transform: translateY(-1px);
}

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

.btn-nav svg {
    width: 16px;
    height: 16px;
}

/* ── Auth links (desktop) ── */
.nav-auth-links {
    display: flex;
    align-items: center;
    gap: 0;
    margin-right: 0.2rem;
}

.nav-auth-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.55);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 100px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-auth-link:hover {
    color: #18181b;
    background: rgba(0, 0, 0, 0.04);
}

/* ── Hamburger button ── */
.nav-burger {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 101;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #27ae60;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-burger:hover {
    box-shadow: 0 4px 24px rgba(39, 174, 96, 0.5);
    transform: scale(1.05);
}

.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-burger span::before,
.nav-burger span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
}

.nav-burger span::before {
    top: -6px;
}

.nav-burger span::after {
    top: 6px;
}

/* Burger open state */
.nav-burger.open span {
    background: transparent;
}

.nav-burger.open span::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-burger.open span::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ── Mobile overlay ── */
.nav-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Mobile drawer (bottom sheet) ── */
.nav-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: #fafaf9;
    border-radius: 28px 28px 0 0;
    padding: 1.5rem 1.5rem 2.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.15);
    max-height: 85vh;
    overflow-y: auto;
}

.nav-mobile.open {
    transform: translateY(0);
}

/* Handle bar */
.nav-mobile-handle {
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 100px;
    margin: 0 auto 1.5rem;
}

/* Mobile navigation links */
.nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.nav-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #18181b;
    text-decoration: none;
    transition: all 0.25s;
}

.nav-mobile-link:hover,
.nav-mobile-link.active {
    background: rgba(39, 174, 96, 0.06);
    color: #27ae60;
}

.nav-mobile-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(39, 174, 96, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-mobile-link-icon svg {
    width: 18px;
    height: 18px;
    color: #27ae60;
}

.nav-mobile-link.active .nav-mobile-link-icon {
    background: #27ae60;
}

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

/* Mobile divider */
.nav-mobile-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 0.5rem 0;
}

/* Mobile section label */
.nav-mobile-section {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(0, 0, 0, 0.35);
    padding: 0.5rem 1rem 0.25rem;
}

/* Mobile CTA */
.nav-mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2ecc71, #27ae60, #219a52);
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.3);
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.nav-mobile-cta:hover {
    box-shadow: 0 4px 24px rgba(39, 174, 96, 0.45);
}

.nav-mobile-cta svg {
    width: 18px;
    height: 18px;
}

/* ── Spacer ── */
.nav-spacer {
    height: 5.5rem;
}

/* ══════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .nav-burger {
        display: inline-flex;
    }

    /* Show a minimal fixed top bar on mobile */
    .nav-mobile-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 97;
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }


    .nav-mobile-topbar .nav-brand-logo {
        width: 40px;
        height: 40px;
    }

    .nav-mobile-topbar .nav-brand-name {
        font-size: 0.9rem;
    }

    .nav-spacer {
        height: 4.5rem;
    }
}

@media (min-width: 769px) {
    .nav-mobile-topbar {
        display: none;
    }
}
