/* ==============================
   VARIABLES Y UTILIDADES
   ============================== */
:root {
  --rev-bg-header: #ffffff;
  --rev-bg-page: #f8f9fa;
  --rev-primary: #007cba;
  --rev-primary-dark: #005a87;
  --rev-danger: #e74c3c;
  --rev-text-dark: #2c3e50;
  --rev-text-muted: #7f8c8d;
  --rev-border-light: #e9ecef;
  --rev-shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
  --rev-shadow-medium: 0 6px 20px rgba(0, 0, 0, 0.12);
  --rev-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ==============================
   CONTENEDOR PRINCIPAL - PROGRAMA EN VIVO
   ============================== */
.rev-live-container {
  display: flex;
  align-items: flex-start;
  background: var(--rev-bg-header);
  padding: clamp(15px, 4vw, 45px);
  border-radius: 16px;
  box-shadow: var(--rev-shadow-medium);
  margin: 30px 0;
  flex-wrap: wrap;
  gap: clamp(15px, 3vw, 50px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ==============================
   PROGRAMA ACTUAL (EN VIVO)
   ============================== */
.rev-current-program {
    display: flex;
    align-items: flex-start;
    position: relative;
    flex: 1;
    min-width: 300px;
    overflow: visible;
}

/* CONTENEDOR DE IMAGEN DEL PROGRAMA ACTUAL */
.rev-program-image-container {
    position: relative;
    top: -25px !important;           /* BAJADO de -55px a -25px */
    margin-right: 40px !important;    /* AUMENTADO de 30px a 40px */
    margin-left: 10px !important;     /* NUEVO: espacio extra a la izquierda */
    flex-shrink: 0;
    z-index: 2;
    width: 180px !important;          /* Ajustado al nuevo tamaño */
    height: 180px !important;         /* Ajustado al nuevo tamaño */
}

/* IMAGEN DEL PROGRAMA ACTUAL - MÁS GRANDE Y CUADRADA */
.rev-program-image {
    width: 180px !important;          /* Aumentado de 150px */
    height: 180px !important;         /* Aumentado de 150px */
    object-fit: cover !important;     /* Asegura que la imagen cubra todo */
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 4px solid #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

/* HOVER EFFECT MEJORADO */
.rev-program-image:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.rev-mini-image:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* CONTENEDOR DE INFORMACIÓN - MÁS ESPACIO PARA EL BOTÓN EN VIVO */
.rev-program-info {
    flex: 1;
    padding-right: 20px !important;   /* NUEVO: espacio a la derecha */
}

.rev-program-info h3 {
  margin: 0 0 8px;
  font-size: clamp(1.2em, 4vw, 1.4em);
  color: var(--rev-text-dark);
  font-weight: 700;
}

.rev-program-info p {
  margin: 4px 0;
  color: #555;
  font-size: clamp(0.85em, 2.5vw, 0.95em);
}

/* CONTENEDORES ASEGURADOS SIN ESPACIOS */
.rev-program-image-container,
.rev-next-item,
.rev-program-card {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* ELIMINAR ESPACIOS FANTASMAS EN IMÁGENES */
.rev-program-image-container img,
.rev-next-item img,
.rev-program-card img {
    vertical-align: top !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* ==============================
   AJUSTES DE ALINEACIÓN PARA NUEVOS TAMAÑOS
   ============================== */

/* MEJOR ALINEACIÓN VERTICAL EN PROGRAMA ACTUAL */
.rev-current-program {
    display: flex;
    align-items: center !important;    /* Centrado vertical mejorado */
    position: relative;
    flex: 1;
    min-width: 300px;
    overflow: visible;
}

/* ==============================
   BOTÓN EN VIVO - EFECTO TITILANTE MEJORADO
   ============================== */
.rev-live-badge {
    display: inline-block;
    background: var(--rev-danger);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: bold;
    font-size: clamp(0.8em, 2.2vw, 0.9em);
    letter-spacing: 0.5px;
    margin-top: 15px !important;
    margin-left: auto !important;
    margin-right: 20px !important;
    animation: revBlink 1.5s ease-in-out infinite !important; /* EFECTO TITILANTE */
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: fit-content !important;
    position: relative;
    z-index: 10;
    text-transform: uppercase;
    border: 2px solid transparent;
    transition: all 0.3s ease !important;
}

/* EFECTO TITILANTE MEJORADO - MÁS VISIBLE */
@keyframes revBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4),
                   0 0 0 0 rgba(231, 76, 60, 0.7);
        background-color: var(--rev-danger);
    }
    25% {
        opacity: 0.9;
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.6),
                   0 0 0 4px rgba(231, 76, 60, 0.3);
        background-color: #ff4757; /* Color más brillante */
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(231, 76, 60, 0.8),
                   0 0 0 8px rgba(231, 76, 60, 0.1);
        background-color: var(--rev-danger);
    }
    75% {
        opacity: 0.9;
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.6),
                   0 0 0 4px rgba(231, 76, 60, 0.3);
        background-color: #ff4757; /* Color más brillante */
    }
}

/* EFECTO HOVER ADICIONAL */
.rev-live-badge:hover {
    animation: revBlink 0.8s ease-in-out infinite !important;
    transform: scale(1.1) !important;
    cursor: pointer;
}

/* ==============================
   RESPONSIVE PARA EFECTOS
   ============================== */
@media (max-width: 767px) {
    .rev-live-badge {
        animation: revBlink 2s ease-in-out infinite !important; /* Más lento en móviles */
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: inline-block !important;
    }
    
    /* Efecto más suave en móviles */
    @keyframes revBlink {
        0%, 100% {
            opacity: 1;
            transform: scale(1);
            box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
        }
        50% {
            opacity: 0.7;
            transform: scale(1.03);
            box-shadow: 0 3px 10px rgba(231, 76, 60, 0.6);
        }
    }
}

/* ==============================
   MEJORA VISUAL PARA CONTRASTAR CON FONDOS OSCUROS
   ============================== */
.rev-live-container.has-bg-image .rev-live-badge {
    animation: revBlink 1.3s ease-in-out infinite !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* ==============================
   PRÓXIMOS PROGRAMAS
   ============================== */
.rev-next-programs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(0,0,0,0.03);
    padding: 20px;
    border-radius: 12px;
    min-width: 250px;
}

/* CONTENEDOR DE IMÁGENES MINIATURA */
.rev-next-item {
    display: flex;
    align-items: center;
    gap: 15px !important;             /* Espacio aumentado entre imagen y texto */
}

/* IMÁGENES MINIATURA (PRÓXIMO/ANTERIOR) - MÁS GRANDES */
.rev-mini-image {
    width: 70px !important;           /* Aumentado de 50px */
    height: 70px !important;          /* Aumentado de 50px */
    object-fit: cover !important;     /* Cubre todo el contenedor */
    border-radius: 10px !important;   /* Ligeramente más redondeado */
    flex-shrink: 0 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 2px solid #f0f0f0 !important;
}

.rev-next-item > div {
  flex: 1;
  min-width: 0;
}

.rev-next-label {
    font-size: 0.85em; /* Tamaño original */
    color: #7f8c8d;
    display: block;
    margin-bottom: 3px;
}

.rev-next-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1em; /* Tamaño original */
}

