/* ==========================================================================
   PALETA INSTITUCIONAL Y CONFIGURACIÓN GLOBAL
   ========================================================================== */
:root {
    --azul-cvi: #0981bc;
    --azul-dark: #054d71;
    --rojo-tv: #dc3545;
    --negro-tv: #000000;
}

body {
    background-color: #f8f9fa !important;
    font-family: 'Segoe UI', sans-serif;
}

.container { max-width: 1200px; }

/* Clases auxiliares compactas */
.fs-7 { font-size: 0.78rem; }

/* ==========================================================================
   NUEVA ESTRUCTURA STICKY (CORREGIDA)
   ========================================================================== */
/* Este contenedor evita que la barra azul se deforme o pierda el ancho de la página */
.sticky-nav-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1040; /* Capa prioritaria sobre las tarjetas de abajo */
    background-color: transparent; /* Evita opacar el fondo al bajar */
}

/* Redefinimos el antiguo header para que fluya con el scroll sin quedarse pegado */
header {
    background: transparent;
    padding-top: 10px;
    position: relative;
}

/* Contenedor maestro único para Banner Publicitario */
.header-banner-container {
    position: relative;
    width: 100% !important;
    height: 140px !important; /* Altura estandarizada forzada */
    background-color: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: block !important;
}

/* Forzar dimensiones de renderizado para componentes internos del carrusel */
.header-banner-container .carousel,
.header-banner-container .carousel-inner,
.header-banner-container .carousel-item {
    height: 100% !important;
    width: 100% !important;
}

/* Ajuste elástico de las imágenes publicitarias */
.header-banner-container .carousel-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Contenedor de las imágenes promocionales de fondo alternativo */
.pub-banner-fullsize {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.pub-banner-fullsize .pub-ticker-scroll {
    height: 100%;
    width: 100%;
}

.pub-banner-fullsize .pub-banner-item, 
.pub-banner-fullsize .pub-banner-item a, 
.pub-banner-fullsize .pub-banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   CONTROL DE ALTO CONTRASTE Y VISIBILIDAD DE FLECHAS (CORREGIDO)
   ========================================================================== */
.header-banner-container .carousel-control-prev,
.header-banner-container .carousel-control-next {
    width: 6% !important;
    opacity: 1 !important; /* Evitamos la transparencia pálida nativa de Bootstrap */
    z-index: 10;
    transition: all 0.2s ease;
}

/* Posicionamiento quirúrgico en los extremos internos */
.header-banner-container .carousel-control-prev { left: 10px !important; }
.header-banner-container .carousel-control-next { right: 10px !important; }

/* --- CORRECCIÓN DE VISIBILIDAD DE FLECHAS --- */
.header-banner-container .carousel-control-prev-icon,
.header-banner-container .carousel-control-next-icon {
    width: 35px !important;
    height: 35px !important;
    background-color: rgba(0, 0, 0, 0.5) !important; /* Fondo circular oscuro */
    border-radius: 50% !important;
    filter: invert(1) brightness(2); /* Invierte el color para que la flecha sea negra/visible */
    transition: all 0.2s ease-in-out;
}

/* Efecto hover al pasar el cursor */
.header-banner-container .carousel-control-prev:hover .carousel-control-prev-icon,
.header-banner-container .carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--azul-cvi) !important;
    filter: invert(0); /* Vuelve al color original (blanco) sobre el fondo azul */
    transform: scale(1.1);
}

/* ==========================================================================
   ESTILOS DE LA BARRA DE BOTONES (FONDO AZUL E INTERACTIVO)
   ========================================================================== */
/* Forzamos el color institucional bg-primary de Bootstrap */
.navbar.bg-primary {
    background-color: var(--azul-cvi) !important;
    border-bottom: none;
}

/* Los links de la barra ahora son blancos limpios */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    padding: 10px 15px;
    border-radius: 4px;
}

/* Efecto Hover translúcido */
.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.18);
}

/* Menú desplegable de Noticias */
.dropdown-menu { 
    border-top: 4px solid var(--rojo-tv); 
    border-radius: 0 0 4px 4px; 
}
.dropdown-item:hover { 
    background-color: #f8f9fa; 
    color: var(--rojo-tv) !important; 
}

