/**
 * CPWE AI Quantum Navigation System
 * Revolutionary design with glassmorphism, quantum flow, and professional UI/UX
 */

/* ============================================================================ */
/* QUANTUM NAVIGATION BASE - COMPACT DESKTOP DESIGN */
/* ============================================================================ */

.cyber-navbar {
    background: linear-gradient(135deg, 
        rgba(26, 77, 122, 0.95) 0%, 
        rgba(18, 55, 88, 0.98) 50%, 
        rgba(26, 77, 122, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 2px solid transparent !important;
    border-image: linear-gradient(90deg, 
        rgba(255, 167, 38, 0.3), 
        rgba(255, 167, 38, 0.5), 
        rgba(255, 167, 38, 0.3)) 1 !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 10px rgba(255, 167, 38, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05) !important;
    position: sticky;
    top: 0;
    z-index: 1040;
    min-height: 56px; /* Reduced from 76px for compact desktop view */
    padding: 0.5rem 0; /* Compact vertical padding */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scrolled state enhancement */
.cyber-navbar.scrolled {
    background: linear-gradient(135deg, 
        rgba(26, 77, 122, 0.98) 0%, 
        rgba(18, 55, 88, 0.99) 50%, 
        rgba(26, 77, 122, 0.98) 100%) !important;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 4px 15px rgba(255, 167, 38, 0.3) !important;
}

/* ============================================================================ */
/* QUANTUM BRAND LOGO - COMPACT DESKTOP */
/* ============================================================================ */

.navbar-brand {
    position: relative;
    padding: 0.5rem 1rem; /* Reduced from 0.75rem 1.5rem */
    font-size: 1rem; /* Slightly smaller for compact design */
    background: linear-gradient(135deg, 
        rgba(255, 167, 38, 0.15), 
        rgba(255, 167, 38, 0.15));
    border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: 10px; /* Reduced from 12px */
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.navbar-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 167, 38, 0.3), 
        transparent);
    transition: left 0.6s ease;
}

.navbar-brand:hover::before {
    left: 100%;
}

.navbar-brand:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(255, 167, 38, 0.4),
        0 0 20px rgba(255, 167, 38, 0.2);
    border-color: rgba(255, 167, 38, 0.6);
}

/* ============================================================================ */
/* QUANTUM NAV LINKS - COMPACT DESKTOP */
/* ============================================================================ */

.navbar-nav .nav-link {
    position: relative;
    padding: 0.5rem 0.875rem !important; /* Reduced from 0.75rem 1.25rem */
    margin: 0 0.15rem; /* Reduced from 0.25rem */
    font-size: 0.9rem; /* Slightly smaller text */
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    border-radius: 8px; /* Reduced from 10px */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

/* Quantum underline effect */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 167, 38, 0.8), 
        rgba(255, 167, 38, 0.8), 
        transparent);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar-nav .nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    background: linear-gradient(135deg, 
        rgba(255, 167, 38, 0.2), 
        rgba(255, 167, 38, 0.15));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

/* Active state */
.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, 
        rgba(255, 167, 38, 0.25), 
        rgba(255, 167, 38, 0.2)) !important;
    color: #fff !important;
    box-shadow: 
        0 4px 15px rgba(255, 167, 38, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Icon enhancement */
.cyber-icon-enhanced {
    display: inline-block;
    filter: drop-shadow(0 0 8px currentColor);
    transition: all 0.3s ease;
}

.nav-link:hover .cyber-icon-enhanced {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 12px currentColor);
}

/* ============================================================================ */
/* QUANTUM DROPDOWN SYSTEM - COMPACT DESKTOP */
/* ============================================================================ */

