/* Mobile-first responsive system. Loaded after page styles (equal/higher
   specificity wins ties). Tokens come from token.css. */

/* ---- 1. Global base (mobile) ---- */
*, *::before, *::after { box-sizing: border-box; }

/* img, video { max-width: 100%; height: auto; } */

input, select, textarea, button { max-width: 100%; }

/* ---- 2. Mobile base layout: stack major horizontal rows ---- */
.hero_container,
.hero_container2,
.application_section,
.our_story_text,
.hero_listen,
.sponsor,
.get_involved2,
.impact-container,
.contact-details,
.main_can_we,
.hero,
.impact-hero,
.impact-hero2,
.hero2,
.hero3,
.story {
  flex-direction: column;
}

/* Fixed-width blocks collapse to fluid on mobile */
.our_story_p,
.hero_programmes_p2,
.hero_programmes_emp_p1,
.hero_programmes_com_p1,
.hero_help_p,
.hero_sponsor_p,
.you,
.edu,
.emp,
.com,
.youth,
.dev,
.hum,
.ment,
.hero_programmes_emp,
.hero_programmes_com,
.hero_listen1,
.hero_listen2,
.hero_listen3,
.register-box,
.login-box {
  width: auto;
  max-width: 100%;
}

.container_hero_right img,
.hero_right img,
.our_story_text img,
.hero-right img,
.hero2 img,
.hero3-right img,
.card-1 img,
.sponsor img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* ---- 2b. Mobile typography: reduce oversized headings/text (design preserved, just sized down) ---- */
@media (max-width: 640px) {
  .container h1 { font-size: 1rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.1rem; }

  .second_hero h1,
  .Our_Impact h1,
  .hero_about h1,
  .our_story h1,
  .hero_programmes h1,
  .hero_help_h1,
  .hero_sponsor_h1,
  .get_involved h1,
  .contact-hero h1 { font-size: 2rem; }

  .our_story h2 { font-size: 1.5rem; }
  .hero_left2 h1 { font-size: 1.4rem; }
  .cor h1 { font-size: 1.5rem; }
  .hero_help_listen { font-size: 1.4rem; }
  .hero_listen h3,
  .hero_listen1 h3,
  .hero_listen2 h3,
  .hero_listen3 h3 { font-size: 1.1rem; }
  .volunteer, .support, .partner, .spread { font-size: 1.05rem; }
  .commitment_h1 h1 { font-size: 1.75rem; }
  .contact_us, .foot h3, .p-foot, .social-media h2 { font-size: 1.2rem; }
  .impact-box h3 { font-size: 1.5rem; }
  .contact-section h1 { font-size: 1.4rem; }
  .contact-info h2 { font-size: 1.4rem; }
  .contact-form h2 { font-size: 1.25rem; }
  .contact-bottom h2 { font-size: 1.35rem; }
  .card-1 p { font-size: 1rem; }
  footer { font-size: 1.1rem; }

  p { max-width: 100%; }
}

/* ---- 3. Tablet: compressed desktop composition ---- */
@media (min-width: 641px) {
  .hero_container,
  .hero_container2,
  .application_section,
  .our_story_text,
  .hero_listen,
  .sponsor,
  .get_involved2,
  .impact-container,
  .contact-details,
  .main_can_we,
  .hero,
  .impact-hero,
  .impact-hero2,
  .hero2,
  .hero3,
  .story {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .our_story_p,
  .hero_programmes_p2,
  .hero_programmes_emp_p1,
  .hero_programmes_com_p1,
  .hero_help_p,
  .hero_sponsor_p,
  .you,
  .edu,
  .emp,
  .com,
  .youth,
  .dev,
  .hum,
  .ment,
  .hero_programmes_emp,
  .hero_programmes_com,
  .hero_listen1,
  .hero_listen2,
  .hero_listen3 {
    max-width: 100%;
  }

  .emp,
  .youth,
  .dev,
  .hum,
  .ment {
    max-width: 600px;
  }

  .container_hero_right img,
  .hero_right img,
  .hero-right img,
  .hero2 img,
  .hero3-right img,
  .card-1 img {
    max-width: 600px;
  }

  .card, .pro {
    margin-left: var(--space-6);
    margin-right: var(--space-6);
  }

  .our_story_text img { max-width: 700px; }
  .sponsor img { max-width: 480px; }
  .login-box { width: 350px; max-width: 100%; }
}

/* ---- 4. Desktop: full composition ---- */
@media (min-width: 1025px) {
  .hero_container,
  .hero_container2,
  .application_section,
  .our_story_text,
  .hero_listen,
  .sponsor,
  .get_involved2,
  .impact-container,
  .contact-details,
  .main_can_we,
  .hero,
  .impact-hero,
  .impact-hero2,
  .hero2,
  .hero3,
  .story {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .container_hero_right img { width: 540px; height: 505px; }
  .hero_right img { width: 600px; height: 400px; }
  .our_story_text img { width: 700px; height: 350px; }
  .hero-right img,
  .hero2 img,
  .hero3-right img { width: 600px; height: 400px; }
  .card-1 img { width: 600px; height: 500px; }
  .sponsor img { width: 480px; }

  .card, .pro {
    margin-left: 100px;
    margin-right: 100px;
  }
}
