/* =========================================================
   Resources + Media pages (Milestone 5). Reuses Design-System tokens.
   ========================================================= */

/* ---- Resource cards (child Pages) ---- */
.resource-card { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: var(--sp-4); box-shadow: var(--shadow-card); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.resource-card:hover { box-shadow: var(--shadow-card-hover); text-decoration: none; transform: translateY(-2px); }
.resource-card__title { color: var(--navy); margin: 0; }
.resource-card__summary { color: var(--muted); font-size: var(--fs-small); margin: 0; }
.resource-card__cta { margin-top: auto; color: var(--slate-blue); font-weight: 600; font-size: var(--fs-small); }

/* ---- Single resource ---- */
.resource-hero { padding-top: var(--sp-3); }
.resource-hero__title { margin: var(--sp-1) 0 var(--sp-2); }
.resource-content { margin-bottom: var(--sp-4); }
.resource-download { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); margin: var(--sp-3) 0; flex-wrap: wrap; }
.resource-download__meta { display: flex; flex-direction: column; gap: 2px; }
.resource-preview { margin: var(--sp-4) 0; }
.resource-preview iframe { width: 100%; height: min(70vh, 640px); border: 1px solid var(--line); border-radius: var(--radius-md); }
.resource-preview figcaption { font-size: var(--fs-small); margin-top: 8px; text-align: center; }

/* ---- Media Centre ---- */
.media-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); max-width: none; flex-wrap: wrap; }
.media-section { margin-bottom: var(--sp-8); }
.video-card { display: flex; flex-direction: column; gap: 8px; }
.video-card__title { font-size: var(--fs-small); color: var(--ink); margin: 0; }

/* YouTube facade (click-to-load) */
.yt-facade { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border: 0; padding: 0; cursor: pointer;
  background-size: cover; background-position: center; border-radius: var(--radius-md); overflow: hidden; }
.yt-facade::before { content: ""; position: absolute; inset: 0; background: rgba(20,38,74,.18); transition: background .15s; }
.yt-facade:hover::before { background: rgba(20,38,74,.30); }
.yt-facade__play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.92); }
.yt-facade__play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0;
  border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent var(--navy); transform: translateX(2px); }
.yt-embed, .playlist-embed iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius-md); }

@media (max-width: 640px) {
  .resource-download { align-items: stretch; }
  .resource-download .btn { width: 100%; justify-content: center; }
}
