/* Navigation Menu Responsive Styles */

/* Desktop Navigation - Centered and Symmetric */
@media (min-width: 992px) {
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.95rem;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover {
        color: #1d88d4;
        transform: translateY(-1px);
    }
    
    .dropdown-menu {
        min-width: 220px;
        border: none;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
    }
    
    .dropdown-item {
        font-size: 0.9rem;
        transition: all 0.2s ease;
    }
    
    .dropdown-item:hover {
        background-color: #f0f7ff;
        color: #1e3a8a;
        padding-left: 1.75rem;
    }
}

/* Mobile Navigation - Touch-Optimized */
@media (max-width: 991.98px) {
    /* Navbar Toggler */
    .navbar-toggler {
        padding: 0.5rem;
        font-size: 1.25rem;
        border-radius: 8px;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(29, 136, 212, 0.25);
    }
    
    /* Collapsed Menu */
    .navbar-collapse {
        background: #ffffff;
        border-radius: 8px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    /* Menu Items */
    .navbar-nav {
        width: 100%;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        font-weight: 500;
        border-radius: 6px;
        display: flex;
        align-items: center;
        transition: all 0.2s ease;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        background-color: #f0f7ff;
        color: #1e3a8a;
    }
    
    .navbar-nav .nav-link i {
        font-size: 1.1rem;
        width: 24px;
    }
    
    .navbar-nav .nav-link span {
        flex: 1;
    }
    
    /* Dropdown Menus on Mobile */
    .navbar-nav .dropdown-menu {
        background-color: #f8fafc;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0.5rem 0;
        border-radius: 6px;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 4px;
        margin: 0.25rem 0.5rem;
        transition: all 0.2s ease;
    }
    
    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        background-color: #e0f2fe;
        color: #1e3a8a;
    }
    
    .navbar-nav .dropdown-item i {
        font-size: 1rem;
        width: 24px;
    }
    
    /* Dropdown Divider */
    .dropdown-divider {
        margin: 0.5rem 1rem;
        border-color: #cbd5e1;
    }
    
    /* User Dropdown on Mobile */
    .navbar-nav .dropdown-toggle::after {
        margin-left: auto;
    }
}

/* Tablet Optimization (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 1.05rem;
    }
}

/* Small Mobile Devices (< 576px) */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-toggler {
        font-size: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Animation for Mobile Menu */
@media (max-width: 991.98px) {
    .navbar-collapse.collapsing {
        transition: height 0.3s ease;
    }
    
    .navbar-collapse.show {
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Active State for Current Page */
.navbar-nav .nav-link.active,
.navbar-nav .dropdown-item.active {
    color: #1e3a8a;
    font-weight: 600;
    background-color: #f0f7ff;
}

/* Focus Visible for Accessibility */
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.navbar-toggler:focus-visible {
    outline: 2px solid #1d88d4;
    outline-offset: 2px;
}

/* User Menu Specific Styles */
.navbar-nav .nav-link .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.5rem;
    object-fit: cover;
}

@media (max-width: 991.98px) {
    .navbar-nav .nav-link .user-avatar {
        width: 28px;
        height: 28px;
    }
}
