/*
 * Mobile UX batch 1.
 * Scope is intentionally narrow so this plugin can be disabled independently.
 */
@media (max-width: 640px) {
    /*
     * Keep the homepage's two project actions visible before the long B2B
     * qualification paragraph. All source content remains present and in the
     * same DOM order for assistive technology.
     */
    .anh-layered-home .home-hero .hero-content {
        display: flex;
        flex-direction: column;
    }

    .anh-layered-home .home-hero .eyebrow {
        order: 1;
    }

    .anh-layered-home .home-hero h1 {
        order: 2;
    }

    .anh-layered-home .home-hero .hero-actions {
        order: 3;
        margin: 24px 0 0;
    }

    .anh-layered-home .home-hero .hero-lead {
        order: 4;
        margin: 24px 0 0;
        font-size: 17px;
        line-height: 1.55;
    }

    .anh-layered-home .home-hero .hero-proof {
        order: 5;
    }

    .anh-layered-home .home-hero .hero-actions .btn {
        min-height: 48px;
    }
}

@media (max-width: 834px) {
    .anh-lp .lp-subnav-links {
        scroll-padding-inline: 8px;
        scroll-snap-type: x proximity;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .anh-lp .lp-subnav-link {
        min-height: 44px;
        scroll-snap-align: start;
    }

    .anh-lp .lp-btn-whatsapp {
        min-height: 44px;
    }
}

@media (max-width: 834px) {
    #enquiryForm,
    #enquiry {
        scroll-margin-top: 88px;
    }
}

@media (max-width: 1023px) {
    /*
     * The base header keeps the closed panel in the accessibility tree because
     * it only changes opacity and pointer events. Visibility complements the
     * JS-managed aria-hidden/inert state without changing the open animation.
     */
    .anh-header .anh-mobile-panel {
        visibility: hidden;
    }

    .anh-header .anh-mobile-panel.is-open {
        visibility: visible;
    }
}

@media (max-width: 560px) {
    .anh-header .anh-search-toggle {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
}

@media (max-width: 640px) {
    /*
     * A fixed WhatsApp FAB overlaps fields while a long enquiry form occupies
     * the viewport. Hide the competing overlay only for that interval.
     */
    html.anh-mobile-form-in-view .ah-footer-wrap .ah-whatsapp-fab {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(8px);
    }
}
