/* ==========================================================================
   Zack's Place VT – site stylesheet
   Colors and fonts match the Elementor design on the staging site.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset, variable weights) ---------- */
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-italic.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "League Spartan";
  src: url("../fonts/league-spartan.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --c-primary: #151515;
  --c-secondary: #242424;
  --c-text: #2B2B2B;
  --c-accent: #991A37;      /* burgundy: buttons, links */
  --c-accent-2: #C32046;    /* brighter red: events list links */
  --c-navy: #1A3665;
  --c-navy-hover: #1B55B7;
  --c-dropdown: #25487F;    /* menu dropdowns: a shade lighter than the navy title bar */
  --c-soft: #F4F4F4;        /* alternating section background */
  --c-line: #E7E7E7;
  --c-white: #FFFFFF;

  --f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-head: "League Spartan", "DM Sans", system-ui, sans-serif;

  --max: 86rem;             /* content width, same as the Elementor kit */
  --gutter: 2rem;           /* side padding for sections */
  --gap: 2rem;              /* space between columns */
  --section-y: 4rem;        /* top/bottom padding for sections */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); }
a:hover, a:focus { color: var(--c-secondary); }
/* Links inside body copy are underlined so they don't rely on color alone */
.text a, .page-content p a { text-decoration: underline; text-underline-offset: .15em; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-head);
  font-weight: 400;
  line-height: 1.2;
  color: var(--c-secondary);
  margin: 0;
}
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
sup { font-size: .6em; line-height: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--c-line); vertical-align: top; }
th { font-family: var(--f-head); font-weight: 500; }

/* Readable line length: body copy tops out around 80–85 characters per line,
   even in wide or full-width sections (long lines make it easy to lose your place). */
.text, .stack > p, .col > p, .todo { max-width: 40em; }
.text.center, .stack > .text.center { margin-left: auto; margin-right: auto; }

/* Single-column pages (Phonebook, Sponsorship, thank-you style pages): center the column
   instead of leaving the text hugging the left with empty space beside it.
   Card grids (Programs, Events) keep the full width. */
.container.stack:not(:has(.cards)) { max-width: 52em; }
.container.stack:not(:has(.cards)) > .text,
.container.stack:not(:has(.cards)) > .todo { max-width: none; }