/* ==========================================================================
   TICKER DE NOTICIAS (ÚLTIMA HORA)
   ========================================================================== */
.ticker-wrap { 
    background: #ffffff; 
    height: 40px; 
    display: flex; 
    align-items: center; 
    border-top: 3px solid var(--rojo-tv); 
    overflow: hidden; 
    border-radius: 4px;
}
.ticker-title { 
    background: var(--negro-tv); 
    color: #fff; 
    padding: 0 20px; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    font-weight: bold;
}
.ticker-content-wrapper {
    overflow: hidden;
    width: 100%;
}
.ticker-scroll {
    display: inline-block; 
    white-space: nowrap; 
    padding-left: 100%;
    animation: ticker-animation 30s linear infinite;
}
.ticker-item { padding: 0 40px; color: #333; font-weight: 600; }
@keyframes ticker-animation { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* ==========================================================================
   WIDGET DEL CLIMA LOCAL (SANCTI SPÍRITUS)
   ========================================================================== */
.widget-tiempo {
    border-radius: 8px !important;
    border-top: 4px solid var(--azul-cvi) !important;
}

/* Fondo degradado azul profundo semicálido */
.bg-gradient-tiempo {
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 50%, #207cca 100%);
}

/* Animación sutil de respiración para el sol */
@keyframes soft-shine {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}
.animate-shine {
    animation: soft-shine 4s ease-in-out infinite;
}

/* ==========================================================================
   CINTA DE VIDEOS LOCALES Y PODCASTS
   ========================================================================== */
.full-width-pub { 
    width: 100%; 
    padding: 15px 0; 
    margin: 30px 0; 
    overflow: hidden; 
    position: relative;
}
.bg-black-tv {
    background-color: var(--negro-tv) !important;
}
.borde-pelicula {
    height: 8px; 
    background-image: linear-gradient(to right, #fff 0px, #fff 8px, transparent 8px, transparent 16px);
    background-size: 16px 8px; 
    background-repeat: repeat-x;
}
.borde-pelicula.arriba { margin-bottom: 15px; }
.borde-pelicula.abajo { margin-top: 15px; }

.pub-scroll { 
    display: flex; 
    scrollbar-width: thin;
}
.pub-item { 
    transition: 0.3s; 
}
.pub-item:hover { 
    transform: scale(1.03); 
}

/* Custom skin para VideoJS dentro de la galería horizontal */
.vjs-custom-skin {
    width: 100% !important;
    height: 140px !important;
    border-radius: 4px;
    overflow: hidden;
}

/* ==========================================================================
   COMPLEMENTOS INSTITUCIONALES Y COMPORTAMIENTO FLOTANTE
   ========================================================================== */
.btn-primary { background-color: var(--azul-cvi) !important; border: none !important; }
.bg-primary { background-color: var(--azul-cvi) !important; }
.card { border-radius: 8px !important; border-top: 4px solid var(--azul-cvi) !important; }

/* Botón de Redes Sociales Flotante */
.social-bubble {
    width: 55px; 
    height: 55px;
    background: var(--azul-cvi);
    border-radius: 50%;
    display: flex; 
    justify-content: center; 
    align-items: center;
    color: white; 
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    user-select: none;
    transition: transform 0.2s;
}

.social-menu {
    display: none; 
    flex-direction: column; 
    gap: 10px;
}

/* Marcos de banners y efectos */
.banner-frame {
    display: inline-block;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s ease;
}
.banner-frame:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}
.banner-pub-link { display: block; position: relative; }

.banner-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: 0.7s;
}
.banner-frame:hover .banner-shine { left: 150%; }
.banner-frame img { display: block; width: 100%; height: auto; }

/* Footer Profesional */
footer {
    background: #1a1a1a;
    border-top: 5px solid var(--rojo-tv);
}
footer h5 {
    color: var(--azul-cvi);
    letter-spacing: 1px;
}
footer a:hover {
    color: var(--rojo-tv) !important;
    transition: 0.3s;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TELÉFONOS Y TABLETAS)
   ========================================================================== */
@media (max-width: 768px) {
    .header-banner-container {
        height: 100px !important; /* Forzado responsivo */
    }
    
    /* Adaptaciones del Menú Desplegable en Móviles */
    .navbar-collapse {
        background-color: var(--azul-cvi);
        padding: 10px;
        border-radius: 0 0 8px 8px;
    }
    
    .dropdown-menu {
        background-color: var(--azul-dark);
        border-top: none;
        border-left: 3px solid var(--rojo-tv);
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
    }
}
/* ==========================================================================
   CORRECCIÓN MAESTRA PARA CAROUSEL DE PUBLICIDAD Y FLECHAS NATIVAS
   ========================================================================== */
.header-banner-container {
    position: relative;
    width: 100% !important;
    height: 140px !important;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Forzar que las imágenes cubran todo el lienzo estirándose sin recortar bordes */
.header-banner-container .carousel-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important; /* Evita que las imágenes se recorten */
}

/* Redefinición de los botones nativos de Bootstrap para máxima visibilidad */
.header-banner-container .carousel-control-prev,
.header-banner-container .carousel-control-next {
    width: 45px !important;
    opacity: 1 !important; /* Elimina la transparencia pálida de Bootstrap */
    z-index: 15;
}

/* Círculos oscuros de soporte para las flechas standard */
.header-banner-container .carousel-control-prev-icon,
.header-banner-container .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.7) !important;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: all 0.2s ease-in-out;
}

