.gallery {
    position: relative;
    z-index: 2;
    padding: 10px;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    transition: all 0.5s ease-in-out;
    transform: translateZ(0);
    max-width: 1200px;
    padding: 30px 30px 70px;
    margin: auto;
}

.gallery.pop {
    filter: blur(10px);
}

.gallery>div:not(.see_more) {
    flex-basis: calc(33.3% - 20px);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    margin: 10px;
}

.gallery>div.see_more {
    padding-top: 30px;
}

.gallery div img {
    width: 100%;
    height: 300px;
}

.gallery div figcaption {
    display: none;
}

.popup {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-in-out 0.2s;
}

.popup.pop {
    opacity: 1;
    transition: opacity 0.2s ease-in-out 0s;
}

.popup.pop>div {
    margin-top: 0;
    opacity: 1;
    visibility: visible !important;
}

.popup>div {
    opacity: 0;
    transform: translate(0, 0) !important;
}

.popup>div img {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.popup>div figcaption {
    position: absolute;
    bottom: 50px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.78));
    z-index: 2;
    width: 100%;
    padding: 100px 20px 20px 20px;
    color: #fff;
    font-size: 28px;
}

.popup>div figcaption small {
    font-size: 11px;
    display: block;
    text-transform: uppercase;
    margin-top: 12px;
    text-indent: 3px;
    opacity: 0.7;
    letter-spacing: 1px;
}

.popup .shadow {
    position: relative;
    z-index: 1;
    top: -56px;
    margin: 0 auto;
    background-position: center bottom;
    background-repeat: no-repeat;
    width: 98%;
    height: 50px;
    opacity: 0.9;
    filter: blur(16px) contrast(1.5);
    transform: scale(0.95, -0.7);
    transform-origin: center bottom;
}

.popup .close {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 25px;
    background: rgb(255 255 255 / 70%);
    box-shadow: 0 0 3px rgb(0 0 0 / 20%);
}

.popup .close svg {
    width: 72%;
    height: 72%;
}