.rev-next-time {
  display: block;
  font-size: clamp(0.7em, 2vw, 0.8em);
  color: var(--rev-text-muted);
  margin-top: 3px;
  font-weight: 500;
}

/* ==============================
   PESTAÑAS DE DÍAS DE LA SEMANA
   ============================== */
.rev-full-schedule-tabs {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-top: 20px;
}

.rev-days-navigation {
  display: flex;
  background: #ffffff;
  border-bottom: 2px solid var(--rev-border-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0 8px;
}

.rev-days-navigation::-webkit-scrollbar {
  height: 6px;
}

.rev-days-navigation::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.rev-day-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 100px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  color: #6c757d;
  transition: all 0.3s ease;
  font-size: clamp(0.85em, 2.5vw, 0.95em);
  white-space: nowrap;
  flex: 0 0 auto;
}

.rev-day-tab:hover {
  background: #f8f9fa;
  color: #495057;
}

.rev-day-tab.active {
  color: var(--rev-primary);
  border-bottom-color: var(--rev-primary);
}

/* BADGE "HOY" EN PESTAÑAS */
.rev-hoy-badge {
  display: inline-block;
  background: var(--rev-danger);
  color: white;
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: bold;
  vertical-align: middle;
  line-height: 1;
}

/* ==============================
   CONTENIDO DE PROGRAMACIÓN POR DÍA
   ============================== */
.rev-days-content {
  padding: clamp(20px, 5vw, 30px);
}

