/* ==========================================================================
   DAV Ventura Chapter 24 — site stylesheet
   Brand tokens are defined once here. To adjust colors site-wide,
   edit the custom properties below.
   ========================================================================== */

:root {
  /* Brand palette — drawn from the DAV eagle emblem and the U.S. flag */
  --navy:      #0F2A4A;   /* deep service navy — headers, footer */
  --navy-2:    #1C3D66;   /* lighter navy — hovers, gradients */
  --red:       #B31942;   /* Old Glory red — primary actions */
  --red-dark:  #8E1335;
  --gold:      #C9A24B;   /* eagle gold — eyebrows, accents */
  --paper:     #F7F7F4;   /* warm off-white page background */
  --white:     #FFFFFF;
  --ink:       #1E2733;   /* body text */
  --slate:     #4B5563;   /* secondary text */
  --mist:      #EAF0F6;   /* pale blue section bands */
  --line:      #D8DEE5;

  /* Type */
  --font-display: "Libre Franklin", "Franklin Gothic Medium", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --radius: 6px;
  --shadow: 0 2px 6px rgba(15, 42, 74, .08), 0 12px 28px rgba(15, 42, 74, .10);
  --maxw: 74rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;           /* 17px base — generous for older readers */
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); font-weight: 800; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.4rem); font-weight: 700; }
p  { margin: 0 0 1.1em; }
ul { padding-left: 1.2em; }
li { margin-bottom: .45em; }
li::marker { color: var(--red); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: .75rem 1.25rem;
  z-index: 200; font-family: var(--font-display); font-weight: 700;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Signature: service-ribbon stripe ---------- */
.ribbon {
  height: 6px;
  background: linear-gradient(to right,
    var(--red) 0 33.3%, var(--gold) 33.3% 66.6%, var(--navy) 66.6% 100%);
}
.ribbon--inline {
  width: 88px; height: 5px; border: 0; margin: 0 0 1.5rem;
}

/* Eyebrow labels */
.eyebrow {
  font-family: var(--font-display);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 .5rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw); margin-inline: auto;
  padding: .6rem var(--pad);
}
.brand {
  display: flex; align-items: center; gap: .8rem;
  text-decoration: none; color: var(--navy);
  min-height: 44px;
}
.brand img { width: 52px; height: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.05rem; line-height: 1.2;
}
.brand-name small {
  display: block; font-weight: 600; font-size: .78rem;
  color: var(--slate); letter-spacing: .04em;
}

.nav-toggle {
  display: none;
  background: none; border: 2px solid var(--navy); border-radius: var(--radius);
  padding: .5rem .8rem; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--navy); min-height: 44px; min-width: 44px;
}
.nav-toggle[aria-expanded="true"] { background: var(--navy); color: #fff; }

.site-nav > ul {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .1rem;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: .65rem .8rem;
  font-family: var(--font-display);
  font-weight: 600; font-size: .95rem;
  color: var(--navy); text-decoration: none;
  border-radius: var(--radius);
}
.site-nav a:hover { background: var(--mist); color: var(--navy); }
.site-nav a[aria-current="page"] {
  color: var(--red);
  box-shadow: inset 0 -3px 0 var(--red);
  border-radius: 0;
}
.site-nav .nav-cta a {
  background: var(--red); color: #fff; margin-left: .5rem;
}
.site-nav .nav-cta a:hover { background: var(--red-dark); }

/* Dropdown (Services) */
.has-sub { position: relative; }
.has-sub > a::after { content: " ▾"; font-size: .7em; }
.sub-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 15rem;
  background: #fff; border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: .4rem;
}
.has-sub:hover .sub-menu,
.has-sub:focus-within .sub-menu { display: block; }
.sub-menu a { display: block; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff;
  background: var(--navy);
  overflow: hidden;
}
.hero img.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(9, 26, 48, .92) 0%, rgba(9, 26, 48, .78) 45%, rgba(9, 26, 48, .35) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
}
.hero h1 { color: #fff; max-width: 20ch; }
.hero .eyebrow { color: var(--gold); }
.hero p.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 52ch; color: #E8EDF4;
}
.hero--page .hero-inner { padding-block: clamp(2.5rem, 6vw, 4rem); }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: .7rem 1.4rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  text-decoration: none; border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline { border-color: #fff; color: #fff; background: rgba(255,255,255,.06); }
.btn-outline:hover { background: #fff; color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-outline-navy { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

/* Fact strip under hero */
.fact-strip { background: var(--navy); color: #fff; border-top: 1px solid rgba(255,255,255,.15); }
.fact-strip ul {
  list-style: none; margin: 0; padding: 1rem var(--pad);
  max-width: var(--maxw); margin-inline: auto;
  display: grid; gap: .75rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
}
.fact-strip li { margin: 0; font-family: var(--font-display); }
.fact-strip strong { display: block; color: var(--gold); font-size: 1.05rem; }
.fact-strip span { font-size: .85rem; color: #C9D4E1; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.75rem, 7vw, 4.5rem); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy .eyebrow { color: var(--gold); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }

/* Card grid */
.card-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr));
}
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(15,42,74,.06);
  border-top: 4px solid var(--navy);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-top-color: var(--red); }
