.gallery {}
.gallery .inner {
    position: relative;
    overflow: hidden;
    display: block;
    width: auto;
    max-width: 800px;
}
.gallery img {
    display: none;
}
.main {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: #ccc;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
    margin-bottom: 20px;
}
.main:before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100px;

    background: -moz-linear-gradient(top,  rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    background: -webkit-linear-gradient(top,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%);
    background: linear-gradient(to bottom,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#a6000000',GradientType=0 );
}
.main-selected {
    animation: crossfade 0.5s ease;
    -webkit-animation: crossfade 0.5s ease;
    -moz-animation: crossfade 0.5s ease;
}
@keyframes crossfade {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

@-webkit-keyframes crossfade {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

@-moz-keyframes crossfade {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}
.main span {
    position: absolute;
    display: block;
    text-align: center;
    font-size: 16px;
    font-family: sans-serif;
    color: #fff;
    bottom: 10px;
    left: 0;
    right: 0;
}
.thumb-roll {
    position: relative;
    width: auto;
    overflow-x: auto;
    overflow-y: hidden;

    white-space: nowrap;
}
.thumb {
    display: inline-block;
    position: relative;
    width: 100px;
    height: 100px;
    margin-right: 20px;
    background: #ccc;
    overflow: hidden;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    overflow: hidden;
    cursor: pointer;
}
.thumb:last-of-type {
    margin-right: 0px;
}
.thumb:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    box-shadow: inset 5px 5px 0px rgba(51, 204, 255, 0), inset -5px -5px 0px rgba(51, 204, 255, 0);
}
.thumb.current:after {
    box-shadow: inset 5px 5px 0px rgba(51, 204, 255, 1), inset -5px -5px 0px rgba(51, 204, 255, 1);
    background: rgba(255,255,255,0.4);
    cursor: default;
}
.thumb:hover:after {
    box-shadow: inset 5px 5px 0px rgba(51, 204, 255, 1), inset -5px -5px 0px rgba(51, 204, 255, 1);
}



.show_image_popup{
    position: absolute; /*  so that not take place   */
    top: 50%;
    left: 50%;
    z-index: 1000; /*  adobe all elements   */
    transform: translate(-50%, -50%); /*  make center   */

    display: none; /*  to hide first time   */
}
.show_image_popup img{
    max-width: 90%;
    height: auto;
}

/*Popup*/
.popup{
    width: 1200px;
    margin: auto;
    text-align: center
}
.popup div{
    width: 200px;
    height: 200px;
    cursor: pointer
}
.show{
    z-index: 999;
    display: none;
}
.show .overlay{
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.66);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}
.show .div-show{
    width: 1280px;
    height: 720px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    overflow: hidden;
    z-index: 2;
}

.div-show img{
    position: fixed;
    z-index:2;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    max-height: 90%;
}
/*back To Gallery*/
.cl-btn-4 {
    width: 50px;
    height: 50px;
    background: #81b1de;
    margin: 5px;
    position: fixed;
    z-index: 200;
    top: 0;
    right: 0;
}
.cl-btn-4:before,
.cl-btn-4:after {
    content: '';
    width: 80%;
    height: 6px;
    background: #BFE2FF;
    position: absolute;
    top: 48%;
    left: 10%;
    transform: rotate(45deg);
    transition: all 0.3s ease-out;
}
.cl-btn-4:after {
    transform: rotate(-45deg);
    transition: all 0.3s ease-out;
}
.cl-btn-4:hover:before,
.cl-btn-4:hover:after {
    transform: rotate(180deg);
    background: #FFF;
}