/* Mobile Optimization Fixes for wildsvleisbewerking Website */

/* Fix for iOS Safari video playback issues */
@media screen and (max-width: 768px) {
    .hero-video {
        /* Enable video on mobile */
        display: block;
        object-fit: cover;
    }
    
    /* Fallback background removed - using video instead */
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .hero,
    .features-section,
    .cta-section,
    .contact-section {
        background-attachment: scroll !important;
    }
    
    /* Fix for iOS Safari viewport issues */
    .hero {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

/* Android Chrome specific fixes */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 1) {
    .hero-video {
        display: block;
        object-fit: cover;
    }
    
    .nav-menu {
        -webkit-overflow-scrolling: touch;
    }
}

/* Landscape orientation fixes for mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .nav-menu {
        height: 100vh;
        overflow-y: auto;
    }
}

/* Touch-friendly navigation improvements */
@media (max-width: 768px) {
    .nav-link,
    .dropdown-link {
        min-height: 44px; /* iOS recommended touch target size */
        display: flex;
        align-items: center;
    }
    
    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Fix for very small screens */
@media (max-width: 360px) {
    .nav-menu {
        width: 240px;
        left: -240px;
        max-width: 85vw;
    }
    
    .nav-menu .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Enable video on mobile */
    .hero-video,
    .background-video {
        display: block !important;
        object-fit: cover;
    }
    
    /* Remove background from hero - using video instead */
    .hero {
        background: none !important;
        background-image: none !important;
    }
    
    /* Hero content centering fix for mobile */
    .hero-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .hero-title,
    .hero-description {
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }
    
    /* Hide hero image on mobile to show video better */
    .hero-image,
    .hero-image-main,
    .hero-image-placeholder {
        display: none !important;
    }
    
    /* Optimize background images for other sections */
    .features-section,
    .cta-section {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }
    
    /* Reduce backdrop blur on mobile for better performance */
    .nav-menu {
        backdrop-filter: none;
        background: rgba(40, 68, 40, 0.95);
    }
}
