/*
 * C7 HF3 — MOBILE RESPONSIVENESS LOCK
 * Built from live-device UAT screenshots supplied 2026-10-09.
 * Scope: mobile/tablet-only layout repairs. Desktop authority is untouched.
 */

@media (max-width: 900px) {
  html,
  body,
  body.eh-wp-theme,
  body.eh-wp-theme .eh-site {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body.eh-wp-theme main,
  body.eh-wp-theme section,
  body.eh-wp-theme article,
  body.eh-wp-theme .eh-container,
  body.eh-wp-theme [class*="__inner"],
  body.eh-wp-theme [class*="__grid"] {
    min-width: 0;
  }

  /* SERVICES PAGE — later desktop fidelity rules were overriding the
     earlier mobile stack. Lock the Air/Sea split and lower three services
     to a true single-column reading flow on phones/tablets. */
  body.eh-wp-theme .detail-split {
    grid-template-columns: 1fr !important;
  }
  body.eh-wp-theme .detail-split .detail-photo {
    width: 100% !important;
    height: clamp(240px, 48vw, 360px) !important;
    min-height: 0 !important;
  }
  body.eh-wp-theme .detail-split .detail-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  body.eh-wp-theme .detail-split .detail-copy {
    width: 100% !important;
    padding: 30px 24px 32px !important;
  }
  body.eh-wp-theme .service-triptych {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }
  body.eh-wp-theme .service-triptych > article {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #e0e6eb !important;
  }
  body.eh-wp-theme .service-triptych > article:last-child {
    border-bottom: 0 !important;
  }
  body.eh-wp-theme .service-triptych > article > img {
    position: static !important;
    display: block !important;
    order: 2 !important;
    width: 100% !important;
    height: clamp(230px, 52vw, 340px) !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    opacity: 1 !important;
  }
  body.eh-wp-theme .service-triptych .trip-copy {
    order: 1 !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 30px 24px 28px !important;
    background: #fff !important;
  }
  body.eh-wp-theme .service-triptych .trip-copy > p,
  body.eh-wp-theme .service-triptych .trip-copy li {
    max-width: none !important;
  }

  /* FAQ — tablet rule created two narrow sidebar columns and remained
     active on phones. Stack support + Quick Help + CTA instead. */
  body.eh-wp-theme .faq-sidebar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 18px !important;
  }
  body.eh-wp-theme .faq-ready {
    grid-column: auto !important;
  }
  body.eh-wp-theme .faq-help,
  body.eh-wp-theme .faq-topics,
  body.eh-wp-theme .faq-ready {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Keep quote/contact side cards readable instead of allowing secondary
     grids to squeeze to narrow columns at intermediate mobile widths. */
  body.eh-wp-theme .rq-sidebar,
  body.eh-wp-theme .ct-side {
    grid-template-columns: 1fr !important;
  }

  /* Homepage: use one calm column for complex lower feature bands on
     smaller tablets as well as phones. This prevents half-width copy. */
  body.eh-wp-theme .eh-supply {
    grid-template-columns: 1fr !important;
  }
  body.eh-wp-theme .eh-supply__copy,
  body.eh-wp-theme .eh-consolidation__copy {
    padding: 28px 24px !important;
  }
  body.eh-wp-theme .eh-supply__network,
  body.eh-wp-theme .eh-warehouse {
    min-height: 260px !important;
  }
  body.eh-wp-theme .eh-quote {
    grid-template-columns: 1fr !important;
  }
  body.eh-wp-theme .eh-quote__worker,
  body.eh-wp-theme .eh-quote__map {
    min-height: 230px !important;
  }

  /* Footer remains the Homepage HF6 global footer, but never lets long
     contact text force horizontal scrolling. */
  body.eh-wp-theme .eh-footer,
  body.eh-wp-theme .eh-footer__grid,
  body.eh-wp-theme .eh-footer-contact,
  body.eh-wp-theme .eh-footer-brand {
    min-width: 0 !important;
  }
  body.eh-wp-theme .eh-footer a,
  body.eh-wp-theme .eh-footer p,
  body.eh-wp-theme .eh-footer strong,
  body.eh-wp-theme .eh-footer span {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 720px) {
  /* At real handset widths, cards read better as one column even on
     devices reporting a larger CSS viewport. */
  body.eh-wp-theme .eh-service-grid,
  body.eh-wp-theme .service-grid {
    grid-template-columns: 1fr !important;
  }
  body.eh-wp-theme .service-card:last-child {
    grid-column: auto !important;
    max-width: none !important;
  }

  body.eh-wp-theme .faq-layout,
  body.eh-wp-theme .rq-layout,
  body.eh-wp-theme .ct-grid {
    grid-template-columns: 1fr !important;
  }

  body.eh-wp-theme .faq-help {
    min-height: 360px !important;
  }
  body.eh-wp-theme .faq-help__content {
    width: min(68%, 360px) !important;
  }
  body.eh-wp-theme .faq-help__photo {
    left: 50% !important;
    width: 50% !important;
  }
}

@media (max-width: 560px) {
  /* Compact, readable content spacing without changing approved type style. */
  body.eh-wp-theme .detail-split .detail-copy,
  body.eh-wp-theme .service-triptych .trip-copy {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  body.eh-wp-theme .faq-help {
    min-height: 410px !important;
    padding: 22px !important;
  }
  body.eh-wp-theme .faq-help__content {
    width: 62% !important;
  }
  body.eh-wp-theme .faq-help__buttons {
    left: 22px !important;
    right: 22px !important;
    grid-template-columns: 1fr !important;
  }

  body.eh-wp-theme .eh-footer__grid {
    grid-template-columns: 1fr !important;
  }
}
