/* PROVE Institute — mobile-responsive overrides.
   The site is styled inline; these rules re-flow the known layout patterns on
   small screens. The DC runtime serializes style attributes with spaces
   (e.g. "grid-template-columns: repeat(4, 1fr)"), so selectors match both the
   spaced (runtime) and unspaced (source) forms. */

@media (max-width: 900px) {

  /* ---- Page gutters: all width-capped containers ---- */
  [style*="max-width: 1280px"], [style*="max-width:1280px"],
  [style*="max-width: 1100px"], [style*="max-width:1100px"],
  [style*="max-width: 1080px"], [style*="max-width:1080px"],
  [style*="max-width: 880px"],  [style*="max-width:880px"],
  [style*="max-width: 860px"],  [style*="max-width:860px"] {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }

  /* ---- Header: hamburger nav ---- */
  [data-desktop-nav] { display: none !important; }
  [data-mobile-toggle] { display: flex !important; }
  nav[aria-label="Primary"] > div:first-child {
    padding: 0 18px !important;
  }

  /* ---- Headings & display sizes ---- */
  h1 { font-size: clamp(30px, 8vw, 42px) !important; }
  h2 { font-size: clamp(23px, 6vw, 30px) !important; }
  [style*="font-size: 62px"], [style*="font-size:62px"],
  [style*="font-size: 60px"], [style*="font-size:60px"],
  [style*="font-size: 52px"], [style*="font-size:52px"] { font-size: clamp(30px, 8vw, 42px) !important; }
  [style*="font-size: 54px"], [style*="font-size:54px"] { font-size: 38px !important; }
  [style*="font-size: 44px"], [style*="font-size:44px"] { font-size: 34px !important; }
  [style*="font-size: 40px"], [style*="font-size:40px"],
  [style*="font-size: 38px"], [style*="font-size:38px"] { font-size: 29px !important; }
  [style*="font-size: 34px"], [style*="font-size:34px"],
  [style*="font-size: 32px"], [style*="font-size:32px"],
  [style*="font-size: 30px"], [style*="font-size:30px"] { font-size: 25px !important; }
  [style*="font-size: 28px"], [style*="font-size:28px"],
  [style*="font-size: 27px"], [style*="font-size:27px"],
  [style*="font-size: 26px"], [style*="font-size:26px"] { font-size: 22px !important; }

  /* ---- Grid collapses ---- */
  /* Asymmetric editorial two-columns (text + aside etc.) */
  [style*="grid-template-columns: minmax"], [style*="grid-template-columns:minmax"] { grid-template-columns: 1fr !important; }
  /* 5-col footer sitemap + 5-col register toolbar */
  [style*="grid-template-columns: repeat(5, 1fr)"], [style*="grid-template-columns:repeat(5,1fr)"] { grid-template-columns: 1fr 1fr !important; }
  [style*="grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr"], [style*="grid-template-columns:1.4fr 1fr 1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }
  /* 4-col ladders / steppers / routing cards */
  [style*="grid-template-columns: repeat(4, 1fr)"], [style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: 1fr 1fr !important; }
  /* 3-col card grids */
  [style*="grid-template-columns: repeat(3, 1fr)"], [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
  /* symmetric 2-col */
  [style*="grid-template-columns: repeat(2, 1fr)"], [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns: 1fr 1fr"], [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  /* label-column rows (certification ladder, tier explainer) */
  [style*="grid-template-columns: 200px 1fr"], [style*="grid-template-columns:200px 1fr"],
  [style*="grid-template-columns: 140px 1fr"], [style*="grid-template-columns:140px 1fr"] { grid-template-columns: 1fr !important; }
  /* training rows: text + price column */
  [style*="grid-template-columns: 1fr auto"], [style*="grid-template-columns:1fr auto"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: 1fr auto"] > div:last-child,
  [style*="grid-template-columns:1fr auto"] > div:last-child {
    text-align: left !important;
    align-items: flex-start !important;
  }

  /* ---- Big flex rows that shouldn't squeeze ---- */
  [style*="gap: 64px"][style*="display: flex"], [style*="display:flex"][style*="gap:64px"],
  [style*="gap: 48px"][style*="display: flex"], [style*="display:flex"][style*="gap:48px"],
  [style*="gap: 44px"][style*="display: flex"], [style*="display:flex"][style*="gap:44px"] { flex-wrap: wrap; }

  /* Aside panels that used a left border as a divider */
  [style*="border-left: 1px solid rgb(226, 223, 214)"],
  [style*="border-left:1px solid #E2DFD6"] {
    border-left: none !important;
    padding-left: 0 !important;
  }

  /* Footer top block: stack brand + contact */
  footer [style*="gap: 48px"], footer [style*="gap:48px"] { flex-direction: column; }
  footer [style*="text-align: right"], footer [style*="text-align:right"] { text-align: left !important; }
}

@media (max-width: 560px) {
  /* Second tier: pairs become single columns on phones */
  [style*="grid-template-columns: repeat(4, 1fr)"], [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(5, 1fr)"], [style*="grid-template-columns:repeat(5,1fr)"],
  [style*="grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr"], [style*="grid-template-columns:1.4fr 1fr 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }

  [style*="max-width: 1280px"], [style*="max-width:1280px"],
  [style*="max-width: 1100px"], [style*="max-width:1100px"],
  [style*="max-width: 1080px"], [style*="max-width:1080px"],
  [style*="max-width: 880px"],  [style*="max-width:880px"],
  [style*="max-width: 860px"],  [style*="max-width:860px"] {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  /* Hero CTAs go full-width for tap targets */
  [style*="justify-content: center"][style*="gap: 14px"] > a,
  [style*="justify-content:center"][style*="gap:14px"] > a {
    flex: 1 1 100%;
    text-align: center;
  }

  /* Book-a-course stepper: hide connector lines, tighten */
  [style*="justify-content: space-between"] > span[style*="height: 1px"],
  [style*="justify-content:space-between"] > span[style*="height:1px"] { display: none; }
}
