#gallery{
    position: fixed;
    left:0;
    top:0;
    width: 100%; 
    height: 100%;
    background-color: rgba(0,0,0, 0.8);
    z-index: 1000000;
    text-align: center;
    text-align: center;
}

#gallery:before{
    content: '';
    display: inline-block;
    height: 100%;
    width: 0;
    vertical-align: middle;
}

#preload{
    position: absolute;
    z-index: 1;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    margin-left: -25px;
    top: 50%;
    left: 50%;
    background: url(/i/load.gif) no-repeat scroll center rgba(0,0,0, .4);
    opacity: 0.8;
    border-radius: 3px;
}

#gallery_title{
    position: absolute;
    left: 20px;
    top: 25px;
    font-size: 21px;
    padding: 3px 15px;
    background-color: rgba(0,0,0,0.75);
    border-radius: 2px;
    color: #fff;
}

#gallery_img_hide{
    display: none;
}
#gallery_img{
    display: inline-block;
    vertical-align: middle;
    max-height: 96%;
    max-width: 94%;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
}

#gallery_img_title{
    position: absolute;
    right: 100px;
    bottom: 20px;
    background-color: rgba(0,0,0,0.3);
    color: #fff;
    padding: 5px 10px;
    font-size: 18px;
}

#go_left, #go_right{
    position: absolute;
    top:50%;
    height: 90px;
    line-height: 90px;
    width:90px;
    font-size: 45px;
    text-align: center;
    color: red;
    font-weight: normal;
    padding: 10px;
    border-radius: 50%;
}

#go_left{left:50px;}
#go_right{right:50px;}

#go_left, #go_right, #close_gallery{
    cursor: pointer;
    opacity: .6;
    color: #fff;
    transition: opacity 0.3s ease;
    
}

#go_left:hover, #go_right:hover, #close_gallery:hover{
    opacity: .4;
}


#go_left svg, #go_right svg{
    transform: scale(2);
    -webkit-transform: scale(2);
    -moz-transform: scale(2);
    
}


#close_gallery{
    position: absolute;
    right: 17px;
    top:15px;
    font-size: 44px;
    width: 55px;
}

@media screen and (max-width: 800px) {

    #go_left, #go_right {
        width: auto;
        padding: 4px 20px;
        font-size: 100px;
        top:  90%;
    }
    #close_gallery {
        font-size: 50px;
        right: 20px;
        top: 0;
    }
}
@media screen and (max-height: 800px) {

    /*    #gallery_img{
            max-height: 94%;
        }*/

}

@media screen and (max-width: 480px){
    #go_left, #go_right {
        top: 85%;
        padding: 70px 75px;
        opacity: 0.6;
    }

    #close_gallery {
        font-size: 60px;
        right: 20px;
        top: 3px;
    }

    #gallery_img{
        max-height: 100%;
        max-width: 100%;
        width: auto;
    }
}
@media screen and (max-width: 360px){
    #go_left, #go_right {
        top: 85%;
        padding: 30px 45px;
        opacity: 0.6;
    }

    #close_gallery {
        font-size: 60px;
        right: 20px;
        top: 3px;
    }

    #gallery_img{
        width: auto;
    }
}

@media screen and (max-width :  320px){

    #go_left, #go_right {
        font-size: 70px;
        padding: 0 15px;
    }
    #close_gallery {
        font-size: 25px;
        right: 3px;
        top: -2px;
    }
}