/* =========================================================
   CABILDO MUNICIPAL 2024 - 2027
   Hoja de estilos completa
   ========================================================= */

/* =========================================================
   SECCIÓN PRINCIPAL
   ========================================================= */

.cabildo-section {
    width: 100%;
    padding: 80px 20px 90px;
    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: 850px;
    margin: 0 auto 55px;
    text-align: center;
}

.cabildo-kicker {
    display: inline-block;
    margin-bottom: 12px;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;

    color: #718078;
}

.cabildo-header h2 {
    margin: 0 0 15px;
    padding: 0;

    font-size: 38px;
    line-height: 1.2;
    font-weight: 700;

    color: #26352e;
}

.cabildo-header p {
    max-width: 650px;
    margin: 0 auto;
    padding: 0;

    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;

    color: #727b76;
}


/* =========================================================
   CONTENEDOR / GRID
   ========================================================= */

.container-cards-presidentes {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 0;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;

    align-items: stretch;
}


/* =========================================================
   TARJETA
   ========================================================= */

.card-cabildo {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 475px;

    margin: 0;
    padding: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e3e7e4;
    border-radius: 14px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.30s ease,
        box-shadow 0.30s ease,
        border-color 0.30s ease;
}

.card-cabildo:hover {
    transform: translateY(-5px);

    border-color: #d4dbd6;

    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.10);
}


/* =========================================================
   ÁREA DE FOTOGRAFÍA
   IMPORTANTE:
   - Todas tienen la misma altura.
   - object-fit: contain evita cortar personas.
   ========================================================= */

.card-cabildo-image {
    position: relative;

    width: 100%;
    height: 330px;
    min-height: 330px;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #f1f3f2;
}


/* Imagen */

.card-cabildo-image img {
    display: block;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    object-fit: contain;
    object-position: center center;

    border: 0;

    transition: opacity 0.25s ease;
}


/* =========================================================
   CONTENIDO DE LA TARJETA
   ========================================================= */

.card-cabildo-content {
    width: 100%;
    min-height: 145px;

    margin: 0;
    padding: 20px 22px 24px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: flex-start;

    text-align: center;

    background: #ffffff;
}


/* =========================================================
   LÍNEA DECORATIVA
   ========================================================= */

.card-cabildo-content::before {
    content: "";

    display: block;

    width: 35px;
    height: 3px;

    margin: 0 auto 14px;

    flex-shrink: 0;

    background: #718579;

    border-radius: 10px;
}


/* =========================================================
   NOMBRE
   ========================================================= */

.card-cabildo-content h3 {
    width: 100%;
    min-height: 50px;

    margin: 0 0 7px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;

    color: #26352e;

    text-align: center;

    overflow-wrap: break-word;
    word-wrap: break-word;
}


/* =========================================================
   CARGO
   ========================================================= */
/* =========================================================
   DESCRIPCIÓN / CARGO DE LA PERSONA
========================================================= */

