.image-gallery{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.image-gallery > article {
    flex-basis: 250px; /*width: 250px;*/
    position: relative;
    cursor: pointer;
}

.image-gallery::after {
    content: "";
    flex-basis: 250px;
}

.image-gallery article img {
    object-fit: cover;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-radius: 5px;
}

.overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(57, 57, 57, 0.502);
    top: 0;
    left: 0;
    transform: scale(0);
    transition: all 0.2s 0.1s ease-in-out;
    color: #fff;
    border-radius: 5px;
    /* center overlay text */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* hover */
.image-gallery article:hover .overlay {
    transform: scale(1);
}