/* ============================================================
   PPF WEBSITE — style.css
   Paddy Pallin Foundation
   ============================================================ */

/* ── 0. Google Fonts ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Hind:wght@300;400;500;600;700&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Merriweather+Sans:ital,wght@0,300;0,400;0,700;0,800;1,300;1,400;1,700;1,800&display=swap');

/* ── 1. Custom Properties ──────────────────────────────────── */
:root {
  --primary:    #526f72;
  --dark:       #254151;
  --accent:     #efc94c;
  --accent-dark:#c9a52a;
  --light-bg:   #fffef7;
  --cream:      #ece7df;
  --border:     #e3e2db;
  --text:       #474e54;
  --text-light: #6d7c84;
  --sage:       #9bbab2;
  --white:      #ffffff;
  --nav-height: 72px;

  --font-serif:   'Merriweather', Georgia, 'Times New Roman', serif;
  --font-sans:    'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display: 'Merriweather Sans', 'Hind', Helvetica, Arial, sans-serif;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.12);
  --radius:     6px;
  --transition: 0.22s ease;
}

/* ── 2. Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--light-bg);
  line-height: 1.7;
  font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }

ul { list-style: none; }

/* ── 3. Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--dark);
}

h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.8;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

/* ── 4. Layout Utilities ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 5rem 0; }
.section--sm { padding: 3rem 0; }
.section--dark { background: var(--dark); color: var(--white); }
.section--cream { background: var(--cream); }
.section--primary { background: var(--primary); color: var(--white); }

.section--dark h2,
.section--dark h3,
.section--primary h2,
.section--primary h3 { color: var(--white); }

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header h2 { margin-bottom: 0.75rem; }

.text-center { text-align: center; }
.text-white { color: var(--white) !important; }

/* ── 5. Navigation ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: transparent;
  box-shadow: none;
  /* Smooth transition when scrolling solidifies the bar */
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

