/* ============================================
   MOBILE NAVIGATION FIX
   ============================================ */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    /* Hide desktop actions on mobile */
    .desktop-actions {
        display: none !important;
    }
    
    /* Show hamburger */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    
    .hamburger .line {
        width: 100%;
        height: 3px;
        background-color: var(--primary-blue);
        border-radius: 2px;
        transition: var(--transition-normal);
    }
    
    .hamburger.active .line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Mobile navigation */
    .right {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 320px !important;
        height: 100vh !important;
        background-color: var(--pure-white) !important;
        box-shadow: var(--shadow-xl) !important;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 999 !important;
        overflow-y: auto !important;
        padding: 80px 30px 30px !important;
    }
    
    .right.active {
        right: 0 !important;
    }
    
    /* Navigation content */
    .nav-content {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .list {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        margin-top: 20px;
    }
    
    .list-Item {
        width: 100% !important;
        margin: 5px 0 !important;
    }
    
    .list-Item a {
        padding: 15px !important;
        width: 100% !important;
        justify-content: flex-start !important;
        border-radius: var(--radius-md) !important;
        font-size: 1rem !important;
    }
    
    .list-Item.active a:after {
        display: none !important;
    }
    
    /* Mobile search container */
    .mobile-search-container {
        display: block !important;
        width: 100%;
        margin: 20px 0 10px;
    }
    
    .search-input {
        width: 100% !important;
        padding: 12px 12px 12px 45px !important;
    }
    
    .search-icon {
        left: 15px !important;
    }
    
    /* Mobile profile dropdown */
    .mobile-profile-dropdown {
        display: block !important;
        width: 100%;
        margin: 10px 0;
    }
    
    .mobile-profile-dropdown .profile-btn {
        width: 100%;
        padding: 15px;
        justify-content: space-between;
    }
    
    .mobile-profile-dropdown .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        width: 100%;
        margin-top: 10px;
        display: none;
    }
    
    .mobile-profile-dropdown.active .dropdown-menu {
        display: block;
    }
    
    /* Mobile donate button */
    .donate-btn-mobile {
        margin-top: 20px !important;
        display: block !important;
    }
    
    .donate-btn-mobile a {
        padding: 15px !important;
        text-align: center !important;
        font-size: 1.1rem !important;
        width: 100%;
        display: block;
    }
    
    .donate-btn-desktop {
        display: none !important;
    }
    
    /* Hide desktop elements on mobile */
    .search-container,
    .profile-dropdown {
        display: none !important;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden !important;
    }
    
    /* Adjust hero slider margin */
    .hero-slider {
        margin-top: 70px !important;
    }
}

@media (min-width: 1025px) {
    /* Hide mobile elements on desktop */
    .mobile-search-container,
    .mobile-profile-dropdown,
    .donate-btn-mobile,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    /* Show desktop elements */
    .desktop-actions {
        display: flex !important;
        align-items: center;
        gap: var(--space-md);
    }
    
    .hamburger {
        display: none !important;
    }
    
    /* Desktop navigation */
    .right {
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    
    .list {
        flex-direction: row !important;
        align-items: center !important;
        gap: var(--space-md) !important;
        margin-top: 0 !important;
    }
    
    .list-Item {
        width: auto !important;
        margin: 0 !important;
    }
    
    .list-Item a {
        padding: 8px 12px !important;
        width: auto !important;
        justify-content: center !important;
        font-size: 0.95rem !important;
    }
    
    .list-Item.active a:after {
        display: block !important;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .right {
        width: 280px !important;
        padding: 70px 20px 20px !important;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .right {
        width: 100% !important;
        right: -100% !important;
    }
    
    .right.active {
        right: 0 !important;
    }
}