
:root {

    --info-guinda: #6d1234;
    --info-guinda-hover: #861743;

    --info-guinda-claro: #8d3656;

    --info-dorado: #b28e5c;

    --info-fondo: #f8f5f6;

    --info-blanco: #ffffff;

    --info-texto: #333333;

    --info-gris: #777777;

    --info-borde: #eadde2;

    --info-sombra:
        0 6px 20px rgba(80, 20, 45, .12);

}


/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */

.info-modulo {

    width: 100%;

    max-width: 1300px;

    margin: 0 auto;

    padding: 25px 20px 40px;

    box-sizing: border-box;

}


/* ============================================================
   ENCABEZADO DE LA SECCION
   ============================================================ */

.info-encabezado {

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 30px;

}


/* ============================================================
   TITULO
   ============================================================ */

.info-titulo {

    margin: 0;

    padding: 0;

    color: var(--info-guinda);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 28px;

    font-weight: 700;

}


/* ============================================================
   LINEA DECORATIVA
   ============================================================ */

.info-linea {

    width: 80px;

    height: 4px;

    margin-top: 8px;

    background: var(--info-guinda);

    border-radius: 10px;

}


/* ============================================================
   GRID DE INFOGRAFIAS
   ============================================================ */

.info-grid {
    width: 100%;
    display: grid;
    /* Adapta automáticamente las tarjetas ocupando el espacio disponible (mínimo 230px) */
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 25px;
    margin: 0 auto;
}


/* ============================================================
   TARJETA
   ============================================================ */

.info-card {
    width: 100%; /* Toma el ancho dinámico de la columna del grid */
    background: #ffffff;
    border: 1px solid #eadde2;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(80, 20, 45, .12);
    transition: transform .25s ease, box-shadow .25s ease;
}


.info-card:hover {

    transform: translateY(-4px);

    box-shadow:
        0 8px 20px rgba(80, 20, 45, .18);

}



/* ============================================================
   CONTENEDOR DE LA PORTADA
   ============================================================ */

.info-portada {
    width: 100%;
    height: 310px; /* Ancho fluido con altura fija proporcional */
    background: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ============================================================
   IMAGEN DE PORTADA
   ============================================================ */

.info-portada img {

   width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px; 
    box-sizing: border-box;

}


/* ============================================================
   PDF DE PORTADA
   ============================================================ */

.info-portada iframe {

    width: 100%;

    height: 100%;

    display: block;

    border: 0;

    background: #ffffff;

}


/* ============================================================
   INFORMACION DE TARJETA
   ============================================================ */

.info-datos {

    width: 100%;

    min-height: 82px;

    padding: 10px;

    box-sizing: border-box;

    background: #ffffff;

}


/* ============================================================
   TITULO DE TARJETA
   ============================================================ */

.info-card-titulo {

    margin: 0 0 10px 0;

    color: #333333;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 11px;

    line-height: 1.3;

    font-weight: 600;

    min-height: 40px;

}



/* ============================================================
   BOTON VER
   ============================================================ */

.info-btn-ver {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    padding: 9px 15px;

    border: 0;

    border-radius: 6px;

    background: #6d1234;

    color: #ffffff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;

}


.info-btn-ver:hover {

    background: #861743;

    transform: translateY(-1px);

}


.info-btn-ver:active {

    transform: translateY(0);

}


/* ============================================================
   ============================================================
   MODAL
   ============================================================
   ============================================================ */

.info-modal {

    position: fixed;

    inset: 0;

    width: 100%;

    height: 100%;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    box-sizing: border-box;

    background:
        rgba(30, 8, 18, .78);

    z-index: 999999;

}


/* ============================================================
   MODAL ACTIVO
   ============================================================ */

.info-modal.info-modal-activo {

    display: flex;

}


/* ============================================================
   CONTENEDOR DEL MODAL
   ============================================================ */

.info-modal-contenido {

    width: min(1050px, 96vw);

    height: min(900px, 94vh);

    background: var(--info-blanco);

    border-radius: 13px;

    overflow: hidden;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, .40);

    display: flex;

    flex-direction: column;

    animation:
        infoModalEntrada .25s ease;

}


@keyframes infoModalEntrada {

    from {

        opacity: 0;

        transform:
            scale(.96)
            translateY(10px);

    }

    to {

        opacity: 1;

        transform:
            scale(1)
            translateY(0);

    }

}


/* ============================================================
   HEADER DEL MODAL
   ============================================================ */

