/* ====================================================================================================
   Design Tokens
   Why: These reusable values keep colors, shadows, and spacing consistent across every page.
   Note: clamp(min, preferred, max) lets a value grow with the screen while staying within limits.
   ==================================================================================================== */
:root {
  --red: #B7322B;
  --gold: #F2C94C;
  --green: #1E7A3A;
  --black: #111;
  --white: #fff;
  --cream: #F7F3E9;
  --paper: #fbfaf6;
  --muted: #5d6368;
  --line: #d8ded9;
  --sage: #52705f;
  --ochre: #b86f32;
  --shadow: 0 24px 60px rgba(32, 33, 36, 0.12);
  --space-page: clamp(1.625rem, 5vw, 4.375rem);
  --space-section: clamp(4.375rem, 8vw, 7.5rem);
  --space-grid: clamp(1.5rem, 3vw, 2.5rem);
}

/* ====================================================================================================
   Reset / Base
   Why: Browser defaults vary, so this creates a predictable baseline before page-specific styling.
   ==================================================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  overflow-x: hidden;
  background: var(--cream);
  color: var(--black);
  font-family: Arial, Helvetica, sans-serif;
}

a { text-decoration: none; }

/* ====================================================================================================
   Shared Utilities
   Why: These small classes are reused in many pages to avoid repeating the same simple styling.
   ==================================================================================================== */
.eyebrow,
.section-label {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 0.83rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 0;
  color: white;
  font-family: Arial Black, Impact, sans-serif;
  letter-spacing: 0.46em;
}

.red { color: var(--red); }

.green,
.green-btn { color: var(--green); }

