/* Home page: "Our Programmes" mobile grid + "Our Impact" heading alignment.
   Desktop (>=1025px) keeps the accepted layout; the heading-balance rule is
   responsive on purpose (see note below). */

/* ---- Our Impact: genuinely centred heading ----
   Root cause of the misalignment: the h1 is a flex container with asymmetric
   side margins (margin-left: 60px vs margin-right: 20px), so it is centred
   inside its own off-centre box, not inside the section. Balance the margins
   so the heading's own box is centred; text-align is already set in story.css. */
@media (max-width: 1024px) {
  .Our_Impact h1 {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
    padding: var(--space-6) var(--space-4);
    text-align: center;
  }

  /* Keep the heading aligned with the section content below it */
  .Our_Impact {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
  }
}

@media (min-width: 1025px) {
  .Our_Impact h1 {
    margin-left: 20px;
    margin-right: 20px;
  }
}

/* ---- Our Programmes: stack on mobile ----
   Root cause: .hero_programmes_3 is a 2-column grid (grid-template-columns:
   50% 50%) with 30px padding, and each card adds another 20px margin per
   side, so on phones each card was squeezed into ~45% of an already narrow
   column. One column plus token gutters fixes it. */
@media (max-width: 640px) {
  .hero_programmes_3 {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: var(--space-4);
    margin-left: var(--space-4);
    margin-right: var(--space-4);
  }

  .hero_programmes_3 > .edu,
  .hero_programmes_3 > .emp,
  .hero_programmes_3 > .com,
  .hero_programmes_3 > .youth {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
    width: auto;
    max-width: 100%;
  }

  .hero_programmes_emp,
  .hero_programmes_com,
  .you {
    width: auto;
    max-width: 100%;
  }
}

/* Tablet: two columns are still too tight with the current card margins */
@media (min-width: 641px) and (max-width: 1024px) {
  .hero_programmes_3 {
    gap: var(--space-5);
    padding: var(--space-5);
    margin-left: var(--space-4);
    margin-right: var(--space-4);
  }

  .hero_programmes_3 > .edu,
  .hero_programmes_3 > .emp,
  .hero_programmes_3 > .com,
  .hero_programmes_3 > .youth {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  .hero_programmes_emp,
  .hero_programmes_com,
  .you {
    width: auto;
    max-width: 100%;
  }
}