/************************************************************

                        IMAGE GALLERY

************************************************************/

.img-gallery {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-right: 25%;
}

.img-gallery-item {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.img-gallery-item:hover img {
    transform: scale(1.1);
    cursor: pointer;
}

.img-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s transform;
}





/************************************************************

                        POPUP IMAGE

************************************************************/

.popup-image {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .9);
    display: none;
    overflow: auto;
}

.popup-image span {
    position: fixed;
    top: 0.6em;
    right: 0.6em;
    color: white;
    font-size: 3em;
    cursor: pointer;
    transition: 0.2s transform;
}

.popup-image span:hover {
    transform: scale(1.2);
}

.popped-image-container {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    padding: 0 1.1em;
}

.popped-image img {
    width: 100%;
    height: auto;
    max-width: 700px;
    max-height: 1050px;
}





/************************************************************

                        MEDIA QUERIES

************************************************************/

@media only screen and (max-width: 950px) {
    .img-gallery-item {
        height: 320px;
    }
}



@media only screen and (max-width: 550px) {
    .img-gallery {
        margin-right: auto;
        margin-left: auto;
    }

    .img-gallery-item {
        height: 250px;
    }
}