/* ==========================================================================
   Get involved — Figma frame 204:3017. Section-by-section, pixel-matched.
   Reuses shared components (page-hero, feature-card, icon-tile, circle-arrow,
   tick-badge, field, closing-cta); only page-specific furniture lives here.
   ========================================================================== */

/* ---- Hero: this page's image is 320 tall (204:3027) --------------------- */
@media (min-width: 901px) {
  .page-hero .page-hero__media { height: 320px; }
}

/* ---- Ways to get involved (204:3029) ------------------------------------ */
.gi-ways .gi-ways__head { max-width: none; margin-bottom: 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 48px; }
.gi-ways .gi-ways__head > * { margin: 0; }
.gi-ways__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gi-card { min-height: 321px; }
.gi-card .icon-tile svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .gi-ways__grid { grid-template-columns: 1fr; gap: 16px; }
  .gi-ways .gi-ways__head { gap: 16px; }
  .gi-card { min-height: 0; }
  .gi-card .feature-card__foot { margin-top: 16px; }
}

/* ---- Become a volunteer (204:3065) -------------------------------------- */
.gi-volunteer__split { grid-template-columns: 520px minmax(0, 608px); justify-content: space-between; gap: 72px; align-items: center; }
.gi-volunteer__media {
  height: 480px;
  aspect-ratio: auto;
  border-radius: 160px 24px 160px 24px;
}
.gi-volunteer__content { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.gi-volunteer__content > * { margin: 0; }

.gi-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.gi-checklist li { display: flex; gap: 12px; align-items: center; color: var(--secondary); font-size: var(--fs-body); line-height: var(--lh-body); }
.gi-volunteer__actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 8px; }
.gi-volunteer__actions .btn { --btn-h: 46px; padding: 0 26px; }
.gi-volunteer__actions .btn-secondary { color: var(--ink); }

@media (max-width: 900px) {
  .gi-volunteer__split { grid-template-columns: 1fr; gap: 40px; }
  .gi-volunteer__media { order: -1; height: auto; aspect-ratio: 520 / 480; }
}

