/* === Paleta de colores ===
Blanco: #ffffff
Gris oscuro: #1e1e2f
Azul claro: #009ccc
Gris claro: #dcdcdc
Cian: #00bcd4
=========================== */

/* Resaltado de búsqueda */
.highlight {
    background-color: rgba(255, 235, 59, 0.6);
    padding: 2px;
    border-radius: 2px;
}

/* Barra de búsqueda fija global */
.search-bar {
    position: fixed;
    top: 70px; /* Altura navbar */
    left: 0;
    right: 0;
    background-color: #ffffff;
    z-index: 1050;
    padding: 10px 15px;
    border-bottom: 1px solid #dcdcdc;
}

/* Contenido sin solaparse con barra */
#estatutoContent {
    padding-top: 20px;
}
main {
    padding-top: 100px; 
}
/* Índice lateral */
.toc-container {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding-right: 10px;
    background-color: #dcdcdc;
    color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px; 
}

.toc-container h5 {
    color: #00bcd4;
    font-weight: bold;
    margin-bottom: 15px;
}

.toc-container ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-item {
    background-color: #009ccc;
    color: #ffffff;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
    cursor: pointer;
}

.toc-item > a {
    display: block;
    padding: 10px;
    color: #ffffff;
    text-decoration: none;
}

.toc-item > a:hover {
    background-color: #046a77;
}


/* Submenús */
.submenu {
    display: none;
    background-color: #237b96;
    padding-left: 15px;
}

.submenu li a {
    display: block;
    padding: 8px 10px;
    color: #dcdcdc;
    text-decoration: none;
}

.submenu li a:hover {
    background-color: #009ccc;
    color: #ffffff;
}

/* Botón volver arriba */
#backToTop {
    background: #009ccc;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    margin-left: 8px;
}

#backToTop:hover {
    background: #007b9e;
}

/* Resultados búsqueda */
#searchResultsContainer {
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    padding: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .toc-container {
        max-height: unset;
        position: relative;
        margin-bottom: 150px;
    }

    .submenu {
        padding-left: 10px;
    }
}


/* Icono de despliegue */
.toc-toggle {
    position: relative;
    padding-right: 20px;
}

.toc-toggle::after {
    content: '+';
    position: absolute;
    right: 10px;
    font-weight: bold;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.toc-item.open > .toc-toggle::after {
    content: '-';
    color: #00bcd4;
}

/* Cuando un título NO tiene submenú, no se muestra icono */
.toc-item.no-submenu > .toc-toggle::after {
    content: '';
}
#estatutoContent {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding-right: 10px; 
}