/*------------------------------------------------------------------------------ gallery */
.gallery {
    font-size: 0;
}

.gallery-filter {
    display: inline-block;
    margin: 0 10px;
    cursor: pointer;
    -webkit-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    transition: all 0.2s linear;
}

.gallery-filter.gallery-filter-first {
    margin: 0 10px 0 0;
}

.gallery-filter.gallery-filter-active,
.gallery-filter:hover {
    color: #3bbded;
}

.gallery-items {
    width: 104%;
    margin-left: -2%;
}

.gallery-item .gallery-item-image {
    height: 200px;
    background-size: cover;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
    margin-bottom: 20px;
    position: relative;
    font-size: 0;
    cursor: pointer;
}

.gallery-item .gallery-item-image .gallery-item-image-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #282f38;
    opacity: 0;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
    -webkit-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    transition: all 0.2s linear;
}

.gallery-item .gallery-item-image .gallery-item-image-pattern:hover {
    opacity: 0.95;
}

.gallery-item .gallery-item-image .gallery-item-image-pattern span {
    color: #fff;
    font-weight: 700;
    font-size: 25px;
    text-align: center;
    width: 160px;
    position: absolute;
    left: 50%;
    margin-left: -80px;
    top: 50%;
    margin-top: -15px;
}

/*------------------------------------------------------------------------------ gallery popup */
#gallery-popup {
    display: none;
}

#gallery-popup .gallery-popup-background {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #1b1b1b;
    z-index: 5001;
    opacity: 0;
}

#gallery-popup .gallery-popup-content {
    position: fixed;
    background-size: cover;
    top: 50%;
    left: 50%;
    z-index: 99999;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba( 0, 0, 0, 0.2 );
}

#gallery-popup .gallery-popup-content .gallery-popup-prev-image {
    height: 100px;
    width: 40px;
    background: red;
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -50px;
    -webkit-border-top-right-radius: 3px;
    -moz-border-top-right-radius: 3px;
    border-top-right-radius: 3px;
    -webkit-border-bottom-right-radius: 3px;
    -moz-border-bottom-right-radius: 3px;
    border-bottom-right-radius: 3px;
    cursor: pointer;
    background: #fff;
    opacity: 0.1;
    -webkit-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    transition: all 0.2s linear;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#gallery-popup .gallery-popup-content .gallery-popup-next-image {
    height: 100px;
    width: 40px;
    background: red;
    position: absolute;
    right: 0;
    top: 50%;
    margin-top: -50px;
    -webkit-border-top-left-radius: 3px;
    -moz-border-top-left-radius: 3px;
    border-top-left-radius: 3px;
    -webkit-border-bottom-left-radius: 3px;
    -moz-border-bottom-left-radius: 3px;
    border-bottom-left-radius: 3px;
    cursor: pointer;
    background: #fff;
    opacity: 0.1;
    -webkit-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    transition: all 0.2s linear;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#gallery-popup .gallery-popup-content .gallery-popup-prev-image img {
    position: absolute;
    font-size: 40px;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -13px;
}

#gallery-popup .gallery-popup-content .gallery-popup-next-image img {
    position: absolute;
    font-size: 40px;
    top: 50%;
    right: 50%;
    margin-top: -20px;
    margin-right: -13px;
}

#gallery-popup .gallery-popup-content .gallery-popup-next-image:hover,
#gallery-popup .gallery-popup-content .gallery-popup-prev-image:hover {
    opacity: 0.2;
}

/*------------------------------------------------------------------------------ responsive */
@media (min-width: 1150px) {

    .gallery-item {
        width: 279.33px;
        display: inline-block;
        vertical-align: top;
        text-align: center;
        margin: 0 2%;
        margin-bottom: 20px;
    }
    
    .gallery-item.gallery-item-bottom {
        margin-bottom: 0;
    }
}

@media (min-width: 850px) and (max-width: 1149px) {

    .gallery-item {
        width: 203.5px;
        display: inline-block;
        vertical-align: top;
        text-align: center;
        margin: 0 2%;
        margin-bottom: 20px;
    }
    
    .gallery-item.gallery-item-bottom {
        margin-bottom: 0;
    }
}

@media (min-width: 600px) and (max-width: 849px) {

    .gallery-item {
        width: auto;
        display: block;
        vertical-align: top;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .gallery-item.gallery-item-last {
        margin-bottom: 0;
    }
}

@media (max-width: 599px) {

    .gallery-item {
        width: auto;
        display: block;
        vertical-align: top;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .gallery-item.gallery-item-last {
        margin-bottom: 0;
    }
}