/* ########################################################################## */
/* GALLERY */
/* ########################################################################## */

.has_gallery .content_wrapper {
    padding-top: 0;
}

.has_gallery main {
    display: flex;
    margin-right: 0;
    /*margin-right: -5rem;*/
}

.has_gallery .item-page {
    width: 50%;
}

.has_gallery .item-page div[itemprop="articleBody"] {
    padding-top: 0;
    padding-right: 90px;
}

.has_gallery .gallery_block {
    width: 50%;
    display: flex;
    flex-direction: column;
}

.has_gallery .gallery_block,
.has_gallery .gallery_block [id^="rc_gallery_"] {
    position: relative;
    right: 0;
}

.has_gallery_horizontal .gallery_block [id^="rc_gallery_"] a,
.has_gallery .gallery_block [id^="rc_gallery_"] a {
    /*max-width: calc(50% - 2px);*/
    position: relative;
}

.has_gallery_horizontal .gallery_block [id^="rc_gallery_"] a:after,
.has_gallery .gallery_block [id^="rc_gallery_"] a:after {
    content: '\F14D';
    font-family: "bootstrap-icons";
    font-size: 68px;
    color: #222;

    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;

    transition: all 300ms ease-in-out;

    background-color: rgba(255,255,255,0.9);
}

.has_gallery_horizontal .gallery_block [id^="rc_gallery_"] a:hover:after,
.has_gallery .gallery_block [id^="rc_gallery_"] a:hover:after {
    opacity: 1;
    visibility: visible;
}

.under_gallery_block {
    margin-top: 3rem;
}

.has_gallery_horizontal .gallery_block {
    width: 100%;
    display: inline-block;
    margin: 2rem 0;
}

.has_gallery_horizontal .gallery_block .rc_gallery {
    flex-wrap: wrap;
    /*flex-wrap: nowrap;*/
    justify-content: stretch;
}

.has_gallery_horizontal #rc_gallery_1.rc_gallery .rc_galleryimg {
    width: 100% !important;
    height: auto !important;
}

.has_gallery_horizontal .gallery_block {
    display: flex;
}

.has_gallery_horizontal .gallery_block .rc_gallery {
    /*flex-grow: 1;*/
}

.has_gallery_horizontal .gallery_block [id^="rc_gallery_"] a {
    max-width: 25%;
    /*flex-grow: 1;*/
    display: flex;
    padding: 1px;
}

.has_gallery_horizontal .rc_gallery div.rc_galleryimg_container {
    width: 100%;
}

@media (max-width: 1499px) {
    .has_gallery main {
        margin-right: 0;
        /*margin-right: -5rem;*/
    }

    .has_gallery .item-page div[itemprop="articleBody"] {
        padding-right: 60px;
    }
}

@media (max-width: 840px) {
    .has_gallery_horizontal .gallery_block .rc_gallery {
        flex-wrap: wrap;
    }

    .has_gallery_horizontal .gallery_block [id^="rc_gallery_"] a {
        max-width: 100%;
        flex-grow: 1;
    }
}

@media (max-width: 800px) {
    .has_gallery main {
        flex-direction: column;
        margin-right: 0 !important
    }

    .has_gallery .item-page {
        width: 100%;
    }

    .has_gallery .gallery_block,
    .has_gallery .gallery_block [id^="rc_gallery_"] {
        width: 100%;
        right: 0px;
    }

    .has_gallery .item-page div[itemprop="articleBody"] {
        padding-right: 0;
        padding-bottom: 90px;
    }
}

@media (max-width: 800px) {
    .has_gallery .gallery_block [id^="rc_gallery_"] a,
    .rc_gallery div.rc_galleryimg_container,
    .rc_gallery div.rc_galleryimg_container picture {
        width: 100%;
    }

    #rc_gallery_1.rc_gallery .rc_galleryimg {
        width: 100% !important;
        height: auto !important;
    }
}