/* ---- Partner logos (204:3095) ------------------------------------------- */
.gi-partners { padding-block: 72px; }
.gi-partners__label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  font-size: var(--fs-eyebrow);
  line-height: var(--lh-eyebrow);
  font-weight: 600;
  color: var(--secondary);
  margin: 0 0 32px;
}
.gi-partners__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.gi-partners__logo {
  flex: 0 0 180px;
  max-width: 180px;
  height: 72px;
  border-radius: 10px;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.gi-partners__logo img { max-width: 70%; max-height: 56%; object-fit: contain; }
/* Placeholder mark until real partner logos are uploaded. */
.gi-partners__mark {
  width: 24px; height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='4.5' cy='12' r='4.5' fill='%239DBFCC'/%3E%3Crect x='11' y='9' width='8' height='2.5' rx='1.25' fill='%239DBFCC'/%3E%3Crect x='11' y='13.5' width='5.5' height='2.5' rx='1.25' fill='%239DBFCC'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 620px) {
  .gi-partners__row { gap: 16px; }
  .gi-partners__logo { flex-basis: calc(50% - 8px); max-width: none; }
}

/* ---- Partner with us — form (204:3108) ---------------------------------- */
.gi-form__grid { display: grid; grid-template-columns: minmax(0, 756px) 380px; justify-content: space-between; gap: 64px; align-items: start; }
.gi-form__main { display: flex; flex-direction: column; gap: 20px; }
.gi-form__main .section-head { max-width: none; margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.gi-form__main .section-head > * { margin: 0; }
.gi-form__form { display: flex; flex-direction: column; gap: 20px; }
.gi-form__form .field { gap: 8px; }
.gi-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gi-form__form .field__error:empty { display: none; }
.gi-form__form .field input { height: 54px; min-height: 0; }
.gi-form__form .field select { height: 55px; min-height: 0; }
.gi-form__form textarea.gi-form__textarea { width: 400px; max-width: 100%; height: 110px; min-height: 110px; }
.gi-form__form .btn { align-self: flex-start; --btn-h: 50px; padding: 0 32px; }

.gi-form__card {
  align-self: start;
  border-radius: 20px;
  padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.gi-form__card-title,
.gi-form__card-phone {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-h4); line-height: var(--lh-h4);
  color: #fff; margin: 0;
}
.gi-form__card-phone { text-decoration: none; transition: color var(--dur-micro) var(--ease-out); }
.gi-form__card-phone:hover { color: var(--green-500); }
.gi-form__card-body,
.gi-form__card-hours { font-size: var(--fs-body-sm); line-height: var(--lh-body-sm); color: var(--blue-100); margin: 0; }
.gi-form__card-divider { height: 1px; width: 100%; background: var(--blue-900); }

@media (max-width: 900px) {
  .gi-form__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 600px) {
  .gi-form__row { grid-template-columns: 1fr; }
  .gi-form__textarea { width: 100%; }
}

/* ---- Gallery — volunteering in action (295:2790) ------------------------ */
.gi-gallery__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.gi-gallery__head .section-head { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.gi-gallery__head .section-head > * { margin: 0; }
.gi-gallery__nav { display: flex; gap: 12px; flex: 0 0 auto; }
.gi-gallery__btn {
  width: 48px; height: 48px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
}
.gi-gallery__btn svg { width: 20px; height: 20px; }
.gi-gallery__btn:hover { border-color: var(--blue-500); color: var(--blue-700); background: #fff; transform: none; }

.gi-gallery__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gi-gallery__track::-webkit-scrollbar { display: none; }
.gi-gallery__item {
  flex: 0 0 calc((100% - 40px) / 3);
  scroll-snap-align: start;
  margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.gi-gallery__media {
  display: block;
  height: 280px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--blue-100);
}
.gi-gallery__media img, .gi-gallery__media .img-placeholder { width: 100%; height: 100%; object-fit: cover; }
.gi-gallery__caption { font-size: var(--fs-body-sm); line-height: var(--lh-body-sm); color: var(--secondary); }

@media (max-width: 900px) {
  .gi-gallery__item { flex-basis: 300px; }
  .gi-gallery__media { height: auto; aspect-ratio: 387 / 280; }
}
@media (max-width: 560px) {
  .gi-gallery__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .gi-gallery__item { flex-basis: 82%; }
}

/* ---- Volunteer stories (client amend, Nov 2026; no Figma frame) ---------
   Made from parts already in the design: the white card, 16px radius and card
   shadow of the "Ways to get involved" cards, the quote mark and name from the
   "voices" cards on Our impact, and the same 3-up grid. */
.gi-stories__head { max-width: none; margin-bottom: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.gi-stories__head > * { margin: 0; }
.gi-stories__head p { max-width: 720px; }
/* Cards keep their own height, so opening one story does not stretch its neighbours. */
.gi-stories__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }

.story-card {
  display: flex; flex-direction: column; gap: 20px;
  background: #fff; border-radius: var(--r-card-sm); box-shadow: var(--shadow-card);
  padding: 28px;
}
.story-card__head { display: flex; align-items: center; gap: 20px; }
/* Portrait frame: the photos are head-and-shoulders portraits, so a 3:4 frame
   anchored to the top keeps every face in view whatever the upload's shape. */
.story-card__photo { flex: 0 0 auto; width: 96px; aspect-ratio: 3 / 4; border-radius: var(--r-card-sm); overflow: hidden; background: var(--blue-100); }
.story-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.story-card__id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.story-card__mark { display: block; height: 26px; font-family: var(--font-body); font-weight: 600; font-size: 48px; line-height: 56px; color: var(--blue-500); }
.story-card__name { margin: 0; font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: var(--ls-h4); color: var(--blue-700); overflow-wrap: anywhere; }

.story-card__text { color: var(--ink); font-size: var(--fs-body); line-height: var(--lh-body); }
.story-card__text p { margin: 0; }
.story-card__text p + p { margin-top: 12px; }
/* Extract: six lines, set only by main.js (see storyToggles) and only when the
   story is longer than that. The full text stays in the page. Paragraph gaps
   close up in the extract so every shortened card is exactly the same height. */
.story-card.is-clamped .story-card__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.story-card.is-clamped .story-card__text p + p { margin-top: 0; }

.story-card__toggle {
  margin: auto 0 -12px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-button); line-height: var(--lh-button); letter-spacing: var(--ls-button);
  color: var(--ink);
  transition: color var(--dur-micro) var(--ease-out);
}
.story-card__toggle[hidden] { display: none; }
.story-card__toggle:hover { color: var(--blue-700); }
.story-card__toggle svg { width: 18px; height: 18px; flex: 0 0 auto; transition: transform var(--dur-micro) var(--ease-out); }
.story-card__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

@media (max-width: 1023px) {
  .gi-stories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .gi-stories__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .gi-stories__head { margin-bottom: 32px; }
  .story-card { padding: 24px; }
  .story-card__photo { width: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-card__toggle, .story-card__toggle svg { transition: none; }
}
