/* ==========================================================================
   COMPONENTS — reusable UI
   Loaded on every page.

   Rule of admission: it appears in BOTH approved designs, or it is a partial
   in template-parts/ that is explicitly reused across the site (the news,
   event and story cards). Anything else stays in assets/css/pages/.
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------ */
/* Square, no shadow. Present in both designs. */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .04em;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.btn--primary { background: var(--navy); color: var(--on-dark); }
.btn--primary:hover,
.btn--primary:focus-visible { background: var(--navy-dark); color: var(--on-dark); }

.btn--outline { background: transparent; border-color: var(--ink); color: var(--ink); padding: 12px 22px; }
.btn--outline:hover,
.btn--outline:focus-visible { background: var(--ink); color: var(--on-dark); }

.btn--gold { background: var(--gold); color: var(--navy); font-weight: 700; font-size: 14px; padding: 15px 30px; }
.btn--gold:hover,
.btn--gold:focus-visible { background: var(--gold-dark); color: var(--navy); }

.btn--on-navy { background: transparent; border-color: rgba(255, 255, 255, .4); color: var(--on-dark); }
.btn--on-navy:hover,
.btn--on-navy:focus-visible { background: rgba(255, 255, 255, .12); color: var(--on-dark); }

.btn--sm { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; padding: 9px 18px; }
.btn--sm.btn--outline { border-color: var(--navy); color: var(--navy); padding: 8px 17px; }
.btn--sm.btn--outline:hover { background: var(--navy); color: var(--on-dark); }

/* Inline "Read more →" style link, used on every card. */
.link-arrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy-link);
}
.link-arrow:hover { color: var(--navy); }

/* --- Images and placeholders -------------------------------------------- */
/* .img-frame is the sized box; it holds either a real image or, where no
   image exists yet, the dashed .img-ph placeholder from the designs. */

.img-frame {
  position: relative;
  overflow: hidden;
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; }

.img-ph {
  width: 100%;
  height: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  background: var(--ph-bg);
  border: 1px dashed var(--ph-rule);
  color: var(--ph-text);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .04em;
}

/* Full-bleed image strip. Height overridable per page via --band-h. */
.img-band {
  height: var(--band-h, 360px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
/* When the hero above already carries a rule, don't double it up. */
.img-band--no-top { border-top: 0; }
@media (max-width: 900px) { .img-band { height: 220px; } }

.img-caption {
  font-size: 11.5px;
  font-style: italic;
  color: var(--ink-light);
  margin: 10px 0 0;
}

/* --- Page hero ---------------------------------------------------------- */
/* Identical construction in both designs: eyebrow, oversized headline, then
   a two-column row of intro copy and right-aligned calls to action. */

.hero-band--ruled { border-bottom: 1px solid var(--rule); }

.hero { padding-top: 60px; padding-bottom: 52px; }

.hero__eyebrow { margin-bottom: 24px; }

.hero__title { max-width: 920px; margin: 0; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 37px;
  align-items: end;
}

.hero__intro { font-size: 17px; line-height: 1.7; color: var(--ink-body); margin: 0; }

.hero__cta { display: flex; gap: 14px; justify-content: flex-end; }

@media (max-width: 900px) {
  .hero { padding-top: 44px; padding-bottom: 40px; }
  .hero__grid { grid-template-columns: 1fr; gap: 24px; margin-top: 26px; }
  .hero__cta { justify-content: flex-start; flex-wrap: wrap; }
}

/* --- Section heading ---------------------------------------------------- */

.sec-head { margin-bottom: 30px; }
.sec-head .eyebrow { margin-bottom: 14px; }
.sec-head h2 { margin: 0; }
.sec-head__lede {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 640px;
  margin: 12px 0 0;
}

/* --- Cards -------------------------------------------------------------- */
/* Shared shell: hairline border, square, no shadow. */

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: background .18s var(--ease);
}
.card:hover { background: var(--cream); }

.card__meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--sp-2);
}

/* News card — homepage grid and, later, the news archive. */

.card-news { color: inherit; }

/* The whole image is shown rather than cropped — the legacy library is a mix
   of portraits, crests and wide group shots, and cropping them to a common
   ratio loses heads and cuts logos in half. The box keeps a fixed 16:10 so
   the grid stays level, and cream fills whatever the image doesn't. */
.card-news__media {
  aspect-ratio: 16 / 10;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
}
.card-news__media img { object-fit: contain; object-position: center; }

.card-news__body  { padding: 22px 24px; }
.card-news__title { font-size: 19px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }

