/* Navbar Responsive Styles */

/* Ensure dropdown menus work properly on mobile */
@media (max-width: 991.98px) {
    .dropdown-menu {
        border: none;
        background-color: rgba(255, 255, 255, 0.1);
        padding-left: 1rem;
        margin-top: 0.5rem;
        display: none; /* Hide by default */
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        box-shadow: none;
    }
    
    /* Show dropdown when parent is clicked */
    .dropdown.show .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: all 0.3s ease;
    }
    
    .dropdown-item {
        color: rgba(0, 0, 0, 0.8);
        padding: 0.75rem 1rem;
        white-space: normal;
    }
    
    .dropdown-item:hover, .dropdown-item:focus {
        background-color: rgba(0, 0, 0, 0.1);
        color: #000;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
    }
    
    .nav-icon {
        margin-right: 10px;
    }
    
    /* Make dropdown toggle more visible on mobile */
    .dropdown-toggle {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    /* Ensure dropdown toggle works on mobile */
    .dropdown-toggle::after {
        display: inline-block;
        margin-left: 0.5em;
        vertical-align: middle;
        content: "";
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-bottom: 0;
        border-left: 0.3em solid transparent;
        transition: transform 0.3s ease;
    }
    
    /* Rotate caret when dropdown is open */
    .dropdown.show .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

/* Improve dropdown appearance on desktop */
@media (min-width: 992px) {
    .dropdown-menu {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        border: none;
        border-radius: 0.25rem;
    }
    
    .dropdown-item {
        padding: 0.5rem 1.5rem;
        transition: all 0.2s ease;
    }
    
    .dropdown-item:hover {
        background-color: #FFD700;
        color: #000;
    }
    
    /* Add a slight delay to dropdown to improve UX */
    .dropdown:hover > .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}