/* WellStream responsive overrides — loaded after inline styles, wins via !important */
#top { overflow-x: clip; }

@media (max-width: 1240px) {
  #top { min-width: 0 !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  #ws-desknav, #ws-navactions { display: none !important; }
  #ws-burger { display: grid !important; }
  #top div[style*="max-width: 1280px"], #top div[style*="max-width:1280px"] { padding-left: 28px !important; padding-right: 28px !important; }
  section[data-screen-label="Values"] div[style*="repeat(4"] { grid-template-columns: 1fr 1fr !important; }
  footer > div[style*="grid-template-columns"] { grid-template-columns: 1fr 1fr !important; row-gap: 44px !important; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  #ws-navbar { padding: 12px 20px !important; }
  #top div[style*="grid-template-columns"], #top a[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  footer > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  #top div[style*="max-width: 1280px"], #top div[style*="max-width:1280px"] { padding-left: 20px !important; padding-right: 20px !important; }
  #top h1 { font-size: clamp(34px, 10vw, 46px) !important; line-height: 1.08 !important; }
  #top h2 { font-size: clamp(25px, 7vw, 34px) !important; line-height: 1.14 !important; }
  section[data-screen-label*="Hero"] div[style*="max-width: 1280px"] { padding-top: 150px !important; padding-bottom: 56px !important; }
  section[data-screen-label="Hero"] > div { min-height: 0 !important; }
  section[data-screen-label*="Hero"] div[style*="min-height"] { min-height: 0 !important; }
  /* service family rows stack */
  #top a[href^="Family.dc.html"][style*="grid-template-columns"] { padding: 26px 4px !important; }
  #top a[href^="Family.dc.html"] div[style*="width: 390px"], #top a[href^="Family.dc.html"] div[style*="width:390px"] { width: 100% !important; height: 210px !important; }
  /* sticky sidebars become normal flow */
  #top div[style*="sticky"][style*="120px"] { position: static !important; }
  /* marquee scale */
  section[data-screen-label="Marquee"] > div { font-size: 36px !important; gap: 14px !important; flex-wrap: wrap; }
  /* CTA + hero button rows wrap/stack */
  section[data-screen-label="CTA"] div[style*="space-between"] { flex-direction: column !important; align-items: flex-start !important; gap: 30px !important; }
  #top div[style*="display: flex"][style*="gap: 14px"],
  #top div[style*="display: flex"][style*="gap: 18px"] { flex-wrap: wrap; }
  /* hero stat strip: tighten */
  #top div[style*="border-left"][style*="padding: 26px"] { border-left: none !important; padding-left: 0 !important; }
  #top div[style*="padding: 26px 32px"] { padding: 18px 0 0 !important; }
  footer { padding-left: 20px !important; padding-right: 20px !important; }
}

/* ---- follow-up fixes ---- */
@media (max-width: 1100px) {
  footer > div[style*="space-between"] { flex-wrap: wrap; gap: 48px !important; }
}
@media (max-width: 760px) {
  footer > div[style*="space-between"] { flex-direction: column !important; align-items: flex-start !important; gap: 40px !important; }
  footer > div { padding-left: 20px !important; padding-right: 20px !important; }
  /* section headers with side button (What we do / View All Services, Values, families) stack */
  #top div[style*="flex-end"][style*="space-between"] { flex-direction: column !important; align-items: flex-start !important; gap: 24px !important; }
  #top div[style*="flex-end"][style*="space-between"] > a { align-self: flex-start; }
  #top h2 { overflow-wrap: break-word; }
}