.orange,
.orange-btn { color: #b86f32; }

.gold,
.gold-btn { color: #d29b00; }

.red-bg { background: var(--red); }

.gold-bg { background: var(--gold); color: #111; }

.green-bg { background: var(--green); }

.orange-bg { background: #b86f32; }

.line-red { background: var(--red); }

.line-gold { background: var(--gold); }

.line-green { background: var(--green); }

.donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  margin-top: 0;
  min-width: clamp(6.75rem, 8.8vw, 10rem);
  min-height: clamp(2.5rem, 4vw, 3.5rem);
  padding: clamp(0.625rem, 1.15vw, 0.9rem) clamp(0.875rem, 1.15vw, 1.75rem);
  border: 1.5px solid var(--gold);
  border-radius: 0.4375rem;
  background: rgba(30, 122, 58, 0.7);
  box-shadow: none;
  color: white;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(0.68rem, 0.85vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  transition: 0.3s ease;
  white-space: nowrap;
}

.donate-btn:hover {
  background: var(--green);
  color: white;
  transform: translateY(-3px);
}

.outline-btn {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  border: 3px solid currentColor;
  border-radius: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
}

/* ====================================================================================================
   Header / Navigation
   Why: The desktop nav is a three-column grid: logo left, links centered, donate button right.
   ==================================================================================================== */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(0.75rem, 1vw, 1.25rem);
  padding: 1.125rem clamp(1.375rem, 2vw, 3.625rem);
  font-size: clamp(0.66rem, 6.9vw, 4.0rem);
}

.logo-wrap { display: inline-flex; align-items: center; justify-self: start; }

.logo {
  width: clamp(4rem, 6.6vw, 5.75rem);
  height: clamp(4rem, 6.6vw, 5.75rem);
  object-fit: contain;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-width: 0;
  width: 90%;
  gap: clamp(1.55rem, 1.25vw, 2.5rem);
  margin-top: 0;
}

.nav-links a {
  color: #f7f1df;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(0.62rem, 1.5vw, 3.0rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  text-transform: uppercase;
  transition: 0.3s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

/* ====================================================================================================
   Hero
   Why: Every page uses the same hero system so the site feels unified from page to page.
   ==================================================================================================== */
.hero {
  position: relative;
  min-height: clamp(28rem, 55vw, 40rem);
  overflow: hidden;
  background: linear-gradient(115deg, #b7322b 0%, #b99a2e 48%, #1e7a3a 100%);
  color: white;
}

.hero-collage-strip {
  position: absolute;
  top: 24%;
  right: 0;
  left: 0;
  z-index: 2;
  height: 56%;
  background:
    linear-gradient(
      90deg,
      rgba(183, 50, 43, 0.45),
      rgba(242, 201, 76, 0.25),
      rgba(30, 122, 58, 0.45)
    ),
    url('../images/hero-collage.png') center / cover no-repeat;
  opacity: 0.5;
}

.hero-center {
  position: absolute;
  top: 57%;
  left: 50%;
  z-index: 10;
  width: min(1680px, calc(100vw - 2rem));
  color: white;
  text-align: center;
  transform: translate(-50%, -50%);
}

.frame-title {
  width: 100%;
  max-width: 95vw;
  margin: 8px auto 0;
  padding: 0;
  background:
    linear-gradient(
      90deg,
      rgba(243, 240, 239, 0),
      rgba(245, 245, 245, 0),
      rgba(255, 255, 255, 0)
    ),
    url('../images/hero-collage.png') center / cover no-repeat;
  color: transparent;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.78;
  text-shadow: 0 24px 38px rgba(0, 0, 0, 0.58);
  text-wrap: balance;
  overflow-wrap: normal;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.7);
}

.frame-title.long-title {
  width: 100%;
  max-width: 95vw;
  margin: 8px auto 0;
  padding: 0;
  background:
    linear-gradient(
      90deg,
      rgba(243, 240, 239, 0),
      rgba(245, 245, 245, 0),
      rgba(255, 255, 255, 0)
    ),
    url('../images/hero-collage.png') center / 145% auto no-repeat;
  color: transparent;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(3rem, 11vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.78;
  text-shadow: 0 24px 38px rgba(0, 0, 0, 0.58);
  text-wrap: balance;
  overflow-wrap: normal;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.7);
}

.frame-title:has(+ .rise-text) { max-width: 100%; }

.rise-text {
  max-width: 94vw;
  margin: clamp(-0.875rem, -1vw, -0.25rem) auto 0;
  color: #fff;
  font-family: 'Brush Script MT', 'Segoe Script', 'Lucida Handwriting', cursive;
  font-size: clamp(1.2rem, 5.35vw, 5.6rem);
  font-weight: 500;
  line-height: 0.86;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  text-wrap: balance;
}

.hero-line {
  width: clamp(8rem, 26vw, 17.5rem);
  height: clamp(0.25rem, 0.55vw, 0.375rem);
  margin: clamp(1.1rem, 3vw, 2.125rem) auto clamp(1rem, 2.4vw, 1.5rem);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
}

.hero-text {
  max-width: 46.25rem;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(0.95rem, 1.65vw, 1.12rem);
  line-height: 1.65;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

/* ====================================================================================================
   Home Page Sections
   Why: These styles power the index page cards, impact counters, event cards, story, and highlights.
   ==================================================================================================== */
.info-section {
  --info-card-width: 16rem;
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, var(--info-card-width)));
  justify-content: center;
  gap: var(--space-grid);
  margin-top: 0;
  padding: clamp(2.25rem, 5vw, 4.375rem) var(--space-page);
  background: #111;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  color: white;
}

.info-section::before {
  content: "";
  position: absolute;
  top: -2.375rem;
  left: 0;
  width: 100%;
  height: 3.125rem;
  background: #111;
  clip-path: polygon(0 75%, 6% 42%, 13% 78%, 20% 38%, 28% 72%, 36% 35%, 45% 80%, 54% 40%, 63% 72%, 72% 35%, 81% 76%, 90% 42%, 100% 72%, 100% 100%, 0 100%);
}

.info-card {
  padding: 0.625rem 1.25rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.info-card:last-child { border-right: 0; }

.info-card:nth-child(4n) { border-right: 0; }

.info-card .icon {
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 4vw, 2.625rem);
}

.info-card h3 {
  margin-bottom: 1.125rem;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  text-transform: uppercase;
}

.info-card p {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: 1.7;
}

.lower-bg {
  background: linear-gradient(132deg, rgba(242, 201, 76, 0.46) 16%, rgba(242, 201, 76, 0.31) 87%);
}

.events-section {
  padding: var(--space-section) var(--space-page);
}

.events-section h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 4vw, 4rem);
  text-align: center;
  text-transform: uppercase;
}

.event-line { display: flex; justify-content: center; margin: 0.875rem auto 3.125rem; }

.event-line span { display: block; width: 3.4375rem; height: 0.3125rem; }

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.1875rem);
  max-width: 78.125rem;
  margin: 0 auto;
}

