:root{
    /* ==============
    Variables 6 columnas */
    --espacio_gImg6Col: 10px; /* Espacio entre columnas*/
    --espacioTot_gImg6Col: calc(var(--espacio_gImg6Col) * 1);
    --anchoTot_gImg6Col: calc(100% - var(--espacioTot_gImg6Col));
    --ancho_gImg6Col: calc(var(--anchoTot_gImg6Col) / 2); /* Ancho de cada columna. */
}
/* ==============
    6 columnas */
    .gImg6Col{ /* Ancho de cada columna */
        width: var(--ancho_gImg6Col);
        margin-bottom: 10px;
        margin-right: var(--espacio_gImg6Col);
    }    
    img.gImg6Col:nth-last-child(-n+2){/* Lòs últimos 6 */
        margin-bottom: 0;
    }
    img.gImg6Col:nth-child(2n){/* cada 6 */
        margin-right: 0;
    }



.gImg1_gallery {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

.gImg1_thumbnail {
    height: 150px;
    object-fit: cover;
    cursor: pointer;
}

#gImg1_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    text-align: center;
    opacity: 0;
    -webkit-transition: all 0.5s linear;
    -moz-transition: all 0.5s linear;
    -o-transition: all 0.5s linear;
    -ms-transition: all 0.5s linear;
    transition: all 0.5s linear;
}

#gImg1_closeBtn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
}

#gImg1_expandedImg {
    max-width: 80%;
    max-height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
}
@keyframes gImg1_Ani1 {
    from { opacity: 0;}
    to { opacity: 1; }
}
@keyframes gImg1_Ani2 {
    from { transform: translate(-50%, -50%);}
    to { transform: translate(300%, -50%); }
}
.gImg1_navBtn {
    position: absolute;
    top: 50%;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
}

#gImg1_prevBtn {
    left: 20px;
}

#gImg1_nextBtn {
    right: 20px;
}

@media only screen and (min-width: 398px) {
    :root{
        /* ==============
        Variables 6 columnas */
        --espacioTot_gImg6Col: calc(var(--espacio_gImg6Col) * 2);
        --ancho_gImg6Col: calc(var(--anchoTot_gImg6Col) / 3); /* Ancho de cada columna. */
    }
    /* ==============
    6 columnas */ 
    img.gImg6Col:nth-child(2n){
        margin-right: var(--espacio_gImg6Col);
    }
    img.gImg6Col:nth-last-child(-n+3){/* Lòs últimos 6 */
        margin-bottom: 0;
    }
    img.gImg6Col:nth-child(3n){/* cada 6 */
        margin-right: 0;
    }
}
@media only screen and (min-width: 480px) {

} 
@media only screen and (min-width: 608px) {

}
/* Ancho horizontal del celular Xiomi 11 Ancho:395px - 790px*/
@media only screen and (min-width: 768px) {
    :root{
        /* ==============
        Variables 6 columnas */
        --espacioTot_gImg6Col: calc(var(--espacio_gImg6Col) * 3);
        --ancho_gImg6Col: calc(var(--anchoTot_gImg6Col) / 4); /* Ancho de cada columna. */
    }
    /* ==============
    6 columnas */ 
    img.gImg6Col:nth-child(2n){
        margin-right: var(--espacio_gImg6Col);
    }
    img.gImg6Col:nth-child(3n){
        margin-right: var(--espacio_gImg6Col);
    }
    img.gImg6Col:nth-last-child(-n+4){/* Lòs últimos 6 */
        margin-bottom: 0;
    }
    img.gImg6Col:nth-child(4n){/* cada 6 */
        margin-right: 0;
    }
}
@media only screen and (min-width: 1024px) {
    :root{
        /* ==============
        Variables 6 columnas */
        --espacioTot_gImg6Col: calc(var(--espacio_gImg6Col) * 4);
        --anchoTot_gImg6Col: calc(100% - var(--espacioTot_gImg6Col));
        --ancho_gImg6Col: calc(var(--anchoTot_gImg6Col) / 5); /* Ancho de cada columna. */
    }
    /* ==============
    6 columnas */ 
    img.gImg6Col:nth-child(4n){
        margin-right: var(--espacio_gImg6Col);
    }
    img.gImg6Col:nth-last-child(-n+5){/* Lòs últimos 6 */
        margin-bottom: 0;
    }
    img.gImg6Col:nth-child(5n){/* cada 6 */
        margin-right: 0;
    }
}
@media only screen and (min-width: 1140px) {
    :root{
        /* ==============
        Variables 6 columnas */
        --espacioTot_gImg6Col: calc(var(--espacio_gImg6Col) * 5);
        --anchoTot_gImg6Col: calc(100% - var(--espacioTot_gImg6Col));
        --ancho_gImg6Col: calc(var(--anchoTot_gImg6Col) / 6); /* Ancho de cada columna. */
    }
    /* ==============
    6 columnas */ 
    img.gImg6Col:nth-child(5n){
        margin-right: var(--espacio_gImg6Col);
    }
    img.gImg6Col:nth-last-child(-n+6){/* Lòs últimos 6 */
        margin-bottom: 0;
    }
    img.gImg6Col:nth-child(6n){/* cada 6 */
        margin-right: 0;
    }
}
