
/* =========================================================
   DIRECTORIO DEL COMITÉ - FESAPAUV XALAPA
   Acordeón con iconos, colores institucionales y animaciones
   ========================================================= */

.directorio-seccion {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.directorio-seccion *,
.directorio-seccion *::before,
.directorio-seccion *::after {
    box-sizing: border-box;
}

.directorio-header {
    margin-bottom: 22px;
}

.directorio-header h2 {
    margin: 0 0 8px;
    color: #005488;
    line-height: 1.3;
}

.directorio-header h3 {
    margin: 0 0 15px;
    font-size: 1em;
    font-weight: 400;
    line-height: 1.5;
}

/* Lista principal */
#menu {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

#menu > li {
    position: relative;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
    border: 1px solid #dce5e9;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(0, 40, 65, .07);
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}

#menu > li:hover {
    border-color: #9ccbb0;
    box-shadow: 0 4px 13px rgba(0, 65, 45, .11);
}

/* Controles del acordeón */
#menu input[type="radio"][name="list"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

/* Encabezados */
#menu .tit {
    margin: 0;
    padding: 0;
    font-size: 1em;
    line-height: 1.4;
}

#menu .tit label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 65px;
    padding: 13px 45px 13px 15px;
    color: #005488;
    font-weight: 700;
    cursor: pointer;
    transition: color .25s ease, background .25s ease;
}

/* Textos: en PC conservan la disposición en línea */
#menu .tit-textos {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

#menu .tit-nombre {
    display: inline;
    color: #005488;
    font-weight: 700;
}

#menu .tit-persona {
    display: inline;
    color: #343f45;
    font-weight: 400;
}

/* Icono principal */
#menu .tit label::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    border-radius: 9px;
    background: #eaf3f8;
    color: #005488;
    font-size: 21px;
    line-height: 1;
    content: "◆";
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

/* Flecha desplegable */
#menu .tit label::after {
    position: absolute;
    top: 50%;
    right: 17px;
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid #168447;
    border-bottom: 2px solid #168447;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .25s ease;
}

/* Iconos individuales */
#menu > li:nth-child(1) .tit label::before {
    content: "♜";
}

#menu > li:nth-child(2) .tit label::before {
    content: "♟";
}

#menu > li:nth-child(3) .tit label::before {
    content: "$";
}

#menu > li:nth-child(4) .tit label::before {
    content: "⚖";
}

#menu > li:nth-child(5) .tit label::before {
    content: "✚";
}

#menu > li:nth-child(6) .tit label::before {
    content: "◎";
}

#menu > li:nth-child(7) .tit label::before {
    content: "▤";
}

#menu > li:nth-child(8) .tit label::before {
    content: "✉";
}

#menu > li:nth-child(9) .tit label::before {
    content: "✎";
}

#menu > li:nth-child(10) .tit label::before {
    content: "◆";
}

/* Estado desplegado */
#menu input[type="radio"]:checked + .tit label {
    color: #fff;
    background: #005488;
}

#menu input[type="radio"]:checked + .tit label .tit-nombre,
#menu input[type="radio"]:checked + .tit label .tit-persona {
    color: #fff;
}

#menu input[type="radio"]:checked + .tit label::before {
    color: #fff;
    background: #168447;
    transform: scale(1.04);
}

#menu input[type="radio"]:checked + .tit label::after {
    border-color: #fff;
    transform: translateY(-25%) rotate(225deg);
}

/* Accesibilidad */
#menu input[type="radio"]:focus-visible + .tit label {
    outline: 3px solid #f60;
    outline-offset: -3px;
}

/* Contenido desplegable */
#menu .interior {
    display: none;
    margin: 0;
    padding: 8px 22px 18px 69px;
    border-top: 1px solid #e5ecef;
    background: #fbfcfd;
    list-style: none;
    animation: directorioAparecer .25s ease both;
}

#menu input[type="radio"]:checked ~ .interior {
    display: block;
}

#menu .interior li {
    position: relative;
    margin: 0;
    padding: 9px 0 9px 19px;
    color: #303b40;
    font-size: .96em;
    line-height: 1.65;
    list-style: none;
    border-bottom: 1px solid #e9eef0;
}

#menu .interior li:last-child {
    border-bottom: 0;
}

#menu .interior li::before {
    position: absolute;
    top: 17px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #168447;
    content: "";
}

/* Animación del contenido */
@keyframes directorioAparecer {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   AJUSTES PARA MÓVILES
   Título arriba, nombre abajo e icono centrado.
   ========================================================= */
@media screen and (max-width: 600px) {
    .directorio-header h2 {
        font-size: 1.35em;
    }

    .directorio-header h3 {
        font-size: .95em;
    }

    #menu > li {
        margin-bottom: 8px;
        border-radius: 8px;
    }

    #menu .tit {
        font-size: 15px;
        line-height: 1.3;
    }

    #menu .tit label {
        min-height: 55px;
        gap: 9px;
        padding: 10px 36px 10px 10px;
        font-size: inherit;
        line-height: 1.3;
    }

    /* Icono centrado verticalmente */
    #menu .tit label::before {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        font-size: 18px;
    }

    /* Título y nombre en líneas separadas */
    #menu .tit-textos {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
    }

    #menu .tit-nombre {
        display: block;
        color: #005488;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.3;
    }

    #menu .tit-persona {
        display: block;
        color: #343f45;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.3;
    }

    /* Textos blancos cuando el apartado está desplegado */
    #menu input[type="radio"]:checked + .tit label .tit-nombre,
    #menu input[type="radio"]:checked + .tit label .tit-persona {
        color: #fff;
    }

    /* Flecha desplegable */
    #menu .tit label::after {
        right: 14px;
        width: 8px;
        height: 8px;
    }

    /* Contenido desplegado */
    #menu .interior {
        padding: 6px 14px 14px 17px;
    }

    #menu .interior li {
        padding: 9px 0 9px 16px;
        font-size: .93em;
        line-height: 1.6;
    }
}

/* Respeto a la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    #menu > li,
    #menu .tit label,
    #menu .tit label::before,
    #menu .tit label::after {
        transition: none;
    }

    #menu .interior {
        animation: none;
    }
}