/* Cambio interactivo a tu azul institucional al pasar el cursor */
.header-banner-container .carousel-control-prev:hover .carousel-control-prev-icon,
.header-banner-container .carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--azul-cvi) !important;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .header-banner-container {
        height: 100px !important;
    }
}

        .ticker-wrap { display: flex; align-items: center; background: #fff; padding: 5px; border-radius: 8px; border: 1px solid #ddd; overflow: hidden; height: 50px; }
        .ticker-title { background: #dc3545; color: white; padding: 0 15px; font-weight: bold; height: 100%; display: flex; align-items: center; font-size: 0.8rem; flex-shrink: 0; }
        .ticker-scroll { display: flex; animation: marquee 30s linear infinite; white-space: nowrap; }
        .ticker-item { display: inline-flex; align-items: center; margin-right: 50px; font-weight: 500; }
        .ticker-item img { width: 35px; height: 35px; object-fit: cover; border-radius: 4px; margin-right: 10px; }
        @keyframes marquee { 0% { transform: translate(100%, 0); } 100% { transform: translate(-100%, 0); } }
        .borde-pelicula { height: 15px; background: repeating-linear-gradient(90deg, #000, #000 10px, #333 10px, #333 20px); }
        .bg-black-tv { background-color: #1a1a1a; }
    /* Forzar anclaje absoluto y evitar conflictos de overflow */
.navbar-sticky-fixed {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    width: 100% !important;
}
/* tkinter*/
/* --- Ticker de Noticias Estilo Profesional --- */
.news-ticker-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    height: 46px;
    border: 1px solid #dee2e6;
}

.ticker-label {
    background-color: #0d6efd;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
    z-index: 3;
    white-space: nowrap;
}

.ticker-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: teleSurTicker 65s linear infinite;
}

/* Pausar cuando el usuario ponga el mouse encima para leer con calma */
.news-ticker-container:hover .ticker-track {
    animation-play-state: paused;
}
 
.ticker-news-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333333;
    padding-right: 40px; /* Espacio amplio y limpio entre noticia y noticia */
}

.dot-separator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #dc3545; /* Puntito rojo separador elegante */
    border-radius: 50%;
    margin-right: 15px;
}

@keyframes teleSurTicker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Se desplaza exactamente la mitad (el bloque original), haciendo el ciclo perfecto */
    }
}
/* Estilo para la miniatura de la noticia en el ticker */
.ticker-thumb {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid rgba(0,0,0,0.1);
    vertical-align: middle;
}
/* --- Efectos para la Burbuja Flotante de Redes Sociales --- */
#social-bubble:hover {
    background-color: #0b5ed7 !important;
    transform: scale(1.08);
}

#social-menu a:hover {
    transform: scale(1.15);
}

/* Opcional: Permitir despliegue automático al pasar el mouse por todo el contenedor */
#social-container:hover #social-menu {
    display: flex !important;
}