.event-card {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.event-img-wrap {
  position: relative;
}

.event-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-date {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.event-date strong {
  font-size: 1.75rem;
}

.event-content {
  padding: 1.75rem 1.625rem;
}

.event-content h3 {
  margin-bottom: 0.875rem;
  font-size: 1.25rem;
}

.event-content p {
  margin-bottom: 1.125rem;
  font-size: 1rem;
  line-height: 1.5;
}

.event-content a { color: var(--red); font-weight: 900; text-transform: uppercase; }

.impact-section {
  padding: clamp(4.375rem, 6vw, 5rem) var(--space-page) var(--space-section);
  background: var(--cream);
}

.impact-box {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 73.75rem;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(183, 50, 43, 0.9), rgba(242, 201, 76, 0.85), rgba(30, 122, 58, 0.9));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.impact-item {
  position: relative;
  padding: clamp(2.5rem, 4vw, 3.125rem) clamp(1.25rem, 3vw, 1.875rem);
  text-align: center;
}

.impact-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 2px;
  height: 55%;
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%);
}

.impact-item h3 {
  margin-bottom: 12px;
  font-size: clamp(3rem, 6vw, 3.625rem);
  font-weight: 900;
}

.impact-item p {
  font-size: clamp(0.95rem, 1.4vw, 1.0625rem);
  font-weight: 900;
  text-transform: uppercase;
}

.story-section {
  display: grid;
  grid-template-columns: 6.875rem minmax(0, 56.25rem);
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 1.875rem);
  padding: 60px 50px;
  background: var(--paper);
}

.story-icon {
  color: var(--red);
  font-size: clamp(3.5rem, 6vw, 4.375rem);
  text-align: center;
}

.story-content h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.3rem, 5vw, 5rem);
  line-height: 0.95;
}

.story-content p {
  margin-bottom: 2.125rem;
  color: #333;
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
  line-height: 1.7;
}

.story-video {
  width: 100%;
  max-width: 650px;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.program-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 3.4375rem);
  padding: clamp(5rem, 7vw, 6.25rem) var(--space-page);
  background: #fff;
}

.program-section.reverse { background: var(--cream); }

.program-section.reverse .program-text { order: 2; }

.program-text h2 {
  margin-bottom: 24px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
}

.program-text p {
  margin-bottom: 28px;
  color: #333;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.7;
}

.program-image {
  padding: 1.125rem;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.program-image img {
  display: block;
  width: 100%;
  height: clamp(18rem, 34vw, 25.625rem);
  object-fit: cover;
  border-radius: 12px;
}

/* ====================================================================================================
   Interior Page Layouts
   Why: These blocks handle non-home pages such as Programs, Events, Get Involved, and About.
   ==================================================================================================== */

/* Program cards: each card opens the shared modal controlled by js/script.js. */
.programs-page {
  padding: 80px 40px;
  background: var(--paper);
  text-align: center;
}

.programs-page h2 {
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  text-transform: uppercase;
}

.programs-intro {
  max-width: 850px;
  margin: 0 auto 55px;
  color: #444;
  font-size: 18px;
  line-height: 1.7;
}

.programs-page .program-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  max-width: 1250px;
  margin: 0 auto;
}

.program-card {
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
  text-align: left;
  transition: 0.25s ease;
}

.program-card:hover { transform: translateY(-8px); }

.program-card img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.program-card-body {
  padding: 28px;
}

.program-card-body h3 {
  margin-bottom: 14px;
  font-size: 26px;
}

.program-card-body p {
  margin-bottom: 20px;
  color: #444;
  line-height: 1.6;
}

.program-card-body button {
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: var(--gold);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  transition: 0.25s ease;
}

