/* ========== NAVBAR REDESIGN ========== */
:root {
    /* Variables from archive-car.css that navbar.css depends on */
    --primary-blue: #003366;
    --primary-black: #000000;
    --white: #ffffff;
    --light-gray: #f5f7fa;
    --medium-gray: #e0e6ed;
    --dark-gray: #666666;
    --available-green: #00C853;
    --unavailable-red: #FF3B30;
    --featured-gold: #FFD700;
    --shadow-sm: 0 2px 8px rgba(0, 51, 102, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 51, 102, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 51, 102, 0.16);
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Navbar-specific variables */
    --navbar-height: 80px;
    --navbar-height-scrolled: 60px;
    --navbar-bg: rgba(255, 255, 255, 0.98);
    --navbar-shadow: 0 2px 20px rgba(0, 51, 102, 0.08);
    --navbar-border: #e0e6ed;
}

/* Add pulse animation that navbar.css uses but doesn't define */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--navbar-border);
}

.site-header.scrolled {
    height: var(--navbar-height-scrolled);
    box-shadow: var(--navbar-shadow);
    background: rgba(255, 255, 255, 0.98);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Logo */
.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.site-header.scrolled .logo-icon {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
}

.logo-icon i {
    transition: transform 0.5s ease;
}

.site-logo:hover .logo-icon i {
    transform: rotate(-10deg);
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-black);
    margin: 0;
    transition: font-size 0.3s ease;
}

.site-header.scrolled .site-title {
    font-size: 1.3rem;
}

.logo-tagline {
    font-size: 0.8rem;
    color: var(--dark-gray);
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.site-logo:hover .logo-tagline {
    opacity: 1;
    max-width: 200px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--primary-black);
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-item.current-menu-item .nav-link::after {
    width: 100%;
}

.nav-link i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown .nav-link i:last-child {
    font-size: 0.7rem;
    margin-left: 4px;
}

.nav-item.has-dropdown:hover .nav-link i:last-child {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid var(--navbar-border);
    padding: 10px 0;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--primary-black);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: rgba(0, 51, 102, 0.05);
    color: var(--primary-blue);
    padding-left: 25px;
}

.dropdown-divider {
    height: 1px;
    background: var(--navbar-border);
    margin: 8px 0;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-icons {
    display: flex;
    gap: 20px;
}

.action-icon {
    position: relative;
    background: none;
    border: none;
    color: var(--primary-black);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon:hover {
    color: var(--primary-blue);
    background: rgba(0, 51, 102, 0.05);
    transform: translateY(-2px);
}

.action-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--unavailable-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: pulse 2s infinite;
}

/* CTA Button */
.nav-cta {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-cta:hover {
    background: #002244;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.2);
}

.nav-cta i {
    font-size: 0.9rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-black);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: var(--primary-blue);
    background: rgba(0, 51, 102, 0.05);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--navbar-border);
    z-index: 999;
    padding: 10px 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--dark-gray);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.bottom-nav-link.active,
.bottom-nav-link:hover {
    color: var(--primary-blue);
    background: rgba(0, 51, 102, 0.05);
}

.bottom-nav-icon {
    font-size: 1.2rem;
}

.bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: 20px;
    background: var(--unavailable-red);
    color: white;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .main-nav {
        gap: 20px;
    }
    
    .nav-menu {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    /* Hide main nav completely on mobile */
    .main-nav {
        display: none !important;
    }

    /* Keep only the toggle */
    .mobile-menu-toggle {
        display: block;
    }

    /* Remove bottom navigation entirely */
    .mobile-bottom-nav {
        display: none !important;
    }

    /* Undo body padding that was compensating for bottom nav */
    body {
        padding-bottom: 0;
    }
}

@media (max-width: 480px) {
    .site-header .container {
        padding: 0 15px;
    }
    
    .logo-tagline {
        display: none;
    }
    
    .site-title {
        font-size: 1.3rem;
    }
    
    .main-nav {
        width: 100%;
        padding: 20px;
    }
    
    .mobile-bottom-nav {
        padding: 8px 0;
    }
    
    .bottom-nav-link {
        font-size: 0.7rem;
        padding: 6px;
    }
    
    .bottom-nav-icon {
        font-size: 1.1rem;
    }
}

/* ========== DARK MODE ========== */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #121212;
        --light-gray: #1e1e1e;
        --medium-gray: #2d2d2d;
        --dark-gray: #b0b0b0;
        --primary-black: #ffffff;
    }
    
    .site-header {
        background: rgba(26, 26, 26, 0.98);
        border-bottom-color: #333;
    }
    
    .site-header.scrolled {
        background: rgba(26, 26, 26, 0.98);
    }
    
    .site-title {
        color: var(--white);
    }
    
    .logo-tagline {
        color: #b0b0b0;
    }
    
    .nav-link {
        color: var(--white);
    }
    
    .dropdown-menu {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .dropdown-item {
        color: var(--white);
    }
    
    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .dropdown-divider {
        background: #444;
    }
    
    .action-icon {
        color: var(--white);
    }
    
    .mobile-bottom-nav {
        background: #1a1a1a;
        border-top-color: #333;
    }
    
    .bottom-nav-link {
        color: #b0b0b0;
    }
    
    .bottom-nav-link.active,
    .bottom-nav-link:hover {
        color: var(--white);
        background: rgba(255, 255, 255, 0.05);
    }
}