/* ==========================================================================
   TELEIEC.CSS - Maquetación de Panel y Contenedor Principal
   ========================================================================== */
/* Contenedor maestro en Flexbox */
.teleiec-layout {
    display: flex;
    min-height: 100vh;
    background-color: #F8FAFC;
    /* Fondo gris claro suave de la maqueta */
    font-family: 'Poppins', 'PoppinsLocal', sans-serif;
}

/* --- Panel Lateral Izquierdo Fijo --- */
.sidebar-panel {
    width: 280px;
    background-color: #FFFFFF;
    border-right: 1px solid #E2E8F0;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar-logo-wrapper {
    padding: 10px 20px 25px 20px;
    border-bottom: 1px solid #F1F5F9;
}

.sidebar-logo-minsa {
    max-width: 100%;
    height: auto;
    max-height: 200px;
}

/* --- Navegación e ítems del Sidebar --- */
.sidebar-nav {
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Títulos de categorías (ej. Temas de salud) */
.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94A3B8;
    font-weight: 700;
    margin: 18px 0 6px 16px;
}

/* Sincronización de alineación y apariencia del footer */
.app-footer {
    background-color: #5c3286;
    width: 100%;
    clear: both;
}

/* ==========================================================================
   CORRECCIÓN COMPLETA DE MAQUETACIÓN DE BARRA SUPERIOR
   ========================================================================== */

