/* =========================================
   SECCIÓN UNIFICADA: COORDINADOR AL DÍA
========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; text-decoration: none;}
:root {
    --color-azul-inst: #363844;
    --color-gris-oscuro: #2c2e36;
    --color-gris-claro: #f4f4f4;
    
    /* Dimensiones del Header */
    --altura-utility: 40px; 
    --altura-barra-top: 150px; /* CAMBIO: Aumentado para que quepa logo de 100px */
    --altura-barra-bottom: 60px;
    
    /* Total Header Height para calcular el padding del body/slider */
    --header-total: calc(var(--altura-utility) + var(--altura-barra-top) + var(--altura-barra-bottom));
}

.aldia-section {
    background-color: #ffffff;
    /* padding: 0px 0; */
    width: 100%;
    /* overflow: hidden;  */
    margin-top: 60px;
}

.aldia-section .wrapper {
    display: block !important; 
    text-align: center;

    /* width: 100vw; 
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw; 
    margin-right: -50vw; 
    */
}

/* --- Cabecera y Switcher de Pestañas --- */
.aldia-header-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    width: 100%;
}

.aldia-header-centered .section-title {
    /* font-size: 36px;
    color: var(--color-azul-inst);
    margin: 0 0 25px 0;
    font-weight: 800; */

    color: #363844;
    font-size: 36px;
    line-height: 1.15;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin: 0 0 20px 0;


}

/* El fondo gris tipo interruptor */
.aldia-tabs {
    display: inline-flex;
    background-color: #f4f6f9;
    padding: 6px;
    border-radius: 50px;
    gap: 5px;
}

