/* Navigation Styles */

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
}

/* Logo */
.logo a {
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-white, white);
    white-space: nowrap;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.nav-menu li {
    position: relative;
}

.nav-link {
    color: var(--color-white, white);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Coming Soon Badge */
.coming-soon-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--color-warning, #f39c12);
    color: var(--color-black, #000);
    border-radius: 4px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    background: var(--bg-container, white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 1000;
    border: 1px solid var(--border-color-light, #ddd);
    list-style: none;
    padding: 8px 0;
    margin-left: 0;
    /* Add invisible bridge to prevent menu collapse */
    padding-top: 8px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* Create invisible area above dropdown to maintain hover */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--text-primary, #333);
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--bg-section, #f8f9fa);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 8px 16px;
    margin-left: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-menu-btn.active {
    background: rgba(255, 255, 255, 0.3);
}

.menu-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* Legacy hamburger line styles (no longer used, kept for backwards compatibility) */
.hamburger-line {
    display: none;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-navigation {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: var(--bg-container, white);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-overlay.active .mobile-navigation {
    transform: translateX(0);
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 60px 0 20px 0;
}

.mobile-nav-menu li {
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: 15px 25px;
    color: var(--text-primary, #333);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color-light, #eee);
    transition: background 0.2s ease;
}

.mobile-nav-link:hover {
    background: var(--bg-section, #f8f9fa);
}

/* Mobile Dropdown */
.mobile-dropdown {
    border-bottom: 1px solid var(--border-color-light, #eee);
}

.mobile-dropdown-toggle {
    width: 100%;
    padding: 15px 25px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary, #333);
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-dropdown-toggle:hover {
    background: var(--bg-section, #f8f9fa);
}

.mobile-dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--bg-section, #f8f9fa);
    display: none;
}

.mobile-dropdown.active .mobile-dropdown-menu {
    display: block;
}

.mobile-dropdown-menu a {
    display: block;
    padding: 12px 25px 12px 45px;
    color: var(--text-secondary, #666);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.mobile-dropdown-menu a:hover {
    background: var(--bg-filter, #e9ecef);
}

/* Auth Section Adjustments for Navigation */
.auth-section {
    margin-left: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 6px 10px;
    }
}

@media (max-width: 768px) {
    .header-left {
        gap: 15px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-nav-overlay {
        display: block;
    }
    
    .auth-section {
        margin-left: 10px;
    }
    
    .user-dropdown-content {
        right: 0;
        left: auto;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .mobile-navigation {
        width: 100%;
    }
    
    .auth-section {
        margin-left: 5px;
    }
    
    .login-link {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .user-name {
        font-size: 14px;
    }
}

/* Close button for mobile nav */
.mobile-nav-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary, #666);
    cursor: pointer;
    padding: 5px;
}

/* Ensure dropdowns work on touch devices */
@media (hover: none) {
    .dropdown-menu {
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
}

/* Animation for smooth transitions */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Focus states for accessibility */
.nav-link:focus,
.mobile-nav-link:focus,
.mobile-dropdown-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.dropdown-menu a:focus {
    outline: 2px solid var(--color-primary, #3498db);
    outline-offset: -2px;
}