/* -------- YouTube embed (click-to-play) -------- */

/* When loaded (iframe), keep 16:9 and center */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 0 auto 2em auto; /* center + spacing below */
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* Thumbnail preview that swaps to iframe on click */
.video-thumb {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 6px;
  cursor: pointer;
  max-width: 100%;
  margin: 0 auto 2em auto;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.video-thumb::after {
  /* subtle dark gradient for legibility of play button */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0.05));
}

/* Big play button */
.video-playbtn {
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 0;
  outline: 0;
  background: rgba(255,255,255,.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.video-playbtn::before {
  content: "";
  display: block;
  margin-left: 5px; /* nudge to feel centered */
  width: 0; height: 0;
  border-left: 22px solid #e11d48;  /* rose-600 triangle */
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}
.video-playbtn:hover { filter: brightness(0.96); }
.video-thumb:focus-visible .video-playbtn,
.video-playbtn:focus-visible {
  outline: 3px solid #2563eb; /* blue focus ring */
  outline-offset: 4px;
}
