/* Base y Reset */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6; /* Fondo suave */
    color: #333;
    font-size: calc(var(--tamanio-fuente) * 1rem);
}

h1, h2, h3 {
    color: #004a99; /* Azul institucional */
    margin-top: 1.5em;
}
.sticky-box{
    h1, h2, h3, h4, h5{
    color: #e4e4e4; /* Azul institucional */
    margin-top: 1.5em;
    }
}
/* Estructura Principal del Artículo */
.course-article-container {
    display: flex;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    gap: 30px; /* Espacio entre las columnas */
}

/* Contenido Principal */
.main-content {
    flex: 3; /* Ocupa 3/4 del espacio */
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-top: 80px;
}

/* Barra Lateral */
.sidebar {  
    flex: 1.4; /* Ocupa 1/4 del espacio */
}

.sticky-box {
    position: sticky;
    top: 110px; /* Se pegará a 20px de la parte superior */
    /* background-color: #e6f0ff; */ /* Fondo azul claro para destacar */
    background-color: #004a99; /* Fondo azul claro para destacar */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, .60);
}

/* Estilos del Encabezado (Header) */
.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.tagline {
    font-size: 1.1em;
    color: #cc0000; /* Color de acento */
    font-weight: bold;
}

.header-metadata span {
    display: inline-block;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 0.9em;
}

/* Generar tag por cada materia para asignar la imagen automaticamente */
.featured-image {
    width: 100%;
    height: 300px; /* Altura fija para el ejemplo */
    background-color: #ccc; /* Placeholder */
    /* background-image: url(../../dist/assets/img/lic_gestion_riesgo/lic_gestion_desastres_horizontal.jpg); */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; /* Center the image horizontally and vertically */
    margin: 20px 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-weight: bold;
}

/* Botones de CTA */
.cta-button {
    display: block;
    width: 100%; /* El botón primario ocupa todo el ancho */
    padding: 15px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.primary-cta {
    background-color: #cc0000; /* Botón de acento fuerte */
    color: white;
}

.primary-cta:hover {
    background-color: #a80000;
}

.sidebar-cta {
    background-color: #0066cc; /* Botón azul */
    color: white;
    margin-bottom: 20px;
}

.sidebar-cta:hover {
    background-color: #004a99;
}

/* Estilos de Listas y Texto */

.article-body ol {
    ol {
        list-style: decimal;
        padding-left: 20px;
    }
    
    ul {
        list-style: disc;
        padding-left: 20px;
    }
}

:where(.article-body) :is(p, ul, ol) {
    text-align: justify;
}
/* Quick Facts */
.quick-facts {
    list-style: none;
    padding: 0;
    li {
        padding: 8px 0;
        border-bottom: 1px dashed #ccc;
        display: flex;
        align-items: center;
        color:#ffff;
    }
    li .icon {
        margin-right: 10px;
        font-size: 1em;
    }
    li span {
        width: 25px;
    }
}

/* Índice de Contenidos (TOC) */
.toc ul {
    list-style: none;
    padding: 0;
}
.toc a {
    text-decoration: none;
    color: #ffff;
    padding: 5px 0;
    display: block;
    border-left: 3px solid transparent;
    padding-left: 10px;
}
.toc a:hover {
    color: #8f8f8f;
    border-left: 3px solid #8f8f8f;;
}

/* --- Estilos del Acordeón --- */
.accordion-item {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-button {
    width: 100%;
    text-align: left;
    background-color: #f9f9f9;
    color: #333;
    padding: 15px;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-button:hover {
    background-color: #eee;
}

.accordion-button::after {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s;
}

.accordion-button.active::after {
    transform: rotate(0deg); 
}

.accordion-content {
    padding: 0 15px;
    max-height: 0; /* Oculto por defecto */
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fff;
}
.accordion-content ul {
    margin-top: 10px;
}
.separador-top{
    border-top: solid 1px dashed #555;
    a {
        margin-top: 10px;
    }
}

/* Media Query para Dispositivos Móviles */
@media (max-width: 900px) {
    .course-article-container {
        flex-direction: column; /* Apila las columnas */
    }

    .main-content, .sidebar {
        flex: auto;
        width: 100%;
    }

    .sticky-box {
        position: static; /* Desactiva el sticky en móvil */
        margin-top: 20px;
    }
}