/*
* {
    border: 1px solid red;
}
*/

#lightbox {
    position: fixed;
    z-index: 10000;
    top: 0;
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
}

#lightbox .img-container {
    max-width: 1000px;
    margin-left: 40px;
    margin-right: 40px;
    vertical-align: middle;
    border: 10px solid white;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
    background: white;
    position: relative;
}

#lightbox .img-container p {
    text-align: center;
    margin: 10px 0 0 0;
    padding: 0;
}

#lightbox .img-container img {
    max-width: 100%;
    max-height: 100vh;
    /*    width: 100%;*/
    height: auto;
    border-radius: 3px;
}


/* nav */

#lightbox nav {
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    top: 0;
    width: 100%;
    height: 100%;
}

#lightbox nav span {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    top: 0;
    width: 50%;
    height: 100%;
    /*                background: #47a3da;*/
    color: #fff;
    font-size: 20px;
    text-align: center;
    cursor: pointer;
    font-weight: normal;
    padding: 20px 10px 10px 10px;
    color: black;
    opacity: .4;
}

#lightbox nav span i {
    /*     opacity: .4;*/
    /*     color: white;*/
    -webkit-align-self: center;
    -ms-flex-item-align: center;
    align-self: center;
}

#lightbox nav span:hover {
    opacity: 1;
}

#lightbox nav span.cm-close:hover {
    opacity: 1;
    color: red;
}

#lightbox .transparent-close.cm-close {
    position: fixed;
    z-index: -1;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

#lightbox nav span.cm-close {
    /*     right: 0px;*/
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: center;
}

#lightbox nav span.cm-next {
    right: 0px;
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
}

#lightbox nav span.cm-prev {
    left: 0px;
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
}

@media(max-width:767px) {
    /* lightbox in mobile devices */
    #lightbox .img-container {
        min-width: 100%;
        margin-left: 0px;
        margin-right: 0px;
        vertical-align: middle;
        border: 0px solid white;
        position: relative;
        background-color: transparent;
        text-align: center;
    }
    #lightbox .img-container img {
        border-radius: 0px;
        max-width: 100%;
        max-height: 100vh;
    }
    /* nav mobile */
    #lightbox nav {
        position: absolute;
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
    }
    #lightbox nav span {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        top: 0;
        width: 50%;
        height: 100%;
        color: #fff;
        font-size: 20px;
        text-align: center;
        cursor: pointer;
        font-weight: normal;
        padding: 20px 10px 10px 10px;
        opacity: .4;
    }
    #lightbox nav span i {
        /*     opacity: .4;*/
        /*     color: white;*/
        -webkit-align-self: center;
        -ms-flex-item-align: center;
        align-self: center;
        text-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
    }
    #lightbox nav span:hover {
        opacity: 1;
    }
    #lightbox nav span.cm-close:hover {
        opacity: 1;
        color: red;
    }
    #lightbox span.cm-close-mobile {
        z-index: 10000;
        right: 20px;
        top: 0px;
        padding: 9px 11px 9px 15px;
        background-color: dimgray;
        color: white;
        position: fixed;
    }
    #lightbox span.cm-close-mobile:hover {
        background-color: red;
    }
    #lightbox .transparent-close.cm-close {
        background-color: rgba(0, 0, 0, 0.9);
    }
    /*    xs    */
    .flex-xs-100 {
        width: 100%;
    }
    .flex-xs-50 {
        width: 50%;
    }
}

@media(min-width:768px) {
    /*    md    */
    .flex-md-25 {
        width: 25%;
    }
    .flex-md-33 {
        width: 33.33%;
    }
}

@media(min-width:992px) {
    /*    sm    */
    .flex-sm-25 {
        width: 25%;
    }
    .flex-sm-33 {
        width: 33.33%;
    }
}

@media(min-width:1200px) {
    /*    lg    */
    .flex-lg-25 {
        width: 25%;
    }
}

.flex-child {
    padding: 20px;
}

.flex-wrap {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.cm_gallery {
    display: none;
}

.cm_gallery.active {
    display: block;
}

.gallery-menu {
    position: absolute;
    width: 100%;
    bottom: 0;
}

.gallery-menu ul {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}

.gallery-menu ul li {
    cursor: pointer;
    -webkit-box-align: stretch;
    -webkit-align-items: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    width: 100%;
    text-align: center;
    font-size: 16px;
    color: white;
    padding: 16px 10px;
    display: block;
    margin: 0;
    border-right: 1px solid white;
}

.gallery-menu ul li:last-child {
    border-right: 0px solid white;
}

.gallery-menu ul li.active {
    background-color: white;
    color: black;
    border-left: 1px solid white;
    border-right: 1px solid white;
    border-top: 4px solid #cd1719;
}