/*** Media Gallery ***/
.gallery h2 {
    text-align: center;
    margin-bottom: 40px;
}

.gallery .gallery-wrap {
    position: relative;
}

.gallery .gallery-wrap:not(.masonry) {
    display: flex;
    flex-wrap: wrap;
    width: calc(100% + 40px);
    left: -20px;
    justify-content: center;
}

.gallery .gallery-wrap:not(.masonry) > div {
    width: 20%;
    padding: 0 20px;
    position: relative;
    margin-bottom: 40px;
    height: 100%;
}

.gallery .gallery-wrap > div a {
    display: block;
    position: relative;
    overflow: hidden;
    height: 100%;
    border: 2px solid #888;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.gallery-item img {
    width: 100%;
    padding: 0;
    height: 100%;
    object-fit: cover;
}

.gallery .gallery-wrap > div a svg {
    width: 12px;
    fill: var(--cta);
    transition: all 300ms;
    top: 0;
}

.gallery .gallery-wrap > div a .icon {
    background: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 10px;
    right: 10px;
    transition: all 300ms;
}

.gallery .gallery-wrap > div.video a svg {
    width: 8px;
    height: 100%;
}

.gallery .gallery-wrap > div a:hover:before {
    opacity: 0;
}

.gallery .gallery-wrap > div a:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: all 300ms;
    opacity: 1;
}

.gallery .gallery-wrap > div a:hover .icon {
    background: var(--cta);
}

.gallery .gallery-wrap > div a:hover .icon svg {
    fill: #fff;
}

.gallery .f-text {
    margin-bottom: 40px;
}

.masonry {
	column-count: 4;
	column-gap: 16px;
}

.masonry .gallery-item {
  display: inline-block;
  margin-bottom: 16px;
  width: 100%;
}

.gallery .gallery-item:not(.masonry) img {
    /* padding: 4px; */
    min-height: 250px;
}


@media only screen and (max-width:1400px) {
    .gallery .gallery-wrap>div {
        width: 25%;
    }
}

@media only screen and (max-width:1100px) {
    .gallery .gallery-wrap>div {
        width: 33.33%;
    }
}

@media only screen and (max-width:850px) {
    .gallery .gallery-wrap>div {
        width: 50%;
    }
}

@media only screen and (max-width:550px) {
    .gallery .gallery-wrap>div {
        width: 100%;
        padding: 0;
    }

    .gallery .gallery-wrap {
        left: auto;
        width: 100%;
    }
}