/*
    Estilos para la página de Brechas Digitales
*/





html {
    height: 100%;
}

body {
    background-image: url("../image/fondoCRT.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    min-height: 100%;
    max-height: fit-content;
    margin: 0px;
    padding: 0px;
    overflow-y: auto;
    overflow-x: hidden;
}

.section {
    min-height: auto;
    height: auto;
    overflow: visible;
    padding-bottom: 0px;
    margin-bottom: 0px;
}

.section p{
    text-align: center;
    color: white;
}

/* Removido para evitar conflictos - los img específicos tienen sus propios estilos */

.section:after{
    content: "";
    display: block;
    clear: both;
    height: 0;
    visibility: hidden;
}

/* Contenedor principal */
.contenedorBrechas {
    display: flex;
    margin-top: 20px;
    margin-bottom: 0px;
    padding: 20px 20px 0px 20px;
    gap: 20px;
    align-items: stretch;
    justify-content: center;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Columna izquierda - Imagen grande */
.brechasIzquierda {
    flex: 0 0 28%;
    max-width: 320px;
    min-width: 280px;
}

/* Columna derecha - Grid de 6 tarjetas (3x2) */
.brechasDerecha {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 15px;
    max-width: 850px;
}

.footer{
    text-align: center;
    z-index: 3;
    width: 100%;
    padding: 15px 0;
    position: relative;
    font-size: 13px;
    color: #ffffff;
    font-family: 'Noto Sans', sans-serif;
    margin-top: 10px;
}

.textFooter {
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.6;
}

.crt-year:before {
    content: "";
}

/* Estilo para la imagen grande (izquierda) */
.estadistica6 {
    position: relative;
    width: 100%;
    height: 415px;
    overflow: hidden;
    transition: .5s;
    border-radius: 5px;
    background-color: rgba(16, 61, 80, 0.5) !important;
}

/* Estilo para las 6 tarjetas del grid */
.estadistica2, .estadistica3, .estadistica4, .estadistica5,
.estadistica7, .estadistica8 {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    transition: .5s;
    border-radius: 5px;
    background-color: rgba(16, 61, 80, 0.5) !important;
}

.estadistica2 img, .estadistica3 img, .estadistica4 img, .estadistica5 img,
.estadistica6 img, .estadistica7 img, .estadistica8 img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s;
    opacity: 0.6 !important;
}

/* Overlay */
.overlay{
    position: absolute;
    background-color: rgba(13, 49, 64, 0.6);
    width: 100%;  
    height: 0;
    opacity: .9;
    bottom: 0px;
    transition: .5s;
    border-radius: 5px;
    overflow: hidden;
}

.texto{
    font-family: 'Noto Sans', sans-serif; 
    text-align: justify;
    color: white;
    transition: .5s;
    padding: 20px;
    font-size: 15px;
}

/* Hover effects */
.estadistica2:hover .overlay,
.estadistica3:hover .overlay,
.estadistica4:hover .overlay,
.estadistica5:hover .overlay,
.estadistica6:hover .overlay,
.estadistica7:hover .overlay,
.estadistica8:hover .overlay {
    height: 100%;
}

/* Media queries para responsividad */
@media only screen and (max-width: 1400px){
    .contenedorBrechas {
        gap: 20px;
        padding: 15px;
    }

    .brechasDerecha {
        grid-template-rows: repeat(2, minmax(240px, auto));
        gap: 15px;
    }

    .estadistica6 {
        min-height: 500px;
    }

    .estadistica2, .estadistica3, .estadistica4, .estadistica5,
    .estadistica7, .estadistica8 {
        min-height: 240px;
    }

    .texto {
        font-size: 13px;
        padding: 15px;
    }
}

@media only screen and (max-width: 1200px){
    .contenedorBrechas {
        gap: 15px;
        padding: 10px;
    }

    .brechasIzquierda {
        flex: 0 0 32%;
        min-width: 250px;
    }

    .estadistica6 {
        min-height: 420px;
    }

    .brechasDerecha {
        gap: 12px;
        grid-template-rows: repeat(2, minmax(200px, auto));
    }

    .estadistica2, .estadistica3, .estadistica4, .estadistica5,
    .estadistica7, .estadistica8 {
        min-height: 200px;
    }

    .texto {
        font-size: 12px;
        padding: 12px;
    }
}

@media only screen and (max-width: 1100px){
    .contenedorBrechas {
        gap: 15px;
        padding: 10px;
        margin-top: 80px;
    }

    .brechasIzquierda {
        flex: 0 0 28%;
        min-width: 200px;
        max-width: 280px;
    }

    .estadistica6 {
        min-height: 360px;
    }

    .brechasDerecha {
        gap: 10px;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, minmax(170px, auto));
    }

    .estadistica2, .estadistica3, .estadistica4, .estadistica5,
    .estadistica7, .estadistica8 {
        min-height: 170px;
    }

    .texto {
        font-size: 11px;
        padding: 8px;
    }

    .brechasIzquierda {
        flex: 0 0 30%;
        min-width: 180px;
        max-width: 250px;
    }
}

