/* Mobile Scroll Fix v2 — 2026-02-16
   Prevents inner elements from trapping touch scroll on mobile.
   Fixes iPhone Safari double-tap zoom and scroll trapping. */

/* Prevent double-tap zoom on all mobile devices */
* {
    touch-action: manipulation;
}

@media (max-width: 921px) {

    /* Force page-level scrolling to always work */
    html, body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none;
    }

    /* Override WordPress NewFold horizontal scroll sliders on mobile */
    .nfd-swiper-enabled,
    .nfd-scroll-slider-horizontal {
        overflow-x: hidden !important;
        flex-wrap: wrap !important;
        scroll-snap-type: none !important;
    }

    .nfd-scroll-slider-vertical {
        overflow-y: visible !important;
        height: auto !important;
        scroll-snap-type: none !important;
    }

    /* Swiper carousels: ensure vertical page scroll is never trapped */
    .swiper,
    .swiper-wrapper {
        touch-action: pan-y !important;
    }

    /* Elementor image containers: don't trap scroll */
    .elementor-image-carousel-wrapper,
    .elementor-slides-wrapper,
    .elementor-swiper,
    .e-swiper-container,
    .elementor-widget-container {
        touch-action: pan-y !important;
    }

    /* Elementor sections and columns: never trap vertical scroll */
    .elementor-section,
    .elementor-column,
    .elementor-widget-wrap,
    .elementor-element {
        overflow: visible !important;
        touch-action: pan-y !important;
    }

    /* Gallery thumbnails: wrap instead of scroll on mobile */
    .gallery-thumbs {
        overflow-x: visible !important;
        flex-wrap: wrap !important;
    }

    /* Product gallery: don't trap scroll */
    .product-gallery {
        overflow: visible !important;
    }

    /* Data containers with bounded scroll: smooth propagation */
    .network-list,
    #fill-history-container,
    #feed-events-list,
    #recent-feedback-list,
    #monthly-stats-detailed,
    #prediction-details,
    #model-comparison-results,
    .list-table-container {
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    /* Images should never block scroll */
    img {
        touch-action: pan-y !important;
        pointer-events: none;
    }
    a img, button img {
        pointer-events: auto;
    }
}
