
.grid .gallery-wrapper {
    overflow: hidden;
}
.masonry .gallery-wrapper {
    position: relative;
}

.grid .gallery-1-cols .image,
.grid .gallery-2-cols .image,
.grid .gallery-3-cols .image,
.grid .gallery-4-cols .image,
.grid .gallery-5-cols .image,
.grid .gallery-6-cols .image {
    float: left;
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
    width: 100%;
}
.grid.no-gap .image {
    padding-left: 0;
    padding-right: 0;
}
.grid .image {
    margin-bottom: 30px;
}
.gallery .inner a {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 2;
    text-indent: -9999em;
}
.gallery .inner {
    position: relative;
}
.gallery .inner .caption {
    background-color: rgba(0, 0, 0, .4);
    bottom: 0;
    color: #fff;
    left: 0;
    padding: 10px 20px;
    position: absolute;
    width: 100%;
}
.gallery.hide-captions .caption {
    display: none;
}

@media (min-width: 767px) {
    .masonry .gallery-2-cols .grid-sizer,
    .masonry .gallery-2-cols .grid-item,
    .grid .gallery-2-cols .image {
        width: 50%;
    }
    .masonry .gallery-3-cols .grid-sizer,
    .masonry .gallery-3-cols .grid-item,
    .grid .gallery-3-cols .image {
        width: 33.33333333%;
    }
    .masonry .gallery-4-cols .grid-sizer,
    .masonry .gallery-4-cols .grid-item,
    .grid .gallery-4-cols .image {
        width: 25%;
    }
    .masonry .gallery-5-cols .grid-sizer,
    .masonry .gallery-5-cols .grid-item,
    .grid .gallery-5-cols .image {
        width: 20%;
    }
    .masonry .gallery-6-cols .grid-sizer,
    .masonry .gallery-6-cols .grid-item,
    .grid .gallery-6-cols .image {
        width: 16.66666666%;
    }
}
