/* ==============================================================================
   ALMA LICORES — Reproductor de Video (Modal Minimalista & Editorial)
   Diseño sobrio y limpio: sin sobrecarga de outlines, fondos sólidos suaves,
   sin bordes redondeados tipo SaaS (Reglas.md).
   ============================================================================== */

/* --------------------------------------------------------------------------
   1. TRIGGER EN LAS TARJETAS (LIMPIO, SIN BORDES PESADOS)
   -------------------------------------------------------------------------- */

.video-trigger {
  position: relative;
  display: block;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
  background-color: #0b110e;
  border: none;
  outline: none;
  text-align: left;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
}

.video-trigger:focus-visible {
  outline: 1px solid var(--cream, #f3efea);
  outline-offset: -1px;
}

/* Imagen/Video base */
.video-trigger .journal-card__video,
.video-trigger .journal-article-card__video,
.video-trigger .journal-lead-feature__video {
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.video-trigger:hover .journal-card__video,
.video-trigger:hover .journal-article-card__video,
.video-trigger:hover .journal-lead-feature__video {
  transform: scale(1.02);
  filter: brightness(1.04);
}

/* Velo sutil translúcido */
.video-trigger__scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 13, 0.35);
  transition: background 0.3s ease;
  pointer-events: none;
}

.video-trigger:hover .video-trigger__scrim {
  background: rgba(10, 16, 13, 0.2);
}

/* Botón de Play Sólido y Rectilíneo (Sin rounded-full ni outlines recargados) */
.video-trigger__play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background-color: #0d1612;
  color: #f3efea;
  border: none;
  border-radius: 0; /* Prohibido rounded-full por Reglas.md */
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
  pointer-events: none;
}

.video-trigger__play-icon {
  width: 16px;
  height: 16px;
  margin-left: 2px;
  fill: currentColor;
}

.video-trigger:hover .video-trigger__play-badge {
  transform: translate(-50%, -50%) scale(1.06);
  background-color: #1a2b25;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   2. VENTANA MODAL (MINIMALISTA, CENTRADA EN EL VIDEO)
   -------------------------------------------------------------------------- */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3.5vw, 2.5rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-modal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Telón de fondo con desenfoque suave */
.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(6, 10, 8, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}

/* Ventana sin exceso de outlines: fondo sólido obsidiana */
.video-modal__window {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(1040px, 94vw);
  background-color: #0a0f0d;
  border: none;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.98);
  transition: transform 0.25s ease;
}

.video-modal.is-active .video-modal__window {
  transform: scale(1);
}

/* Modificador para Videos Verticales (Reels) */
.video-modal__window--vertical {
  max-width: min(440px, 90vw);
}

/* Barra Superior Limpia: Solo título esencial y cerrar */
.video-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.4rem;
  background-color: #0e1512;
  border: none;
  gap: 1.25rem;
}

.video-modal__title {
  font-family: var(--font-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.25;
  color: #f3efea;
  margin: 0;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botón de Cerrar: Minimalista, sin outline box */
.video-modal__close {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: transparent;
  border: none;
  color: rgba(243, 239, 234, 0.7);
  padding: 0.4rem 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: var(--font-sans, system-ui);
  flex-shrink: 0;
}

.video-modal__close:hover {
  color: #ffffff;
}

/* Contenedor del Reproductor */
.video-modal__player-frame {
  position: relative;
  background-color: #000000;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Proporción horizontal por defecto */
.video-modal__window:not(.video-modal__window--vertical) .video-modal__player-frame {
  aspect-ratio: 16 / 9;
  max-height: 74vh;
  max-height: 74dvh;
}

/* Proporción vertical para reels */
.video-modal__window--vertical .video-modal__player-frame {
  aspect-ratio: 9 / 16;
  max-height: 72vh;
  max-height: 72dvh;
}

.video-modal__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  outline: none;
  background-color: #000000;
  accent-color: #d2c4a3;
}

/* Responsive */
@media (max-width: 680px) {
  .video-modal {
    padding: 0.5rem;
  }

  .video-modal__header {
    padding: 0.75rem 1rem;
  }

  .video-modal__close-label {
    display: none;
  }
}