.center { text-align: center; }
.right { text-align: right; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--c-navy); color: #fff; padding: .6rem 1rem;
}
.skip-link:focus { top: 1rem; color: #fff; }
:focus-visible { outline: 3px solid var(--c-navy-hover); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  align-self: flex-start;        /* buttons keep their natural width inside flex columns */
  background: var(--c-accent);
  color: var(--c-white);
  font-family: var(--f-head);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px 12px;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color .2s;
}
.btn:hover, .btn:focus { background: var(--c-secondary); color: var(--c-white); }
.btn--small { font-size: .9rem; padding: 10px 20px 8px; }
.center > .btn, .btn.center { align-self: center; }
/* Several buttons in a row */
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Header: top bar ---------- */
.topbar { border-bottom: 1px solid var(--c-line); }
.topbar__inner, .mainbar__inner {
  max-width: 100%;
  margin: 0 auto;
  padding: .6rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar__contact, .topbar__buttons { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; }
.topbar__contact a { color: var(--c-primary); text-decoration: none; }
.topbar__contact a:hover, .topbar__contact a:focus { color: var(--c-accent); }
.topbar__buttons { gap: .75rem; }

/* ---------- Header: logo + main menu ---------- */
.mainbar { border-bottom: 1px solid var(--c-line); background: var(--c-white); position: relative; z-index: 50; }
.mainbar__inner { padding-top: .5rem; padding-bottom: .5rem; }
.logo { flex: 0 0 auto; }
.logo img { width: 300px; }

.nav__list, .nav__sub { list-style: none; margin: 0; padding: 0; }
.nav__list { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__list > .nav__item > a {
  display: block;
  padding: 1rem .9rem;
  color: var(--c-secondary);
  text-decoration: none;
}
.nav__list > .nav__item > a:hover,
.nav__list > .nav__item > a:focus,
.nav__list > .nav__item.is-active > a { color: var(--c-accent); }
.nav__toggle {
  background: none; border: 0; padding: .4rem; margin-left: -.6rem; margin-right: .2rem;
  cursor: pointer; color: inherit; line-height: 0;
}
.nav__toggle svg { width: .7rem; height: .7rem; fill: currentColor; transition: transform .2s; }
.nav__item.is-open > .nav__toggle svg { transform: rotate(180deg); }

/* Dropdowns: navy panels, white text (desktop) */
.nav__sub {
  position: absolute; top: 100%; left: 0; min-width: 16rem;
  background: var(--c-dropdown);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);   /* soft shadow lifts the menu off the title bar */
  display: none;
  z-index: 60;
}
.nav__sub .nav__sub { top: 0; left: 100%; }
.nav__sub .nav__item { display: flex; flex-wrap: wrap; }
.nav__sub .nav__item:not(:last-child) { border-bottom: 1px solid var(--c-white); }
.nav__sub a {
  flex: 1;
  display: block;
  padding: .7rem 1.25rem;
  font-size: .875rem;     /* dropdown items a step smaller than the main menu */
  color: var(--c-white);
  text-decoration: none;
}
.nav__sub a:hover, .nav__sub a:focus, .nav__sub a[aria-current="page"] { background: var(--c-navy-hover); color: var(--c-white); }
.nav__sub .nav__toggle { color: var(--c-white); margin: 0 .6rem 0 0; }
.nav__sub .nav__toggle svg { transform: rotate(-90deg); }
.nav__item.has-sub:hover > .nav__sub,
.nav__item.has-sub:focus-within > .nav__sub,
.nav__item.is-open > .nav__sub { display: block; }

.menu-toggle { display: none; }

/* ---------- Page title band (navy, on every inner page) ---------- */
.page-title {
  background: var(--c-navy);
  padding: 3.25rem var(--gutter) 2.75rem;
  text-align: center;
}
.page-title h1 { font-size: 2.75rem; color: var(--c-white); }

/* ---------- Sections and columns ---------- */
.section { padding: var(--section-y) var(--gutter); }
.section--alt { background: var(--c-soft); }
.container { max-width: var(--max); margin: 0 auto; }

/* A vertical stack of content */
.stack, .col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Columns side by side; each .col can set its share with style="--w:40%" */
.cols, .row { display: flex; gap: var(--gap); align-items: flex-start; }
.cols--center { align-items: center; }
.cols > .col, .row > .col { flex: 1 1 0; }
.cols > .col[style*="--w"], .row > .col[style*="--w"] { flex: 0 1 calc(var(--w) - var(--gap) / 2); }
.row { gap: 1rem; flex-wrap: wrap; }

/* A shaded box inside a section (Donor Spotlight, ad rates) */
.box { background: var(--c-soft); border: 1px solid var(--c-line); padding: 2rem; }
.section--alt .box { background: var(--c-white); }

/* Space above a heading that follows other content in a column */
.col > * + h2, .col > * + h3, .stack > .text + h3, .col > .text + h4, .col > .gallery + .text { margin-top: .75rem; }

.media { margin: 0; }
.media img { width: 100%; }

/* A row of photos shown at the same height; each figure sets its shape with style="--ar: width/height" */
.photo-row { display: flex; gap: 10px; margin-top: var(--gap); }
.photo-row > .media { flex: var(--ar) 1 0; min-width: 0; }
.photo-row img { width: 100%; height: 100%; object-fit: cover; }
/* A small photo that shouldn't be stretched past its real size */
.media--small { max-width: 22rem; margin: 0 auto; }

/* "Registration is closed" message shown in place of a closed form */
.notice {
  margin-top: 1rem;
  padding: 1.75rem 2rem;
  background: var(--c-soft);
  border-left: 6px solid var(--c-navy);
  border-radius: 4px;
}
.notice h3 { font-size: 1.6rem; color: var(--c-navy); margin-bottom: .75rem; }
.notice p { max-width: 40em; }
.notice__bookmark { color: var(--c-accent); }
.section--alt .notice { background: var(--c-white); }

/* Staff and board listings */
.person { padding-bottom: 2rem; border-bottom: 1px solid var(--c-line); }
.person:last-child { border-bottom: 0; padding-bottom: 0; }
.person .text { max-width: none; }
.person + .person { padding-top: .5rem; }
.person__photo { float: right; width: 11rem; height: auto; margin: 0 0 1rem 1.5rem; border-radius: 4px; }
/* Square portraits: every photo shows at the same size whatever its shape; the file itself isn't cropped.
   Tall photos are trimmed top/bottom; use object-position (the 'focus' setting) to keep faces in view. */
.person__photo--square { aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 50%; }
.person__name { font-size: 2rem; }
.person__title {
  margin: .25rem 0 1rem;
  font-family: var(--f-head); font-size: 1rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent);
}
.person__title:last-child { margin-bottom: 0; }
.person::after { content: ""; display: block; clear: both; }
@media (max-width: 767px) { .person__photo { float: none; margin: 0 0 1rem; } }

/* Signing-up page: question-and-answer list and the forms list */
.lead { font-size: 1.2rem; }
.faq { max-width: none; }
.faq h2 { font-size: 1.6rem; margin: 2rem 0 .5rem; color: var(--c-navy); }
.faq h2:first-child { margin-top: .5rem; }
.doc-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
.doc-list a { display: inline-block; padding: .4rem 0; font-weight: 500; text-decoration: underline; text-underline-offset: .15em; }
.doc-list__type { font-weight: 400; color: var(--c-text); }

/* "Become a Participant" stands out a little from the other top buttons */
.btn--join { background: var(--c-navy); }
.btn--join:hover, .btn--join:focus { background: var(--c-secondary); }

/* "Save the Date" box for events whose next date isn't set yet */
.save-date {
  margin-top: 1.5rem;
  padding: 1.5rem 2rem;
  text-align: center;
  background: var(--c-navy);
  color: var(--c-white);
  border-radius: 4px;
}
.save-date p { margin: 0 auto; max-width: 30em; }
.save-date__label { font-family: var(--f-head); font-size: 1.1rem; letter-spacing: .12em; text-transform: uppercase; }
.save-date__year { font-family: var(--f-head); font-size: clamp(2rem, 6vw, 3rem); font-weight: 600; line-height: 1.1; margin: .1rem 0 .6rem !important; }

/* A short closing statement that should stand out (e.g. under the Programs cards) */
.statement {
  max-width: 34em;
  margin: 1.5rem auto 0;
  text-align: center;
  font-family: var(--f-head);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--c-navy);
}
@media (max-width: 767px) { .statement { font-size: 1.35rem; } }

