/* Video reviews ("Laboratorio.dc.html", approved version 2a). Markup: tools/video_reviews.py.
   Tapping a card opens the video over the section on a blurred backdrop, with the student's
   name inside the video, full screen / close on top and previous / next below. */
.vr {
  --vr-ink: #1a1a2e;
  --vr-muted: #4a5568;
  --vr-violet: #6a00d4;
  --vr-soft: #f6f4ff;
  --vr-gradient: linear-gradient(120deg, #4167dd, #2909a6 55%, #6a00d4);
  position: relative;
  overflow: hidden;
  background: var(--vr-soft);
  color: var(--vr-ink);
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.vr *, .vr *::before, .vr *::after { box-sizing: border-box; }
.vr--panel { padding: clamp(28px, 4vw, 56px); border-radius: 26px; }
.vr--band .vr__inner { max-width: 1440px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) clamp(20px, 5.5vw, 80px); }
.vr__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 28px clamp(32px, 5vw, 72px); }
.vr__copy { flex: 1 1 300px; display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.vr .vr__eyebrow { margin: 0; font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--vr-violet); }
.vr .vr__title { margin: 0; font-size: clamp(28px, 1.4vw + 16px, 38px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; color: var(--vr-ink); }
.vr .vr__lead { margin: 0; font-size: 16px; line-height: 1.6; color: var(--vr-muted); }

/* Cards */
.vr .vr__grid { flex: 999 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.vr__card { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 18px; background: var(--vr-ink); box-shadow: 0 14px 30px rgba(41, 9, 166, .18); }
.vr__thumb, .vr__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vr__open { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 4px; padding: 14px; border: 0; background: linear-gradient(180deg, rgba(26, 26, 46, 0) 50%, rgba(26, 26, 46, .82)); font: inherit; text-align: left; cursor: pointer; }
.vr__open:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.vr__play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 18px; background: var(--vr-gradient); color: #fff; box-shadow: 0 12px 26px rgba(41, 9, 166, .45); transform: rotate(-6deg); transition: transform .2s ease; }
.vr__open:hover .vr__play { transform: rotate(-6deg) scale(1.06); }
.vr__play .vr__icon { width: 34px; height: 34px; transform: rotate(6deg); }
.vr__name { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; line-height: 1.2; color: #fff; }
.vr__tag { font-size: 12px; font-weight: 600; color: #fff; }
.vr__icon { display: block; width: 24px; height: 24px; fill: currentColor; }
.vr__flag { flex: 0 0 auto; width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); }

/* Player over the section */
.vr__dialog { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; background: rgba(246, 244, 255, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); cursor: zoom-out; }
.vr__dialog[hidden] { display: none; }
.vr__player { position: relative; height: min(540px, calc(100% - 76px)); aspect-ratio: 9 / 16; max-width: 100%; overflow: hidden; border-radius: 22px; background: #000; box-shadow: 0 30px 70px rgba(41, 9, 166, .35); cursor: default; }
.vr__bar { position: absolute; top: 0; right: 0; left: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 10px 28px 14px; background: linear-gradient(180deg, rgba(26, 26, 46, .7), rgba(26, 26, 46, 0)); pointer-events: none; }
.vr__who { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.vr__who .vr__name { font-size: 18px; }
.vr__tools { display: flex; gap: 8px; pointer-events: auto; }
.vr__tool { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: var(--vr-gradient); color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 6px 16px rgba(41, 9, 166, .35); cursor: pointer; }
.vr__icon--exit { display: none; }
.vr__nav { display: flex; gap: 10px; width: min(304px, 100%); cursor: default; }
.vr__step { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--vr-gradient); color: #fff; box-shadow: 0 8px 20px rgba(41, 9, 166, .3); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.vr__step .vr__icon { width: 22px; height: 22px; }
.vr__step:disabled { opacity: .35; cursor: default; }
.vr__tool:focus-visible, .vr__step:focus-visible { outline: 3px solid var(--vr-violet); outline-offset: 3px; }

/* Full screen: the player fills the screen and the whole video stays visible. */
.vr__player:fullscreen { width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; border-radius: 0; }
.vr__player:fullscreen .vr__video { object-fit: contain; }
.vr__player:fullscreen .vr__icon--enter { display: none; }
.vr__player:fullscreen .vr__icon--exit { display: block; }
.vr__player:-webkit-full-screen { width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; border-radius: 0; }
.vr__player:-webkit-full-screen .vr__video { object-fit: contain; }

/* Phones: the section is too short to hold a useful player, so the same blurred
   backdrop covers the whole screen (above the header and the fixed booking bar). */
@media (max-width: 640px) {
  .vr__dialog { position: fixed; z-index: 1100; }
  .vr__player { height: min(560px, calc(100% - 92px)); }
}

@media (prefers-reduced-motion: reduce) {
  .vr__play { transition: none; }
}
