/* ===================================
   iOS Chrome Mobile Menu Fix
   Specific fixes for iOS Chrome
   =================================== */

/* iOS Chrome - Force hardware acceleration */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari & Chrome */
    
    .mobile-menu-btn {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
        /* Force touch target */
        min-width: 48px !important;
        min-height: 48px !important;
        /* Prevent iOS text selection */
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    .mobile-menu-btn span {
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    .navbar {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .nav-menu {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* iOS 16+ specific fixes */
@supports (font: -apple-system-body) {
    .mobile-menu-btn {
        /* iOS 16 ProMotion display fix */
        will-change: transform, opacity;
    }
}

/* iPhone specific media query */
@media only screen 
    and (min-device-width: 375px) 
    and (max-device-width: 932px) 
    and (-webkit-min-device-pixel-ratio: 3) {
    
    /* iPhone 14 Pro, 15 Pro, 16 Pro */
    .mobile-menu-btn {
        /* Larger touch target for ProMotion displays */
        min-width: 50px;
        min-height: 50px;
        padding: 1rem;
        /* Ensure it's above everything */
        z-index: 9999 !important;
        position: relative;
    }
    
    .navbar {
        /* Ensure navbar is properly layered */
        z-index: 9998;
    }
    
    .nav-menu {
        z-index: 9997;
    }
}

/* Debug mode - Remove after testing */
/*
.mobile-menu-btn {
    background-color: rgba(255, 0, 0, 0.1) !important;
    border: 2px solid red !important;
}

.mobile-menu-btn:active {
    background-color: rgba(0, 255, 0, 0.3) !important;
}
*/