/* ---------- Photo gallery (click to enlarge) ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery a { display: block; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.gallery a:hover img, .gallery a:focus img { transform: scale(1.04); }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { max-width: 94vw; max-height: 88vh; width: auto; margin: 0 auto; }
.lightbox__close {
  position: fixed; top: 1rem; right: 1rem;
  background: var(--c-white); color: var(--c-primary);
  border: 0; border-radius: 50%; width: 2.5rem; height: 2.5rem; font-size: 1.6rem; line-height: 1; cursor: pointer;
}

/* ---------- Image carousel ---------- */
.carousel { position: relative; }
.carousel__track {
  list-style: none; margin: 0; padding: 0;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel__slide img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0, 0, 0, .45); color: #fff; border: 0;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer;
}
.carousel__btn:hover, .carousel__btn:focus { background: rgba(0, 0, 0, .7); }
.carousel__btn--prev { left: .75rem; }
.carousel__btn--next { right: .75rem; }

/* ---------- Home page ---------- */
.hero {
  position: relative;
  min-height: 50rem;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 5rem;
  color: var(--c-white);
  text-align: center;
  overflow: hidden;
  background: #222;
}
.hero__slides { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.hero__slides li { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.hero__slides li.is-active { opacity: 1; }
.hero__slides img { width: 100%; height: 100%; object-fit: cover; }
/* Darken the bottom of the photo where the headline sits, so the white text stays readable on bright slides */
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.05) 40%, rgba(0,0,0,.55) 100%); }
.hero__text { position: relative; z-index: 1; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }
.hero h1 { color: var(--c-white); font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 4rem; }
.hero h2 { color: var(--c-white); font-weight: 700; font-size: 3rem; text-transform: uppercase; }

.quote-band {
  position: relative;
  padding: 4rem var(--gutter);
  background: url("../images/homepage-making-difference-bg.webp") center / cover no-repeat;
  display: flex; justify-content: center;
}
.quote-band::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.quote-band__box {
  position: relative; max-width: 48%; min-width: 0;
  background: rgba(21, 21, 21, .5); border: 1px solid var(--c-secondary);
  padding: 4rem; color: var(--c-white); text-align: center;
}
.quote-band__box h2 { color: var(--c-white); margin-bottom: 1.25rem; }
.quote-band__box blockquote { margin: 0; font-style: italic; }
.quote-band__box figcaption { margin-top: 1rem; }
@media (min-width: 1025px) { .quote-band { background-attachment: fixed; } }