@media only screen and (max-width: 950px){
    .contenedorBrechas {
        gap: 12px;
        padding: 8px;
        margin-top: 60px;
    }

    .brechasIzquierda {
        flex: 0 0 30%;
        min-width: 180px;
        max-width: 250px;
    }

    .estadistica6 {
        min-height: 340px;
    }

    .brechasDerecha {
        gap: 8px;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, minmax(160px, auto));
    }

    .estadistica2, .estadistica3, .estadistica4, .estadistica5,
    .estadistica7, .estadistica8 {
        min-height: 160px;
    }

    .texto {
        font-size: 10px;
        padding: 8px;
    }
}

@media only screen and (max-width: 850px){
    .contenedorBrechas {
        flex-direction: column;
        align-items: center;
        margin-top: 50px;
        gap: 20px;
    }

    .brechasIzquierda {
        flex: 0 0 auto;
        width: 90%;
        max-width: 500px;
    }

    .estadistica6 {
        height: 300px;
        min-height: 300px;
    }

    .brechasDerecha {
        width: 90%;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 15px;
    }

    .estadistica2, .estadistica3, .estadistica4, .estadistica5,
    .estadistica7, .estadistica8 {
        height: 200px;
        min-height: 200px;
    }

    .texto {
        font-size: 12px;
        padding: 10px;
    }
}

