/* =========================================
   DASHBOARD DE TRANSMISIÓN (Senior Friendly)
   Estilo: Clean Card Layout + Alto Contraste
   v2.0 Fixed
   ========================================= */

/* CONTENEDOR GRID PRINCIPAL */
.section-streaming .alerta-transmision {
    display: flex;
    flex-wrap: wrap;
    /* Fallback */
    gap: 20px;
    align-items: stretch;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;

    /* Fondo para destacar la sección completa */
    background: var(--bg-panel);
    border-radius: 20px;
    border: 1px solid var(--border-soft);
}

/* 1. COLUMNA VIDEO */
.video-column {
    position: relative;
    width: 100%;
    min-width: 0;
    /* Fix flexbox overlap */
}

/* OVERRIDE CRÍTICO PARA EL REPRODUCTOR */
/* Esto arregla el "bloque negro gigante" y la "pantalla rota" */
.video-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin: 0;

    /* Aspect Ratio Responsivo */
    aspect-ratio: 16 / 9;

    /* Importante: Sobrescribir altura fija de style.css */
    height: auto !important;
    min-height: 0 !important;
}

/* Asegurar que el contenido interno (facade/iframe) llene el contenedor */
.video-facade,
.video-container iframe {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    /* Override style.css overrides */
}


/* 2. COLUMNA PROGRAMACIÓN */
.program-column {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* TARJETA DE INFORMACIÓN */
.info-programacion {
    background: var(--bg-panel);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 20px;

    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);

    height: 100%;
    /* Llenar altura en desktop */
    justify-content: center;
}

/* ESTILOS DE TEXTO DEL DASHBOARD */
.prog-block.past {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.prog-block.past .label-micro {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.prog-block.past .prog-title {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

.prog-block.present {
    border-left: 5px solid #ff7e00;
    padding-left: 15px;
    margin: 5px 0;
    background: linear-gradient(to right, rgba(255, 126, 0, 0.05), transparent);
    border-radius: 0 8px 8px 0;
    padding-top: 10px;
    padding-bottom: 10px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.dot-pulse {
    width: 10px;
    height: 10px;
    background-color: #ff4500;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff4500;
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

.label-live {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ff4500;
    letter-spacing: 1px;
}

.prog-block.present .prog-title-hero {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.6rem;
    line-height: 1.2;
    color: var(--text-main);
    font-weight: 800;
    margin: 5px 0;
}

.prog-block.present .prog-time {
    font-size: 1.1rem;
    color: #ffd700;
    font-family: monospace;
    font-weight: 700;
}

/* BOTÓN DE ACCIÓN RESTAURADO (UX) */
.btn-cards {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff8c00 0%, #ff4500 100%);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 25px;
    border-radius: 50px;
    width: 100%;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
}

.btn-cards:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.5);
}



.prog-block.future .label-micro {
    display: block;
    font-size: 0.85rem;
    color: var(--orange-dark);
    font-weight: 600;
    text-transform: uppercase;
}

.prog-block.future .prog-title {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
}

/* OCULTAR BOTÓN ANTIGUO */
.alerta-boton {
    display: none !important;
}

/* =========================================
   MEDIA QUERIES (LAYOUT RESPONSIVO REAL)
   ========================================= */

/* MOBILE & TABLET (Vertical) */
@media (max-width: 1023px) {
    .section-streaming .alerta-transmision {
        flex-direction: column;
        /* Apilar siempre */
        padding: 10px;
    }

    .video-column {
        flex: none;
        width: 100%;
    }

    .program-column {
        flex: none;
        width: 100%;
        margin-top: 10px;
    }

    .info-programacion {
        padding: 15px;
    }
}

/* DESKTOP (Horizontal) */
@media (min-width: 1024px) {
    .section-streaming .alerta-transmision {
        flex-direction: row;
        /* Lado a lado */
        flex-wrap: nowrap;
    }

    .video-column {
        flex: 1.6;
        /* ~62% */
    }

    .program-column {
        flex: 1;
        /* ~38% */
    }

    .info-programacion {
        padding: 30px;
    }
}

/* =========================================
   MOBILE FIRST OPTIMIZATIONS (Max Width 768px)
   ========================================= */
@media (max-width: 768px) {
    .section-streaming .alerta-transmision {
        padding: 24px 18px;
        gap: 20px;
        border-radius: 20px;
        min-height: 85vh;
        /* Allow content to grow naturally */
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .video-column {
        width: 100%;
        margin: 0;
        flex-shrink: 0;
    }

    .video-container {
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto !important;
        position: relative;
        border-radius: 16px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
        margin: 0 auto;
        overflow: hidden;
    }

    .video-facade,
    .video-container iframe {
        position: absolute !important;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
    }

    .program-column {
        width: 100%;
        margin-top: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .info-programacion {
        padding: 20px;
        border-radius: 16px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 14px;
    }

    .prog-block.present {
        padding: 14px 16px;
        border-left: 6px solid #ff7e00;
        border-radius: 0 12px 12px 0;
    }

    .btn-cards {
        padding: 16px 20px;
        font-size: 1.15rem;
        font-weight: 800;
        margin-top: auto;
        box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
    }
}