/* ── YouTube Facade ──────────────────────────────────────────
   Replaces the iframe with a thumbnail + play button.
   The real iframe is only injected when the user clicks play.
   This saves ~500 KB of network and removes heavy YT scripts
   from the initial page load.
──────────────────────────────────────────────────────────── */

.yt-facade {
  position: relative;
  width: 100%;
  /* 16:9 aspect ratio */
  padding-bottom: 56.25%;
  background: #000;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.yt-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* slight dim so the play button stands out */
  filter: brightness(0.85);
  transition: filter 0.2s ease;
}

.yt-facade:hover .yt-thumb {
  filter: brightness(0.75);
}

.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  /* subtle drop shadow so it's visible on any thumbnail colour */
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform 0.15s ease, filter 0.15s ease;
  z-index: 2;
}

.yt-facade:hover .yt-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.6));
}

/* Once clicked, the iframe fills the container */
.yt-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
