.video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-48);
  padding: var(--sp-96) var(--container-pad);
  background: var(--surface-dark-blue);
  border-radius: var(--radius-24);
}

.video__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--container-width);
  height: 23.75rem; /* 380px */
}

/* Every slide is positioned by the horizontal center of its slot (left) plus a
   constant translate(-50%, -50%). Navigation animates left/width/height/opacity
   between slots, so the whole set physically slides one step. transform stays
   constant, so it never fights the position transition. */
.video__slide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22rem; /* 352px — side/off-stage default */
  height: 17.5rem; /* 280px */
  border-radius: var(--radius-12);
  overflow: hidden;
  border: 1px solid var(--surface-blue);
  transition: left 0.45s ease, width 0.45s ease, height 0.45s ease, opacity 0.45s ease;
  will-change: left, width, height, opacity;
  cursor: pointer;
}

.video__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 19, 49, 0.6);
}

/* Center — large, opaque, on top */
.video__slide.pos-active {
  left: 50%;
  width: 42.25rem; /* 676px */
  height: 23.75rem; /* 380px */
  opacity: 1;
  z-index: 3;
  cursor: default;
}

/* Left peek — center sits 11rem (half its width) from the left edge */
.video__slide.pos-prev {
  left: 11rem;
  opacity: 0.5;
  z-index: 2;
}

/* Right peek — center sits 11rem from the right edge */
.video__slide.pos-next {
  left: calc(100% - 11rem);
  opacity: 0.5;
  z-index: 2;
}

/* Off-stage staging slots (fully hidden just past each edge) */
.video__slide.pos-offleft {
  left: -11rem;
  opacity: 0;
  z-index: 1;
}

.video__slide.pos-offright {
  left: calc(100% + 11rem);
  opacity: 0;
  z-index: 1;
}

.video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem; /* 72px */
  height: 4.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  z-index: 4;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.video__play:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%) scale(1.06);
}

.video__play svg {
  width: 3rem;
  height: 3rem;
}

/* Caption swaps in sync with the slide; JS re-triggers the fade on navigation. */
@keyframes video-caption-in {
  from { opacity: 0; transform: translateY(0.4rem); }
  to   { opacity: 1; transform: translateY(0); }
}

.video__caption.is-changing { animation: video-caption-in 0.45s ease; }

@media (prefers-reduced-motion: reduce) {
  .video__slide { transition: none; }
  .video__caption.is-changing { animation: none; }
}

.video__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 42.25rem; /* 676px, matches active slide */
  max-width: 100%;
  padding-left: var(--sp-16);
}

.video__caption {
  font-size: var(--fs-body-16);
  line-height: 1.4;
  color: var(--text-inverse);
}

.video__nav {
  display: flex;
  gap: var(--sp-8);
  flex-shrink: 0;
}

.video__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; /* 40px */
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--surface-blue);
  background: transparent;
  color: var(--text-inverse);
}

.video__nav-btn:hover {
  background: var(--surface-blue-opacity);
}

.video__nav-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.popup-video {
    width: min(900px, 90vw);
    min-width: 300px;
}

.popup-video .video-js {
    width: 100%;
    aspect-ratio: 16 / 9;
}