.gallery_grid_wide{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-gap: 1em;
    margin: 20px 0;
}

.gallery_grid_wide img{width: 100%; display: block;}

.gallery_modal{
    position: fixed;
    top: 10px; left: 10px;
    width: calc(100% - 20px);
    height: 100%;
    background: rgba(0,0,0,0.8);
    overflow: hidden;
    z-index: -1;
    opacity: 0;
    transition-duration: 0.5s;
}

body .gallery_modal.show{
    top: 10px;
    height: calc(100vh - 20px);
    opacity: 1;
    z-index: 100;
}

body.wp_logged_in .gallery_modal.show{
    top: 42px; 
    height: 100%;
}

body .gallery_modal .gallery_content{
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
}

body .gallery_modal .gallery_content .slide{
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-position: center!important;
    transition-duration: 1;
    opacity: 0;
}

body .gallery_modal .gallery_content .slide.active{
    opacity: 1;
}

.gallery_modal .close{
    position: absolute; top: 10px; right: 10px;
    width: 30px; height: 30px;
    cursor: pointer;
}

.gallery_modal .close::before{
    content: "";
    position: absolute;
    top: 50%; left: 0;
    width: 100%; border-top: 1px solid #999;
    transform: rotate(-45deg);
}

.gallery_modal .close::after{
    content: "";
    position: absolute;
    top: 50%; left: 0;
    width: 100%; border-top: 1px solid #999;
    transform: rotate(45deg);
}

.gallery_modal .gallery_nav{
    position: absolute;
    top: 50%;
    width: 50px; height: 50px;
    background: rgba(0,0,0,0.5);
    transform: translateY(-50%);
    cursor: pointer;
}

.gallery_modal .gallery_nav.left{left: 0;}
.gallery_modal .gallery_nav.right{right: 0;}

.gallery_modal .gallery_nav.left::after{
    content: "";
    position: absolute;
    width: 20px; height: 20px;
    top: 50%; left: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(135deg);
    border-right: 1px solid white;
    border-bottom: 1px solid white;
}

.gallery_modal .gallery_nav.right::after{
    content: "";
    position: absolute;
    width: 20px; height: 20px;
    top: 50%; left: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(135deg);
    border-left: 1px solid white;
    border-top: 1px solid white;
}