@media only screen and (max-width: 760px){
    .contenedorBrechas {
        margin-top: 30px;
        padding: 10px;
    }

    .brechasIzquierda {
        width: 100%;
    }

    .estadistica6 {
        height: 250px;
    }

    .brechasDerecha {
        width: 100%;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .estadistica2, .estadistica3, .estadistica4, .estadistica5,
    .estadistica7, .estadistica8 {
        height: 200px;
    }

    .texto {
        font-size: 12px;
        padding: 10px;
    }
}

@media only screen and (max-width: 480px){
    .contenedorBrechas {
        margin-top: 12px;
        padding: 0 8px;
        gap: 10px;
    }

    /* En XS se priorizan las 6 tarjetas de Brechas en grid 2x3 */
    .brechasIzquierda {
        display: none;
    }

    .brechasDerecha {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(2, 150px);
        grid-template-rows: repeat(3, 150px);
        justify-content: center;
        gap: 10px;
    }

    .estadistica2, .estadistica3, .estadistica4, .estadistica5,
    .estadistica7, .estadistica8 {
        width: 150px;
        height: 150px;
        min-height: 150px;
    }

    /* En tarjetas compactas se oculta overlay descriptivo para evitar desbordes */
    .overlay,
    .texto {
        display: none !important;
    }
}



/* XS_OVERLAY_STANDARD: configuracion homologada para overlays en movil */
@media screen and (max-width: 480px) {
    .overlay,
    .section .container-grid .herramientas-content-wrapper .arti2-item .overlay {
        display: block !important;
        position: absolute !important;
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 0 !important;
        opacity: 1 !important;
        background-color: rgba(13, 49, 64, 0.6) !important;
        overflow: hidden !important;
        transition: height 0.28s ease !important;
        border-radius: 0 !important;
    }

    .texto,
    .overlay .texto,
    .section .container-grid .herramientas-content-wrapper .arti2-item .texto {
        display: block !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 3px !important;
        color: #ffffff !important;
        font-family: 'Noto Sans', sans-serif !important;
        font-size: 8.6px !important;
        line-height: 1.08 !important;
        text-align: left !important;
        box-sizing: border-box !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    .content:hover .overlay,
    .content2:hover .overlay,
    .content3:hover .overlay,
    .content4:hover .overlay,
    .conten3:hover .overlay,
    .conten4:hover .overlay,
    .conten5:hover .overlay,
    .conten6:hover .overlay,
    .conten7:hover .overlay,
    .conten8:hover .overlay,
    .estadistica1:hover .overlay,
    .estadistica2:hover .overlay,
    .estadistica3:hover .overlay,
    .estadistica4:hover .overlay,
    .estadistica5:hover .overlay,
    .estadistica6:hover .overlay,
    .estadistica7:hover .overlay,
    .estadistica8:hover .overlay,
    .contentX:hover .overlay,
    .contentY:hover .overlay,
    .arti2-item:hover .overlay {
        height: 100% !important;
    }
}
/* SM_LAYOUT_481_767_BRECHAS_SURFACE_DUO */
@media screen and (min-width: 481px) and (max-width: 767px) {
    .contenedorBrechas {
        margin-top: 16px !important;
        padding: 0 12px !important;
        gap: 12px !important;
        justify-content: center !important;
    }

    .brechasIzquierda {
        display: none !important;
    }

    .brechasDerecha {
        width: min(520px, 100%) !important;
        max-width: 520px !important;
        margin: 0 auto !important;
        display: grid !important;
        grid-template-columns: repeat(2, 168px) !important;
        grid-template-rows: repeat(3, 136px) !important;
        column-gap: 12px !important;
        row-gap: 12px !important;
        justify-content: center !important;
        justify-items: center !important;
        align-content: start !important;
    }

    .estadistica2,
    .estadistica3,
    .estadistica4,
    .estadistica5,
    .estadistica7,
    .estadistica8 {
        width: 168px !important;
        height: 136px !important;
        min-height: 136px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }
}


/* SM_OVERLAY_STANDARD_481_767: overlays homologados para Surface Duo */
@media screen and (min-width: 481px) and (max-width: 767px) {
    .overlay,
    .section .container-grid .herramientas-content-wrapper .arti2-item .overlay {
        display: block !important;
        position: absolute !important;
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 0 !important;
        opacity: 1 !important;
        background-color: rgba(13, 49, 64, 0.6) !important;
        overflow: hidden !important;
        transition: height 0.28s ease !important;
        border-radius: 0 !important;
    }

    .texto,
    .overlay .texto,
    .section .container-grid .herramientas-content-wrapper .arti2-item .texto {
        display: block !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 5px !important;
        color: #ffffff !important;
        font-family: 'Noto Sans', sans-serif !important;
        font-size: 10.4px !important;
        line-height: 1.12 !important;
        text-align: left !important;
        box-sizing: border-box !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    .content:hover .overlay,
    .content2:hover .overlay,
    .content3:hover .overlay,
    .content4:hover .overlay,
    .conten3:hover .overlay,
    .conten4:hover .overlay,
    .conten5:hover .overlay,
    .conten6:hover .overlay,
    .conten7:hover .overlay,
    .conten8:hover .overlay,
    .estadistica1:hover .overlay,
    .estadistica2:hover .overlay,
    .estadistica3:hover .overlay,
    .estadistica4:hover .overlay,
    .estadistica5:hover .overlay,
    .estadistica6:hover .overlay,
    .estadistica7:hover .overlay,
    .estadistica8:hover .overlay,
    .contentX:hover .overlay,
    .contentY:hover .overlay,
    .arti2-item:hover .overlay,
    .arti2-item:active .overlay,
    .arti2-item:focus-within .overlay,
    .arti2-item > a:hover .overlay,
    .arti2-item > a:active .overlay,
    .arti2-item > a:focus .overlay,
    .arti2-item > a:focus-visible .overlay {
        height: 100% !important;
    }
}

/* MD_LAYOUT_1024_1470_BRECHAS_CARD_SCALE_70 */
@media screen and (min-width: 1024px) and (max-width: 1470px), screen and (min-width: 1471px) and (max-width: 1919px) {
    .contenedorBrechas {
        margin-top: 4px !important;
        padding: 6px 20px 0 20px !important;
        gap: 18px !important;
        align-items: center !important;
    }

    .estadistica6 {
        height: 320px !important;
        min-height: 320px !important;
    }

    .brechasDerecha {
        width: 100% !important;
        max-width: 660px !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: repeat(2, 140px) !important;
        gap: 12px !important;
        justify-content: center !important;
    }

    .estadistica2,
    .estadistica3,
    .estadistica4,
    .estadistica5,
    .estadistica7,
    .estadistica8 {
        width: 100% !important;
        height: 140px !important;
        min-height: 140px !important;
        margin: 0 !important;
    }

    .texto {
        font-size: 11px !important;
        padding: 8px !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .contenedorBrechas {
        margin-top: 16px !important;
        padding: 0 12px !important;
        gap: 12px !important;
        justify-content: center !important;
    }

    .brechasIzquierda {
        display: none !important;
    }

    .brechasDerecha {
        width: min(520px, 100%) !important;
        max-width: 520px !important;
        margin: 0 auto !important;
        display: grid !important;
        grid-template-columns: repeat(2, 168px) !important;
        grid-template-rows: repeat(3, 136px) !important;
        column-gap: 12px !important;
        row-gap: 12px !important;
        justify-content: center !important;
        justify-items: center !important;
        align-content: start !important;
    }

    .estadistica2,
    .estadistica3,
    .estadistica4,
    .estadistica5,
    .estadistica7,
    .estadistica8 {
        width: 168px !important;
        height: 136px !important;
        min-height: 136px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .overlay,
    .section .container-grid .herramientas-content-wrapper .arti2-item .overlay {
        display: block !important;
        position: absolute !important;
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 0 !important;
        opacity: 1 !important;
        background-color: rgba(13, 49, 64, 0.6) !important;
        overflow: hidden !important;
        transition: height 0.28s ease !important;
        border-radius: 0 !important;
    }

    .texto,
    .overlay .texto,
    .section .container-grid .herramientas-content-wrapper .arti2-item .texto {
        display: block !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 5px !important;
        color: #ffffff !important;
        font-family: 'Noto Sans', sans-serif !important;
        font-size: 10.4px !important;
        line-height: 1.12 !important;
        text-align: left !important;
        box-sizing: border-box !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    .content:hover .overlay,
    .content2:hover .overlay,
    .content3:hover .overlay,
    .content4:hover .overlay,
    .conten3:hover .overlay,
    .conten4:hover .overlay,
    .conten5:hover .overlay,
    .conten6:hover .overlay,
    .conten7:hover .overlay,
    .conten8:hover .overlay,
    .estadistica1:hover .overlay,
    .estadistica2:hover .overlay,
    .estadistica3:hover .overlay,
    .estadistica4:hover .overlay,
    .estadistica5:hover .overlay,
    .estadistica6:hover .overlay,
    .estadistica7:hover .overlay,
    .estadistica8:hover .overlay,
    .contentX:hover .overlay,
    .contentY:hover .overlay,
    .arti2-item:hover .overlay,
    .arti2-item:active .overlay,
    .arti2-item:focus-within .overlay,
    .arti2-item > a:hover .overlay,
    .arti2-item > a:active .overlay,
    .arti2-item > a:focus .overlay,
    .arti2-item > a:focus-visible .overlay {
        height: 100% !important;
    }
}


/* DESKTOP_OVERLAY_COLOR_STANDARD_1920 */
@media screen and (min-width: 1024px) {
    .overlay .texto,
    .section .container-grid .herramientas-content-wrapper .arti2-item .overlay .texto,
    .section .container-grid .herramientas-content-wrapper .arti2-item .texto {
        color: #ffffff !important;
    }
}

/* OVERLAY_COLOR_STANDARD_1920_ALL_RANGES */
@media screen and (max-width: 1023px) {
    .overlay .texto,
    .section .container-grid .herramientas-content-wrapper .arti2-item .overlay .texto,
    .section .container-grid .herramientas-content-wrapper .arti2-item .texto {
        color: #ffffff !important;
    }
}

/* BRECHAS_DESKTOP_CARD_SCALE_PLUS_20 */
@media screen and (min-width: 1024px) and (max-width: 1247px) {
    .brechasDerecha {
        max-width: 792px !important;
        grid-template-rows: repeat(2, 168px) !important;
    }

    .estadistica2,
    .estadistica3,
    .estadistica4,
    .estadistica5,
    .estadistica7,
    .estadistica8 {
        height: 168px !important;
        min-height: 168px !important;
    }
}

@media screen and (min-width: 1248px) and (max-width: 1470px) {
    .brechasDerecha {
        max-width: 792px !important;
        grid-template-rows: repeat(2, 168px) !important;
    }

    .estadistica2,
    .estadistica3,
    .estadistica4,
    .estadistica5,
    .estadistica7,
    .estadistica8 {
        height: 168px !important;
        min-height: 168px !important;
    }
}

@media screen and (min-width: 1471px) and (max-width: 1919px) {
    .brechasDerecha {
        max-width: 792px !important;
        grid-template-rows: repeat(2, 168px) !important;
    }

    .estadistica2,
    .estadistica3,
    .estadistica4,
    .estadistica5,
    .estadistica7,
    .estadistica8 {
        height: 168px !important;
        min-height: 168px !important;
    }
}

@media screen and (min-width: 1920px) {
    .brechasDerecha {
        max-width: 1014px !important;
        grid-template-rows: repeat(2, 240px) !important;
    }

    .estadistica2,
    .estadistica3,
    .estadistica4,
    .estadistica5,
    .estadistica7,
    .estadistica8 {
        height: 240px !important;
        min-height: 240px !important;
    }
}

/* BRECHAS_DESKTOP_OVERLAY_PADDING_FIX_2026:
   main.js fuerza width:100% en .overlay .texto; border-box evita que el padding
   quede fuera del ancho de la tarjeta y sea recortado por overflow:hidden. */
@media screen and (min-width: 1024px) {
    .brechasDerecha .overlay .texto {
        box-sizing: border-box !important;
        padding: 12px 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }
}

@media screen and (min-width: 1920px) {
    .brechasDerecha .overlay .texto {
        padding: 18px 20px !important;
    }
}