.card h3 { margin-top: 0; }
.card p { color: var(--slate); flex-grow: 1; }
.card .card-link {
  font-family: var(--font-display); font-weight: 700;
  text-decoration: none; color: var(--red);
}
.card .card-link::after { content: " →"; }
.card a.stretch::before { content: ""; position: absolute; inset: 0; }
.card { position: relative; }

/* Two-column feature */
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Event panel */
.event-card {
  background: #fff; border-left: 6px solid var(--red);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem;
}
.event-card .when { font-family: var(--font-display); font-weight: 800; color: var(--red); font-size: 1.1rem; margin-bottom: .25rem; }
.event-card .where { color: var(--slate); }

/* Callout / info boxes for content pages */
.callout {
  background: var(--mist);
  border-left: 5px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout h3 { margin-top: 0; }
.callout ul { margin-bottom: 0; }

/* Prose layout for interior pages */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.25rem; padding-top: .25rem; }
.prose h2:first-child { margin-top: 0; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 26ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(min(11rem, 100%), 1fr));
}
.gallery-grid a {
  display: block; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.gallery-grid img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .2s ease;
}
.gallery-grid a:hover img { transform: scale(1.04); }

dialog.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: min(96vw, 70rem); width: auto;
}
dialog.lightbox::backdrop { background: rgba(9, 20, 36, .9); }
dialog.lightbox img {
  max-height: 85vh; width: auto; max-width: 100%;
  margin-inline: auto; border-radius: var(--radius);
}
dialog.lightbox .lb-close {
  position: absolute; top: -2.6rem; right: 0;
  background: #fff; color: var(--navy); border: 0;
  border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 700;
  padding: .45rem .9rem; cursor: pointer; min-height: 40px;
}

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.1rem; max-width: 40rem; }
.form-grid label {
  font-family: var(--font-display); font-weight: 700;
  display: block; margin-bottom: .3rem; color: var(--navy);
}
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%; padding: .8rem .9rem;
  font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff;
}
.form-grid input:focus, .form-grid textarea:focus {
  border-color: var(--navy); outline: 3px solid rgba(28, 61, 102, .25); outline-offset: 0;
}
.hint { font-size: .875rem; color: var(--slate); margin-top: .3rem; }
.hp-field { position: absolute; left: -9999px; }

/* Contact layout */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }
.contact-list { list-style: none; padding: 0; }
.contact-list li { margin-bottom: 1rem; }
.contact-list strong { font-family: var(--font-display); color: var(--navy); display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C9D4E1; font-size: .95rem; }
.footer-grid {
  max-width: var(--maxw); margin-inline: auto;
  padding: 3rem var(--pad) 2rem;
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
}
.site-footer h3 {
  color: #fff; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: #E8EDF4; }
.site-footer a:hover { color: var(--gold); }
.footer-brand img { width: 84px; margin-bottom: .8rem; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 1.25rem var(--pad) 2rem;
  max-width: var(--maxw); margin-inline: auto;
  font-size: .82rem; color: #9FB0C4;
}
.footer-legal p { margin-bottom: .6em; }

/* ---------- Mobile nav ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: .4rem; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: block; }
  .site-nav > ul { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--pad) 1rem; }
  .site-nav a { display: block; padding: .85rem .5rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); padding-left: .9rem; }
  .site-nav .nav-cta a { background: var(--red); color: #fff; margin: .8rem 0 0; text-align: center; border-radius: var(--radius); border-bottom: 0; }
  .has-sub .sub-menu {
    display: block; position: static; border: 0; box-shadow: none;
    list-style: none; margin: 0; padding: 0 0 0 1rem; min-width: 0;
  }
  .has-sub > a::after { content: ""; }
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .btn-row, .nav-toggle { display: none; }
  body { background: #fff; }
}

/* Screen-reader-only utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}


/* ---------- Interior page layout: content + action sidebar ---------- */
.page-layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
.page-layout > * { min-width: 0; }
@media (min-width: 1000px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
  }
  .sidebar { position: sticky; top: 5.5rem; }
}
.page-layout .prose { max-width: 72ch; }

