/* base.css - reset + primitives */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: var(--font-body);
  color: var(--color-fg);
  background: var(--color-bg);
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }
.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;
}

/* ============================================================
   Legal pages (Privacy Policy, Terms of Use)
   Long-form typographic block — clear hierarchy, generous rhythm.
   ============================================================ */
.legal-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-fg, #1a1a1a);
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-blue-900);
  margin-top: 48px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-gold-500);
  display: inline-block;
}
.legal-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-blue-800);
  margin-top: 28px;
  margin-bottom: 10px;
}
.legal-content p {
  margin-bottom: 16px;
}
.legal-content ul {
  padding-left: 22px;
  margin-bottom: 20px;
}
.legal-content ul li {
  margin-bottom: 10px;
  padding-left: 4px;
}
.legal-content a {
  color: var(--color-blue-700, #1a4a8a);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content a:hover {
  color: var(--color-gold-600, #b58900);
}
.legal-content strong {
  color: var(--color-blue-900);
}

/* News featured article — video panel fills its frame edge-to-edge.
   On desktop the video stretches to match the article panel's height;
   on mobile the grid stacks and the video gets a proper 16:9 ratio. */
.news-featured-video {
  min-height: 100%;
}
@media (max-width: 768px) {
  .news-featured-grid {
    grid-template-columns: 1fr !important;
  }
  .news-featured-video {
    aspect-ratio: 16 / 9;
    min-height: 220px;
  }
}

/* ============================================================
   Single article — responsive video embeds
   Handles all WordPress YouTube/Vimeo embed variations: oEmbed,
   YouTube block, Embed block, Custom HTML, and bare <iframe>.
   The wrapper is forced into a 16:9 aspect ratio and the iframe
   is stretched to fill it edge-to-edge — no letterboxing.
   ============================================================ */

/* Any wrapper WordPress uses for video embeds — make it a 16:9 stage. */
.post-content .wp-block-embed,
.post-content .wp-block-embed-youtube,
.post-content .wp-block-embed-vimeo,
.post-content .wp-block-embed__wrapper,
.post-content figure.wp-block-embed,
.post-content .wp-embed-responsive .wp-block-embed__wrapper,
.post-content div[class*="wp-block-embed"],
.post-content .video-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 32px 0;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  background: #000;
}

/* Override WordPress's default aspect-ratio padding hack (padding-top:56.25%) */
.post-content .wp-embed-responsive .wp-block-embed__wrapper::before,
.post-content .wp-block-embed__wrapper::before {
  content: none !important;
  display: none !important;
}

/* Any iframe inside any embed wrapper — fill it completely. */
.post-content .wp-block-embed iframe,
.post-content .wp-block-embed__wrapper iframe,
.post-content figure.wp-block-embed iframe,
.post-content div[class*="wp-block-embed"] iframe,
.post-content iframe[src*="youtube.com"],
.post-content iframe[src*="youtu.be"],
.post-content iframe[src*="youtube-nocookie.com"],
.post-content iframe[src*="vimeo.com"] {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border: 0 !important;
  display: block !important;
}

/* Bare / paragraph-wrapped iframes without a WordPress embed wrapper. */
.post-content > iframe[src*="youtube.com"],
.post-content > iframe[src*="youtu.be"],
.post-content > iframe[src*="vimeo.com"],
.post-content p > iframe[src*="youtube.com"],
.post-content p > iframe[src*="youtu.be"],
.post-content p > iframe[src*="vimeo.com"] {
  position: static !important;
  width: 100% !important;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  margin: 32px auto;
  display: block;
}

.post-content .wp-block-embed figcaption {
  text-align: center;
  color: var(--color-fg-muted);
  font-size: 0.85rem;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}
