/* =========================================================
   CABILDO MUNICIPAL 2024 - 2027
   DIRECTORIO INSTITUCIONAL
   ========================================================= */


/* =========================================================
   SECCIÓN PRINCIPAL
   ========================================================= */

.cabildo-section {
    width: 100%;
    margin: 0;
    padding: 65px 20px 80px;

    background: #f7f8fa;

    box-sizing: border-box;
}

.cabildo-section *,
.cabildo-section *::before,
.cabildo-section *::after {
    box-sizing: border-box;
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.cabildo-header {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto 42px;
    padding: 0;

    text-align: center;
}

.cabildo-kicker {
    display: inline-block;

    margin: 0 0 8px;
    padding: 0;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;

    letter-spacing: 2px;
    text-transform: uppercase;

    color: #6f7b75;
}

.cabildo-header h2 {
    margin: 0 0 10px;
    padding: 0;

    font-size: 34px;
    line-height: 1.2;
    font-weight: 700;

    color: #252d29;
}

.cabildo-header p {
    max-width: 650px;

    margin: 0 auto;
    padding: 0;

    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;

    color: #737b77;
}


/* =========================================================
   GRID DE TARJETAS
   ========================================================= */

.container-cards-presidentes {
    width: 100% !important;
    max-width: 1200px !important;

    margin: 0 auto !important;
    padding: 0 !important;

    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    gap: 22px !important;

    align-items: start !important;
}


/* =========================================================
   TARJETA
   ========================================================= */

.card-cabildo {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e2e6e4;

    border-radius: 12px;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


/* =========================================================
   EFECTO HOVER
   ========================================================= */

.card-cabildo:hover {
    transform: translateY(-4px);

    border-color: #d5dbd8;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.10);
}


/* =========================================================
   ÁREA DE FOTOGRAFÍA
   =========================================================

   Las fotografías del Cabildo son verticales.

   Se utiliza una relación 2:3 para conservar el encuadre
   y evitar que se corte la cabeza o la parte inferior.
   ========================================================= */

.card-cabildo-image {
    position: relative;

    width: 100% !important;

    aspect-ratio: 2 / 3 !important;

    height: auto !important;

    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    overflow: hidden !important;

    background: #ffffff !important;

    flex-shrink: 0 !important;
}


/* =========================================================
   IMAGEN
   ========================================================= */

.card-cabildo-image img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    /*
       contain mantiene la fotografía completa.
       NO usar cover porque recorta las fotografías.
    */
    object-fit: contain !important;

    object-position: center center !important;

    border: 0 !important;
    border-radius: 0 !important;

    transform: none !important;

    transition: none !important;
}


/* =========================================================
   INFORMACIÓN DE LA TARJETA
   ========================================================= */

.card-cabildo-content {
    width: 100% !important;

    min-height: 160px;

    margin: 0 !important;
    padding: 17px 18px 20px !important;

    display: flex !important;

    flex-direction: column !important;

    align-items: flex-start !important;
    justify-content: flex-start !important;

    background: #ffffff;

    text-align: left;

    flex: 1;
}


/* =========================================================
   QUITAR DECORACIÓN ANTERIOR
   ========================================================= */

.card-cabildo-content::before {
    display: none !important;
}


/* =========================================================
   NOMBRE
   ========================================================= */

.card-cabildo-content h3 {
    width: 100% !important;

    min-height: 45px;

    margin: 0 0 6px !important;
    padding: 0 !important;

    display: flex;

    align-items: flex-start;
    justify-content: flex-start;

    font-family: inherit;

    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;

    color: #202522;

    text-align: left;

    overflow-wrap: break-word;
    word-wrap: break-word;
}


/* =========================================================
   CARGO
   ========================================================= */

.card-cabildo-puesto {
    width: 100% !important;

    min-height: 20px;

    margin: 0 !important;
    padding: 0 !important;

    display: block;

    font-family: inherit;

    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;

    color: #68716c;

    text-align: left;

    text-transform: none !important;

    letter-spacing: 0;

    overflow-wrap: break-word;
    word-wrap: break-word;
}


/* =========================================================
   BOTÓN CURRÍCULUM VITAE
   ========================================================= */

.btn-cabildo-cv {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-top: 14px;

    padding: 9px 14px;

    background: #ffffff;

    border: 1px solid #d5ddda;

    border-radius: 7px;

    color: #3f5148;

    font-family: inherit;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* =========================================================
   HOVER DEL BOTÓN CV
   ========================================================= */

.btn-cabildo-cv:hover {
    background: #f1f5f3;

    border-color: #aebbb4;

    color: #26352e;

    text-decoration: none;

    transform: translateY(-1px);

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   ICONO DEL CV
   ========================================================= */

.cv-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 17px;
    height: 17px;

    font-size: 13px;

    line-height: 1;
}


/* =========================================================
   COMPATIBILIDAD CON CLASES ANTERIORES
   ========================================================= */

.container-cards-presidentes .cards-presidentes {
    width: auto;
    height: auto;

    margin: 0;
    padding: 0;
}

.container-cards-presidentes .etiqueta-presidentes {
    margin: 0;
    padding: 0;
}

.container-cards-presidentes .text-presidentes,
.container-cards-presidentes .subtext-presidentes {
    margin: 0;
}

.container-cards-presidentes .img-cards-presidentes {
    max-width: none;
}


/* =========================================================
   LAPTOP
   3 COLUMNAS
   ========================================================= */

@media (max-width: 1050px) {

    .container-cards-presidentes {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 20px !important;
    }

    .card-cabildo-image {
        aspect-ratio: 2 / 3 !important;
    }
}


/* =========================================================
   TABLET
   2 COLUMNAS
   ========================================================= */

@media (max-width: 750px) {

    .cabildo-section {
        padding: 55px 18px 70px;
    }

    .cabildo-header {
        margin-bottom: 35px;
    }

    .cabildo-header h2 {
        font-size: 30px;
    }

    .container-cards-presidentes {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 18px !important;
    }

    .card-cabildo-image {
        aspect-ratio: 2 / 3 !important;
    }

    .card-cabildo-content {
        min-height: 160px;

        padding: 16px 17px 19px !important;
    }
}


/* =========================================================
   CELULAR
   1 COLUMNA
   ========================================================= */

@media (max-width: 520px) {

    .cabildo-section {
        padding: 45px 14px 60px;
    }

    .cabildo-header {
        margin-bottom: 28px;
    }

    .cabildo-kicker {
        font-size: 10px;

        letter-spacing: 1.5px;
    }

    .cabildo-header h2 {
        font-size: 27px;
    }

    .cabildo-header p {
        font-size: 14px;
    }

    .container-cards-presidentes {
        grid-template-columns: 1fr !important;

        gap: 18px !important;
    }

    .card-cabildo-image {
        aspect-ratio: 2 / 3 !important;
    }

    .card-cabildo-content {
        min-height: 150px;

        padding: 16px 18px 18px !important;
    }

    .card-cabildo-content h3 {
        font-size: 17px;
    }

    .card-cabildo-puesto {
        font-size: 13px;
    }

    .btn-cabildo-cv {
        width: 100%;

        padding: 10px 14px;

        font-size: 12px;
    }
}


/* =========================================================
   CELULAR PEQUEÑO
   ========================================================= */

@media (max-width: 380px) {

    .card-cabildo-image {
        aspect-ratio: 2 / 3 !important;
    }

    .card-cabildo-content h3 {
        font-size: 16px;
    }
}


/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .card-cabildo,
    .card-cabildo-image img,
    .btn-cabildo-cv {
        transition: none !important;
    }

    .card-cabildo:hover {
        transform: none;
    }

    .card-cabildo:hover .card-cabildo-image img {
        transform: none !important;
    }

    .btn-cabildo-cv:hover {
        transform: none;
    }
}

/* =========================================================
   ENLACE CURRÍCULUM VITAE
   DISEÑO INSTITUCIONAL
   ========================================================= */

.cabildo-cv-link {
    width: 100%;

    margin-top: 16px;
    padding-top: 11px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid #e7ebe9;

    color: #53645c;

    font-family: inherit;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;

    letter-spacing: 0.2px;

    text-decoration: none;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}


/* Texto */

.cabildo-cv-link span:first-child {
    position: relative;

    transition:
        color 0.2s ease;
}


/* Flecha */

.cabildo-cv-arrow {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    font-size: 18px;
    line-height: 1;
    font-weight: 400;

    color: #718579;

    transition:
        transform 0.25s ease,
        color 0.2s ease;
}


/* Hover */

.cabildo-cv-link:hover {
    color: #26352e;

    border-top-color: #cbd5d0;

    text-decoration: none;
}


.cabildo-cv-link:hover span:first-child {
    color: #26352e;
}


.cabildo-cv-link:hover .cabildo-cv-arrow {
    color: #26352e;

    transform: translateX(4px);
}


/* =========================================================
   CELULAR
   ========================================================= */

@media (max-width: 520px) {

    .cabildo-cv-link {
        margin-top: 14px;
        padding-top: 10px;

        font-size: 12px;
    }

    .cabildo-cv-arrow {
        width: 22px;
        height: 22px;

        font-size: 17px;
    }
}

.card-cabildo-content h3 a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.card-cabildo-content h3 a:hover {
    color: #53645c;
}


.cv-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.cv-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(25, 35, 30, .55);
    backdrop-filter: blur(3px);
}

