

.rot-block-gallery ul{
    list-style: none;
    padding-left:0;
}

@media(min-width:576px){
    /*every 7th and 11th pic superwide landscape in 3-columns*/
    .rot-block-gallery ul>li:nth-child(7):not(.col-xl-3),
    .rot-block-gallery ul>li:nth-child(11):not(.col-xl-3){
        flex: 0 0 100%; max-width:100%; width:100%;
    }
    .rot-block-gallery ul>li:nth-child(7):not(.col-xl-3) figure,
    .rot-block-gallery ul>li:nth-child(11):not(.col-xl-3) figure{
        height: 1px;
        padding-bottom: 38.4%;
        position: relative;
        width: 100%;
    }
    .rot-block-gallery ul>li:nth-child(7):not(.col-xl-3) figure img,
    .rot-block-gallery ul>li:nth-child(11):not(.col-xl-3) figure img{
        position:absolute;
        width: 100%;
    }
}
.rot-block-gallery,
.wp-block-gallery {
    display:block;
    position: relative;
    /* width:100%; */
}
.rot-block-gallery .row,
.blocks-gallery-grid{
    position:relative;
    margin-right:-5px;
    margin-left:-5px;
}
.rot-block-gallery [class*="col-"]{
    margin-bottom:10px;
    padding-left:5px;
    padding-right:5px;
}
/* .rot-block-gallery [class*="col-"], */
.blocks-gallery-item{
    position:relative;
    display:block!important;
}
.rot-blocks-gallery-item figure{
    margin:0;
}
.rot-blocks-gallery-item figcaption{
    padding-top: 0;
    padding-bottom: .75rem;
    color: white;
    text-align: left;
    position: absolute;
    bottom: 0;
    margin-left: 5%;
    margin-bottom: 0.5rem;
    max-width: 90%;
    padding: 0.4rem 1rem;
    background: rgba(0,0,0,0.4);
    background:rgba(125, 180, 213, 0.9);
}
.rot-blocks-gallery-item.landscape{
    position:relative;
    display:flex;
}
.rot-blocks-gallery-item.landscape img{
    height:100%;
    object-fit:cover;
}

.rot-blocks-gallery-item.portrait{
    height:0;
    padding-bottom:100%;
    overflow:hidden;
}
.rot-blocks-gallery-item.portrait img{
    height:100%;
    object-fit:cover;
    min-width:100%;
}

/* .rot-block-gallery .rot-blocks-gallery-item figure, */
/* .rot-block-gallery .rot-blocks-gallery-image figure, */
.rot-block-gallery .blocks-gallery-item figure,
.rot-block-gallery .blocks-gallery-image figure,
.blocks-gallery-grid .blocks-gallery-image figure,
.blocks-gallery-grid .blocks-gallery-item figure,
.wp-block-gallery .blocks-gallery-image figure,
.wp-block-gallery .blocks-gallery-item figure .blocks-gallery-item figure{
    position:relative;
    display:block!important;
    height:0;
    padding-bottom: 133%;
}
/* .rot-block-gallery .rot-blocks-gallery-item figure img, */
.rot-block-gallery .blocks-gallery-item figure img,
.wp-block-gallery.is-cropped .blocks-gallery-item figure img {
    position:absolute;
    display:block!important;
    height:100%;
    object-position:center;
    object-fit:cover;
    flex:1;
    min-width:100%;
}
@media(min-width:576px){
    .rot-blocks-gallery-item.portrait{
        height:auto;
        padding-bottom:0;
        overflow:hidden;
    }
}
@media(min-width:768px){
    .rot-blocks-gallery-item.portrait figure{
        height:0;
        padding-bottom:120%;
        position:relative;
    }
    .rot-blocks-gallery-item.portrait img{
        position: absolute;
    }
}
@media(min-width:992px){
    .rot-block-gallery.total-items-5 .rot-blocks-gallery-item:nth-child(4),
    .rot-block-gallery.total-items-5 .rot-blocks-gallery-item:nth-child(5){
        -ms-flex: 0 0 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media(min-width:1200px){
    /* .rot-block-gallery .rot-blocks-gallery-item figure, */
    /* .rot-block-gallery .rot-blocks-gallery-image figure, */
    .rot-block-gallery .blocks-gallery-item figure,
    .rot-block-gallery .blocks-gallery-image figure,
    .blocks-gallery-grid .blocks-gallery-image figure,
    .blocks-gallery-grid .blocks-gallery-item figure,
    .wp-block-gallery .blocks-gallery-image figure,
    .wp-block-gallery .blocks-gallery-item figure .blocks-gallery-item figure{
        padding-bottom: 75%;
    }
    /* .rot-block-gallery .rot-blocks-gallery-item figure img, */
    .rot-block-gallery .blocks-gallery-item figure img,
    .wp-block-gallery.is-cropped .blocks-gallery-item figure img {
        object-position:25% 25%;
    }
}
@media(min-width:576px) and (max-width:991px){
    .rot-block-gallery.total-items-5 .rot-blocks-gallery-item:nth-child(5){
        flex: 0 0 100%; max-width:100%; width:100%;
    }
    .rot-block-gallery.total-items-5 .rot-blocks-gallery-item:nth-child(5) figure{
        height: 1px;
        padding-bottom: 38.4%;
        position: relative;
        width: 100%;
    }
    .rot-block-gallery.total-items-5 .rot-blocks-gallery-item:nth-child(5) figure img{
        position:absolute;
        width: 100%;
    }
}