/* Home page corrections: Our Sponsor (mobile), hero button colour,
   Our Programmes spacing (mobile), Be Part of the Change (mobile).
   Desktop layout is preserved; only the hero button colour changes on all
   viewports, as required by the brief. */

/* ---- Stage 2: hero button uses the primary token, not the error token ----
   Root cause: during the colour-token unification the hero CTA's red
   background was mapped to --color-error. The established primary button
   colour elsewhere on the site is --color-primary. */
.btn_app1 {
  background-color: var(--color-primary);
}

.btn_app1:hover,
.btn_app1:focus-visible {
  background-color: var(--color-primary-hover);
}

.btn_app1 .AA {
  color: var(--color-background);
}

/* ---- Mobile + tablet ---- */
@media (max-width: 1024px) {
  /* ---------- Our Sponsor ---------- */

  /* Root cause: headings were flex containers (anonymous flex item, not
     reliably centred), .sponsor used margin-top: -70px, the paragraph had
     margin-right: 180px, and the image was pinned to 480x600 with 100px
     vertical margins — all of which break on narrow screens. */
  .hero_sponsor {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
    padding: var(--space-6) var(--space-4);
  }

  .hero_sponsor_h1 {
    display: block;
    text-align: center;
    padding-top: 0;
    font-size: 2rem;
    margin: 0 0 var(--space-4);
  }

  .hero_sponsor_h2 {
    display: block;
    text-align: center;
    font-size: 1.4rem;
    line-height: var(--line-height-heading);
    margin: 0 0 var(--space-5);
  }

  .sponsor {
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    margin-top: 0;
  }

  .sponsor p,
  .hero_sponsor_p {
    margin: 0;
    text-align: center;
    line-height: var(--line-height-base);
    max-width: 60ch;
  }

  .sponsor img {
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 0;
    border-radius: var(--radius-md);
  }

  /* ---------- Our Programmes: intro paragraph -> card area spacing ---------- */
  .hero_programmes4 {
    margin-bottom: var(--space-6);
  }

  .hero_programmes_3 > .edu,
  .hero_programmes_3 > .emp,
  .hero_programmes_3 > .com,
  .hero_programmes_3 > .youth {
    min-width: 0;
    overflow-wrap: break-word;
  }

  /* ---------- Be Part of the Change ---------- */

  /* Root cause: .get_involved2 is a two-column grid (50% 50%) with no mobile
     override, so the four cards sat side by side on phones; each card also
     carried margin-right: 50px. */
  .main_get_involved {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
  }

  .get_involved_h3 {
    margin-left: 0;
    margin-right: 0;
    padding: var(--space-4);
    text-align: center;
    line-height: var(--line-height-base);
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
  }

  .get_involved2 {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-4);
  }

  .volunteer,
  .support,
  .partner,
  .spread {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding: var(--space-4);
    line-height: var(--line-height-base);
  }

  .together_can,
  .people {
    text-align: center;
    font-size: 1.25rem;
    line-height: var(--line-height-heading);
    margin-left: 0;
    margin-right: 0;
    padding: var(--space-4);
  }
}

/* ---------- Follow-up refinements (same sections, mobile/tablet) ---------- */
@media (max-width: 1024px) {
  /* Our Sponsor: the paragraph carried a hard-coded padding: 30px on top of
     the section padding, which squeezed the text into a narrow column on
     phones. Give it the full content width with balanced gutters instead, and
     add a clear (but not excessive) gap above the section. */
  .hero_sponsor {
    margin-top: var(--space-8);
    padding: var(--space-6) var(--space-4);
  }

  .hero_sponsor_p {
    width: 100%;
    max-width: 68ch;
    padding: 0;
    margin: 0;
    text-align: center;
    line-height: var(--line-height-base);
  }

  .sponsor .p {
    width: 100%;
  }

  /* Be Part of the Change: "Get Involved" had margin-left/right: 400px, which
     collapses the heading to a sliver on phones and pushes it off-centre.
     Balance it with token margins and centre the text at block level. */
  .get_involved h1 {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
    margin-top: var(--space-6);
    display: block;
    text-align: center;
    font-size: 2rem;
    padding: var(--space-3) var(--space-4);
  }

  /* "Be Part of the Change" is a flex container, so its text is an anonymous
     flex item; block-level centring centres it reliably. */
  .get_involved1 {
    display: block;
    text-align: center;
    padding: 0 var(--space-4);
  }

  .get_involved1 h2 {
    font-size: 1.6rem;
    line-height: var(--line-height-heading);
    margin: 0 0 var(--space-4);
  }

  /* Rhythm between intro, cards and the Contact Us button */
  .get_involved_h3 {
    margin-top: 0;
    margin-bottom: var(--space-6);
  }

  .get_involved2 {
    margin-bottom: var(--space-6);
  }

  /* Contact Us button: separation from the cards, full-width tap target */
  .cont {
    margin-top: var(--space-2);
    margin-bottom: var(--space-6);
    padding: 0 var(--space-4);
  }

  .cont .con {
    width: 100%;
    max-width: 320px;
    min-height: 48px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-3) var(--space-4);
  }
}