.card-news__excerpt {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 12px;
  /* Two lines, then cut off — enough to read past the headline. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Grid of news cards. Two up by default, as on the homepage; listings that
   want three set --news-cols. */

.news-grid {
  display: grid;
  grid-template-columns: repeat(var(--news-cols, 2), 1fr);
  gap: 28px;
}
.news-grid--three { --news-cols: 3; }

@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

/* Story card — a testimonial with a portrait alongside. */

.card-story { display: grid; grid-template-columns: 200px 1fr; }

/* Roughly 5:6 — the wcf-portrait ratio — so head-and-shoulders shots aren't
   cropped to a letterbox when the quote is short. */
.card-story__media { border-right: 1px solid var(--rule); min-height: 240px; }
.card-story__media img { object-position: center top; }

.card-story__body  { padding: 24px; }
.card-story__title { font-size: 16px; font-weight: 700; color: var(--navy); margin: 0 0 12px; }

.card-story__quote {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-body);
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-story__by    { font-size: 12.5px; font-style: italic; color: var(--ink-light); margin: 0 0 10px; }

@media (max-width: 600px) {
  .card-story { grid-template-columns: 1fr; }
  .card-story__media {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}

/* Event row — the tabular listing used on the homepage and, later, the
   events archive. */

.ev-list { border-top: 2px solid var(--rule); }
.ev-rows { list-style: none; margin: 0; padding: 0; }

.ev-head,
.ev-row {
  display: grid;
  grid-template-columns: 150px 1fr 220px 120px;
  gap: 24px;
  align-items: center;
}

.ev-head {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-light);
}
.ev-head span:last-child { text-align: right; }

.ev-row { padding: 22px 0; border-bottom: 1px solid var(--rule-cream); }

.ev-date { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1; }
.ev-date__month {
  font-size: 15px;
  letter-spacing: .06em;
  color: var(--gold);
  text-transform: uppercase;
}

.ev-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.ev-title a { color: inherit; }
.ev-title a:hover { color: var(--navy-link); }

.ev-loc  { font-size: 13.5px; color: var(--ink-muted); }
.ev-book { justify-self: end; }

@media (max-width: 900px) {
  .ev-head { display: none; }
  .ev-row {
    grid-template-columns: 88px 1fr;
    gap: 6px 16px;
    padding: 16px 0;
  }
  .ev-loc  { grid-column: 2; color: var(--ink-light); }
  .ev-book { grid-column: 2; justify-self: start; }
}

/* --- Breadcrumbs -------------------------------------------------------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-light);
}
.breadcrumbs a { color: var(--ink-light); }
.breadcrumbs a:hover { color: var(--navy); }
.breadcrumbs .breadcrumb_last,
.breadcrumbs [aria-current="page"] { color: var(--navy); }

/* --- Forms -------------------------------------------------------------- */

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], input[type="search"],
textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color .18s var(--ease);
}
input:focus, textarea:focus, select:focus { border-color: var(--navy); outline-offset: 0; }

textarea { min-height: 130px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--sp-1);
}

/* --- Plugin output ------------------------------------------------------ */
/* WPForms, Contact Form 7 and TablePress emit their own markup. Pull it onto
   the theme's tokens here rather than letting it look bolted on. Keep all
   plugin overrides in this one block. */

.wpcf7 p { margin: 0 0 var(--sp-3); }
.wpcf7 .wpcf7-list-item { margin: 0 var(--sp-3) 0 0; }
.wpcf7 input[type="submit"],
.wpforms-form button[type="submit"],
.wpforms-form input[type="submit"] {
  width: auto;
  background: var(--navy);
  color: var(--on-dark);
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 13px 26px;
  cursor: pointer;
}
.wpcf7 input[type="submit"]:hover,
.wpforms-form button[type="submit"]:hover,
.wpforms-form input[type="submit"]:hover { background: var(--navy-dark); border-color: var(--navy-dark); }

.wpcf7-not-valid-tip { font-size: 12.5px; color: #a32020; }
.wpcf7 form .wpcf7-response-output {
  margin: var(--sp-3) 0 0;
  padding: 12px 16px;
  border: 1px solid var(--rule-soft);
  font-size: 14px;
}

.wpforms-container .wpforms-field-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
}
.wpforms-container { max-width: none; }

.tablepress { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.tablepress th { background: var(--navy); color: var(--on-dark); font-weight: 700; }
.tablepress th, .tablepress td { border: 1px solid var(--rule-soft); padding: 12px 16px; }
.tablepress tbody tr:nth-child(even) td { background: var(--cream); }

/* --- Empty state -------------------------------------------------------- */
/* Every listing needs one. Never render a bare section shell. */

.empty-state {
  border: 1px solid var(--rule-soft);
  background: var(--cream);
  padding: 48px 40px;
  text-align: center;
}
.empty-state__title { font-size: 22px; margin: 0 0 8px; }
.empty-state__text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 460px;
  margin: 0 auto 22px;
}

/* --- Pagination --------------------------------------------------------- */

.pagination { margin-top: var(--sp-6); text-align: center; }
.pagination .page-numbers {
  display: inline-block;
  min-width: 38px;
  padding: 8px 10px;
  margin: 0 2px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  font-size: 14px;
}
.pagination .current { background: var(--navy); color: var(--on-dark); border-color: var(--navy); }

/* --- Prose (WYSIWYG output) --------------------------------------------- */
/* Wrap the_content() in .prose so editor output is always styled. */

.prose > *:last-child { margin-bottom: 0; }
.prose img { margin: var(--sp-5) 0; }
.prose h2 { margin-top: var(--sp-6); }
.prose h3 { margin-top: var(--sp-5); }
.prose ul, .prose ol { margin: 0 0 var(--sp-4); }
.prose li { margin-bottom: var(--sp-2); }
.prose table { width: 100%; border-collapse: collapse; margin: var(--sp-5) 0; }
.prose th, .prose td { border: 1px solid var(--rule-soft); padding: var(--sp-2) var(--sp-3); text-align: left; }
.prose th { background: var(--cream); font-weight: 700; }
