/* ==========================================================================
   MXA · components/video-modal.css — Modal de vídeo (testimonios)
   --------------------------------------------------------------------------
   Se abre al pulsar una tarjeta de testimonio (data-video-modal) y reproduce el
   vídeo de YouTube dentro de la página, sin abrir una pestaña nueva.
   ========================================================================== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;                                    /* por encima del header (50) */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.video-modal.is-open { display: flex; }

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.video-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 1040px;
  padding: 12px;
  background: var(--ink);
  border: 1px solid var(--gold);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: video-modal-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes video-modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.video-modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 4px 12px; }
.video-modal-caption {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  color: var(--cream);
}
.video-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  border: 1px solid var(--gold);
  background: transparent;
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}
.video-modal-close:hover { background: var(--gold); border-color: var(--gold-light); color: var(--ink); }
.video-modal-close:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.video-modal-close svg { width: 20px; height: 20px; }

.video-modal-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* El fondo queda bloqueado mientras el modal está abierto */
body.video-modal-open { overflow: hidden; }

/* Móvil */
@media (max-width: 639px) {
  .video-modal { padding: 12px; }
  .video-modal-dialog { padding: 8px; }
  .video-modal-caption { font-size: 11px; }
  .video-modal-close { width: 34px; height: 34px; }
  .video-modal-close svg { width: 18px; height: 18px; }
}

/* No imprimir el modal */
@media print { .video-modal { display: none !important; } }