.event-list { font-family: var(--f-body); }
.event-list a { color: var(--c-accent-2); font-family: var(--f-head); font-weight: 500; text-transform: uppercase; text-decoration: none; }
.event-list a:hover, .event-list a:focus { color: var(--c-secondary); }
.donation-list { font-weight: 700; }

/* ---------- Program / event index cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--gap); }
.card { background: var(--c-white); border: 1px solid var(--c-line); display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.card__body h2, .card__body h3 { font-size: 1.6rem; }
.card__body h2 a, .card__body h3 a { color: var(--c-secondary); text-decoration: none; }
.card__body h2 a:hover, .card__body h2 a:focus, .card__body h3 a:hover, .card__body h3 a:focus { color: var(--c-accent); }
/* Programs page: the six program areas sit three across on wide screens */
.cards--areas { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.section--alt .card { border-color: transparent; }
.card__body .btn { margin-top: auto; }

/* ---------- People (staff, board) ---------- */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.25rem; }
.people li { background: var(--c-white); border: 1px solid var(--c-line); padding: 1.25rem 1.5rem; }
.people strong { display: block; font-family: var(--f-head); font-weight: 500; font-size: 1.25rem; }

/* ---------- Placeholder notes (visible only until real content is added) ---------- */
.todo { border: 2px dashed var(--c-accent); background: #fff6f8; padding: 1.25rem 1.5rem; }

/* ---------- Forms on content pages ---------- */
.col .zp-form-wrap { max-width: none; margin: 1rem 0 0; }

/* ---------- Footer ---------- */
.footer-main { display: flex; border-top: 1px solid var(--c-line); }
.footer-main__photo, .footer-main__info { flex: 1 1 50%; min-width: 0; }
.footer-main__photo img { width: 100%; height: 100%; object-fit: cover; max-height: 28rem; }
.footer-main__info {
  background: #F7F7F9;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 3rem 2rem; gap: 1rem;
  font-family: var(--f-head); font-size: 1.1rem;
}
.footer-main__info img { width: 200px; }
.footer-main__info a { text-decoration: none; }
.footer-bottom {
  background: var(--c-navy); color: var(--c-white);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  padding: 1.5rem 1.4rem; font-size: .9rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--c-white); text-decoration: none; }
.footer-bottom a:hover, .footer-bottom a:focus { text-decoration: underline; }

/* ==========================================================================
   Tablet and below
   ========================================================================== */
@media (max-width: 1100px) {
  /* Mobile menu: hamburger opens a navy panel under the header */
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; margin-left: auto;
    background: none; border: 0; cursor: pointer; color: var(--c-accent);
  }
  .menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
    display: block; width: 26px; height: 3px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, opacity .2s;
  }
  .menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle__bars::before { top: -8px; }
  .menu-toggle__bars::after { top: 8px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-8px) rotate(-45deg); }

  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--c-navy);
    max-height: calc(100vh - 6rem);     /* long menus scroll inside the panel (phones in landscape) */
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav.is-open { display: block; }
  .nav__list { display: block; }
  .nav__item { flex-wrap: wrap; border-bottom: 1px solid rgba(255, 255, 255, .5); }
  .nav__list > .nav__item > a, .nav__sub a {
    flex: 1; padding: .8rem 2rem; color: var(--c-white); font-size: 1.1rem;
  }
  .nav__list > .nav__item > a:hover, .nav__list > .nav__item > a:focus,
  .nav__list > .nav__item.is-active > a { color: var(--c-white); background: var(--c-navy-hover); }
  .nav__toggle { color: var(--c-white); padding: .8rem 1.5rem; margin: 0; }
  .nav__sub .nav__toggle svg { transform: none; }
  .nav__sub, .nav__sub .nav__sub { position: static; min-width: 0; width: 100%; background: rgba(0, 0, 0, .18); box-shadow: none; }
  /* On touch screens, submenus open only with the arrow button */
  .nav__item.has-sub:hover > .nav__sub, .nav__item.has-sub:focus-within > .nav__sub { display: none; }
  .nav .nav__item.has-sub.is-open > .nav__sub { display: block; }  /* extra specificity so it beats the rule above */
  .nav__sub a { padding-left: 3rem; }
  .nav__sub .nav__sub a { padding-left: 4rem; }
  .nav__sub .nav__item:not(:last-child) { border-bottom-color: rgba(255, 255, 255, .3); }
}

