/* ===== CLEAN MOBILE & DESKTOP MENU SYSTEM ===== */

/* Navbar Toggler */
.navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.navbar-toggler:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

/* Desktop Dropdowns */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1050;
        display: none;
        min-width: 10rem;
        padding: 0.5rem 0;
        margin: 0.125rem 0 0;
        font-size: 1rem;
        color: #212529;
        background-color: #fff;
        border: 1px solid rgba(0,0,0,.15);
        border-radius: 0.375rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
    }
    
    .dropdown-menu.show {
        display: block !important;
    }
}

/* Mobile Menu */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none;
        width: 100%;
        margin-top: 1rem;
    }
    
    .navbar-collapse.show {
        display: block !important;
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        border-radius: 0.5rem;
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
        animation: slideDown 0.3s ease-out;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0.375rem;
        color: white !important;
        display: block;
        width: 100%;
        text-align: left;
        transition: background-color 0.15s ease-in-out;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white !important;
    }
    
    /* Mobile Dropdowns */
    .dropdown-menu {
        position: static !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
        background-color: rgba(255, 255, 255, 0.95) !important;
        border: none !important;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
        border-radius: 0.375rem !important;
        display: none;
    }
    
    .dropdown-menu.show {
        display: block !important;
        animation: fadeIn 0.2s ease-out;
    }
    
    .dropdown-item {
        padding: 0.5rem 1rem;
        color: #333 !important;
        transition: all 0.15s ease-in-out;
    }
    
    .dropdown-item:hover {
        background: #2563eb !important;
        color: white !important;
    }
    
    /* Mobile Auth Buttons */
    .search-btn,
    .auth-btn,
    .auth-btn-primary {
        margin-top: 0.5rem;
        display: block;
        text-align: center;
        width: 100%;
        padding: 0.75rem;
        border-radius: 0.375rem;
    }
    
    .auth-btn-primary {
        background: rgba(255, 255, 255, 0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Brand */
.navbar-brand {
    margin-right: 1rem;
    font-size: 1.25rem;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-brand:hover {
    color: white;
    text-decoration: none;
}

@media (max-width: 576px) {
    .navbar-brand span {
        display: none !important;
    }
    
    .navbar-brand img {
        width: 35px;
        height: 35px;
    }
    
    .navbar-toggler {
        padding: 0.2rem 0.4rem;
        font-size: 1rem;
    }
}

/* Z-index Management */
.navbar {
    z-index: 1030;
}

.dropdown-menu {
    z-index: 1050;
}