/* ==========================================================================
   FOAP — blog
   Loaded on generated blog pages only, after styles.css, whose tokens,
   buttons, cards and grids it reuses.
   ========================================================================== */

/* ---------- Preview bar ----------
   Shown on every build that isn't production, so nobody mistakes a preview
   (or a draft) for the live site. */

.preview-bar {
  padding: .5rem 1.25rem;
  background: #FFF4CC;
  border-bottom: 1px solid #EBD789;
  color: #5C4A00;
  font-size: var(--fs-xs);
  line-height: 1.5;
  text-align: center;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- Index and category pages ---------- */

.blog-intro { max-width: 760px; margin-bottom: 2.25rem; }

.blog-intro h1 { font-size: var(--fs-h1); font-weight: 600; }

.blog-intro p { font-size: var(--fs-lg); color: var(--muted); }

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}

.category-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.category-nav a:hover { border-color: var(--blue); color: var(--blue); }

.category-nav a[aria-current="page"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.blog-empty { color: var(--muted); }

.center .btn-row { justify-content: center; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ---------- Post cards ---------- */

.post-card { position: relative; border: 1px solid var(--line); }

.section-alt .post-card { border-color: transparent; }

.media-16x9 { aspect-ratio: 16 / 9; }

.post-card-fallback {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: linear-gradient(115deg, #163D7A 0%, #2A5CAA 50%, #2E6DD0 100%);
  color: rgba(255, 255, 255, .9);
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: .08em;
}

/* the wordmark on a card with no image of its own */
.post-card-fallback .logo-mark { width: 40%; height: auto; }

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-bottom: .5rem;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.card-body .post-card-meta { margin-bottom: .5rem; font-size: var(--fs-xs); }

.post-card h3 { margin-bottom: .5rem; }

.post-card-link { color: var(--text); text-decoration: none; }

/* the whole card is the click target, not just the title */
.post-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-card:hover .post-card-link { color: var(--blue); }

.post-card:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.post-card-link:focus-visible { outline: none; }

.badge-draft {
  padding: 0 .45rem;
  border-radius: 3px;
  background: #FFF4CC;
  color: #5C4A00;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Single post ---------- */

.post { padding: 2.75rem 0 3.5rem; }

.post-header h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.22;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: 2rem;
}

.post-hero {
  max-width: 1000px;
  margin: 0 auto 2.5rem;
}

/* a fixed shape keeps every post consistent whatever gets uploaded */
.post-hero .media { aspect-ratio: 16 / 9; border-radius: 10px; }

/* ---------- Article body ----------
   Everything the CMS editor can produce: headings, lists, quotes, images,
   tables, code and rules. */

.prose {
  font-size: var(--fs-lg);
  line-height: 1.8;
  overflow-wrap: break-word;
}

.prose > :first-child { margin-top: 0; }

.prose h2 {
  font-size: var(--fs-h2);
  margin: 2.5rem 0 .9rem;
}

.prose h3 {
  font-size: var(--fs-h3-lg);
  margin: 2rem 0 .6rem;
}

.prose h4 {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin: 1.75rem 0 .5rem;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose figure,
.prose table,
.prose pre { margin: 0 0 1.35rem; }

.prose ul,
.prose ol { padding-left: 1.4rem; }

.prose li { margin-bottom: .4rem; }
.prose li > ul,
.prose li > ol { margin: .4rem 0 0; }

.prose a { text-underline-offset: 3px; }
.prose a:hover { color: var(--blue-dark); }

.prose img {
  height: auto;
  margin: 2rem auto;
  border-radius: var(--radius);
}

.prose blockquote {
  padding: .25rem 0 .25rem 1.25rem;
  border-left: 3px solid var(--blue);
  color: var(--muted);
  font-style: italic;
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* wide tables scroll inside themselves rather than widening the page */
.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.prose th,
.prose td {
  padding: .55rem .8rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th { background: var(--bg-alt); font-weight: 600; }

.prose code {
  padding: .1rem .35rem;
  border-radius: 3px;
  background: var(--bg-alt);
  font-size: .9em;
}

.prose pre {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: #14203A;
  color: #E6EAF0;
  overflow-x: auto;
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.prose pre code { padding: 0; background: none; font-size: inherit; }

/* ---------- News & events ---------- */

/* styles.css gives .btn and friends a display value, which would otherwise
   override the hidden attribute that events.js toggles */
[hidden] { display: none !important; }

.listing-heading {
  font-size: var(--fs-h2);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.post-kicker {
  margin-bottom: .35rem;
  color: var(--blue);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  line-height: 1;
}

.date-badge-day { font-size: var(--fs-display); font-weight: 700; letter-spacing: -.02em; }

.date-badge-month {
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.card-body .event-where {
  margin-bottom: .5rem;
  color: var(--blue);
  font-weight: 500;
}

.badge-status {
  padding: 0 .45rem;
  border-radius: 3px;
  background: #FDE3E0;
  color: #8A1F12;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.event-panel {
  margin-bottom: 2.25rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #F7FAFD;
}

.event-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem 1.5rem;
  margin: 0 0 1.25rem;
}

.event-facts dt {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.event-facts dd { margin: .15rem 0 0; font-weight: 500; line-height: 1.5; }

.event-address { color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }

.event-panel > :last-child { margin-bottom: 0; }

.event-alert {
  margin: 0 0 1rem;
  padding: .6rem .85rem;
  border-radius: var(--radius);
  background: #FDE3E0;
  color: #8A1F12;
  font-weight: 600;
}

.event-ended { margin: 0; color: var(--muted); font-weight: 500; }

/* ---------- Responsive ---------- */

@media (max-width: 620px) {
  .post { padding: 2rem 0 2.5rem; }
  .prose { font-size: var(--fs-base); }
  .post-hero { padding: 0; }
  .post-hero .media { border-radius: 0; }
}
