.galeria{
    padding: 20px 7%;
    margin: 20px 0;
    background: var(--colorgris);
}

.galeria h4{
    z-index: 730;
    text-align: center;
    font-style: oblique;
    font-weight: 500;
    font-size: 5.5mm;
    text-justify: inter-word;
    color: black; /*var(--colorverde);*/
    margin: 15px 0;
}

.contenedor-imagenes{
    display:flex;
    width: 100%;
    margin: auto;
    justify-content: space-around;
    flex-wrap: wrap;
    border-radius:3px;
}

.contenedor-imagenes .imagen{
    width: 24.7%;
    position: relative;
    height:300px;
    margin: 2.5px 0;
    box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, .75)
}
.imagen img{
    width: 100%;
    height:100%;
    object-fit: cover;
}

.overlay{
    position: absolute;
    bottom: 0;
    left: 0;
    background:rgba(0, 118, 192, 0.781) ;
    width: 100%;
    height: 0;
    overflow: hidden;
    transition: .5s ease;
}

.overlay h2{
    color: #fff;
    font-weight: 300;
    font-size:30px;
    position: absolute;
    top: 50%;
    left:50%;
    text-align: center;
    transform: translate(-50%, -50%);
}

.imagen:hover .overlay{
    height:100%;
    cursor: pointer;
}

/*-----------------------------------------------*/
@media screen and (max-width:1700px){
    .galeria{
        padding: 20px 1%;
        margin: 20px 0;
        background: rgba(245, 245, 245, 1.0);
    }
}


@media screen and (max-width:1400px){
    .contenedor-imagenes{
        width: 100%;
    }
    .contenedor-imagenes .imagen{
        width: 33%;
    }
}

@media screen and (max-width:1000px){
    .contenedor-imagenes{
        width: 100%;
    }
    .contenedor-imagenes .imagen{
        width: 49.5%;
    }
}

@media screen and (max-width:550px){
    .contenedor-imagenes{
        width: 100%;
    }
    .contenedor-imagenes .imagen{
        width: 98%;
    }
}