/* ===================================
   NEW NAVIGATION COMPONENT
   =================================== */

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

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-link svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
    opacity: 0.7;
    transition: transform 0.3s;
}

.nav-item:hover .nav-link svg {
    transform: rotate(180deg);
}

.nav-link:hover,
.nav-item:hover .nav-link {
    color: #fff;
}

/* Active Line (Optional, from original design) */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-1);
    transition: width 0.3s var(--ease-out-expo);
}

.nav-item:hover .nav-link::after {
    width: 100%;
}

/* Light Theme overrides */
.light-theme .nav-link {
    color: var(--text-main);
}

.light-theme .nav-link:hover,
.light-theme .nav-item:hover .nav-link {
    color: var(--primary-1);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    /* Sharp/Small radius as per image hint */
    padding: 0.5rem 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s var(--ease-out-expo);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1100;
}

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

.dropdown-item {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.dropdown-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-1);
}

/* Light Theme Dropdown */
.light-theme .dropdown-menu {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.light-theme .dropdown-item {
    color: var(--text-secondary);
}

.light-theme .dropdown-item:hover {
    color: var(--primary-1);
    background: rgba(0, 0, 0, 0.03);
}

/* Nav Actions (Right Side) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-icon-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    /* Matches the rectangular look in image */
    background: rgba(255, 255, 255, 0.05);
    /* Start with subtle bg */
    border: 1px solid transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.light-theme .nav-icon-btn {
    background: #f1f5f9;
    /* Light grey bg as per likely image style */
    color: var(--text-main);
}

.light-theme .nav-icon-btn:hover {
    background: #e2e8f0;
    color: #000;
}

/* Login Button */
.btn-login {
    padding: 0.6rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    /* Match icon btn height */
}

.btn-login:hover {
    background: var(--primary-1);
    color: #fff;
    border-color: var(--primary-1);
}

.light-theme .btn-login {
    color: var(--text-main);
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.05);
}

.light-theme .btn-login:hover {
    background: var(--primary-1);
    color: #fff;
    border-color: var(--primary-1);
}

/* ===================================
   MOBILE NAVIGATION
   =================================== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.8rem;
    z-index: 1200;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
}

.mobile-toggle:hover {
    transform: scale(1.1);
    color: var(--primary-1);
}

body.menu-open {
    overflow: hidden;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1100;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-link {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
    font-family: 'Playfair Display', serif;
    color: #fff;
    text-decoration: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    text-align: center;
    width: 100%;
}

.mobile-menu.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-link:hover {
    color: var(--primary-1);
}

/* Mobile Dropdown Styling */
.mobile-dropdown {
    width: 100%;
}

.mobile-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
}

.mobile-dropdown-header svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: transform 0.3s;
}

.mobile-dropdown.active .mobile-dropdown-header svg {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0;
    opacity: 0;
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 300px;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    opacity: 1;
}

.mobile-sub-link {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
    text-align: center;
}

.mobile-sub-link:hover {
    color: var(--primary-1);
}

.light-theme .mobile-sub-link {
    color: var(--text-secondary);
}

/* Delay for staggered animation of direct children */
.mobile-menu.active>*:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu.active>*:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu.active>*:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu.active>*:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-menu.active>*:nth-child(5) {
    transition-delay: 0.5s;
}

.mobile-menu.active>*:nth-child(6) {
    transition-delay: 0.6s;
}

.mobile-menu.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-dropdown-content a {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-content a {
    opacity: 1;
    transform: translateY(0);
}

/* Light Theme Mobile */
.light-theme .mobile-menu {
    background: rgba(255, 255, 255, 0.98);
}

.light-theme .mobile-nav-link {
    color: var(--text-main);
}

/* ===================================
   COMPREHENSIVE NAVIGATION RESPONSIVE
   =================================== */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .navbar {
        padding: 1.25rem clamp(3rem, 5vw, 8rem) !important;
    }
    
    .nav-center {
        gap: 2.5rem;
    }
}

/* Desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .navbar {
        padding: 1rem clamp(2rem, 4vw, 5rem) !important;
    }
    
    .nav-center {
        gap: 2rem;
    }
}

/* Small Desktop / Large Tablet (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .navbar {
        padding: 1rem 2rem !important;
    }
    
    .nav-center {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.75rem;
    }
}

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

    .mobile-toggle {
        display: flex;
    }

    .nav-actions .nav-icon-btn {
        display: none;
    }

    .nav-actions .btn-login {
        display: flex;
        /* Keep login visible */
    }

    .navbar,
    .navbar.scrolled {
        justify-content: space-between !important;
        padding: 1rem clamp(1rem, 3vw, 1.5rem) !important;
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        max-width: none !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        margin-top: 0 !important;
    }
}

/* Tablet Portrait (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .navbar {
        height: 70px !important;
    }
    
    .nav-logo {
        font-size: 1.3rem;
    }
    
    .btn-login {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }
}

/* Mobile Landscape (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .navbar {
        height: 65px !important;
        padding: 0.875rem 1.25rem !important;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .btn-login {
        padding: 0.6rem 1.1rem;
        font-size: 0.8rem;
    }
}

/* Mobile Portrait (480px - 599px) */
@media (min-width: 480px) and (max-width: 599px) {
    .navbar {
        height: 60px !important;
        padding: 0.75rem 1rem !important;
    }
    
    .nav-logo {
        font-size: 1.15rem;
    }
    
    .btn-login {
        padding: 0.55rem 1rem;
        font-size: 0.75rem;
    }
}

/* Small Mobile (375px - 479px) */
@media (min-width: 375px) and (max-width: 479px) {
    .navbar {
        height: 58px !important;
        padding: 0.7rem 0.875rem !important;
    }
    
    .nav-logo {
        font-size: 1.1rem;
    }
    
    .btn-login {
        padding: 0.5rem 0.875rem;
        font-size: 0.7rem;
    }
    
    .mobile-toggle {
        font-size: 1.3rem;
        padding: 0.4rem;
    }
}

/* Extra Small Mobile (320px - 374px) */
@media (max-width: 374px) {
    .navbar {
        height: 55px !important;
        padding: 0.65rem 0.75rem !important;
    }
    
    .nav-logo {
        font-size: 1rem;
    }
    
    .btn-login {
        padding: 0.45rem 0.75rem;
        font-size: 0.65rem;
    }
    
    .mobile-toggle {
        font-size: 1.2rem;
        padding: 0.3rem;
    }
}