/* ==========================================================================
   ESTILOS GENERALES Y MAQUETACIÓN (Base oscura para Foxiz)
   ========================================================================== */
.foxiz-custom-news-module {
  background-color: #141414;
  color: #ffffff;
  margin: 0px 150px 0px 150px;
  padding: 0px;
  font-family: Arial, sans-serif !important;
  box-sizing: border-box;
}

.foxiz-custom-news-module * { 
  box-sizing: border-box; 
}

.foxiz-custom-news-module .news-grid-container {
  display: grid;
  grid-template-columns: 58% 42%;
  gap: 22px;
  align-items: start;
}

/* REPRODUCTOR PERSONALIZADO DE VIDEO (Horizontal en PC) */
.reproductor-noticias-v4 {
  position: relative;
  width: 60% !important; 
  height: 650px !important;
  max-width: 64% !important; 
  margin: 0 auto !important;
  background: #000; 
  overflow: hidden;
  display: flex; 
  align-items: center; 
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.video-elemento-propio { 
  width: 100% !important; 
  height: 100% !important; 
  object-fit: cover !important; 
  display: block; 
}

.foxiz-custom-news-module .grid-col-2-video { 
  width: 100%; 
}

/* Botón central interactivo estilo BBC */
/* BOTÓN CENTRAL INTERACTIVO (Estado inicial / Pausado) */
.boton-play-central {
  position: absolute;
  bottom: 14px;
  left: 0px;
  width: 65px;
  height: 65px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  pointer-events: auto;
  cursor: pointer;
  z-index: 5;
  opacity: 1;
  transition: opacity 0.3s, background-color 0.3s; 
}

/* Hover estándar en Pausa: Cambia a naranja corporativo */
.boton-play-central:hover { 
  background-color: #ff9d00; 
}

/* ESTADO REPRODUCCIÓN: Se mantiene permanentemente visible con fondo translúcido */
.boton-play-central.video-reproduciendose {
  background-color: rgba(0, 0, 0, 0.4); /* No interrumpe la visualización de la noticia */
  opacity: 0.8;                         /* Visible en todo momento mientras corre el video */
}

/* Hover en reproducción: Se ilumina en negro sólido al pasar el mouse por encima */
.boton-play-central.video-reproduciendose:hover {
  background-color: #000000;
  opacity: 1;
}

.boton-silencio-unico { position: absolute; top: 15px; right: 12px; background: transparent; border: none; color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 10; }
.area-interactiva-progreso { position: absolute; bottom: 0; left: 0; width: 100%; height: 15px; cursor: pointer; z-index: 10; display: flex; align-items: flex-end; }
.fondo-barra-progreso { width: 100%; height: 14px; background: rgba(255,255,255,0.3); }
.relleno-barra-progreso { height: 100%; width: 0%; background-color: #333; }
.controles-laterales-derecha { position: absolute; right: 15px; bottom: 25px; z-index: 10; display: flex; flex-direction: column; gap: 10px; }
.boton-compartir, .boton-pantalla-completa { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; opacity: 1; padding: 12px; }

video::-webkit-media-text-track-display { padding-bottom: 40px !important; background: transparent !important; }
video::cue { background: transparent; color: #fff; font-size: 14px; font-weight: bold; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); -webkit-text-stroke: 1px black; }

/* SECCIÓN EDITORIAL (Textos debajo del Video Activo) */
.main-video-story-body { 
  padding: 15px 10px !important; 
  margin-top: 5px !important; 
}

.main-video-story-title { 
  font-family: "MS Serif", "New York", serif !important; 
  font-size: 50px !important; 
  line-height: 1.25 !important; 
  font-weight: 500 !important; 
  color: #FFFFFF !important; 
  text-decoration: none !important; 
  display: block !important; 
  margin-bottom: 8px !important; 
}

.main-video-story-title:hover { 
  color: #e0e0e0; 
}

.main-video-story-date { 
  font-family: Arial, sans-serif !important; 
  font-size: 14px !important; 
  color: #cccccc !important; 
  margin-bottom: 15px !important; 
  display: block !important; 
}

/* Efectos colapsables (Leer Más) */
.main-video-story-description.closed { 
  max-height: 70px; 
  overflow: hidden; 
  position: relative; 
}

.main-video-story-description.closed::after { 
  content: ''; 
  position: absolute; 
  bottom: 0; 
  left: 0; 
  width: 100%; 
  height: 40px; 
  background: linear-gradient(transparent, #141414); 
}

.main-video-story-description.open { 
  max-height: 1500px; 
  transition: max-height 0.5s ease-in-out; 
}

.main-video-story-description p { 
  font-family: Helvetica, Arial, sans-serif !important; 
  font-size: 16px !important; 
  line-height: 1.6 !important; 
  color: #ffffff !important; 
  margin: 0 0 12px 0 !important; 
  text-align: left !important; 
}

.main-video-story-description p:last-child { 
  margin-bottom: 0 !important; 
}

.read-more-btn { 
  background: transparent; 
  border: none; 
  color: #ff9d00; 
  font-family: Arial, sans-serif; 
  font-size: 13px; 
  font-weight: bold; 
  cursor: pointer; 
  padding: 5px 0; 
  margin-top: 5px; 
  display: block; 
}

.read-more-btn:hover { 
  text-decoration: underline; 
}

/* SECCIÓN PLAYLIST LATERAL (Columna 2) */
.foxiz-custom-playlist-title { 
  font-family: Arial, sans-serif !important; 
  font-size: 24px !important; 
  margin: 0 0 10px 5px !important; 
  padding: 5px 2px !important; 
  color: #FFFFFF !important; 
  font-weight: bold; 
  display: block; 
}

.foxiz-custom-news-module .grid-hybrid-cards { 
  display: flex; 
  flex-direction: column; 
  gap: 0px; 
  padding-right: 15px; 
  padding-left: 12px; 
}

/* NUEVO: CONTENEDOR CON SCROLL INTEGRADO PARA LAS TARJETAS */
.playlist-scroll-wrapper {
  max-height: 400px; /* Alineado a la altura fija del reproductor */
  overflow-y: auto;   /* Activa el scroll vertical si agregas más de 4 noticias */
  padding-right: 5px;
}

/* Estilo estético para la barra de scroll (Navegadores basados en Webkit) */
.playlist-scroll-wrapper::-webkit-scrollbar {
  width: 6px;
}
.playlist-scroll-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03); 
  border-radius: 0px;
}
.playlist-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15); 
  border-radius: 0px;
}
.playlist-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: #ff9d00; /* Iluminación naranja al interactuar con el scroll */
}

