/* --- COLORES INSTITUCIONALES --- */
:root {
    --color-azul: #002654; /* Azul oscuro corporativo */
    --color-rojo: #E1000F; /* Rojo vivo corporativo */
    --color-blanco: #FFFFFF;
    --color-gris-claro: #f4f4f4;
}

/* --- Contenedor Principal del Acordeón --- */
.acordeon-documentos {
    font-family: 'Montserrat', sans-serif; /* Una fuente moderna y limpia */
    max-width: 800px;
    margin: 40px auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; /* Para que el border-radius afecte a los hijos */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* --- Encabezado de la Categoría (Clickable) --- */
.acordeon-header {
    padding: 18px 25px;
    background-color: var(--color-azul);
    color: var(--color-blanco);
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    transition: background-color 0.3s ease;
    position: relative;
    border-bottom: 1px solid #001a38;
}

.acordeon-item:last-child .acordeon-header {
    border-bottom: none;
}

.acordeon-header:hover {
    background-color: #003c82; /* Un azul un poco más claro */
}

/* Icono +/- */
.acordeon-header::after {
    content: '+';
    font-size: 1.6em;
    font-weight: 300;
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

/* --- Contenido (Lista de documentos) --- */
.acordeon-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: var(--color-blanco);
    padding: 0 25px;
}

.acordeon-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- ESTILOS PARA CADA DOCUMENTO --- */
.documento-enlace {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px solid var(--color-gris-claro);
    transition: background-color 0.2s ease;
}

.documento-enlace:last-child {
    border-bottom: none;
}

.documento-enlace:hover {
    background-color: var(--color-gris-claro);
}

.doc-info {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre icono y texto */
}

.doc-info .dashicons {
    font-size: 24px;
    color: var(--color-azul);
}

.doc-info .doc-nombre {
    font-weight: 500;
    color: #333;
}

.doc-boton {
    background-color: var(--color-rojo);
    color: var(--color-blanco);
    padding: 8px 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap; /* Evita que el texto del botón se rompa */
}

.doc-boton:hover {
    background-color: #c0000d; /* Rojo más oscuro */
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- Estilos para el estado Activo/Abierto --- */
.acordeon-item.is-active .acordeon-header {
    background-color: #003c82;
}

.acordeon-item.is-active .acordeon-header::after {
    transform: translateY(-50%) rotate(45deg);
}

.acordeon-item.is-active .acordeon-content {
    max-height: 1500px; /* Un valor alto para permitir cualquier cantidad de contenido */
    padding: 10px 25px;
    transition: max-height 0.8s ease-in-out, padding 0.4s ease-in-out;
}