/* ==========================================================================
   REPRODUCTOR (.rp) — marco navy común a Cómo funciona y Aplicaciones
   Video tal como viene (object-fit: contain) sobre el navy de los paneles.
   Rótulo de fuente arriba, subtítulo sincronizado abajo y barra de avance menta.
   Solo se animan opacity y transform. Sin ámbar.
   ========================================================================== */
.rp { position: relative; overflow: hidden; background: var(--bg-panel); border-radius: var(--radius-lg); }
.rp video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }

/* Rótulo de fuente */
.rp-tag { position: absolute; left: 16px; top: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px; border-radius: var(--radius-sm);
  background: rgba(0,48,100,.88); border: 1px solid rgba(0,219,198,.5); pointer-events: none;
  font: 600 13px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.rp-tag svg { width: 13px; height: 13px; color: var(--gamt-mint); }
.rp-tag__n { margin-left: 4px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.3); font-weight: 600; color: rgba(255,255,255,.8); font-feature-settings: "tnum" 1, "zero" 1; }
.rp-tag__n[hidden] { display: none; }

/* Subtítulo en español, sincronizado con el tiempo del video */
.rp-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  min-height: 68px; padding: 11px 24px 13px; background: rgba(0,48,100,.92); border-top: 2px solid var(--gamt-teal); pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-out); }
.rp-cap[hidden] { display: none; }
.rp-cap:not(.is-in) { opacity: .3; }
.rp-cap__e { font: 600 12px/1.2 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gamt-mint); white-space: nowrap; }
.rp-cap__x { font: 600 20px/1.3 var(--font-sans); color: #fff; text-wrap: pretty; }
.rp-cap__n { font: 600 14px/1 var(--font-mono); letter-spacing: .04em; color: rgba(255,255,255,.75); font-feature-settings: "tnum" 1, "zero" 1; }

/* Barra de avance */
.rp-prog { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 4px; background: var(--gamt-mint); transform-origin: 0 50%; transform: scaleX(0);
  transition: transform 260ms linear; pointer-events: none; }

/* Pausa (toque sobre el video) */
.rp-pausa { position: absolute; left: 50%; top: 50%; z-index: 2; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,48,100,.86); border: 2px solid rgba(0,219,198,.6); color: #fff; opacity: 0; transform: scale(.9); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.rp-pausa svg { width: 44px; height: 44px; margin-left: 6px; }
.rp--pausa .rp-pausa { opacity: 1; transform: none; }
.rp[role="button"] { cursor: pointer; }

/* Miniatura con ícono de reproducción (listas de videos) */
.rp-th { position: relative; display: block; overflow: hidden; border-radius: var(--radius-md); background: var(--bg-panel); }
.rp-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-th__play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.rp-th__play svg { width: 30px; height: 30px; padding: 7px 6px 7px 8px; border-radius: 50%; background: rgba(0,48,100,.82); color: #fff; }

/* ==========================================================================
   Ampliar / reducir (js/reproductor.js → REPRO.ampliable). Pantalla táctil sin teclado:
   botón de 64 px o más arriba a la derecha del marco (Cómo funciona, Aplicaciones y Casos).
   Ampliado, el marco pasa al visor: todo el escenario sobre el riel, hasta el pie con la firma.
   ========================================================================== */
.rp-amp { position: absolute; right: 16px; top: 16px; z-index: 4; display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; padding: 0; border-radius: var(--radius-md);
  background: rgba(0,48,100,.88); border: 1px solid rgba(0,219,198,.5); color: #fff;
  font: 600 17px/1 var(--font-sans); letter-spacing: .01em; white-space: nowrap;
  transition: transform var(--dur-base) var(--ease-out); }
.rp-amp svg { width: 26px; height: 26px; flex: none; color: var(--gamt-mint); }
.rp-amp:active { background: var(--gamt-navy); transform: scale(.96); }

/* Hueco que guarda el lugar del marco mientras está ampliado (la pantalla de atrás no se reacomoda) */
.rp-hueco { flex: none; border-radius: var(--radius-lg); background: var(--bg-panel); }

.visor { position: absolute; left: 0; top: 0; width: 1920px; height: 1016px; z-index: 30; display: none; background: var(--bg-panel); }
.visor.is-on { display: block; animation: visorEntra var(--dur-slow) var(--ease-out) both; }
@keyframes visorEntra { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.visor > .rp--amp { position: absolute; inset: 0; width: auto; height: auto; margin: 0; border-radius: 0; }
#stage.con-visor .pie { background: var(--gamt-navy); border-top-color: var(--gamt-navy); }
#stage.con-visor .pie .firma__line { background: rgba(255,255,255,.20); }

/* Ampliado: «Reducir» más grande en la misma esquina; rótulo, subtítulo y pausa a escala de pantalla completa */
.rp--amp .rp-amp { right: 28px; top: 28px; width: 76px; height: 76px; }
.rp--amp .rp-amp svg { width: 30px; height: 30px; }
.rp--amp .rp-tag { left: 28px; top: 28px; padding: 11px 16px; font-size: 15px; }
.rp--amp .rp-tag svg { width: 15px; height: 15px; }
.rp--amp .rp-cap { min-height: 92px; padding: 14px 40px 16px; gap: 24px; }
.rp--amp .rp-cap__e { font-size: 14px; }
.rp--amp .rp-cap__x { font-size: 27px; }
.rp--amp .rp-cap__n { font-size: 17px; }
.rp--amp .rp-pausa { width: 136px; height: 136px; margin: -68px 0 0 -68px; }
.rp--amp .rp-pausa svg { width: 58px; height: 58px; margin-left: 8px; }
.rp--amp .cs-pie { padding: 16px 40px 18px; font-size: 25px; }

/* Al reducirse, el marco reaparece en su lugar */
.rp--vuelve { animation: aparecer var(--dur-slow) var(--ease-out); }