.cv-modal-content {
    position: relative;
    z-index: 2;

    width: calc(100% - 40px);
    max-width: 650px;
    max-height: 85vh;

    overflow-y: auto;

    background: #fff;
    border-radius: 16px;

    box-shadow: 0 25px 70px rgba(0,0,0,.22);

    animation: modalEntrada .22s ease;
}

.cv-modal-header {
    display: flex;
    align-items: center;
    gap: 20px;

    padding: 25px 30px;

    border-bottom: 1px solid #e5e9e7;
}

.cv-modal-foto {
    width: 75px;
    height: 95px;

    flex-shrink: 0;

    overflow: hidden;

    border-radius: 10px;
    background: #f4f6f5;
}

.cv-modal-foto img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.cv-modal-header h2 {
    margin: 0 0 6px;

    color: #26352e;

    font-size: 22px;
    font-weight: 700;
}

.cv-modal-header span {
    color: #64736c;
    font-size: 14px;
}

.cv-modal-body {
    padding: 25px 30px 30px;
}

.cv-modal-body section {
    margin-bottom: 22px;
}

.cv-modal-body section:last-child {
    margin-bottom: 0;
}

.cv-modal-body h4 {
    margin: 0 0 7px;

    color: #3f5148;

    font-size: 14px;
    font-weight: 700;
}

.cv-modal-body p {
    margin: 0;

    color: #59655f;

    font-size: 14px;
    line-height: 1.7;
}

.cv-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;

    width: 32px;
    height: 32px;

    border: 0;
    border-radius: 50%;

    background: #f3f5f4;

    color: #65716c;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.cv-modal-close:hover {
    background: #e8ecea;
    color: #26352e;
}

.card-cabildo-content h3 a {
    color: inherit;
    text-decoration: none;
}

.card-cabildo-content h3 a:hover {
    color: #53645c;
}

@keyframes modalEntrada {
    from {
        opacity: 0;
        transform: translateY(15px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {

    .cv-modal-content {
        width: calc(100% - 25px);
        max-height: 90vh;
    }

    .cv-modal-header {
        padding: 22px;
        gap: 15px;
    }

    .cv-modal-foto {
        width: 65px;
        height: 82px;
    }

    .cv-modal-header h2 {
        font-size: 19px;
    }

    .cv-modal-body {
        padding: 22px;
    }
}