/* Ajustamos las dimensiones de la barra superior */
.navbar-top-custom {
    background-color: #FFFFFF !important;
    border-bottom: 1px solid #E2E8F0;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    z-index: 1050;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

/* Espaciado del contenedor interno de la barra */
.navbar-container-padding {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
    width: 100%;
}

.logo-wrapper-branding {
    display: flex;
    align-items: center;
}

/* Control milimétrico de los logos superiores */
.navbar-logo-minsa {
    height: 52px !important;
    width: auto;
    object-fit: contain;
    display: block;
}

.navbar-logo-submodulo-top {
    height: 58px !important;
    /* Escalado agresivo para que TeleInfórmate sea muy visible */
    width: auto;
    object-fit: contain;
    display: block;
}

.navbar-divider-line {
    height: 34px !important;
    background-color: #CBD5E1;
}

.nav-grid-collapse {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.nav-grid-spacer-right {
    min-width: 320px;
}

/* Estilizado de los enlaces de navegación superiores */
.nav-link-top {
    color: #334155 !important;
    /* Slate 700 */
    font-weight: 600;
    font-size: 16.5px;
    /* Escalado para mayor presencia visual */
    padding: 8px 20px !important;
    border-radius: 20px;
    transition: all 0.2s ease;
    display: inline-block;
}

.nav-link-top:hover {
    color: #20A19A !important;
    background-color: #F1F5F9;
}

.nav-link-top:focus,
.navbar-nav .nav-link:focus-visible {
    outline: none !important;
    border-color: rgba(32, 161, 154, 0.4) !important;
    /* Destello sutil de tu color de marca #20A19A */
    box-shadow: 0 0 0 4px rgba(32, 161, 154, 0.25) !important;
}

/* Botón activo */
.nav-link-top.active,
.dropdown-item.active,
.navbar-nav .nav-link.show {
    color: #FFFFFF !important;
    background-color: #20A19A !important;
}

/* Dropdowns flotantes */
.navbar-top-custom .dropdown-menu {
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    padding: 6px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
}

.navbar-top-custom .dropdown-menu.show {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.navbar-top-custom .dropdown-item {
    padding: 10px 16px !important;
    font-size: 14px;
    font-weight: 500;
    color: #585f75;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar-top-custom .dropdown-item:hover {
    color: #20A19A !important;
    background-color: #F1F5F9 !important;
}

.navbar-top-custom .dropdown-item.active,
.navbar-top-custom .dropdown-item:active,
.navbar-top-custom .dropdown-item:focus {
    background-color: #16746f !important;
    color: #FFFFFF !important;
    outline: none !important;
    box-shadow: 0 2px 4px rgba(22, 116, 111, 0.15);
}

.teleiec-layout-topnav.layout-with-fixed {
    margin-top: 0px !important;
    padding-top: 90px !important;
    min-height: 100vh;
    background-color: #F8FAFC;
    width: 100%;
    display: flex;
    position: relative;
    flex-direction: column;
}

/* Contenedor centralizado para que respire el contenido */
.content-main-full {
    padding: 40px 4rem;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    flex: 1 0 auto;
}

/* Ajustes responsivos móviles */
@media (max-width: 991.98px) {
    .menu-items-list-top {
        padding-top: 16px !important;
        /* Le da el aire necesario para que "Inicio" no se pegue arriba */
        padding-bottom: 12px !important;
        margin-top: 5px !important;
        /* Separación extra de seguridad con los logos */
    }

    .navbar-container-padding {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    /* Reducción proporcional para que entren ambos logos en horizontal en celulares */
    .navbar-logo-minsa {
        height: 36px !important;
    }

    .navbar-logo-submodulo-top {
        height: 40px !important;
        /* Sigue siendo legible pero compacto */
    }

    .navbar-divider-line {
        height: 24px !important;
    }

    /* Espaciado del menú colapsado */
    .menu-items-list-top {
        padding-top: 20px;
        padding-bottom: 10px;
    }

    .nav-link-top {
        width: 100%;
        font-size: 16px;
        padding: 12px !important;
    }

    /* Reajuste del margen de contenido en móviles */
    .teleiec-layout-topnav.layout-with-fixed {
        margin-top: 0px !important;
        padding-top: 70px !important;
    }
}

/*  =========================================================
    ESTILOS ESPECIFICOS PARA EL CONTENIDO DEL PANEL DE INICIO
    ========================================================= */
/* ==============================================================
    DISEÑO: TARJETAS ENLAZABLES COMPACTAS (IMAGEN + TÍTULO SOLO)
   ============================================================== */
/* Enlace contenedor */
.card-teleiec-link {
    text-decoration: none !important;
    display: block;
    color: inherit;
    height: 100%;
}

/* El contenedor principal de la tarjeta */
.card-teleiec {
    background-color: var(--theme-color) !important;
    border-radius: 22px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none !important;
    outline: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-teleiec-link:hover .card-teleiec {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

/* Contenedor de la Imagen superior */
.card-teleiec-img-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #F1F5F9;
    /* Fondo gris base por si no hay foto */
}

.card-teleiec-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* Bloque inferior de texto y contenido */
.card-teleiec-body-compact {
    padding: 16px 18px 20px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    color: #FFFFFF !important;
}

/* Título de la tarjeta */
.card-teleiec-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #FFFFFF !important;
}

/* Descripción corta */
.card-teleiec-text {
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-bottom: 30px;
    opacity: 0.95;
    color: #FFFFFF !important;
}

/* Contenedor del botón inferior derecho */
.card-teleiec-footer-arrow {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    width: 100%;
}

/* El círculo blanco de acción */
.card-action-circle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    /* Forzamos a que NO tenga fondo */
    border: none !important;
    /* Cero bordes extra */
    transition: transform 0.2s ease;
}

/* Efecto visual de agrandado en el icono de flecha al pasar el mouse */
.card-teleiec-link:hover .card-action-circle {
    transform: scale(1.15);
}

/* Ajuste estricto de la imagen de la flecha */
.card-action-circle img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/*  ==========================================================
    CONTENEDOR GLOBAL PARA MÓDULOS DEL DETALLE DE TEMA
    ========================================================= */
.card-seccion-modulo {
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 24px;
    padding: 28px;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.01);
}

/* Control estandarizado para textos dentro de cualquier módulo */
.card-seccion-modulo .section-main-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1E293B;
}

.card-seccion-modulo .section-main-desc {
    font-size: 0.875rem;
    color: #64748B;
}

/* Asegurar que las filas internas hereden márgenes limpios */
.card-seccion-modulo .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

/*  ==========================================================
    COMPONENTE GLOBAL: ENCABEZADO SECCIONAL REUTILIZABLE 
    ========================================================== */
.section-header-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.section-header-block>.d-flex {
    width: 100%;
}

.section-header-with-actions {
    flex-direction: column;
    align-items: flex-start;
}

.section-header-with-actions .section-title-wrapper {
    margin-left: 0;
    /* Mantiene la armonía del gap original */
}

.section-icon-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: var(--seccion-color, #5c3286);
    border: 1px solid color-mix(in srgb, var(--seccion-color) 85%, #000000);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Clases de colores de fondo para el círculo */
.bg-teal-soft {
    background-color: #E6F6F5;
}

.bg-purple-soft {
    background-color: #F3E8FF;
}

.section-icon-circle img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.section-icon-mask {
    width: 25px;
    height: 25px;
    display: inline-block;
    background-color: #ffffff;
    -webkit-mask-image: var(--icon-url);
    mask-image: var(--icon-url);
    /* Propiedades de control para que la máscara no se repita y se centre */
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.section-header-with-actions .btn-volver-custom {
    align-self: flex-end;
}

.section-title-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    word-break: break-word;
}

.section-main-title {
    font-size: 17px;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
}

.section-main-desc {
    font-size: 12.5px;
    color: #64748B;
    margin: 3px 0 0 0;
    font-weight: 400;
}

@media (min-width: 768px) {

    /* Si tiene acciones, en escritorio vuelve a ser horizontal distribuyendo espacio */
    .section-header-with-actions {
        flex-direction: row;
        align-items: center;
    }

    .section-header-with-actions {
        justify-content: space-between;
    }

    .section-header-block>.d-flex {
        width: auto !important;
    }

    .section-header-block .btn-volver-custom,
    .section-header-block .btn-volver-custom {
        align-self: center;
        flex-shrink: 0;
        white-space: nowrap;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

@media (max-width: 575.98px) {

    /* Fuerza a que el contenedor de las tarjetas use el 100% real de la pantalla del móvil */
    .card-teleiec-link,
    .card-teleiec {
        width: 100% !important;
        display: block;
    }
}

/* =================================
    TARJETAS DE ACCESOS RÁPIDOS 
    ================================*/
.card-quick-access-new {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 24px;
    padding: 35px 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.quick-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px auto;
}

.card-quick-access-new {
    transform: translateY(-4px);
    border-color: #CBD5E1;
    /* El borde se oscurece un penique */
    box-shadow: 0 10px 25px rgba(148, 163, 184, 0.12);
    /* Sombra suave y moderna (no tosca) */
}

.quick-svg-container {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.25s ease;
}

.quick-svg-icon {
    width: 48px;
    /* Tamaño ideal del icono interno */
    height: 48px;
    display: block;
    background-color: #5C2D91;
    /* Color por defecto (Morado institucional) */

    /* Usamos tu archivo como una máscara de recorte */
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

/* Forzamos a ocultar cualquier renderizado de imagen nativo si usas tags img */
.quick-svg-container img {
    display: none;
}

/* Asignamos las rutas y colores específicos a cada clase temática */
.icon-purple {
    mask-image: url('../icons/Icon-Videos.svg');
    /* RUTA DE ICONO */
    -webkit-mask-image: url('../icons/icon-diris-83.svg');
    background-color: #20A19A;
    /* Morado */
}

.icon-green {
    mask-image: url('../icons/Icon-Consejerias.svg');
    /* RUTA DE ICONO */
    -webkit-mask-image: url('../icons/icon-diris-82.svg');
    background-color: #2E9F74;
    /* Verde de consejerías */
}

.icon-pink {
    mask-image: url('../icons/Icon-Temas.svg');
    /* RUTA DE ICONO */
    -webkit-mask-image: url('../icons/icon-diris-81.svg');
    background-color: #E2939A;
    /* Rosa/Morado suave */
}

.icon-sky-blue {
    mask-image: url('../icons/Icon-Preguntas.svg');
    /* RUTA DE ICONO */
    -webkit-mask-image: url('../icons/icon-diris-45.svg');
    background-color: #4EA8DE;
    /* Celeste */
}

/* Efecto opcional: El icono reacciona sutilmente al pasar el mouse por la tarjeta */
.card-teleiec-link:hover .quick-svg-container {
    transform: scale(1.08);
}

/* --- TEXTOS INTERNOS --- */
.card-quick-access-new h5 {
    font-size: 18px;
    font-weight: 700;
    color: #1E293B;
    /* Color oscuro pizarra muy fino */
    margin-bottom: 8px;
}

.card-quick-access-new p {
    font-size: 13px;
    color: #64748B;
    /* Gris intermedio para la descripción */
    margin-bottom: 0;
    line-height: 1.4;
}

/* =========================================================================
   MÓDULO TELEIEC - SOPORTE ADAPTATIVO PARA BANNERS TEMÁTICOS
   ========================================================================= */
.tema-banner-wrapper {
    width: 100%;
    height: auto;
    max-height: 280px;
    background-color: #f8fafc;
}

.banner-responsivo-full {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* ===========================================
   SECCIÓN: INFÓRMATE - CARDS DE DOCUMENTOS
   =========================================== */

/* Contenedor principal de la tarjeta Infórmate */
.card-informate {
    border-radius: 18px;
    /* Redondeado idéntico a la maqueta */
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Efecto Hover sutil al pasar el mouse */
.card-teleiec-link:hover .card-informate {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.1);
}

/* Espacio superior para la previsualización/imagen (Gris en la maqueta) */
.card-informate-img-wrapper {
    width: 100%;
    height: 240px;
    /* Altura proporcional para simular una hoja/afiche vertical */
    background-color: #CBD5E1;
    /* Gris de reserva por si no carga la imagen */
}

.card-informate-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Asegura que la imagen llene el espacio sin deformarse */
}

/* Franja morada inferior fija para el título */
.card-informate-footer-title {
    background-color: var(--seccion-color);
    padding: 14px 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    /* Asegura alineación si un título es más largo */
    margin-top: auto;
    /* La empuja siempre hacia el fondo de la tarjeta */
    overflow: hidden;
}

/* Texto del título en blanco */
.card-informate-footer-title h5 {
    color: #FFFFFF !important;
    font-size: 13.5px;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    /* Máximo 4 líneas de texto */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================
   SECCIÓN: VIDEOS CORTOS
   ============================= */

.card-video-corto {
    background-color: #CBD5E1;
    border-radius: 20px;
    aspect-ratio: 16 / 9;
    /* 🎯 Estándar para videos clásicos horizontales externos */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-video-corto.format-reel {
    aspect-ratio: 9 / 16;
    max-height: 380px;
}

/* Imagen de fondo (La miniatura del video que subas desde Django) */
.card-video-corto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.95;
}

/* El botón circular de Play morado en el centro */
.play-center-btn {
    width: 56px;
    /* Un toque más pequeño y estilizado */
    height: 56px;
    border: 3px solid #20A19A;
    background-color: rgba(255, 255, 255, 0.95);
    /* Fondo blanco para contraste total */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 0 4px 10px rgba(0, 0, 0, 0.15);
}

.play-center-btn::after {
    content: "";
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 14px solid #20A19A;
    margin-left: 4px;
}

/* Efectos interactivos cuando pasen el cursor sobre la tarjeta */
.card-teleiec-link:hover .card-video-corto {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.card-teleiec-link:hover .play-center-btn {
    transform: scale(1.1);
    background-color: rgba(92, 45, 145, 0.05);
    /* Destello morado sutil al hover */
}

/* =============================================
   CARRUSEL PANORÁMICO SUPERIOR - 
   ============================================= */

.main-carousel-container {
    border-radius: 24px;
    /* Esquinas muy redondeadas idénticas a la maqueta */
    overflow: hidden;
    /* Evita que las imágenes se salgan de las esquinas curvas */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    margin-bottom: 35px;
}

/* Se recomienda usar imágenes en una resolución de 1920 x 600 píxeles (o manteniendo una proporción panorámica 16:5) */
.carousel-banner-item {
    width: 100%;
    height: 440px;
    /* Incrementado para mayor impacto visual */
    background-color: #CBD5E1;
    object-position: center center;
    position: relative;
}

.carousel-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Opcional: Estilo personalizado para los botones indicadores (puntitos de abajo) */
.main-carousel-container .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #20A19A;
    /* Los pintamos del morado institucional */
}

/* ==========================================================================
   ESTILO: TARJETAS DE CONSEJERÍA EN GRILLA DE 4
   ========================================================================== */

.card-consejeria-link-wrapper {
    text-decoration: none !important;
    display: block;
    height: 100%;
}

.card-consejeria-compacta {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    height: 100%;
}

/* Efecto hover suave */
.card-consejeria-link-wrapper:hover .card-consejeria-compacta {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

/* Tipografía optimizada para bloques angostos */
.consejeria-title-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 0;

    /* Si el título es muy largo, se corta en la tercera línea limpiamente */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-consejeria-link-wrapper:hover .consejeria-title-text {
    color: #4f46e5;
    /* Cambio de color sutil al pasar el mouse */
}

/* Línea de fecha inferior */
.consejeria-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f8fafc;
}

.consejeria-date-tag {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ==========================================================================
   MÓDULO: CABECERA DE BIENVENIDA POR TEMA DE SALUD (DETALLE TEMA)
   ========================================================================== */

/* ==========================================================================
   OPCIÓN 1: CABECERA MINIMALISTA INTEGRADA (CON SEPARADOR CORREGIDO)
   ========================================================================== */
.tema-header-minimal {
    padding: 10px 0 0 24px;
    border-left: 4px solid var(--theme-color) !important;
    margin-bottom: 25px;
    position: relative;
}

.tema-badge-clean {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--theme-color);
    margin-bottom: 4px;
}

.tema-title-clean {
    font-size: 32px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.tema-desc-clean {
    font-size: 14.5px;
    color: #64748B;
    line-height: 1.6;
    max-width: 750px;
    margin-bottom: 24px;
    /* Espacio antes de la línea */
}

.tema-main-separator {
    height: 1px;
    width: 100%;
    /* Degradado sutil: empieza suave, mantiene el tono y se desvanece al final */
    background: linear-gradient(to right, #E2E8F0 0%, #E2E8F0 80%, transparent 100%);
    margin-top: 15px;
}

/* ==========================================================================
   SECCIÓN: PREGUNTAS FRECUENTES (FAQs)
   ========================================================================== */

/* 1. Buscador Principal */
.faq-search-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.faq-search-input {
    width: 100%;
    padding: 16px 24px 16px 54px;
    font-size: 15px;
    background-color: #E2E8F0;
    border: 2px solid transparent;
    border-radius: 30px;
    color: #1E293B;
    font-weight: 500;
    transition: all 0.25s ease;
}

.faq-search-input:focus {
    outline: none;
    background-color: #FFFFFF;
    border-color: #20A19A;
    box-shadow: 0 4px 12px rgba(92, 45, 145, 0.08);
}

.faq-search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #64748B;
    pointer-events: none;
}

/* 2. Botonera Horizontal de Categorías (Filtrado) */
.faq-categories-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.faq-btn-filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    background-color: #FFFFFF;
    color: #1E293B;
    font-size: 12.5px;
    font-weight: 600;
    width: 120px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-btn-filter i,
.faq-btn-filter img {
    font-size: 22px;
    transition: transform 0.2s ease;
}

/* Soporte para máscaras SVG en los botones de FAQs */
.faq-svg-icon-wrapper {
    width: 28px;
    height: 28px;
    background-color: #1E293B;
    /* Color del icono por defecto */
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

/* Cuando el botón está activo, forzamos a que el SVG sea blanco o combine */
.faq-btn-filter.active .faq-svg-icon-wrapper {
    background-color: #FFFFFF !important;
}

.faq-btn-filter:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* 3. Estilizado del Acordeón Limpio (Fiel a la Maqueta) */
.faq-accordion-custom .accordion-item {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px !important;
    /* Separados con bordes curvos */
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
    transition: box-shadow 0.2s ease;
}

.faq-accordion-custom .accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.faq-accordion-custom .accordion-button {
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    background-color: #FFFFFF;
    border: none;
    box-shadow: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
}

/* Eliminar la flecha por defecto de Bootstrap */
.faq-accordion-custom .accordion-button::after {
    display: none;
}

/* Añadir el comportamiento del ícono dinámico (+) y (-) de la maqueta */
.faq-icon-toggle {
    font-size: 18px;
    color: #1E293B;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

/* Cuando está abierto, podemos cambiar el color del título o la línea (opcional, como el borde morado del canvas) */
.faq-accordion-custom .accordion-item-active-border {
    border-color: #20A19A !important;
    /* Pinta el borde morado si está seleccionado */
}

.faq-accordion-custom .accordion-body {
    padding: 0 24px 20px 24px;
    font-size: 14.5px;
    color: #475569;
    line-height: 1.6;
    background-color: #FFFFFF;
}

.faq-pagination-wrapper {
    background-color: #f8f9fa;
    border-radius: 50rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e9ecef;
}

.faq-counter-badge {
    font-size: 0.825rem;
    color: #6c757d;
    font-weight: 500;
}

.faq-btn-load-more {
    background-color: #ffffff;
    color: #5c3286;
    border: 1px solid #ced4da;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.375rem 1.25rem;
    border-radius: 50rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.faq-btn-load-more:hover {
    background-color: #5c3286;
    color: #ffffff;
    border-color: #5c3286;
    box-shadow: 0 4px 4px rgba(179, 14, 255, 0.075);
}

.faq-btn-reset-search {
    color: #dc3545;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.faq-btn-reset-search:hover {
    text-decoration: underline !important;
    color: #a71d2a;
}


/* ==========================================================================
   ESTILOS DE LECTURA PARA EL CUERPO DEL BLOG
   ========================================================================== */

.blog-article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
}

.faq-answer-content {
    font-size: 1rem !important;
    line-height: 1.6;
    color: #50565c !important;
}

/* Títulos internos que se añadan dentro del artículo */
.blog-article-content h2,
.blog-article-content h3 {
    color: #0f172a;
    font-weight: 700;
    margin-top: 1rem !important;
    margin-bottom: 1rem;
}

.blog-article-content h2 {
    font-size: 1.75rem;
}

.blog-article-content h3 {
    font-size: 1.4rem;
}

/* Párrafos */
.blog-article-content p {
    margin-bottom: 1.5rem;
}

/* Listas ordenadas y desordenadas dentro del contenido */
.blog-article-content ul,
.blog-article-content ol,
.faq-answer-content ul,
.faq-answer-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-article-content li {
    margin-bottom: 0.5rem;
}

/* Elementos destacados o citas textuales */
.blog-article-content blockquote {
    padding: 16px 24px;
    margin: 24px 0;
    font-style: italic;
    background-color: #f8fafc;
    border-left: 4px solid #4f46e5;
    border-radius: 4px;
    color: #475569;
}

/* Asegurar que las tablas dentro del blog se adapten y sean responsivas */
.blog-article-content table {
    width: 100% !important;
    margin: 24px 0;
    border-collapse: collapse;
    font-size: 1rem;
}

.blog-article-content th,
.blog-article-content td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.blog-article-content th {
    background-color: #1e293b;
    color: #ffffff;
    font-weight: 600;
}

/* Zebra striping (Filas intercaladas grises) */
.blog-article-content tbody tr:nth-of-type(odd) {
    background-color: #f8fafc;
}

.blog-article-content img,
.faq-answer-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Contenedor o el propio iframe dentro del contenido */
.blog-article-content iframe,
.faq-answer-content iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   ESTILOS PARA ICONOS SVG DINÁMICOS EN BOTONERA FAQS
   ========================================================================== */

/* 1. Configuración de tamaño y color base para los íconos vectoriales */
.faq-svg-icon-dynamic {
    width: 24px;
    height: 24px;
    display: inline-block;
    background-color: #64748b;
    /* Propiedades estrictas de máscara CSS */
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-position: center;
    -webkit-mask-position: center;

    transition: background-color 0.2s ease;
}

.faq-nav-icon-fallback {
    font-size: 1.3rem;
    color: #64748b;
    transition: color 0.2s ease;
}

/* ==========================================================================
    COMPORTAMIENTO PARA EL ESTADO ACTIVO (SELECCIONADO)
   ========================================================================== */

.faq-btn-filter.active {
    background-color: #20A19A !important;
    border-color: #20A19A !important;
}

/* El texto de la pestaña activa cambia a blanco nítido */
.faq-btn-filter.active span {
    color: #ffffff !important;
}

.faq-btn-filter.active .faq-svg-icon-dynamic {
    background-color: #ffffff !important;
    /* Ícono blanco sobre fondo morado */
}

.faq-btn-filter.active .faq-nav-icon-fallback {
    color: #ffffff !important;
}

/* ==========================================================================
    EFECTO HOVER (PASAR EL MOUSE POR ENCIMA)
   ========================================================================== */
.faq-btn-filter:hover:not(.active) {
    border-color: #20A19A;
}

/* Al pasar el mouse, el ícono vectorial se tinta del morado de tu marca */
.faq-btn-filter:hover:not(.active) .faq-svg-icon-dynamic {
    background-color: #20A19A;
}

.faq-btn-filter:hover:not(.active) .faq-nav-icon-fallback {
    color: #20A19A;
}

/* ==========================================================================
    ESTILOS ESPECÍFICOS DEL CUESTIONARIO INTERACTIVO
   ========================================================================== */

/* Botón institucional color morado */
.btn-purple-style {
    background-color: #20A19A;
    color: #ffffff;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
}

.btn-purple-style:hover {
    background-color: #4a2076;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Items de opción (Radios) */
.quiz-opcion-item {
    border: 1px solid #e8daf0;
    background-color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.quiz-opcion-item:hover {
    background-color: #fcfaff;
    border-color: #cbb4de;
}

/* Cambios de estado dinámicos inyectados por JS */
.card-pregunta.pregunta-correcta {
    border-color: #badbcc !important;
    background-color: #f1f9f5 !important;
}

.card-pregunta.pregunta-incorrecta {
    border-color: #f5c2c7 !important;
    background-color: #fdf2f2 !important;
}

/* Tipografías de los textos de feedback */
.texto-correcto {
    color: #0f5132;
    font-weight: 600;
}

.texto-incorrecto {
    color: #842029;
    font-weight: 600;
}


/* =========================================================
   CONTENEDOR GLOBAL PARA MÓDULOS DEL DETALLE DE TEMA
   ========================================================= */
.card-seccion-modulo {
    background-color: #F8FAFC;
    /* Gris Slate sutil e institucional */
    border: 1px solid #E2E8F0;
    /* Línea divisoria muy fina */
    border-radius: 24px;
    /* Redondeado unificado de módulos */
    padding: 28px;
    /* Acolchado interno uniforme */
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.01);
    /* Profundidad interna sutil */
}

/* Control estandarizado para textos dentro de cualquier módulo */
.card-seccion-modulo .section-main-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1E293B;
}

.card-seccion-modulo .section-main-desc {
    font-size: 0.875rem;
    color: #64748B;
}

/* Asegurar que las filas internas hereden márgenes limpios */
.card-seccion-modulo .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

/* ========================================================== */
/* Sombra y contenedor principal */
.blog-main-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Caja contenedora auto-adaptable */
.blog-banner-wrapper {
    width: 100%;
    aspect-ratio: 16 / 6.5;
    min-height: 400px;
    max-height: 520px;
    overflow: hidden;
    position: relative;
    background-color: #212529;
}

/* Control milimétrico de la imagen de fondo */
.blog-banner-img {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

/* Degradado translúcido equilibrado: permite ver la foto nítida */
.blog-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0.55) 100%);
    z-index: 1;
}

/* Contenedor del texto (Control de capas sobre el degradado) */
.blog-banner-caption {
    position: relative;
    z-index: 3;
}

/* Realce Máximo del Título Principal (Efecto Borde/Contorno Profesional) */
.blog-banner-caption h1 {
    /* Multi-sombra en cruz de alta opacidad: actúa como un contorno negro nítido pero estético */
    text-shadow:
        -1px -1px 0 rgba(0, 0, 0, 0.8),
        1px -1px 0 rgba(0, 0, 0, 0.8),
        -1px 1px 0 rgba(0, 0, 0, 0.8),
        1px 1px 0 rgba(0, 0, 0, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Rescate del Texto Secundario de Abajo (Metadatos) */
.blog-banner-caption .small {
    color: rgba(255, 255, 255, 0.95) !important;
    /* Fuerza blanco casi puro para ganarle al fondo claro */
    font-weight: 500;
    /* Le da más grosor y cuerpo a las letras pequeñas */
    text-shadow:
        -1px -1px 0 rgba(0, 0, 0, 0.7),
        1px -1px 0 rgba(0, 0, 0, 0.7),
        -1px 1px 0 rgba(0, 0, 0, 0.7),
        1px 1px 0 rgba(0, 0, 0, 0.7);
}

/* Forzar que los iconos hereden el color blanco visible */
.blog-banner-caption .small i {
    color: rgba(255, 255, 255, 0.95) !important;
}

.breadcrumb-item.active {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-article-content p {
    margin-bottom: 1.6rem;
}

/* Ajustes adaptables estrictos para Tablets y Smartphones */
@media (max-width: 768px) {
    .blog-banner-wrapper {
        min-height: 320px;
    }

    .blog-banner-caption h1 {
        font-size: 1.85rem !important;
    }
}

@media (max-width: 576px) {
    .blog-banner-wrapper {
        min-height: 280px;
    }

    .blog-banner-caption {
        padding: 1.25rem !important;
    }
}

/* ==========================================================================
   Módulo de Juegos
   ========================================================================== */

/* Máscara de icono para la cabecera de la sección de Juegos */
.game-icon-mask {
    --icon-url: url('../icons/icon_games.svg');
}

/* Contenedor wrapper de la tarjeta del juego */
.card-juego-wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Efecto al pasar el cursor sobre la tarjeta */
.card-teleiec-link:hover .card-juego-wrapper {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Formato redondeado con relación de aspecto estricta 3:2 */
.card-juego-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}