.sidebar .card { margin-bottom: 1.25rem; }
.action-card { text-align: center; }
.action-card img { width: 100%; max-width: 220px; margin: 0 auto .75rem; }
.action-card .btn { width: 100%; margin-bottom: .6rem; }
.action-card .btn:last-child { margin-bottom: 0; }
.mini-note { font-size: .875rem; color: var(--slate); margin: .75rem 0 0; }

.meeting-card p { margin-bottom: .4em; }
.meeting-card .when { font-family: var(--font-display); font-weight: 800; color: var(--navy); }

/* Content lead image */
.lead-photo { border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 0 1.75rem; width: 100%; object-fit: cover; max-height: 340px; }

/* Photo strip (e.g., volunteer page) */
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1.5rem 0; }
.photo-strip img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Donate page giving options */
.give-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); margin-top: 1.5rem; }

/* ---------- Gallery: load more + lightbox navigation ---------- */
.load-more { display: block; margin: 1.5rem auto 0; }

dialog.lightbox { overflow: visible; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: #fff; color: var(--navy); border: 0;
  border-radius: 50%;
  width: 48px; height: 48px;
  font-size: 1.8rem; line-height: 1; font-family: var(--font-display);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.lb-nav:hover { background: var(--gold); }
.lb-prev { left: -1.4rem; }
.lb-next { right: -1.4rem; }
@media (max-width: 700px) {
  .lb-prev { left: .4rem; }
  .lb-next { right: .4rem; }
  .lb-nav { opacity: .9; }
}
.lb-counter {
  position: absolute; left: 0; top: -2.5rem;
  margin: 0; color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
}

/* ---------- Chapter officers ---------- */
.officer-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  max-width: 56rem;
}
.officer-card { text-align: center; }
.officer-card img {
  width: 140px; height: 140px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 1rem;
  border: 4px solid var(--mist);
  box-shadow: 0 0 0 3px var(--gold);
}
.officer-card h3 { margin-bottom: .15rem; }
.officer-card .officer-title {
  font-family: var(--font-display); font-weight: 700;
  color: var(--red); font-size: .95rem;
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: .6rem;
}
.officer-card .officer-bio { font-size: .95rem; color: var(--slate); }

.officer-card { max-width: 22rem; width: 100%; margin-inline: auto; }
.officer-card .officer-contact { font-size: .9rem; line-height: 1.9; }
.officer-card .officer-contact a { color: var(--navy-2); }

/* ---------- Forms: multi-column rows, alerts, checkbox rows ---------- */
.form-2col, .form-3col { display: grid; gap: 1.1rem; }
@media (min-width: 620px) {
  .form-2col { grid-template-columns: 1fr 1fr; }
  .form-3col { grid-template-columns: 2fr 1fr 1fr; }
}
.check-row { display: flex; gap: .7rem; align-items: flex-start; }
.check-row input { width: 1.3rem; height: 1.3rem; margin-top: .25rem; flex-shrink: 0; }
.check-row label { font-family: var(--font-body); font-weight: 400; color: var(--ink); }

.form-alert {
  padding: 1rem 1.25rem; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 600;
  margin-bottom: 1.5rem;
}
.form-alert--ok  { background: #E7F3EA; border-left: 5px solid #2E7D46; color: #1D4A2C; }
.form-alert--err { background: #FBE9EC; border-left: 5px solid var(--red); color: #7A1330; }

/* ---------- Numbered process steps ---------- */
.steps { list-style: none; padding: 0; margin: 1.5rem 0 2rem; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.25rem 3.4rem;
  margin: 0;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.15rem;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: var(--navy); color: var(--gold);
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 1.15rem; top: 2.5rem; bottom: 0;
  width: 3px; background: var(--line);
}


/* Long unbroken strings (emails, URLs) wrap instead of overflowing */
.officer-contact, .contact-list, .steps li, .prose a { overflow-wrap: anywhere; }