.program-card-body button:hover { background: var(--green); transform: translateY(-3px); }

/* Program modal: hidden until a card button calls openProgramModal() in js/script.js. */
.program-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(0, 0, 0, 0.85);
}

.program-modal.show { display: flex; }

.program-modal-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  width: min(1000px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 35px;
  border-radius: 18px;
  background: white;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 45px;
  height: 45px;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: white;
  cursor: pointer;
  font-size: 28px;
  transition: 0.2s ease;
}

.modal-close:hover { transform: scale(1.08); }

.modal-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-text h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.modal-text h4 {
  margin-bottom: 18px;
  color: var(--green);
  font-size: 1.1rem;
}

.modal-line { width: 80px; height: 4px; margin-bottom: 24px; background: var(--gold); }

.modal-text p {
  margin-bottom: 30px;
  color: #444;
  line-height: 1.8;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.modal-primary-btn,
.modal-secondary-btn { padding: 14px 24px; border-radius: 10px; font-weight: 900; }

.modal-primary-btn { background: var(--green); color: white; }

.modal-secondary-btn { background: #111; color: var(--gold); }

.modal-images {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#modalMainImage {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 14px;
}

.modal-preview-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.modal-preview-row img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.8;
}

.modal-preview-row img:hover { opacity: 1; }

/* Events calendar: keeps the embedded Google Calendar responsive inside the Events page. */
.calendar-section {
  position: relative;
  overflow: hidden;
  padding: 110px 70px;
  background: var(--paper);
}

.calendar-section > .section-label {
  display: block;
  text-align: center;
}

.calendar-section h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 4vw, 4rem);
  text-align: center;
  text-transform: uppercase;
}

.calendar-intro {
  max-width: 700px;
  margin: 0 auto 40px;
  color: #444;
  font-size: 18px;
  line-height: 1.7;
  text-align: center;
}

.calendar-frame {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.calendar-frame iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
}
/* Get Involved form: supports the pathway selector and Web3Forms contact form. */
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 90px 0;
}

.intro {
  max-width: 780px;
  margin: 0 auto 40px;
  text-align: center;
}

.intro h1 {
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 0.98;
}

.intro p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.inquiry-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  align-items: start;
  gap: 32px;
}

.pathway-panel,
.contact-form {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.pathway-panel {
  padding: 24px;
}

.pathway-list {
  display: grid;
  gap: 10px;
}

.pathway-item {
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.16s;
}

.pathway-item:hover,
.pathway-item.is-active {
  border-color: rgba(82, 112, 95, 0.35);
  background: #f4f7f1;
  transform: translateY(-1px);
}

.pathway-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--sage);
  font-weight: 900;
}

.pathway-item p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.contact-form {
  padding: clamp(22px, 4vw, 40px);
}

.form-header {
  margin-bottom: 24px;
}

.form-header h2 {
  margin-bottom: 14px;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.form-header p:last-child {
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 7px;
  color: #343735;
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd4ce;
  border-radius: 8px;
  background: #fff;
  color: #202124;
  font: inherit;
}

input,
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea { resize: vertical; padding: 13px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.field {
  margin-top: 18px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}

.actions button {
  padding: 15px 24px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: var(--gold);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.secondary-link { color: var(--red); font-weight: 900; }

/* ====================================================================================================
   Gallery Page
   Why: JavaScript swaps the main image and thumbnail roll based on the selected category tab.
   ==================================================================================================== */
.gallery-page {
  overflow: hidden;
  padding: 110px 70px;
  background: var(--paper);
  text-align: center;
}

.gallery-page h2 {
  margin-bottom: 30px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  text-transform: uppercase;
}

.gallery-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto 45px;
}

.gallery-tab {
  padding: 12px 18px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: white;
  color: var(--black);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  transition: 0.25s ease;
}

.gallery-tab:hover,
.gallery-tab.active {
  background: var(--black);
  color: var(--gold);
}

.gallery-page .gallery-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(1000px, 94vw);
  min-height: 560px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(rgba(247, 243, 233, 0.75), rgba(247, 243, 233, 0.75)),
    url('../images/gallery-background.png') center / cover no-repeat;
  box-shadow: var(--shadow);
}

.gallery-page .gallery-stage::before { content: none; }

.main-gallery-photo {
  width: min(760px, 82vw);
  height: 500px;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
}

.main-gallery-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  max-width: 700px;
  margin: 28px auto 24px;
}

