/**
 * Landing pages - accessibility overrides (text resize / reflow, reduced motion).
 *
 * Linked last from single-landing_page.php so it wins over every block sheet.
 * The block sheets are served by user agent (desktop-style.css vs mobile-style.css),
 * so the rules are scoped by the body class the template sets for the same reason:
 *   body.lp-desktop  - desktop-style.css is loaded
 *   body.lp-mobile   - mobile-style.css is loaded
 *
 * Part 1 keeps the exact current size when the text fits and only lets the box grow
 * when the text is larger (browser zoom / text resize). Nothing visible changes at 100%.
 * Part 2 only applies to a desktop-served page at a narrow CSS width (zoomed in or a
 * narrow window), where the desktop sheets have no responsive rules at all.
 * Part 3 removes motion when the OS asks for reduced motion.
 */

/* ---------- Part 1: text containers grow with their content ---------- */

/* Hero (background image / background video / image) */
body.lp-desktop .block-container.hero-v1-container,
body.lp-desktop .block-container.hero-v3-container {
    height: auto;
    min-height: 519px;
}
body.lp-mobile .block-container.hero-v1-container .content-wrapper {
    height: auto;
    min-height: 467px;
}

/* Testimonials (text cards) */
body.lp-desktop .testimonials-content-block-container .single-testimonial-container {
    height: auto;
    min-height: 394px;
}
body.lp-mobile .testimonials-content-block-container .single-testimonial-container {
    height: auto;
    min-height: 420px;
}

/* Implementation cards */
body.lp-desktop .implementation-block-container.block-container .single-card-container {
    height: auto;
    min-height: 232px;
}
body.lp-mobile .implementation-block-container.block-container .single-card-container {
    height: auto;
    min-height: 192px;
}

/* Our commitment items */
body.lp-desktop .our-commitment-block-container.block-container .single-commitment-container,
body.lp-mobile .our-commitment-block-container.block-container .single-commitment-container {
    height: auto;
    min-height: 112px;
}

/* Tabs section panel, trials cards, countdown tab (desktop sheets only) */
body.lp-desktop .tabs-section-block-container.block-container .tab-panel.active {
    height: auto;
    min-height: 252px;
}
body.lp-desktop .trials-block-container.block-container .trials-container.one-trial .single-trial-container,
body.lp-desktop .trials-block-container.block-container .trials-container.two-trials .single-trial-container {
    height: auto;
    min-height: 541px;
}
body.lp-desktop .countdown-tab-container {
    height: auto;
    min-height: 252px;
}

/* ---------- Part 2: desktop sheets at a narrow CSS width (zoom / narrow window) ---------- */

@media (max-width: 768px) {
    /* Side paddings sized for 1440px eat most of a 320px viewport */
    body.lp-desktop .block-container.navigation-bar-container .navigation-bar-wrapper,
    body.lp-desktop .block-container.footer-container .footer-wrapper,
    body.lp-desktop .block-container.hero-v1-container .inner-content-wrapper,
    body.lp-desktop .block-container.hero-v2-container .inner-content-wrapper,
    body.lp-desktop .block-container.hero-v3-container .inner-content-wrapper,
    body.lp-desktop .countdown-tab-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Fixed-width wrappers and media become fluid */
    body.lp-desktop .block-container.navigation-bar-container .navigation-bar-wrapper,
    body.lp-desktop .block-container.footer-container .footer-wrapper,
    body.lp-desktop .form-section-block-container .gravity-form-container,
    body.lp-desktop .form-section-block-container .gform_wrapper,
    body.lp-desktop .block-container.content-container .image-container,
    body.lp-desktop .block-container.content-container .video-container,
    body.lp-desktop .block-container.hero-v2-container .video-container,
    body.lp-desktop .block-container.hero-v3-container .image-container-desktop,
    body.lp-desktop .trials-block-container.block-container .single-trial-container,
    body.lp-desktop .testimonials-content-block-container .single-testimonial-container,
    body.lp-desktop .testimonials-video-block-container .single-testimonial-container,
    body.lp-desktop .implementation-block-container.block-container .single-card-container,
    body.lp-desktop .block-container .btn-container {
        width: 100%;
        max-width: 100%;
    }
    body.lp-desktop .block-container.content-container .image-container,
    body.lp-desktop .block-container.content-container .video-container,
    body.lp-desktop .block-container.hero-v2-container .video-container,
    body.lp-desktop .block-container.hero-v3-container .image-container-desktop {
        height: auto;
    }

    /* Two-column and three-card rows stack */
    body.lp-desktop .block-container.hero-v2-container .inner-content-wrapper,
    body.lp-desktop .block-container.hero-v3-container .inner-content-wrapper,
    body.lp-desktop .block-container.content-container .content-wrap,
    body.lp-desktop .block-container.content-container .content-wrap.reversed-content,
    body.lp-desktop .tabs-section-block-container.block-container .tab-panel.active,
    body.lp-desktop .trials-block-container.block-container .trials-container.two-trials,
    body.lp-desktop .trials-block-container.block-container .trials-block-wrapper.one-trial-container,
    body.lp-desktop .testimonials-content-block-container .testimonials-container,
    body.lp-desktop .testimonials-video-block-container .testimonials-container,
    body.lp-desktop .implementation-block-container.block-container .implementation-cards-container,
    body.lp-desktop .countdown-tab-container,
    body.lp-desktop .block-container.footer-container .footer-content {
        flex-direction: column;
        align-items: stretch;
        row-gap: 24px;
    }
    body.lp-desktop .tabs-section-block-container.block-container .tab-panel.active .content-container {
        max-width: 100%;
    }
    body.lp-desktop .block-container.content-container .left-side-container,
    body.lp-desktop .block-container.content-container .right-side-container {
        max-width: 100%;
    }
    body.lp-desktop .tabs-section-block-container.block-container .tab-buttons,
    body.lp-desktop .clients-block-container .clients-container,
    body.lp-desktop .crops-block-container .crops-items-container,
    body.lp-desktop .products-block-container .products-container,
    body.lp-desktop .pdf-section-block-container .pdf-container,
    body.lp-desktop .our-commitment-block-container.block-container .commitment-container {
        flex-wrap: wrap;
    }

    /* Clamped text is shown in full instead of being cut when it grows */
    body.lp-desktop .block-container * {
        -webkit-line-clamp: unset !important;
        max-height: none !important;
    }
}

/* ---------- Part 3: reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    /* Scroll-in states: content is visible and still (the JS also skips the observers) */
    .single-testimonial-container.animation-from-top,
    .implementation-cards-container .single-card-container.animation-from-top,
    .block-container.content-container .left-side-container,
    .block-container.content-container .image-container,
    .block-container.content-container .video-container {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