.info-modal-header {

    width: 100%;

    min-height: 60px;

    background: var(--info-guinda);

    color: var(--info-blanco);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 18px;

    box-sizing: border-box;

    flex-shrink: 0;

}


/* ============================================================
   TITULO DEL MODAL
   ============================================================ */

.info-modal-titulo {

    display: flex;

    align-items: center;

    gap: 9px;

    min-width: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 13px;

    font-weight: 700;

}


.info-modal-titulo i {

    font-size: 13px;

}


/* ============================================================
   BOTON CERRAR SUPERIOR
   ============================================================ */

.info-modal-cerrar {

    width: 34px;

    height: 34px;

    min-width: 34px;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255,255,255,.15);

    color: var(--info-blanco);

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .25s ease;

}


.info-modal-cerrar:hover {

    background:
        rgba(255,255,255,.28);

    transform: rotate(90deg);

}


/* ============================================================
   CUERPO DEL MODAL
   ============================================================ */

.info-modal-cuerpo {

    flex: 1;

    min-height: 0;

    width: 100%;

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        #faf7f8;

    padding: 20px 60px;

    box-sizing: border-box;

}


/* ============================================================
   VISOR
   ============================================================ */

.info-visor {

    width: 100%;

    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    min-width: 0;

    min-height: 0;

}


/* ============================================================
   IMAGEN DEL VISOR
   ============================================================ */

.info-visor img {

    max-width: 100%;

    max-height: 100%;

    width: auto;

    height: auto;

    object-fit: contain;

    display: block;

    border: 3px solid var(--info-guinda);

    border-radius: 9px;

    box-shadow:
        0 8px 25px rgba(0,0,0,.16);

}


/* ============================================================
   PDF DEL VISOR
   ============================================================ */

.info-visor iframe {

    width: 100%;

    height: 100%;

    border: 3px solid var(--info-guinda);

    border-radius: 9px;

    background: #ffffff;

}


/* ============================================================
   FLECHAS
   ============================================================ */

.info-flecha {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 42px;

    height: 42px;

    border: 0;

    border-radius: 50%;

    background:
        var(--info-blanco);

    color:
        var(--info-guinda);

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    box-shadow:
        0 4px 15px rgba(0,0,0,.15);

    z-index: 10;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;

}


.info-flecha:hover {

    background:
        var(--info-guinda);

    color:
        var(--info-blanco);

}


.info-flecha:active {

    transform:
        translateY(-50%)
        scale(.95);

}


.info-flecha-izquierda {

    left: 12px;

}


.info-flecha-derecha {

    right: 12px;

}


/* ============================================================
   INDICADORES
   ============================================================ */

.info-indicadores {

    width: 100%;

    min-height: 50px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 5px;

    background:
        var(--info-blanco);

    flex-shrink: 0;

}


/* ============================================================
   PUNTOS
   ============================================================ */

.info-puntos {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

}


.info-punto {

    width: 8px;

    height: 8px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background:
        #d5c6cb;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;

}


.info-punto:hover {

    transform: scale(1.2);

}


.info-punto-activo {

    background:
        var(--info-guinda);

}


/* ============================================================
   CONTADOR
   ============================================================ */

.info-contador {

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;

    color:
        var(--info-gris);

}


/* ============================================================
   FOOTER DEL MODAL
   ============================================================ */

.info-modal-footer {

    width: 100%;

    min-height: 60px;

    border-top:
        1px solid #eeeeee;

    background:
        var(--info-blanco);

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 10px;

    padding: 10px 20px;

    box-sizing: border-box;

    flex-shrink: 0;

}


/* ============================================================
   BOTON CERRAR INFERIOR
   ============================================================ */

.info-btn-cerrar {

    padding: 9px 20px;

    border:
        2px solid var(--info-guinda);

    border-radius: 6px;

    background:
        var(--info-blanco);

    color:
        var(--info-guinda);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease;

}


.info-btn-cerrar:hover {

    background:
        var(--info-guinda);

    color:
        var(--info-blanco);

}


/* ============================================================
   BOTON DESCARGAR
   ============================================================ */

.info-btn-descargar {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    padding: 10px 18px;

    border: 0;

    border-radius: 6px;

    background:
        var(--info-guinda);

    color:
        var(--info-blanco);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;

}


.info-btn-descargar:hover {

    background:
        var(--info-guinda-hover);

    transform: translateY(-1px);

}