.rev-day-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.rev-day-content.active {
  display: block;
}

.rev-day-title {
  background: #ffffff; 
  color: var(--rev-text-dark);
  font-size: clamp(1.5em, 5vw, 1.8em);
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 3px solid #3498db;
  font-weight: 700;
}

.rev-no-programs {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
  font-size: 1.1em;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================
   CUADRÍCULA DE PROGRAMAS - VERSIÓN CORREGIDA
   ============================== */
.rev-programs-grid {
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(15px, 3vw, 25px);
  width: 100%;
}

.rev-program-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--rev-shadow-light);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #f0f0f0;
}

.rev-program-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--rev-shadow-hover);
}

/* ==============================
   IMÁGENES DE PROGRAMACIÓN COMPLETA - OPTIMIZADAS
   ============================== */
.rev-card-image {
    width: 100% !important;
    height: 220px !important;         /* Aumentado de 200px */
    object-fit: cover !important;     /* Cubre exactamente el contenedor */
    background-color: #f8f9fa;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}}

/* CONTENEDOR DE TARJETA - ELIMINAR CUALQUIER ESPACIO */
.rev-program-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden !important;
    box-shadow: var(--rev-shadow-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f0f0f0;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* ELIMINAR ESPACIOS EN CONTENEDOR DE IMAGEN */
.rev-program-card > img {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* CONTENEDOR DE CONTENIDO COMPACTO */
.rev-card-content {
    padding: 10px 8px !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    gap: 0 !important;
}

/* ==============================
   ESTILOS DE TEXTO ULTRA COMPACTOS
   ============================== */
.rev-program-card h3 {
    margin: 0 0 5px 0 !important;
    padding: 0 2px !important;
    font-size: clamp(1.1em, 3.5vw, 1.2em);
    line-height: 1.2;
    font-weight: 700;
    width: 100%;
}

.rev-program-host {
    margin: 0 0 4px 0 !important;
    padding: 0 2px !important;
    font-size: 0.9em;
    font-weight: 500;
    width: 100%;
}

.rev-program-time {
    margin: 0 0 5px 0 !important;
    padding: 0 2px !important;
    font-weight: 600;
    font-size: 0.85em;
    width: 100%;
}

.rev-program-description {
    padding: 0 2px 6px 2px !important;
    margin: auto 0 0 0;
    font-size: 0.85em;
    line-height: 1.4;
    width: 100%;
}

/* ==============================
   RESET COMPLETO PARA ELIMINAR ESPACIOS
   ============================== */
.rev-programs-grid {
    background: #ffffff;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(15px, 3vw, 25px);
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.rev-programs-grid * {
    box-sizing: border-box !important;
}

/* ==============================
   AJUSTES ESPECÍFICOS PARA MÓVILES
   ============================== */
@media (max-width: 767px) {
    .rev-card-image {
        height: 160px !important;
    }
    
    .rev-card-content {
        padding: 8px 6px !important;
    }
    
    .rev-program-card h3 {
        margin: 0 0 4px 0 !important;
        font-size: 1.05em;
    }
    
    .rev-program-host {
        margin: 0 0 3px 0 !important;
        font-size: 0.85em;
    }
    
    .rev-program-time {
        margin: 0 0 4px 0 !important;
        font-size: 0.8em;
    }
    
    .rev-program-description {
        padding: 0 2px 5px 2px !important;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .rev-card-image {
        height: 140px !important;
    }
    
    .rev-card-content {
        padding: 6px 4px !important;
    }
    
    .rev-programs-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 12px;
    }
}
/* ==============================
   ESTILOS PARA FONDO OSCURO / IMAGEN DE FONDO
   ============================== */
.rev-live-container.has-bg-image {
  background-color: rgba(0, 0, 0, 0.6) !important;
  color: white !important;
}

.rev-live-container.has-bg-image .rev-program-title,
.rev-live-container.has-bg-image .rev-program-host,
.rev-live-container.has-bg-image .rev-program-time,
.rev-live-container.has-bg-image .rev-next-label,
.rev-live-container.has-bg-image .rev-next-title {
  color: white !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ==============================
   AJUSTES PARA PANTALLAS GRANDES (1024px+)
   ============================== */
@media (min-width: 1024px) {
    .rev-program-image-container {
        margin-right: 50px !important; /* MÁXIMA separación en pantallas grandes */
        margin-left: 20px !important;  /* MÁXIMO espacio a la izquierda */
    }
    
    .rev-program-info {
        padding-right: 40px !important; /* MÁXIMO espacio para el botón */
    }
    
    .rev-live-badge {
        margin-right: 40px !important; /* MÁXIMO espacio desde el borde */
    }
}

/* ==============================
   MANTENER COMPORTAMIENTO ORIGINAL EN MÓVILES
   ============================== */
@media (max-width: 767px) {
    .rev-current-program {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .rev-program-image-container {
        top: -15px !important;
        margin-right: 0 !important;    /* RESET: sin margen lateral en móviles */
        margin-left: 0 !important;     /* RESET: sin margen lateral en móviles */
        margin-bottom: 10px;
        width: 120px !important;
        height: 120px !important;
    }
    
    .rev-program-info {
        padding-right: 0 !important;   /* RESET: sin padding en móviles */
        width: 100%;
    }
    
    .rev-live-badge {
        margin-left: 0 !important;     /* RESET: centrado en móviles */
        margin-right: 0 !important;    /* RESET: centrado en móviles */
        margin-top: 12px !important;
        display: inline-block !important;
    }
}

/* ==============================
   MÓVILES PEQUEÑOS
   ============================== */
@media (max-width: 480px) {
    .rev-program-image-container {
        top: -10px !important;
        width: 100px !important;
        height: 100px !important;
    }
}

/* ==============================
   MEDIA QUERIES - AJUSTES FINALES
   ============================== */
   
/* TABLETS */
@media (max-width: 1024px) {
    .rev-program-image {
        width: 160px !important;
        height: 160px !important;
    }
    
    .rev-program-image-container {
        width: 160px !important;
        height: 160px !important;
        top: -45px;
    }
    
    .rev-mini-image {
        width: 65px !important;
        height: 65px !important;
    }
    
    .rev-card-image {
        height: 200px !important;
    }
}


/* Móviles pequeños: mantener pestañas horizontales con scroll */
@media (max-width: 767px) {
  .rev-live-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .rev-current-program {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .rev-program-image-container {
    top: -20px;
    margin-right: 0;
    margin-bottom: 15px;
  }

@media (max-width: 767px) {
    .rev-program-image {
        width: 120px !important;
        height: 120px !important;
    }
    
    .rev-program-image-container {
        width: 120px !important;
        height: 120px !important;
        top: -30px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .rev-mini-image {
        width: 55px !important;
        height: 55px !important;
    }
    
    .rev-card-image {
        height: 180px !important;
    }
    
    .rev-next-item {
        gap: 12px !important;
    }
}

  .rev-program-info {
    align-items: center;
  }

  .rev-next-programs {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    min-width: auto;
  }

  .rev-days-navigation {
    flex-wrap: nowrap;
    padding: 0 4px;
  }

  .rev-day-tab {
    padding: 12px 14px;
    font-size: 0.85em;
  }

  /* Badge "HOY" en móviles pequeños */
  .rev-hoy-badge {
    font-size: 0.65em;
    padding: 1px 4px;
    margin-left: 4px;
  }

  /* Ajustes para tarjetas en móviles */
  .rev-card-content {
    padding: 15px 10px;
  }

  .rev-card-image {
    height: 160px;
  }
}

/* MÓVILES PEQUEÑOS */
@media (max-width: 480px) {
    .rev-program-image {
        width: 100px !important;
        height: 100px !important;
    }
    
    .rev-program-image-container {
        width: 100px !important;
        height: 100px !important;
        top: -25px;
        margin-right: 45px !important; /* MÁS separación en pantallas grandes */
        margin-left: 15px !important;  /* MÁS espacio a la izquierda */
    }
    
        .rev-program-info {
        padding-right: 30px !important; /* MÁS espacio para el botón */
    }
    
    .rev-live-badge {
        margin-right: 30px !important; /* MÁS espacio desde el borde */
    }
    
    .rev-mini-image {
        width: 45px !important;
        height: 45px !important;
    }
    
    .rev-card-image {
        height: 160px !important;
    }
    
    .rev-next-item {
        gap: 10px !important;
    }

  .rev-next-programs {
    flex-direction: column;
    gap: 15px;
  }

  .rev-next-item {
    flex: 1 1 100%;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .rev-mini-image {
    width: 40px;
    height: 40px;
  }

  .rev-card-image {
    height: 140px;
  }

  .rev-programs-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
  }
}