.gallery-caption h3 {
  margin-bottom: 8px;
  font-size: 28px;
}

.gallery-caption p {
  color: #444;
  line-height: 1.6;
}

.gallery-page .camera-roll {
  width: min(1100px, 94vw);
  margin: 0 auto;
}

.gallery-thumb {
  flex: 0 0 95px;
  height: 72px;
  overflow: hidden;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  opacity: 0.75;
  transition: 0.25s ease;
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active { border-color: var(--gold); opacity: 1; transform: translateY(-4px); }

@media (max-width: 700px) {
  .gallery-page {
    padding: 80px 20px;
  }

  .gallery-page .gallery-stage {
    min-height: 390px;
  }

  .main-gallery-photo {
    height: 330px;
  }

  .gallery-page .gallery-arrow {
    width: 44px;
    height: 44px;
    font-size: 34px;
  }

  .gallery-page .gallery-prev {
    left: 10px;
  }

  .gallery-page .gallery-next {
    right: 10px;
  }
}

/* ====================================================================================================
   Footer
   Why: The footer repeats the same logo, quick links, support links, and social links on every page.
   ==================================================================================================== */
.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: 100px;
  background: transparent;
}

.footer-texture {
  position: absolute;
  top: -260px;
  left: 50%;
  z-index: 1;
  width: 100vw;
  height: 850px;
  object-fit: cover;
  opacity: 0.12;
  mix-blend-mode: multiply;
  transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 20%,
    rgba(0, 0, 0, 0.08) 35%,
    rgba(0, 0, 0, 0.35) 50%,
    black 70%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 20%,
    rgba(0, 0, 0, 0.08) 35%,
    rgba(0, 0, 0, 0.35) 50%,
    black 70%,
    transparent 100%
  );
}

.footer-content {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.75rem);
  max-width: 81.25rem;
  margin: 0 auto;
  padding: 0 var(--space-page) 2.375rem;
}

.footer-logo {
  width: 7.5rem;
  height: auto;
  object-fit: contain;
  margin-bottom: 1.5rem;
}

.footer-logo-area p {
  max-width: 420px;
  color: rgba(0, 0, 0, 0.8);
  font-size: 17px;
  line-height: 1.8;
}

.footer-links h3 {
  margin-bottom: 24px;
  font-size: 22px;
  text-transform: uppercase;
}

.footer-links a {
  display: block;
  margin-bottom: 14px;
  color: rgba(0, 0, 0, 0.82);
  font-weight: 800;
  transition: 0.3s;
}

.footer-links a:hover {
  color: var(--red);
  transform: translateX(5px);
}

.footer-socials {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 8px auto 34px;
}

.footer-socials a[href^="http"] { cursor: pointer; }

.social-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.social-icon img {
  display: block;
  width: 23px;
  height: 23px;
}

.social-icon.email {
  width: 42px;
  height: 42px;
}

.facebook {
  width: 56px;
  height: 56px;
  background: var(--white);
}

.social-icon:hover { transform: translateY(-5px) scale(1.08); }

.footer-bottom {
  position: relative;
  z-index: 5;
  padding: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.65);
  font-weight: 800;
  text-align: center;
}

/* ====================================================================================================
   Mobile Navigation Defaults
   Why: These defaults keep the mobile menu hidden until the 650px breakpoint turns it on.
   ==================================================================================================== */
.mobile-menu-tab,
.mobile-sidebar {
  display: none;
}

/* ====================================================================================================
   Responsive Breakpoints
   Why: Breakpoints are ordered largest to smallest so later phone rules can override tablet rules.
   ==================================================================================================== */

/* 1400px and below: home info cards wrap to two columns. */
@media (max-width: 1400px) {
  .info-section {
    grid-template-columns: repeat(2, minmax(0, min(100%, var(--info-card-width))));
  }

  .info-card {
    border-right: 0;
  }

  .info-card:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
  }
}