/* ============================================================
   BLOQUEAR SCROLL
   ============================================================ */

body.info-modal-bloqueado {

    overflow: hidden;

}


/* ============================================================
   ESTADO SIN INFOGRAFÍAS
   ============================================================ */

.info-sin-resultados {

    width: 100%;

    padding: 50px 20px;

    text-align: center;

    color: var(--info-gris);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

}


/* ============================================================
   TABLET GRANDE
   ============================================================ */

@media (max-width: 1100px) {

    .info-modulo {

        padding-left: 20px;

        padding-right: 20px;

    }


    .info-grid {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }

}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 850px) {

    .info-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .info-portada {

        height: 300px;

    }


    .info-modal-contenido {

        width: 96vw;

        height: 94vh;

    }

}


/* ============================================================
   CELULAR
   ============================================================ */

@media (max-width: 600px) {
    .info-modulo {
        padding: 15px 10px;
    }


    .info-encabezado {

        margin-bottom: 20px;

    }


    .info-titulo {

        font-size: 23px;

    }


    .info-grid {
        display: grid;
        /* Forzamos 1 o 2 columnas bien centradas */
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        justify-content: center;
        justify-items: center;
        gap: 15px;
        padding: 0 10px;
    }

.info-card {
        width: 100%;
        max-width: 280px; /* Evita que las tarjetas se estiren demasiado */
    }
    .info-portada {
        height: 240px; /* Reduce un poco la altura en móviles para no ocupar verticalmente tanto espacio */
    }


    .info-card-titulo {

        min-height: auto;

        font-size: 14px;

    }


    /* ========================================================
       MODAL CELULAR
       ======================================================== */
.modal-body, 
.modal-content-pdf {
    width: 100%;
    height: 75vh; /* Mantiene una altura cómoda en móviles */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 5px;
    box-sizing: border-box;
}

/* Ajuste dinámico para el visor */
.modal-body iframe,
.modal-body embed,
.modal-body object {
    width: 100% !important;
    height: 100% !important;
    border: none;
    max-width: 100%;
    object-fit: contain;
}
    .info-modal {

        padding: 5px;

    }


    .info-modal-contenido {

        width: 100%;

        height: 97vh;

        max-height: 97vh;

        border-radius: 9px;

    }


    .info-modal-header {

        min-height: 54px;

        padding:
            0 12px;

    }


    .info-modal-titulo {

        font-size: 11px;

        max-width: calc(100% - 45px);

        line-height: 1.3;

    }


    .info-modal-cuerpo {

        padding:
            10px 42px;

    }


    .info-visor img {

        max-width: 100%;

        max-height: 100%;

        border-width: 2px;

    }


    .info-visor iframe {

        border-width: 2px;

    }


    .info-flecha {

        width: 34px;

        height: 34px;

    }


    .info-flecha-izquierda {

        left: 5px;

    }


    .info-flecha-derecha {

        right: 5px;

    }


    .info-indicadores {

        min-height: 42px;

    }


    .info-modal-footer {

        min-height: 56px;

        padding:
            8px;

        gap: 7px;

    }


    .info-btn-cerrar,
    .info-btn-descargar {

        padding:
            9px 11px;

        font-size: 11px;

    }

}


/* ============================================================
   CELULAR PEQUEÑO
   ============================================================ */

@media (max-width: 400px) {

    .info-portada {

        height: 380px;

    }


    .info-modal-footer {

        justify-content: center;

    }


    .info-btn-cerrar,
    .info-btn-descargar {

        flex: 0 1 auto;

    }

}


/* ============================================================
   PANTALLAS MUY PEQUEÑAS
   ============================================================ */

@media (max-width: 340px) {

    .info-modal-titulo {

        font-size: 10px;

    }


    .info-btn-cerrar,
    .info-btn-descargar {

        padding:
            8px 9px;

        font-size: 10px;

    }

}
/* ============================================================
   Ajuste de PDF en Visor Móvil
   ============================================================ */
#infoVisor {
    width: 100%;
    height: 70vh; /* Controla la altura en la pantalla */
    overflow: hidden;
    position: relative;
}

#infoVisor iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    object-fit: contain;
}

/* Forzar escala en pantallas pequeñas */
@media (max-width: 768px) {
    #infoVisor iframe {
        /* Fuerza a los motores móviles a renderizar el lienzo completo */
        -webkit-transform: scale(1);
        transform: scale(1);
        width: 100%;
        height: 100%;
    }
}