main {
    margin: 3rem 5vw;
}

main section{
    margin-bottom:5rem;
}

.gallery {
    display: grid;
    max-width: 1600px;
    justify-content: center;
    margin: auto;
    gap: 40px;
    text-align: center;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

figcaption{
    line-height: 25px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 10px;
}

.gallery img {
    display: block;
    /* max-width: 300px;
    min-height: 300px; */
    width: 100%;
    margin: 0px auto;
    margin-bottom: 0px;
    border-radius: 5px;
    cursor: pointer;
    object-fit: cover;
}

.gallery div img:hover {
    opacity: .5;
}

/* Style the images used to trigger the modal */
.modal-img {
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

/* The Modal (background) */
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    padding-top: 200px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.9);
}

/* Modal Content (image) */
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

/* Caption of Modal Image */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-weight: 500;
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
    letter-spacing: 5px;
}

/* Add Animation - Zoom in the Modal */
.modal-content, #caption {
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

/* The Close Button */
.close {
    position: absolute;
    right: 10vw;
    top: 100px;
    color: #f1f1f1;
    font-size: 60px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media screen and (min-width: 1100px) {
    .gallery {
        grid-template-columns: repeat(3, minmax(300px, 1fr));
    }

    /* .gallery > div:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 400px;
    } */

    .close {margin-right:15%;}

}