/**
 * Navigation Styles - LostFound
 * Modern Enhanced Navigation with Multiple Style Options
 * Updated: Fixed notification badge positioning over dropdown arrow
 * Version: 1.0.0
 */

/* ===== BASE NAVIGATION STYLES ===== */

.modern-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 40px rgba(0, 0, 0, 0.12);
}

/* ===== BRAND STYLES ===== */

.nav-brand {
    color: #1f2937;
    text-decoration: none;
}

.nav-brand:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ===== NAVIGATION LINKS ===== */

.nav-link {
    color: #6b7280;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.nav-link-active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.nav-link-active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Compact home button */
.nav-link.compact {
    padding: 10px 12px;
    min-width: auto;
    justify-content: center;
}

/* ===== USER AVATAR STYLES ===== */

.user-avatar-btn {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid rgba(229, 231, 235, 0.8);
    min-width: 140px;
}

.user-avatar-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.avatar-image {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.avatar-circle {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.avatar-text {
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* ===== DROPDOWN MENU STYLES ===== */

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 0;
    z-index: 50;
}

.dropdown-header {
    padding: 16px 20px;
    border-bottom: 2px solid #f3f4f6;
    background: #fafbfc;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f0f9ff;
    color: #0c4a6e;
    padding-left: 24px;
}

.dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 8px 0;
}

/* ===== MOBILE STYLES ===== */

.mobile-menu-btn {
    padding: 8px;
    color: #6b7280;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-menu-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.mobile-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 0;
    z-index: 50;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-nav-item:hover {
    background: #f8fafc;
    color: #1f2937;
}

.mobile-nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-weight: 600;
}

.mobile-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 8px 0;
}

/* ===== NAVIGATION STATE MANAGEMENT ===== */

.navbar-scrolled {
    background: rgba(248, 250, 252, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.glass-smart.navbar-scrolled {
    background: linear-gradient(135deg, 
        rgba(248, 250, 252, 0.98) 0%, 
        rgba(255, 255, 255, 0.95) 100%) !important;
    backdrop-filter: blur(25px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Text color management for different backgrounds */
.nav-text {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-smart.on-white-bg .nav-text {
    color: #1f2937;
    text-shadow: none;
}

.glass-smart.navbar-scrolled .nav-text {
    color: #1f2937 !important;
    text-shadow: none !important;
}

.glass-smart.navbar-scrolled .nav-text:hover {
    color: #f97316 !important;
}

.nav-text:hover {
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.glass-smart.on-white-bg .nav-text:hover {
    text-shadow: 0 1px 2px rgba(59, 130, 246, 0.3);
}

/* ===== STYLE VARIATIONS ===== */

/* Clean Minimal Style */
.modern-nav.style-minimal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.1);
}

.style-minimal .nav-brand {
    color: #1f2937;
}

.style-minimal .nav-link {
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.style-minimal .nav-link:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.style-minimal .nav-link-active {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.15);
    font-weight: 600;
}

/* Dark Premium Style */
.modern-nav.style-dark {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-bottom: 1px solid #374151;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.style-dark .nav-brand {
    color: #ffffff;
}

.style-dark .nav-link {
    color: #d1d5db;
}

.style-dark .nav-link:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.style-dark .nav-link-active {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.2);
}

/* Gradient Modern Style */
.modern-nav.style-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 30px rgba(102, 126, 234, 0.3);
}

.style-gradient .nav-brand,
.style-gradient .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.style-gradient .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.style-gradient .nav-link-active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.25);
}

/* ===== SCROLLED STATE ===== */

.modern-nav.scrolled {
    box-shadow: 0 4px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(25px);
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
    .modern-nav {
        background: rgba(17, 24, 39, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav-brand, 
    .nav-link {
        color: #f9fafb;
    }
    
    .dropdown-menu, 
    .mobile-dropdown {
        background: #1f2937;
        border-color: #374151;
    }
    
    .dropdown-item, 
    .mobile-nav-item {
        color: #f9fafb;
    }
    
    .dropdown-item:hover, 
    .mobile-nav-item:hover {
        background: #374151;
    }
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .modern-nav {
        padding: 0 16px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .dropdown-menu,
    .mobile-dropdown {
        width: 240px;
    }
}

@media (max-width: 480px) {
    .dropdown-menu,
    .mobile-dropdown {
        width: calc(100vw - 32px);
        right: 16px;
    }
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .nav-link::before,
    .user-avatar-btn {
        transition: none;
    }
    
    .nav-link:hover,
    .nav-link-active:hover {
        transform: none;
    }
}

/* Focus styles for keyboard navigation */
.nav-link:focus,
.user-avatar-btn:focus,
.mobile-menu-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .modern-nav {
        background: rgba(255, 255, 255, 0.95);
        border-bottom: 2px solid #000;
    }
    
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link-active {
        border-color: #3b82f6;
    }
}
