/**
 * Mobile Responsive Overrides
 * Air Ambulance 1 Theme
 *
 * Purpose: Mobile-first improvements for service grid and other components
 * Uses aa1_asset_url() for automatic versioning via filemtime()
 *
 * Last Updated: 2026-01-21
 */

/* ==========================================================================
   Services Grid - Mobile Full-Width Images (QA Fix)
   ========================================================================== */

@media (max-width: 767px) {
    /* Service card container - remove padding for full-width images */
    .info_content {
        margin: 0 15px;
        padding: 0;
        border: 1px solid rgba(0, 0, 0, 0.12);
        border-radius: 4px;
        overflow: hidden;
    }

    /* Images fill container naturally without calc() hacks */
    .info_content img {
        width: 100% !important;  /* Override calc(100% + 30px) */
        max-width: 100% !important;  /* Override calc(100% + 30px) */
        margin: 0 !important;  /* Override negative margins */
        display: block;
        border-bottom: 8px solid #be1e2e;
    }

    /* Add padding to text content for readability */
    .info_content h3 {
        padding: 15px 15px 10px;
        margin: 0;
        color: #be1e2e;
        font-weight: 600;
        border-bottom: 1px solid rgba(0, 0, 0, 0.12);
        text-align: center;
        min-height: 44px;  /* Touch target minimum */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .info_content p {
        padding: 10px 15px 15px;
        margin: 0;
        font-size: 14px;
        text-align: left;
        line-height: 1.7;
        color: rgba(0, 0, 0, 0.75);
    }

    /* Increase spacing between service cards */
    .row.info_contentrow > [class*='col-'] {
        padding-bottom: 20px;
    }

    .info_contentrow {
        padding: 0;
    }
}

/* ==========================================================================
   General Mobile Improvements
   ========================================================================== */

@media (max-width: 767px) {
    /* Prevent horizontal scroll from any overflow */
    body {
        overflow-x: hidden;
    }

    /* Ensure full-width image containers respect viewport */
    .container-fluid,
    .container {
        max-width: 100vw;
    }
}

/* ==========================================================================
   Homepage: Fix gap between slider and red CTA
   The #content anchor div should not affect layout flow
   ========================================================================== */

/* Remove any potential margin/padding from content anchor */
#content {
    display: block;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
}

/* ==========================================================================
   Skip to Content Link - Hide the visible "Skip to main content" element
   Only target this specific link, not all .sr-only elements
   ========================================================================== */

/* Hide the skip to main content link specifically */
a[href="#content"] {
    display: none !important;
}

/* Fix slider caption positioning to eliminate gaps */
.slider_caption.cust_centre {
    position: relative;
    margin: 0;
    padding: 0;
}

/* Ensure no gap between slider and next section */
.comm_fadeslider2 + .slider_caption {
    margin-top: 0;
}

/* Homepage-specific: eliminate any gaps between sections */
.home .comm_fadeslider2,
.page-template-template-home .comm_fadeslider2 {
    margin-bottom: 0;
}

.home .slider_caption,
.page-template-template-home .slider_caption {
    margin-top: 0;
}

/* Gotop anchor positioning - ensure it doesn't affect layout */
#gotop {
    position: absolute;
    top: 0;
    height: 0;
    margin: 0;
    padding: 0;
}