.aldia-tab-btn {
    background: transparent;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.aldia-tab-btn:hover { color: var(--color-azul-inst); }

.aldia-tab-btn.active {
    background-color: #fff;
    color: var(--color-azul-inst);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* --- Transición de los Contenidos --- */
.aldia-tab-content {
    display: none;
    animation: fadeInTab 0.4s ease;
}

.aldia-tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Contenedor Global de Sliders --- */
.aldia-slider-wrapper {
    position: relative;
    width: 100% !important;
    max-width: 1360px !important;
    margin: 0 auto !important;
    text-align: left !important;
}

.aldia-track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 15px 5px 30px 5px; 
}
.aldia-track::-webkit-scrollbar { display: none; }


/* =========================================
   ESTILOS COMPARTIDOS (NOVEDADES Y VIDEOS)
========================================= */

/* --- Tarjetas Base --- */
.news-card, .video-card {
    background: #fff;
    border-radius: 16px;
    min-width: 320px;
    width: 320px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover, .video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

/* Imágenes Base */
.news-image, .video-thumb {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.video-thumb { background-color: #000; cursor: pointer; }

.news-image img, .video-thumb img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}

.video-thumb img { opacity: 0.8; }
.video-card:hover .video-thumb img { opacity: 0.5; }

.news-card:hover .news-image img, .video-card:hover .video-thumb img {
    transform: scale(1.05);
}

/* --- Elementos de Novedades --- */
.news-category-badge {
    position: absolute; top: 15px; left: 15px; background-color: #00c6ff; color: #fff;
    font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 6px 13px;
    border-radius: 4px; z-index: 2;
}

.news-content, .video-info { padding: 25px 20px; flex-grow: 1; display: flex; flex-direction: column; }

.news-date, .video-date {
    font-size: 11px; font-weight: 700; margin-bottom: 10px; letter-spacing: 0.5px;
}
.news-date { color: #888; }
.video-date { color: #00c6ff; display: block; }

.news-content h3, .video-info h3 { font-size: 16px !important; font-weight: 700; line-height: 1.4; margin-bottom: 10px; margin-top: 0; }

.news-content h3 a, .video-info h3 a {
    color: var(--color-azul-inst); text-decoration: none; transition: color 0.3s ease; font-weight: bold !important; 
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-content h3 a:hover, .video-info h3 a:hover { color: #00c6ff; }

.news-content p {
    font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 20px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.read-more-link {
    display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700;
    color: var(--color-azul-inst); text-decoration: none; transition: gap 0.3s, color 0.3s; margin-top: auto; 
}
.read-more-link:hover { gap: 10px; color: #00c6ff; }

/* --- Elementos de Video --- */
.play-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: #fff; font-size: 40px; transition: 0.3s ease; text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.4); width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; z-index: 2;
}
.video-card:hover .play-overlay { background: #00c6ff; transform: translate(-50%, -50%) scale(1.1); }

.video-duration {
    position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.8);
    color: #fff; font-size: 11px; font-weight: 700; padding: 3px 6px; border-radius: 4px; z-index: 2;
}

/* --- Botones del Carrusel Comunes --- */
.nav-btn-modern {
    position: absolute; top: 40%; transform: translateY(-50%);
    width: 46px; height: 46px; background: #fff; border: 1px solid #ddd;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--color-azul-inst); cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 10; transition: all 0.3s ease;
}
.nav-btn-modern:hover { background: var(--color-azul-inst); color: #fff; border-color: var(--color-azul-inst); }

#newsPrev, #vidPrev, #presPrev { left: -25px; }
#newsNext, #vidNext, #presNext { right: -25px; }


/* --- Acciones Footer (Botones Inferiores) --- */
.aldia-footer-action {
    display: flex; justify-content: flex-end; width: 100%; max-width: 1200px;
    margin: 10px auto 0 auto; padding: 0 5px; 
}



/* =========================================
   MODAL DE YOUTUBE (CINE)
========================================= */
.yt-modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); /* Fondo negro casi sólido */
    z-index: 100000; /* Por encima de todo */
    justify-content: center; 
    align-items: center;
    opacity: 0; 
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.yt-modal-overlay.is-active { 
    display: flex; 
    opacity: 1; 
}

.yt-modal-content {
    position: relative; 
    width: 90%; 
    max-width: 900px;
    background: #000; 
    border-radius: 8px; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.yt-close-btn {
    position: absolute; 
    top: -40px; right: 0; 
    background: none; border: none;
    color: #fff; font-size: 36px; 
    cursor: pointer; transition: 0.2s;
}

.yt-close-btn:hover { 
    color: #ff5252; 
    transform: scale(1.1); 
}

/* Truco para mantener proporción 16:9 del video siempre */
.yt-video-container {
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden; 
    border-radius: 8px;
}

.yt-video-container iframe {
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
}

/* --- Botón Secundario (Ver todos) --- */
.btn-outline-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-azul-inst);
    background-color: transparent;
    border: 2px solid var(--color-azul-inst);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-outline-blue:hover {
    background-color: var(--color-azul-inst);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 32, 96, 0.15);
    text-decoration: none;
}


/* --- Botón YouTube --- */
.btn-youtube {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #FF0000; /* Rojo oficial de YouTube */
    color: #fff;
    padding: 12px 24px;
    /* border-radius: 50px; */
    border-radius: 50px 50px 50px 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap; /* Evita que el texto se rompa */
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.2); /* Sombra rojiza suave */
    margin-left: 10px;
}

.btn-youtube:hover {
    background-color: #CC0000; /* Un rojo más oscuro y elegante al pasar el mouse */
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 6px 15px rgba(255, 0, 0, 0.3);
    text-decoration: none;
}
/* --- RESPONSIVE MÓVIL --- */
@media (max-width: 410px) {

    .nav-btn-modern {
        display: none !important;
    }
    .aldia-tabs {
        display: flex;
        width: 100%;
    }
    .aldia-tab-btn {
        width: 100%;
        text-align: center;
        padding: 12px 5px;
        font-size: 14px;
    }

    .aldia-footer-action {
        display: flex;
        flex-direction: column; 
        align-items: center;    
        gap: 15px;              
        width: 100%; 
    }

    .aldia-footer-action a {
        width: 100%;            
        max-width: 280px;       
        text-align: center;     
        box-sizing: border-box; 
    }

    .btn-youtube {
        display: inline-flex;
        justify-content: center;
        margin-left: 0px;
    }
}