/* ========================================== */
/* NAVBAR.CSS                                 */
/* ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    padding: 0;
    transition: var(--transition-base);
    border-bottom: 1px solid transparent;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

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

.nav-logo {
    height: 36px;
    width: auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 8px;
}

.nav-title {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link svg {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-link:hover svg,
.nav-link.active svg {
    opacity: 1;
}

.nav-link.nav-cta {
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 600;
}

.nav-link.nav-cta:hover {
    background: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.nav-link.nav-cta svg {
    opacity: 1;
}

/* ========================================== */
/* HAMBURGER - Long top, short bottom         */
/* ========================================== */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1002;
    position: relative;
    background: none;
    border: none;
}

.hamburger-line {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
    transform-origin: center;
}

.hamburger-line:nth-child(1) { width: 24px; }
.hamburger-line:nth-child(2) { width: 14px; margin-left: auto; }
.hamburger-line:nth-child(3) { width: 24px; }

.nav-hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    width: 24px;
}
.nav-hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    width: 24px;
}

/* ========================================== */
/* MOBILE SIDEBAR - BELOW NAVBAR, FULL BLUR   */
/* ========================================== */

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

    .nav-menu {
        position: fixed;
        top: 64px;
        right: -100%;
        width: 280px;
        height: calc(100dvh - 64px);
        min-height: calc(100vh - 64px);
        background: rgba(6, 6, 6, 0.75);
        backdrop-filter: blur(60px) saturate(1.4);
        -webkit-backdrop-filter: blur(60px) saturate(1.4);
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        gap: 2px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid rgba(255,255,255,0.08);
        border-top: 1px solid rgba(255,255,255,0.06);
        overflow-y: auto;
        z-index: 999;
        box-shadow: -16px 0 60px rgba(0,0,0,0.8), inset 1px 0 0 rgba(255,255,255,0.04);
    }

    .nav-menu.active { right: 0; }

    .nav-item {
        width: 100%;
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .nav-menu.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active .nav-item:nth-child(1) { transition-delay: 0.08s; }
    .nav-menu.active .nav-item:nth-child(2) { transition-delay: 0.16s; }
    .nav-menu.active .nav-item:nth-child(3) { transition-delay: 0.24s; }
    .nav-menu.active .nav-item:nth-child(4) { transition-delay: 0.32s; }
    .nav-menu.active .nav-item:nth-child(5) { transition-delay: 0.40s; }

    .nav-link {
        width: 100%;
        padding: 14px 16px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: var(--radius-md);
    }

    .nav-link.nav-cta {
        margin-top: 12px;
        justify-content: center;
    }

    .nav-has-submenu { position: relative; }
    .nav-link-parent { justify-content: space-between; }
    .nav-arrow {
        transition: transform 0.3s ease;
        opacity: 0.5;
    }
    .nav-submenu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding-left: 16px;
        width: 100%;
    }
    .nav-has-submenu.open .nav-submenu { max-height: 200px; }
    .nav-has-submenu.open .nav-arrow { transform: rotate(180deg); }

    .nav-sublink {
        display: block;
        padding: 10px 16px;
        font-family: var(--font-heading);
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-muted);
        border-radius: var(--radius-sm);
        transition: var(--transition-fast);
        margin: 2px 0;
    }
    .nav-sublink:hover {
        color: var(--text-primary);
        background: rgba(255, 255, 255, 0.03);
    }

    /* Overlay */
    .nav-overlay {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        height: calc(100vh - 64px);
        height: calc(100dvh - 64px);
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

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