/* Tarjeta individual inyectada por JS */
.foxiz-custom-news-module .hybrid-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
  padding: 10px;
  border-radius: 0px;
  transition: background-color 0.2s ease, border-left 0.2s ease;
  border-left: 3px solid transparent;
}

.foxiz-custom-news-module .hybrid-card:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 8px;
}

/* Estado Activo: Ilumina la miniatura del video de la URL actual */
.foxiz-custom-news-module .hybrid-card.active-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-left: 3px solid #ff9d00;
}

.foxiz-custom-news-module .card-media-wrapper { 
  position: relative; 
  display: block; 
  width: 135px; 
  min-width: 135px; 
  aspect-ratio: 16 / 9; 
  overflow: hidden; 
  background-color: #111; 
  border-radius: 0px; 
}

.foxiz-custom-news-module .card-media-wrapper img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.foxiz-custom-news-module .card-title { 
  color: #e0e0e0; 
  font-size: 16px; 
  line-height: 1.3; 
  font-weight: 500; 
  display: -webkit-box; 
  -webkit-line-clamp: 3; 
  -webkit-box-orient: vertical; 
  overflow: hidden; 
  transition: color 0.2s ease; 
}

.foxiz-custom-news-module .hybrid-card:hover { 
  background-color: rgba(255, 255, 255, 0.04); 
}

.foxiz-custom-news-module .hybrid-card:hover .card-title { 
  color: #ffffff; 
}

/* CAJA DE PUBLICIDAD LATERAL ADAPTABLE */
.foxiz-custom-playlist-ad {
  width: 100%;
  margin-top: 20px; 
  padding: 15px 0 5px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   DISEÑO ADAPTATIVO (Móviles y Tablets)
   ========================================================================== */
@media (max-width: 991px) {
  .foxiz-custom-news-module { margin: 0px; }
  .foxiz-custom-news-module .news-grid-container { grid-template-columns: 1fr; gap: 22px; }
  .main-video-story-title { font-size: 30px !important; line-height: 1.2 !important; }
  .foxiz-custom-news-module .grid-hybrid-cards { padding-right: 0px; }
  .playlist-scroll-wrapper { max-height: 300px; } /* Reduce altura en tablets/móviles */
  .foxiz-custom-playlist-ad { margin-top: 35px; }
}

@media (max-width: 768px) {
  .reproductor-noticias-v4 {
   height: 200px !important; 
   width: 100% !important; 
  height: 600px !important;
  max-width: 100% !important;  
  }
  
  .foxiz-custom-news-module .card-media-wrapper { 
  position: relative; 
  display: block; 
  width: 135px; 
  min-width: 135px; 
  aspect-ratio: 16 / 9; 
  overflow: hidden; 
  background-color: #111; 
  border-radius: 0px; 
}
  
  
  
  
  .main-video-story-description.open { 
  max-height: 2500px; 
  transition: max-height 0.5s ease-in-out; 
}
  
}

@media (max-width: 480px) {
  .main-video-story-title { font-size: 30px !important; line-height: 1.1 !important; }
  .foxiz-custom-news-module .card-media-wrapper { width: 140px; min-width: 140px; }
  .foxiz-custom-news-module .card-title { font-size: 13px; }
}