.navbar-nav .dropdown-toggle {
    position: relative;
    padding: 0.5rem 0.875rem !important; /* Reduced from 0.75rem 1.25rem */
    font-size: 0.9rem; /* Slightly smaller text */
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    border-radius: 8px; /* Reduced from 10px */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.navbar-nav .dropdown-toggle:hover {
    color: #fff !important;
    background: linear-gradient(135deg, 
        rgba(255, 167, 38, 0.2), 
        rgba(255, 167, 38, 0.15));
    transform: translateY(-2px);
}

.dropdown-menu {
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.98) 0%, 
        rgba(30, 41, 59, 0.98) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(255, 167, 38, 0.4) !important;
    border-radius: 15px !important;
    padding: 1rem !important;
    position: absolute !important;
    z-index: 1050 !important;
    margin-top: 0.5rem !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 10px 30px rgba(255, 167, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    min-width: 280px !important;
    animation: quantumDropdownOpen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes quantumDropdownOpen {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    padding: 0.6rem 1rem !important; /* Reduced from 0.75rem 1.25rem */
    margin: 0.2rem 0 !important; /* Reduced from 0.25rem */
    font-size: 0.9rem; /* Slightly smaller text */
    color: rgba(255, 255, 255, 0.85) !important;
    border-radius: 8px !important; /* Reduced from 10px */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 167, 38, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, 
        rgba(255, 167, 38, 0.25), 
        rgba(255, 167, 38, 0.2)) !important;
    color: #fff !important;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

.dropdown-header {
    color: rgba(255, 167, 38, 0.9) !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important; /* Reduced from 0.85rem */
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important; /* Reduced from 1px */
    padding: 0.4rem 1rem !important; /* Reduced from 0.5rem 1.25rem */
    margin-bottom: 0.3rem !important; /* Reduced from 0.5rem */
}

.dropdown-divider {
    border-color: rgba(255, 167, 38, 0.3) !important;
    margin: 0.75rem 0 !important;
    opacity: 0.5 !important;
}

/* ============================================================================ */
/* QUANTUM PROFILE DROPDOWN - COMPACT DESKTOP */
/* ============================================================================ */

.profile-toggle {
    border: 2px solid rgba(255, 167, 38, 0.5) !important;
    background: linear-gradient(135deg, 
        rgba(255, 167, 38, 0.15), 
        rgba(255, 167, 38, 0.1)) !important;
    border-radius: 10px !important; /* Reduced from 12px */
    padding: 0.5rem 1rem !important; /* Reduced from 0.75rem 1.25rem */
    font-size: 0.9rem; /* Slightly smaller text */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.2);
}

.profile-toggle:hover {
    border-color: rgba(255, 167, 38, 0.8) !important;
    background: linear-gradient(135deg, 
        rgba(255, 167, 38, 0.25), 
        rgba(255, 167, 38, 0.2)) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 167, 38, 0.4);
}

.profile-dropdown-menu {
    min-width: 280px !important;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.98) 0%, 
        rgba(30, 41, 59, 0.98) 100%) !important;
    border: 2px solid rgba(255, 167, 38, 0.5) !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 10px 30px rgba(255, 167, 38, 0.4) !important;
    border-radius: 15px !important;
    padding: 1rem !important;
}

/* ============================================================================ */
/* MOBILE RESPONSIVE QUANTUM DESIGN */
/* ============================================================================ */

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: linear-gradient(135deg, 
            rgba(15, 23, 42, 0.98) 0%, 
            rgba(30, 41, 59, 0.98) 100%);
        border: 2px solid rgba(255, 167, 38, 0.3);
        border-radius: 15px;
        padding: 1.5rem;
        margin-top: 1rem;
        backdrop-filter: blur(20px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        padding: 1rem 1.25rem !important;
    }
    
    .dropdown-menu {
        background: rgba(20, 30, 50, 0.95) !important;
        border: 1px solid rgba(255, 167, 38, 0.3) !important;
        margin: 0.5rem 0 !important;
    }
}

/* ============================================================================ */
/* QUANTUM NAVBAR TOGGLER */
/* ============================================================================ */

.navbar-toggler {
    border: 2px solid rgba(255, 167, 38, 0.5) !important;
    border-radius: 10px !important;
    padding: 0.5rem 0.75rem !important;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: rgba(255, 167, 38, 0.8) !important;
    background: rgba(255, 167, 38, 0.15) !important;
    transform: rotate(90deg);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 167, 38, 0.25) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 167, 38, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ============================================================================ */
/* QUANTUM THEME SWITCHER BUTTON */
/* ============================================================================ */

.btn-outline-info {
    border: 2px solid rgba(255, 167, 38, 0.5) !important;
    color: rgba(255, 167, 38, 0.9) !important;
    border-radius: 10px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-outline-info:hover {
    background: linear-gradient(135deg, 
        rgba(255, 167, 38, 0.25), 
        rgba(255, 167, 38, 0.2)) !important;
    border-color: rgba(255, 167, 38, 0.8) !important;
    color: #fff !important;
    transform: translateY(-2px) rotate(15deg);
    box-shadow: 0 8px 25px rgba(255, 167, 38, 0.4);
}

/* ============================================================================ */
/* QUANTUM PARTICLES & ANIMATIONS */
/* ============================================================================ */

@keyframes quantumFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes quantumPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Subtle quantum glow on nav items */
.nav-link:hover,
.dropdown-toggle:hover,
.profile-toggle:hover {
    animation: quantumPulse 2s ease-in-out infinite;
}

/* ============================================================================ */
/* ACCESSIBILITY & FOCUS STATES */
/* ============================================================================ */

.nav-link:focus,
.dropdown-toggle:focus,
.dropdown-item:focus {
    outline: 2px solid rgba(255, 167, 38, 0.8);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(255, 167, 38, 0.2);
}

/* ============================================================================ */
/* PERFORMANCE OPTIMIZATIONS */
/* ============================================================================ */

.navbar-nav,
.dropdown-menu {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .navbar-nav .nav-link,
    .dropdown-item,
    .navbar-brand {
        transition: none;
        animation: none;
    }
    
    .navbar-nav .nav-link::after {
        transition: none;
    }
}
