/* navigation.css - Optimized Navigation Styles */

/* CSS Custom Properties for consistent theming */
:root {
    --nav-primary: #004aad;
    --nav-secondary: #002966;
    --nav-accent: #ffd700;
    --nav-white: #ffffff;
    --nav-text-light: #f8f9fa;
    --nav-shadow: rgba(0, 0, 0, 0.15);
    --nav-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-border-radius: 10px;
    --nav-z-index: 999;
}

/* Navigation Container */
.nav-custom {
    background: linear-gradient(135deg, var(--nav-primary) 0%, var(--nav-secondary) 100%);
    box-shadow: 0 4px 20px var(--nav-shadow);
    position: sticky;
    top: 0;
    z-index: var(--nav-z-index);
    transition: transform 0.3s ease;
    will-change: transform;
}

/* Navigation hidden state for scroll optimization */
.nav-custom.nav-hidden {
    transform: translateY(-100%);
}

/* Navbar Base Styles */
.navbar {
    padding: 0;
    min-height: 64px;
}

/* Navigation List */
.navbar-nav {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Navigation Items */
.nav-item {
    position: relative;
    margin: 0 2px;
}

/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    padding: 18px 16px;
    color: var(--nav-white) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
    border-radius: 6px;
    transition: var(--nav-transition);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    min-height: 44px; /* Touch target size */
}

/* Link hover effects */
.nav-link:hover,
.nav-link:focus {
    color: var(--nav-accent) !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Active link state */
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--nav-accent) !important;
}

/* Link underline animation */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--nav-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::before,
.nav-link:focus::before,
.nav-link.active::before {
    width: 80%;
}

/* CTA Button Styling */
.cta-item .cta-link {
    background: linear-gradient(135deg, var(--nav-accent), #ffed4a);
    color: var(--nav-secondary) !important;
    font-weight: 600;
    border-radius: 25px;
    margin: 0 5px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.cta-item .cta-link:hover,
.cta-item .cta-link:focus {
    background: linear-gradient(135deg, #ffed4a, var(--nav-accent));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    color: var(--nav-secondary) !important;
}

.cta-item .cta-link::before {
    display: none;
}

/* Student Portal Special Styling */
.student-portal .nav-link {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 20px;
    margin: 0 3px;
}

.student-portal .nav-link:hover,
.student-portal .nav-link:focus {
    background: rgba(40, 167, 69, 0.25);
    border-color: rgba(40, 167, 69, 0.5);
}

/* Dropdown Styles */
.dropdown-menu {
    background: var(--nav-white);
    border: none;
    border-radius: var(--nav-border-radius);
    box-shadow: 0 10px 40px var(--nav-shadow);
    padding: 10px 0;
    margin-top: 8px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333 !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    margin: 2px 8px;
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-height: 44px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff) !important;
    color: var(--nav-primary) !important;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 74, 173, 0.1);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    font-size: 14px;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    margin: 8px 16px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    border: none;
}

/* Mobile Navigation Styles */
.navbar-toggler {
    background: none;
    border: none;
    color: var(--nav-white);
    font-size: 24px;
    padding: 8px;
    margin: 8px 0;
    border-radius: 6px;
    transition: var(--nav-transition);
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
    background: rgba(255, 255, 255, 0.1);
    color: var(--nav-accent);
}

.navbar-toggler-icon {
    font-style: normal;
    font-size: 20px;
}

/* Mobile Collapsed Menu */
.navbar-collapse {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Design */
@media (max-width: 1199px) {
    .nav-link {
        padding: 16px 12px;
        font-size: 14px;
    }
}

@media (max-width: 991px) {
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
    }
    
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 15px;
        right: 15px;
        background: rgba(0, 74, 173, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 15px;
        padding: 20px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
        transform: translateY(-15px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .navbar-collapse.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-item {
        margin: 4px 0;
        width: 100%;
    }
    
    .nav-link {
        text-align: center;
        padding: 14px 20px;
        border-radius: 8px;
        width: 100%;
        justify-content: center;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(0);
    }
    
    .nav-link::before {
        display: none;
    }
    
    /* Mobile Dropdown Styles */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.95);
        margin: 8px 0 0 0;
        border-radius: 10px;
        backdrop-filter: blur(10px);
        opacity: 1;
        visibility: visible;
        display: none;
    }
    
    .dropdown-menu.show {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    .dropdown-item {
        justify-content: center;
        text-align: center;
        padding: 12px 16px;
        margin: 2px 4px;
    }
    
    .dropdown-item:hover,
    .dropdown-item:focus {
        transform: translateX(0);
    }
    
    /* Mobile CTA Button */
    .cta-item .cta-link {
        background: linear-gradient(135deg, var(--nav-accent), #ffed4a);
        color: var(--nav-secondary) !important;
        font-weight: 600;
        border-radius: 25px;
        margin: 8px 0;
        animation: pulse 2s infinite;
    }
    
    /* Mobile Student Portal */
    .student-portal .nav-link {
        background: rgba(40, 167, 69, 0.2);
        border: 1px solid rgba(40, 167, 69, 0.4);
    }
}

@media (max-width: 576px) {
    .navbar-collapse {
        left: 10px;
        right: 10px;
        padding: 15px;
    }
    
    .nav-link {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .dropdown-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    }
}

/* Focus styles for accessibility */
.nav-link:focus,
.dropdown-item:focus,
.navbar-toggler:focus {
    outline: 2px solid var(--nav-accent);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-custom {
        border-bottom: 2px solid var(--nav-accent);
    }
    
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        border-color: var(--nav-accent);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Print styles */
@media print {
    .nav-custom,
    .navbar {
        display: none;
    }
}