/* Header solidifies once user scrolls past the hero */
.site-header.scrolled {
  background: rgba(37, 65, 81, 0.97);
  box-shadow: 0 2px 16px rgba(0,0,0,0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.site-logo img {
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  /* Always display as white — works for both transparent and dark-bg states */
  filter: brightness(0) invert(1);
}

/* Main nav list */
.main-nav { display: flex; align-items: center; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list > li { position: relative; }

.nav-list > li > a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.nav-list > li > a:hover,
.nav-list > li.active > a {
  color: var(--accent);
  background: rgba(255,255,255,0.12);
}

/* Donate button in nav */
a.nav-donate {
  background: var(--accent);
  color: var(--dark) !important;
  padding: 0.45rem 1.1rem !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  transition: background var(--transition) !important;
}
a.nav-donate:hover { background: var(--accent-dark) !important; }

/* Dropdown arrow indicator */
.has-dropdown > a::after {
  content: ' ▾';
  font-size: 0.65rem;
  opacity: 0.6;
}

/* Level 2 dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: var(--dark);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown { display: block; }

.dropdown li { border-bottom: 1px solid rgba(255,255,255,0.07); }
.dropdown li:last-child { border-bottom: none; }

.dropdown li a {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.88);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.dropdown li a:hover {
  background: var(--primary);
  color: var(--white);
}

/* Level 3: Previous Campaigns flyout */
.sub-dropdown-wrap {
  position: relative;
}

.sub-dropdown-wrap > a::after {
  content: ' ›';
  font-size: 0.8rem;
  float: right;
  opacity: 0.7;
  margin-left: 0.5rem;
}

.sub-dropdown {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 220px;
  background: var(--dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-md);
  z-index: 300;
}

.sub-dropdown-wrap:hover > .sub-dropdown,
.sub-dropdown-wrap:focus-within > .sub-dropdown { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── 6. Mobile Nav ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .hamburger { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark);
    overflow-y: auto;
    padding: 1rem 0 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .main-nav.open { transform: translateX(0); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-list > li > a {
    color: var(--white);
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  .nav-list > li > a:hover { background: var(--primary); color: var(--white); }

  a.nav-donate {
    margin: 1rem 1.5rem;
    text-align: center;
    background: var(--accent) !important;
  }

  /* Mobile dropdowns: accordion */
  .dropdown,
  .sub-dropdown {
    display: none;
    position: static;
    box-shadow: none;
    border-radius: 0;
    background: rgba(0,0,0,0.25);
    min-width: unset;
    width: 100%;
    left: auto;
    top: auto;
  }

  .dropdown.open,
  .sub-dropdown.open { display: block; }

  .dropdown li a {
    padding-left: 2.5rem;
    font-size: 0.9rem;
  }

  .sub-dropdown li a { padding-left: 3.5rem; }

  .has-dropdown > a::after { float: right; }
  .sub-dropdown-wrap > a::after { float: right; }
}

/* ── 7. Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 88vh;
  min-height: 520px;
  max-height: 820px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero--short {
  height: 50vh;
  min-height: 300px;
  max-height: 480px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.1s linear;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.25) 60%,
    transparent 100%
  );
}

.hero--short .hero__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.15) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3rem 0;
}

.hero__content h1,
.hero__content h2 { color: var(--white); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }

.hero__content h1 { margin-bottom: 0.75rem; }

.hero__content .lead { color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; }

/* ── 8. Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.72rem 1.9rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--dark);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--dark); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--dark); }

.btn-outline-dark {
  background: transparent;
  color: var(--dark);
  border-color: var(--dark);
}
.btn-outline-dark:hover { background: var(--dark); color: var(--white); }

/* ── 9. Info Cards (4-col, beige) ───────────────────────────── */
.info-cards {
  background: var(--cream);
  padding: 5rem 0;
}

.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.info-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.info-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--white);
  flex-shrink: 0;
}

.info-card__icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--white);
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.info-card .btn {
  font-size: 0.82rem;
  color: var(--dark);
  border-color: transparent;
  background: transparent;
  padding: 0;
  font-weight: 700;
  border-radius: 0;
  letter-spacing: 0;
}

.info-card .btn:hover { color: var(--primary); }

/* ── 10. Stats Section (teal + texture) ─────────────────────── */
.stats-section {
  position: relative;
  background-color: var(--primary);
  background-image: url('/assets/images/bg-scatter.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  padding: 6rem 0;
  overflow: hidden;
}

/* Teal overlay to ensure text readability over texture */
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(82, 111, 114, 0.82);
}

.stats-section > * { position: relative; z-index: 1; }
.stats-section .container { position: relative; z-index: 1; }

.stats-lead {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.stats-lead h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  color: var(--white);
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.stat-item .stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-item .stat-label {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  font-style: italic;
}

.stats-footer {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.stats-footer p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  margin-bottom: 0;
}

/* Legacy stats-bar alias for any pages that still use it */
.stats-bar {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 0;
}

/* ── Mission Split (image left + text right) ────────────────── */
.mission-split {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 560px;
}

.mission-split__img {
  overflow: hidden;
  position: relative;
}

.mission-split__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.mission-split__content {
  background: var(--light-bg);
  padding: 5rem 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mission-split__content .section-label { margin-bottom: 0.75rem; }

.mission-split__content h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.mission-split__content h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.mission-split__content p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.mission-split__content .btn { align-self: flex-start; }

/* ── 10. Campaign Cards ─────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  /* Centre lone orphan cards in the last row */
  justify-items: stretch;
}

.cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
.cards-grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card__img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card__img img { transform: scale(1.05); }

.card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__body h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.card__body p  { font-size: 0.88rem; color: var(--text-light); flex: 1; }
.card__body .btn { margin-top: 1rem; align-self: flex-start; font-size: 0.8rem; }

/* ── 11. Featured Split ─────────────────────────────────────── */
.featured-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 460px;
}

.featured-split__img {
  overflow: hidden;
}

.featured-split__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-split__content {
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-split__content .section-label { margin-bottom: 0.75rem; }
.featured-split__content h2 { margin-bottom: 1rem; }
.featured-split__content p  { margin-bottom: 1.25rem; }

/* ── 12. People Grid ────────────────────────────────────────── */
.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.person-card {
  text-align: center;
}

.person-card__img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  border: 3px solid var(--border);
}

.person-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.person-card .role { font-size: 0.8rem; color: var(--primary); font-weight: 600; }
.person-card p { font-size: 0.85rem; color: var(--text-light); margin-top: 0.5rem; }

/* ── 13. Intro Strip ────────────────────────────────────────── */
.intro-strip {
  background: var(--primary);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.intro-strip h2 { color: var(--white); margin-bottom: 1rem; }
.intro-strip p  { color: rgba(255,255,255,0.88); max-width: 720px; margin: 0 auto 1.5rem; }

/* ── 14. Page Hero Banner ───────────────────────────────────── */
.page-hero {
  background: var(--dark);
  color: var(--white);
  /* Top padding accounts for the fixed overlay nav height */
  padding: calc(var(--nav-height) + 3.5rem) 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
}

.page-hero__content { position: relative; z-index: 2; }
.page-hero__content h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-hero__content p  { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }

/* ── 15. Content Layouts ────────────────────────────────────── */
.content-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.prose h2 { margin: 2rem 0 0.75rem; }
.prose h3 { margin: 1.5rem 0 0.5rem; color: var(--primary); }
.prose p  { margin-bottom: 1.1rem; }
.prose ul { margin: 0.75rem 0 1rem 1.5rem; list-style: disc; }
.prose ul li { margin-bottom: 0.4rem; }
.prose blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1.25rem;
  background: var(--cream);
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
}

/* Sidebar */
.sidebar-box {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-box h4 { margin-bottom: 0.75rem; color: var(--dark); }
.sidebar-box p  { font-size: 0.88rem; }
.sidebar-box .btn { width: 100%; text-align: center; }

/* ── 16. Donate Section ─────────────────────────────────────── */
.donate-cta {
  background: var(--accent);
  padding: 4rem 0;
  text-align: center;
}

.donate-cta h2 { color: var(--dark); margin-bottom: 0.75rem; }
.donate-cta p  { color: var(--dark); opacity: 0.8; margin-bottom: 1.5rem; max-width: 540px; margin-left: auto; margin-right: auto; }

/* ── 17. Form ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(82,111,114,0.15);
}

.form-group textarea { min-height: 130px; resize: vertical; }

/* ── 18. Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand img { height: 40px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; color: rgba(255,255,255,0.65); }

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { font-size: 0.85rem; color: rgba(255,255,255,0.7); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p { font-size: 0.78rem; color: rgba(255,255,255,0.45); }

.footer-charity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-charity img { height: 40px; opacity: 0.8; }

.acknowledgment {
  background: rgba(0,0,0,0.2);
  padding: 1.25rem 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
  line-height: 1.7;
}

/* ── 19. Responsive ─────────────────────────────────────────── */

/* Large tablet / small desktop */
@media (max-width: 1100px) {
  .cards-grid--4   { grid-template-columns: repeat(2, 1fr); }
  .people-grid     { grid-template-columns: repeat(3, 1fr); }
  .info-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top      { grid-template-columns: 1fr 1fr; }
  .mission-split   { grid-template-columns: 1fr 1.2fr; }
}

/* Tablet */
@media (max-width: 900px) {
  .cards-grid               { grid-template-columns: repeat(2, 1fr); }
  .featured-split           { grid-template-columns: 1fr; }
  .featured-split__img      { min-height: 300px; }
  .featured-split__content  { padding: 2.5rem 2rem; }
  .content-2col             { grid-template-columns: 1fr; }
  .stats-grid               { grid-template-columns: repeat(3, 1fr); }
  .people-grid              { grid-template-columns: repeat(2, 1fr); }
  .mission-split            { grid-template-columns: 1fr; }
  .mission-split__img       { min-height: 360px; }
  .mission-split__content   { padding: 3.5rem 2.5rem; }
  .hero                     { height: 80vh; }
}

/* Mobile */
@media (max-width: 600px) {
  :root { --nav-height: 60px; }

  .section     { padding: 3rem 0; }
  .info-cards  { padding: 3rem 0; }
  .stats-section { padding: 3.5rem 0; }

  .container { padding: 0 1.25rem; }

  /* nav */
  .site-logo img { height: 40px; max-width: 170px; }

  /* hero */
  .hero          { min-height: 400px; height: 75vh; }
  .hero__overlay {
    background: linear-gradient(
      to top,
      rgba(0,0,0,0.65) 0%,
      rgba(0,0,0,0.2) 60%,
      transparent 100%
    );
  }

  /* page hero */
  .page-hero        { padding: calc(var(--nav-height) + 2rem) 0 3rem; }
  .page-hero__bg    { opacity: 0.45; }

  /* grids */
  .cards-grid,
  .cards-grid--2    { grid-template-columns: 1fr; }
  .stats-grid       { grid-template-columns: 1fr; gap: 2rem; }
  .people-grid      { grid-template-columns: 1fr 1fr; }
  .info-cards-grid  { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .info-card        { padding: 1.5rem 1rem; }

  /* splits */
  .featured-split__content { padding: 2rem 1.5rem; }
  .mission-split__content  { padding: 2.5rem 1.5rem; }

  /* footer */
  .footer-top    { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* buttons */
  .flex-gap { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* Very small phones (320–375px) */
@media (max-width: 400px) {
  .info-cards-grid  { grid-template-columns: 1fr; }
  .people-grid      { grid-template-columns: 1fr; }
  .cards-grid--2    { grid-template-columns: 1fr; }
  .container        { padding: 0 1rem; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }
}

/* ── Wide screens (1440px+) ──────────────────────────────── */
@media (min-width: 1440px) {
  /* Give the content column a bit more breathing room */
  .container { max-width: 1300px; }

  /* Prevent full-bleed split sections becoming unusably wide on ultrawide monitors.
     The image side will crop gracefully via object-fit: cover. */
  .mission-split,
  .featured-split {
    max-width: 1700px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Slightly taller hero on large displays */
  .hero { max-height: 900px; }

  /* Extra section breathing room */
  .section { padding: 6rem 0; }
  .info-cards { padding: 6rem 0; }
  .stats-section { padding: 7rem 0; }
}

/* ── Ultra-wide (2200px+, 21:9 monitors) ─────────────────── */
@media (min-width: 2200px) {
  .container { max-width: 1480px; }

  .mission-split,
  .featured-split { max-width: 2000px; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 20. Focus / Accessibility ──────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* Smooth fade-in for page load */
body {
  animation: pageFadeIn 0.35s ease both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Print styles */
@media print {
  .site-header, .hamburger, .donate-cta, .site-footer { display: none; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}

/* ── 21. Utilities ──────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.mb-0  { margin-bottom: 0 !important; }
.mb-1  { margin-bottom: 0.5rem !important; }
.mb-2  { margin-bottom: 1rem !important; }
.mt-2  { margin-top: 1rem !important; }
.mt-3  { margin-top: 1.5rem !important; }
.gap-1 { gap: 0.5rem !important; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-gap { display: flex; gap: 1rem; flex-wrap: wrap; }