/* 1100px and below: wide grids become tablet-friendly. */
@media (max-width: 1100px) {
  .hero-center {
    top: 55%;
  }

  .event-grid,
  .program-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-section {
    grid-template-columns: repeat(2, minmax(0, min(100%, var(--info-card-width))));
  }

  .program-section,
  .story-section,
  .inquiry-layout,
  .footer-content {
    grid-template-columns: 1fr;
  }

  .program-section.reverse .program-text {
    order: 0;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .event-img-wrap img {
    height: 13.75rem;
  }

  .impact-box {
    grid-template-columns: 1fr;
  }

  .impact-item:not(:last-child)::after {
    right: auto;
    bottom: 0;
    left: 50%;
    top: auto;
    width: 55%;
    height: 2px;
    transform: translateX(-50%);
  }

  .footer-content {
    padding: 0 1.875rem 2.375rem;
  }

  .gallery-prev {
    left: 1.125rem;
  }

  .gallery-next {
    right: 1.125rem;
  }
}

/* 1000px and below: program cards use two columns. */
@media (max-width: 1000px) {
  .programs-page .program-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 900px and below: header spacing tightens and modals stack. */
@media (max-width: 900px) {
  .nav {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(0.45rem, 1.15vw, 0.8rem);
    padding: 0.95rem clamp(0.875rem, 1.1vw, 1.375rem);
  }

  .logo-wrap {
    grid-column: 1;
    grid-row: 1;
  }

  .logo {
    width: clamp(3.5rem, 6.3vw, 5rem);
    height: clamp(3.5rem, 6.3vw, 5rem);
  }

  .nav-links {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    width: 95%;
    min-width: 0;
    margin-top: 0;
    gap: clamp(0.32rem, 1.15vw, 0.7rem);
  }

  .nav-links a {
    font-size: clamp(0.54rem, 1.50vw, 1.72rem);
  }

  .donate-btn {
    grid-column: 3;
    grid-row: 1;
    min-width: clamp(5.9rem, 12vw, 6.75rem);
    min-height: clamp(2.25rem, 4.6vw, 2.5rem);
    padding: 0.55rem clamp(0.65rem, 1.7vw, 0.875rem);
    font-size: clamp(0.58rem, 1.15vw, 0.68rem);
  }

  .program-modal-content {
    grid-template-columns: 1fr;
    padding: 25px;
  }

  #modalMainImage {
    height: 320px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-primary-btn,
  .modal-secondary-btn {
    text-align: center;
  }
}

/* 700px and below: small-page padding adjustments. */
@media (max-width: 700px) {
  .calendar-section {
    padding: 80px 20px;
  }
}

/* 650px and below: phone layout, mobile sidebar, and single-column content. */
@media (max-width: 650px) {
  :root {
    --mobile-drawer-width: 150px;
  }

  .nav {
    padding: 1rem 1.375rem;
  }

  .logo {
    width: 4.5rem;
    height: 4.5rem;
  }

  .donate-btn {
    font-size: 0.75rem;
    min-width: 7.25rem;
    min-height: 2.75rem;
    padding: 0.75rem 1rem;
  }

  .nav-links,
  .nav .donate-btn {
    display: none;
  }

  .hero-center {
    top: 58%;
    width: calc(100vw - 0.75rem);
  }

  .eyebrow {
    font-size: clamp(0.58rem, 2.5vw, 0.7rem);
    letter-spacing: 0.18em;
  }

  .frame-title {
    font-size: clamp(3.8rem, 18vw, 7.25rem);
    letter-spacing: -0.045em;
    line-height: 0.82;
  }

  .rise-text {
    margin-top: -0.1rem;
    font-size: clamp(1rem, 4.2vw, 2rem);
    line-height: 1;
  }

  .hero-text {
    max-width: 34rem;
    padding: 0 0.75rem;
    line-height: 1.55;
  }

  .info-section,
  .events-section,
  .impact-section,
  .story-section,
  .program-section,
  .calendar-section,
  .gallery-page,
  .programs-page {
    padding-right: 1.625rem;
    padding-left: 1.625rem;
  }

  .event-grid,
  .program-card-grid {
    grid-template-columns: 1fr;
  }

  .info-section {
    grid-template-columns: minmax(0, min(100%, var(--info-card-width)));
  }

  .info-card,
  .info-card:nth-child(odd) {
    border-right: 0;
  }

  .programs-page {
    padding: 80px 26px;
  }

  .programs-page .program-card-grid {
    grid-template-columns: 1fr;
  }

  .program-card img {
    height: 230px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .gallery-arrow {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 2.125rem;
  }

  .mobile-menu-tab {
    position: fixed;
    top: 48px;
    right: 0;
    left: auto;
    z-index: 1003;
    display: grid;
    place-items: center;
    width: 38px;
    height: 108px;
    padding: 0;
    border: 1px solid var(--gold);
    border-right: 0;
    border-radius: 28px 0 0 28px;
    background: #101211;
    box-shadow: 0 0 12px rgba(242, 201, 76, 0.6);
    color: var(--gold);
    cursor: pointer;
    font-size: 27px;
    transition: right 0.3s ease;
  }

  body:has(.mobile-sidebar.show) .mobile-menu-tab {
    right: var(--mobile-drawer-width);
  }

  .mobile-sidebar {
    position: fixed;
    top: 40px;
    right: calc(-1 * var(--mobile-drawer-width));
    left: auto;
    z-index: 1002;
    display: block;
    width: var(--mobile-drawer-width);
    height: calc(100dvh - 80px);
    min-height: 0;
    overflow-y: auto;
    padding: 25px 10px 18px;
    border: 1px solid rgba(242, 201, 76, 0.35);
    border-right: 0;
    border-radius: 25px 0 0 25px;
    background: linear-gradient(180deg, #111411, #090b0a);
    box-shadow:
      -5px 8px 20px rgba(0, 0, 0, 0.65),
      -1px 0 8px rgba(242, 201, 76, 0.18);
    transition: right 0.3s ease;
  }

  .mobile-sidebar.show {
    right: 0;
  }

  .mobile-sidebar-close {
    position: absolute;
    top: 13px;
    right: 15px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    font-size: 27px;
  }

  .mobile-sidebar-logo {
    display: block;
    width: 72px;
    max-width: 100%;
    margin: 40px auto 22px;
  }

  .mobile-sidebar nav {
    display: flex;
    flex-direction: column;
  }

  .mobile-sidebar nav > a:not(.sidebar-donate) {
    display: flex;
    align-items: center;
    min-height: 55px;
    padding: 0 8px;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .mobile-sidebar nav > a.active {
    color: var(--gold);
  }

  .mobile-sidebar .nav-icon {
    display: grid;
    flex: 0 0 20px;
    place-items: center;
    width: 20px;
    font-size: 16px;
  }

  .mobile-sidebar .nav-icon.gold {
    color: #e7b829;
  }

  .mobile-sidebar .nav-icon.red {
    color: #c92831;
  }

  .mobile-sidebar .nav-icon.green {
    color: #238443;
  }

  .mobile-sidebar .sidebar-donate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    min-height: 64px;
    margin-top: 20px;
    overflow: hidden;
    padding: 8px 3px;
    border: 1px solid var(--gold);
    border-radius: 10px;
    background: linear-gradient(135deg, #d72027, #ef6b24 52%, #f2c94c);
    box-shadow:
      0 0 0 4px rgba(242, 201, 76, 0.12),
      0 0 12px rgba(242, 201, 76, 0.55);
    color: #fff;
    text-transform: uppercase;
  }

  .mobile-sidebar .sidebar-donate > span {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }

  .mobile-sidebar .sidebar-donate i {
    display: block;
    margin: 0 auto 3px;
    color: #fff;
    font-size: 18px;
  }

  .mobile-sidebar .sidebar-donate::after {
    content: "SUPPORT OUR MISSION";
    display: block;
    width: 100%;
    color: #111;
    font-size: 6px;
    line-height: 1;
    text-align: center;
  }
}
