/*
 * ========================================================================
 * CSS DEFINITIVO v18.0 - VERSIÓN FINAL CORREGIDA
 * BASE: Layout estable v10.0
 * FUSIÓN: Nueva paleta de colores y estilos de botones finales.
 * ========================================================================
 */

/* --- 1. VARIABLES GLOBALES Y RESET (Con tu nueva paleta) --- */
:root {
  --brand-primary-color: #2D1140; /* Tu nuevo color */
  --brand-popup-bg: #1E0F29;    /* Tu nuevo color */
  --text-primary: #FFFFFF;
  --text-secondary: #dcdcdc;
  --text-muted: #888;
}
*, *::before, *::after { 
  box-sizing: border-box; 
}

/* --- 2. ESTILOS DEL CARRUSEL (Estables) --- */
.elementor-widget-loop-carousel .swiper-container { 
  overflow: visible; 
  padding: 15px; 
  margin: -15px; 
}
.e-loop-item.swiper-slide { 
  width: 321px !important; 
  height: auto !important; 
}
.netflix-item-popup-trigger { 
  display: block; 
  position: relative; 
  width: 100%; 
  height: 0; 
  padding-bottom: 150%; 
  border-radius: 6px; 
  overflow: hidden; 
  cursor: pointer; 
  transition: transform 0.2s ease; 
}
.netflix-item-popup-trigger:hover { 
  transform: scale(1.05); 
}
.netflix-item-popup-trigger .poster-img { 
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

/* --- 3. ESTILOS DEL POPUP (Layout al Tope Vertical - El que funciona) --- */
#video-popup-modal {
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex; 
  align-items: flex-start; /* ALINEA EL POPUP ARRIBA */
  justify-content: center;
  z-index: 999999; 
  opacity: 0; 
  visibility: hidden; 
  transition: opacity 0.3s ease;
  padding: 5vh 1rem;
  overflow-y: auto;
}
#video-popup-modal.visible { 
  opacity: 1; 
  visibility: visible; 
}

.modal-content {
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 8px;
  background-color: var(--brand-popup-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  position: relative;
}
#video-popup-modal.visible .modal-content { 
  transform: scale(1); 
}


/* Botón de Cerrar Redondo con Selector de Alta Especificidad */
#video-popup-modal .modal-close-btn {
  position: absolute; 
  top: 10px; 
  right: 10px; 
  z-index: 10;
  padding: 0;
  width: 30px; 
  height: 30px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background-color: #C5D932 !important; /* Añadimos !important como seguro final */
  color: white !important;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 24px; 
  font-weight: 500; 
  line-height: 1;
  transition: all 0.2s ease-in-out;
}
#video-popup-modal .modal-close-btn:hover {
  background-color: #AC54C9 !important;
  color: #FFFFFF !important;
  transform: scale(1.1);
}

/* Botón "Show More" con Selector de Alta Especificidad */
#video-popup-modal .modal-play-btn { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.3rem; 
  background-color: #C5D932; 
  color: #1E0F29; 
  border-radius: 4px; 
  padding: 0.8rem 1.5rem; 
  font-family: 'Archivo Narrow', sans-serif; 
  font-size: 0.9rem; 
  font-weight: bold; 
  text-decoration: none; /* Sin subrayado */
  //text-transform: uppercase; 
  transition: all 0.2s ease-in-out; 
}
#video-popup-modal .modal-play-btn:hover { 
  background-color: #AC54C9; 
  color: #FFFFFF; 
  transform: scale(1.05); 
}

/* --- ZONA DE VIDEO --- */
.modal-video-wrapper {
  width: 100%;
  background-color: #000;
  position: relative;
  height: 0;
  padding-bottom: 56.25%; /* Aspect-Ratio 16:9 */
}
#modal-video-container { 
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
}
#modal-video-container iframe { 
  width: 100%; 
  height: 100%; 
  border: none; 
}

/* --- ZONA DE INFORMACIÓN --- */
.modal-info-panel {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  flex-grow: 1;
}
#modal-title { 
  font-family: 'Archivo Black', sans-serif; 
  font-size: clamp(1.5rem, 3.5vw, 2rem); 
  color: var(--text-primary); 
  margin: 0 0 0.5rem 0; 
  line-height: 1.2; 
}
.modal-metadata { 
  display: flex; 
  flex-wrap: wrap; 
  align-items: center; 
  gap: 0.5rem 1.5rem; 
  font-size: 0.9rem; 
  color: var(--text-secondary); 
  margin-bottom: 1.5rem; 
}
#modal-synopsis, #modal-genres, #modal-cast { 
  margin-bottom: 1.5rem; 
}
h5 { 
  font-family: 'Archivo Black', sans-serif; 
  font-size: 0.8rem; 
  color: var(--text-muted); 
  margin: 0 0 0.5rem 0; 
  text-transform: uppercase; 
}
#modal-synopsis-text, #modal-genres span, #modal-cast span { 
  font-size: 0.95rem; 
  line-height: 1.6; 
  color: var(--text-secondary); 
}
.modal-actions { 
  margin-top: 2rem; 
}
modal-play-btn { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem; 
  background-color: #C5D932; 
  color: #1E0F29; 
  border-radius: 4px; 
  padding: 0.8rem 1.5rem; 
  font-family: 'Archivo Narrow', sans-serif; 
  font-size: 0.9rem; 
  font-weight: bold; 
  text-transform: uppercase; 
  transition: all 0.2s ease-in-out; 
  text-decoration: none;
}

.modal-play-btn:hover {
  background-color: #AC54C9;
  color: #FFFFFF;
  transform: scale(1.05);
}

/* --- 4. RESPONSIVIDAD (La versión que funciona) --- */
@media (min-width: 901px) {
  .modal-content {
    flex-direction: row;
  }
  .modal-video-wrapper {
    width: 55%;
    height: auto; /* Correcto: la altura se define por el aspect-ratio */
    padding-bottom: calc(55% * 9 / 16); /* Correcto: Mantiene la proporción */
  }
  .modal-info-panel {
    width: 45%;
    /* Correcto: la altura se estira para igualar al video */
  }
}