.card-cabildo-puesto {
    width: 100% !important;

    min-height: 42px;

    margin: 4px 0 0 !important;
    padding: 0 !important;

    display: block;

    font-family: inherit;

    font-size: 12.5px;
    line-height: 1.55;
    font-weight: 400;

    color: #68736e;

    text-align: left;

    text-transform: none !important;
    letter-spacing: 0.1px;

    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* =========================================================
   IMAGEN FALLIDA / FONDO
   ========================================================= */

.card-cabildo-image img[src=""],
.card-cabildo-image img:not([src]) {
    display: none;
}


/* =========================================================
   TABLET GRANDE
   ========================================================= */

@media (max-width: 1199px) {

    .container-cards-presidentes {
        max-width: 1000px;
        gap: 24px;
    }

    .card-cabildo-image {
        height: 300px;
        min-height: 300px;
    }

    .card-cabildo {
        min-height: 445px;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .cabildo-section {
        padding: 70px 20px 80px;
    }

    .cabildo-header {
        margin-bottom: 45px;
    }

    .cabildo-header h2 {
        font-size: 34px;
    }

    .container-cards-presidentes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .card-cabildo {
        min-height: 450px;
    }

    .card-cabildo-image {
        height: 320px;
        min-height: 320px;
    }
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 600px) {

    .cabildo-section {
        padding: 55px 16px 65px;
    }

    .cabildo-header {
        margin-bottom: 35px;
    }

    .cabildo-kicker {
        margin-bottom: 10px;

        font-size: 11px;
        letter-spacing: 1.5px;
    }

    .cabildo-header h2 {
        font-size: 29px;
        line-height: 1.25;
    }

    .cabildo-header p {
        font-size: 15px;
        line-height: 1.6;
    }

    .container-cards-presidentes {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-cabildo {
        min-height: 0;
    }

    .card-cabildo-image {
        height: 350px;
        min-height: 350px;
    }

    .card-cabildo-content {
        min-height: 140px;
        padding: 20px;
    }

    .card-cabildo-content h3 {
        font-size: 18px;
    }

    .card-cabildo-puesto {
        font-size: 14px;
    }
}


/* =========================================================
   MÓVILES PEQUEÑOS
   ========================================================= */

@media (max-width: 400px) {

    .cabildo-section {
        padding-left: 12px;
        padding-right: 12px;
    }

    .cabildo-header h2 {
        font-size: 26px;
    }

    .card-cabildo-image {
        height: 320px;
        min-height: 320px;
    }
}


/* =========================================================
   COMPATIBILIDAD:
   EVITA QUE LAS CLASES ANTIGUAS MODIFIQUEN EL DISEÑO
   ========================================================= */

.container-cards-presidentes .cards-presidentes {
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
}

.container-cards-presidentes .etiqueta-presidentes {
    margin: 0;
}

.container-cards-presidentes .img-cards-presidentes {
    max-width: none;
}


/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .card-cabildo,
    .card-cabildo-image img {
        transition: none;
    }

    .card-cabildo:hover {
        transform: none;
    }
}

/* =========================================================
   CABILDO MUNICIPAL 2024 - 2027
   DIRECTORIO INSTITUCIONAL MODERNO
   ========================================================= */

/* =========================================================
   SECCIÓN PRINCIPAL
   ========================================================= */

.cabildo-section {
    width: 100%;
    padding: 65px 20px 80px;
    margin: 0;
    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
   ESCRITORIO: 4 POR FILA
   ========================================================= */

.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: stretch !important;

    box-sizing: border-box;
}


/* =========================================================
   TARJETA
   ========================================================= */

.card-cabildo {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !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;
}

.card-cabildo:hover {
    transform: translateY(-4px);

    border-color: #d5dbd8;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.10);
}


/* =========================================================
   ÁREA DE FOTOGRAFÍA
   ========================================================= */

.card-cabildo-image {
    position: relative;

    width: 100% !important;

    height: 260px !important;
    min-height: 260px !important;
    max-height: 260px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #eef0ef;

    flex-shrink: 0;
}


/* =========================================================
   FOTOGRAFÍA
   ========================================================= */

.card-cabildo-image img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center center;

    border: 0 !important;
    border-radius: 0 !important;

    transition: transform 0.35s ease;
}

.card-cabildo:hover .card-cabildo-image img {
    transform: scale(1.015);
}


/* =========================================================
   INFORMACIÓN
   ========================================================= */

.card-cabildo-content {
    width: 100% !important;

    min-height: 125px;

    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;
}


/* =========================================================
   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: uppercase;

    overflow-wrap: break-word;
    word-wrap: break-word;
}


/* =========================================================
   OCULTAR DECORACIÓN DE VERSIONES ANTERIORES
   ========================================================= */

.cabildo-section .card-cabildo-content::before {
    display: none !important;
}


/* =========================================================
   COMPATIBILIDAD CON CLASES ANTIGUAS
   Evita que reglas viejas deformen el nuevo diseño.
   ========================================================= */

.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;
}


/* =========================================================
   TABLET / LAPTOP
   3 POR FILA
   ========================================================= */

@media (max-width: 1050px) {

    .container-cards-presidentes {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 20px !important;
    }

    .card-cabildo-image {
        height: 245px !important;
        min-height: 245px !important;
        max-height: 245px !important;
    }
}


/* =========================================================
   TABLET
   2 POR FILA
   ========================================================= */

@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 {
        height: 250px !important;
        min-height: 250px !important;
        max-height: 250px !important;
    }
}


/* =========================================================
   CELULAR
   1 POR FILA
   ========================================================= */

@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 {
        height: 320px !important;
        min-height: 320px !important;
        max-height: 320px !important;
    }

    .card-cabildo-content {
        min-height: 140px;
        padding: 16px 18px 18px !important;
    }

    .card-cabildo-content h3 {
        font-size: 17px;
    }
}


/* =========================================================
   MÓVIL PEQUEÑO
   ========================================================= */

@media (max-width: 380px) {

    .card-cabildo-image {
        height: 290px !important;
        min-height: 290px !important;
        max-height: 290px !important;
    }

    .card-cabildo-content h3 {
        font-size: 16px;
    }
}


/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .card-cabildo,
    .card-cabildo-image img {
        transition: none;
    }

    .card-cabildo:hover {
        transform: none;
    }

    .card-cabildo:hover .card-cabildo-image img {
        transform: none;
    }
}