@media (max-width: 1024px) {
  :root { --gutter: 1rem; --section-y: 2.5rem; }
  .cols, .row { flex-direction: column; align-items: stretch; }
  .cols > .col, .cols > .col[style*="--w"], .row > .col[style*="--w"] { flex: 1 1 auto; width: 100%; }
  .row { flex-direction: row; }
  .cols--text-first { flex-direction: column-reverse; } /* image is first on desktop, text first on smaller screens */
  /* Photo-on-the-right rows: show the photo first on smaller screens, so every section starts with its photo */
  .cols:has(> .col:last-child > .media):not(:has(> .col:first-child > .media)) { flex-direction: column-reverse; }
  .hero { min-height: 40rem; }
  .hero h1 { font-size: 3rem; }
  .hero h2 { font-size: 2rem; }
  .quote-band__box { max-width: 80%; }
}

@media (max-width: 767px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.6rem; }
  h4 { font-size: 1.3rem; }
  .page-title { padding: 2rem var(--gutter) 1.75rem; }
  .page-title h1 { font-size: 2.1rem; }
  .topbar__inner { flex-direction: column; padding: .6rem 1rem; gap: .5rem; }
  .topbar__contact { justify-content: center; font-size: .95rem; }
  /* Phones: the top buttons sit in a fixed 2-column grid, so the header is the same height before and
     after the web font loads (a jump there hurts the PageSpeed layout-shift score).
     "Become a Participant" spans the full width on its own row. */
  .topbar__buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; width: 100%; max-width: 26rem; }
  .topbar__buttons .btn--small { font-size: .8rem; padding: 9px 6px 7px; white-space: nowrap; text-align: center; }
  .topbar__buttons .btn--join { grid-column: 1 / -1; }
  .mainbar__inner { padding: .5rem 1rem; }
  .logo img { width: 230px; }
  .hero { min-height: 30rem; padding: 1rem; }
  .hero h1 { font-size: 2rem; }
  .hero h2 { font-size: 1.4rem; }
  .quote-band { padding: 2rem 1rem; background-image: url("../images/homepage-making-difference-bg-900.webp"); }  /* smaller photo for phones */
  .quote-band__box { max-width: 100%; padding: 2rem 1.25rem; }
  .box { padding: 1.25rem; }
  .footer-main { flex-direction: column; }
  .footer-main__photo img { max-height: 16rem; }
  .footer-bottom { flex-direction: column; text-align: center; align-items: center; }
  .gallery--3 { grid-template-columns: repeat(2, 1fr); }
  .photo-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .mainbar, .site-footer .footer-main__photo, .hero__slides, .carousel__btn { display: none; }
}

/* ---------- Home page: Next Event (filled from SITE_EVENTS in includes/config.php) ---------- */
.next-event { padding: var(--section-y) var(--gutter); background: var(--c-navy); color: var(--c-white); }
.next-event h2 { color: var(--c-white); margin: 0; }
.next-event .col { gap: 1rem; }
.next-event__label { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; color: #F2C14E; }
.next-event__when { margin: 0; font-family: var(--f-head); font-size: 1.35rem; }
.next-event p { margin-top: 0; margin-bottom: 0; }
.next-event__details { margin: 0; display: grid; gap: .5rem; }
.next-event__details > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding-top: .5rem; border-top: 1px solid rgba(255, 255, 255, .2); }
.next-event__details dt { font-weight: 700; }
.next-event__details dd { margin: 0; }
.next-event .btn-row { margin-top: .5rem; }
.btn--light { background: var(--c-white); color: var(--c-navy); }
.btn--light:hover, .btn--light:focus { background: #F2C14E; color: var(--c-primary); }
.btn--outline { background: transparent; color: var(--c-white); box-shadow: inset 0 0 0 2px var(--c-white); }
.btn--outline:hover, .btn--outline:focus { background: var(--c-white); color: var(--c-navy); }
/* Wide screens: photo stretches to match the height of the text beside it */
@media (min-width: 1025px) {
  .cols--reverse { flex-direction: row-reverse; } /* swaps a row's columns on wide screens only */
  .next-event .cols { align-items: stretch; }
  .next-event .media { flex: 1; display: flex; }
  .next-event .media img { flex: 1; min-height: 0; height: 100%; object-fit: cover; object-position: center; }
}
@media (max-width: 767px) {
  .next-event__details > div { grid-template-columns: 1fr; gap: .1rem; }
  .next-event__when { font-size: 1.15rem; }
}
