.photo-gallery{
    padding: 0.5em 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-template-rows: 200px;
    grid-gap: 0.5em;
    /* grid-auto-rows: 350px; */
    grid-auto-flow: dense;
}

@media (max-width: 785px) {
    .photo-gallery {
      /* padding: 0.5em; */
      grid-gap: 0.25em;
    }
}

.photo-gallery .item {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

.photo-gallery .item:nth-of-type(3n) {
    grid-column: span 2;
}
@media (max-width: 500px) {
    .photo-gallery .item:nth-of-type(3n) {
        grid-column: span 1;
    }
}

.photo-gallery .item:nth-of-type(4n) {
    grid-row: span 2;
}
.photo-gallery .item img {
    height: 100%;
    width: 100%;
    -o-object-fit: cover;
        object-fit: cover;
        object-position: top center;
    border-radius: var(--border-radius);
    transition: var(--transition);
}
.photo-gallery .item img:hover {
    cursor: pointer;
    filter: brightness(1.15);
    transform: scale(1.015);
}

.modal {
    align-items: center;
    display: none;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    position: fixed;
    z-index: 60;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
}
.modal.is-active {
    display: flex;
}

.modal-background {
    background-color: rgba(10,10,10,.86);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.modal-card, .modal-content {
    margin: 0 20px;
    text-align: center;
    max-height: calc(100vh - 160px);
    /* overflow: auto; */
    position: relative;
    width: 100%;
}
@media screen and (min-width: 769px) {
    .modal-card, .modal-content {
        margin: 0 auto;
        max-height: calc(100vh - 40px);
        position: relative;
        width: 100%;
    }
}

.modal-content img {
    height: auto;
    max-width: 100%;
    overflow: auto;
}

.modal-close {
    background: 0 0;
    height: 75px;
    position: fixed;
    right: 20px;
    top: 20px;
    width: 75px;
    border: none;
    cursor: pointer;
    pointer-events: auto;
}
.modal-close:hover{
    border-radius: 290486px;
    background-color: rgba(10,10,10,.75);
}

.modal-close::after {
    height: 50%;
    width: 4px;
}
.modal-close::before {
    height: 4px;
    width: 50%;
}
.modal-close::after, .modal-close::before {
    background-color: #fff;
    content: "";
    display: block;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
    transform-origin: center center;
}