/* IMAGE GRID CSS */
.gallery {
    display: grid;
}

.gallery_content {
    width: 100%;
    height: auto;   
    position: relative; /* positions images and text in the grid's relative positions*/
}

.gallery_image-overlay {
    transition: .30s ease;
    opacity: 0;
    position: absolute; /* keeps the overlay within image box */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gallery_image-text {
    color: #fffff0;
    font-family: 'Josefin Sans', sans-serif;
    text-align: center;
}

.gallery_content:hover .gallery_image_mobile, .gallery_content:hover .gallery_image_small {
    opacity: 0.3;
}
.gallery_content:hover .gallery_image-overlay {
    opacity: 1;
}

@media only screen and (min-width: 1080px) and (max-width : 3000px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Auto adjust columns on rows based on screen size*/
        grid-gap: 2.4vw; /* Gap between the grid rows and columns*/
    }

    .gallery_image_small {
        width: 100%;
        height: auto;
    }

    .gallery_image_mobile {
        display: none;
    }

    .gallery_image-text {
        font-size: 30px;
        font-weight: 100;
    }
}

@media only screen and (max-width : 1080px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Auto adjust columns on rows based on screen size*/
        grid-gap: 2%; /* Gap between the grid rows and columns*/
    }
    
    .gallery_image_mobile {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .gallery_image_small {
        display: none;
    }

    .gallery_image-text {
        font-size: 30px;
        font-weight: 100;
    }
}