/* Mobile Menu Critical Fixes - v1.0.3 */

@media (max-width: 768px) {
    /* Force mobile menu to display when active */
    .mobile-menu-toggle {
        display: block !important;
        position: relative;
        z-index: 9999;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }
    
    .mobile-menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #2a6b9d;
        margin: 5px 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Main nav mobile styles */
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #ffffff;
        padding: 5rem 0 2rem;
        z-index: 9000;
        overflow-y: auto;
    }
    
    .main-nav.active {
        display: block !important;
    }
    
    .main-nav.active ul {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }
    
    .main-nav.active ul li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f5f5f5;
        padding: 0.5rem 0;
    }
    
    .main-nav.active ul li a {
        display: block;
        padding: 1rem;
        width: 100%;
        color: #2a6b9d;
        font-size: 1.2rem;
    }
    
    /* Fix for navigation link clicks */
    .main-nav.active ul li a:active {
        background-color: rgba(42, 107, 157, 0.1);
    }
    
    /* Prevent clicks during fade out animation */
    .main-nav:not(.active) {
        pointer-events: none;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    /* Ensure body can scroll after menu is closed */
    body.scroll-enabled {
        overflow: auto !important;
        overscroll-behavior: auto !important;
        touch-action: auto !important;
    }
    
    /* Add a small delay before following links */
    a[href] {
        transition: background-color 0.2s ease;
    }
    
    /* Fix logo click white screen issue */
    .logo a {
        display: inline-block;
    }
    
    /* Force navigation to use replace instead of push for mobile browsers */
    a[href]:not([href^="#"]):not([href^="mailto:"]):not([href^="tel:"]):not([href^="http"]) {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
} 