.block-masonry .mlist-holder {
    -moz-columns: 4;
         columns: 4;
    margin:0;
    padding:0;
    -moz-column-gap: 6px;
         column-gap: 6px;
    -moz-column-fill: balance-all;
         column-fill: balance-all;
}

.block-masonry .mlist-item {
    margin:0 0 6px;
    -moz-column-break-inside: avoid;
         break-inside: avoid-column;
}

.block-masonry .mlist-item img {
    display:block;
    max-width:100%;
    height:auto;
    pointer-events: none;
    will-change:transform, opacity;
}

@media only screen and (min-width: 768px) {
    .img-masonry{
        height:3px;
        overflow: hidden;
        padding-bottom:78.62%;
        position: relative;
    }
    .img-masonry img{
        min-height:100%;
        min-width:100%;
        position: absolute;
        left:0;
        top:0;
        -o-object-fit: cover;
           object-fit: cover;
        -o-object-position: center;
           object-position: center;
    }
    .mlist-holder .mlist-item:nth-child(2) .img-masonry{padding-bottom:89.72%;}
    .mlist-holder .mlist-item:nth-child(3) .img-masonry{padding-bottom:93.41%;}
    .mlist-holder .mlist-item:nth-child(4) .img-masonry{padding-bottom:74.93%;}
    .mlist-holder .mlist-item:nth-child(5) .img-masonry{padding-bottom:56.52%;}
    .mlist-holder .mlist-item:nth-child(6) .img-masonry{padding-bottom:111.82%;}
    .mlist-holder .mlist-item:nth-child(7) .img-masonry{padding-bottom:99.73%;}
    .mlist-holder .mlist-item:nth-child(8) .img-masonry{padding-bottom:68.61%;}
}

@media only screen and (max-width: 767px) {
    .block-masonry .mlist-holder {
        columns: 3;
        -webkit-columns: 3;
        -moz-columns: 3;
    }
}

@media only screen and (max-width: 595px) {
    .block-masonry .mlist-holder {
        columns: 2;
        -webkit-columns: 2;
        -moz-columns: 2;
    }
}

.preview-image{
    -o-object-fit: contain !important;
       object-fit: contain !important;
    max-width:100% !important;
}

@media only screen and (max-width: 595px) {
        .safari-type .block-masonry .mlist-holder {
            -moz-columns:auto;
                 columns:auto;
        }
        .safari-type .block-masonry .mlist-holder:after{
            content:'';
            display:block;
            clear:both;
        }
        .safari-type .mlist-holder .mlist-item{
            height:auto;
            width:46%;
            margin:5px 2%;
            float:left;
        }
        .safari-type .mlist-holder .mlist-item:nth-child(2n){
            float:right;
        }
}
