.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin: 50px 25px;
}

.gallery img {
    height: 250px;
    width: auto;
    cursor: pointer;
    display: block;
    flex-grow: 1;
    object-fit: cover;
    border: 2px solid white;
}

.gallery div {
    display: block;
    width: 100%;
    position: relative;
}

.gallery div h2 {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 32px;
    color: var(--main-color-green);
}

.gallery div span {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    flex-direction: row;
}

.image-popup img {
    max-height: 80%;
    max-width: 80%;
    width: auto;
    height: auto;
}

@media screen and (max-width: 740px) {
    .gallery {
        margin: 0px 20px;
    }

    .image-popup img {
        max-width: 96%;
    }
}

@media screen and (max-width: 540px) {
    .gallery {
        margin: 0px 10px;
    }
}

@media screen and (max-width: 400px) {
    .gallery img {
        width: 100%;
    }
}