/**
 * jQuery lightBox plugin
 * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 * and adapted to me for use like a plugin from jQuery.
 * @name jquery-lightbox-0.5.css
 * @author Leandro Vieira Pinho - http://leandrovieira.com
 * @version 0.5
 * @date April 11, 2008
 * @category jQuery plugin
 * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
 * @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US
 * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
 */
#jquery-overlay {
    z-index: 10001;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 320px;
}

* html #jquery-overlay {
    position: absolute;
}

#jquery-lightbox {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    cursor: pointer;
    z-index: 10002;
    text-align: center;
    line-height: 0;
    min-width: 320px;
    max-width: 860px;
    max-height: 905px;
}

#jquery-lightbox a img {
    border: none;
    max-width: 100%;
}

#lightbox-container-image-box {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    display: flex;
    background-color: #fff;
    width: 320px;
    height: 320px;
    margin: auto;
    min-width: 320px;
    max-width: 100%;
    /*min-height: 600px;*/
    min-height: calc(100% - 45px);
    max-height: calc(100% - 45px);
    vertical-align: middle;
}

#lightbox-container-image {
    padding: 30px;
    overflow: hidden;
    max-width: calc(100% - 60px);
    width: 100%;
    display: flex;
    height: calc(100% - 60px);
    position: absolute;
}

#lightbox-loading {
    position: absolute;
    top: 40%;
    left: 0%;
    height: 25%;
    width: 100%;
    text-align: center;
    line-height: 0;
}

#lightbox-nav {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 110;
    max-width: 100%;
}

#lightbox-container-image-box > #lightbox-nav {
    left: 0;
    max-width: 100%;
}

#lightbox-nav a {
    outline: none;
}

#lightbox-nav-btnPrev, #lightbox-nav-btnNext {
    width: 49%;
    height: 100%;
    display: block;
    zoom: 1;
}

a#lightbox-nav-btnPrev, a#lightbox-nav-btnNext {
    /*display: none;*/
    width: 32px;
    min-height: calc(100% - 77px);
    max-height: calc(100% - 77px);
}

a#lightbox-nav-btnPrev:hover, a#lightbox-nav-btnNext:hover {
    display: block;
}

#lightbox-nav-btnPrev {
    left: 0;
    float: left;
}

#lightbox-nav-btnNext {
    right: 0;
    float: right;
}

#lightbox-container-image-data-box {
    font: 10px Verdana, Helvetica, sans-serif;
    background-color: #fff;
    margin: 0 auto;
    line-height: 1.4em;
    overflow: hidden;
    position: absolute;
    left: 50%;
    bottom: 1px;
    transform: translate(-50%, 0);
    padding: 0 !important;
    min-width: 320px;
    max-width: 100%;
    height: 45px;
}

#lightbox-container-image-data {
    padding: 0 20px;
    overflow: hidden;
    color: #666;
    max-width: 100%;
}

#lightbox-container-image-data #lightbox-image-details {
    text-align: left;
}

#lightbox-image-details-caption {
    font-weight: bold;
}

#lightbox-image-details-currentNumber {
    display: block;
    clear: left;
    padding-bottom: 1.0em;
}

#lightbox-secNav-btnClose {
    width: 32px;
    height: 32px;
    z-index: 1001;
    display: block;
    outline-style: none;
    position: absolute;
    right: 0px;
    top: 0px;
}

img#lightbox-image {
    position: absolute;
    max-width: calc(100% - 60px);
    max-height: calc(100% - 60px);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

/** CSS галереи из старого сайта **/
.img-background,
.image-gallery-item-link {
    display: table-cell;
    vertical-align: middle;
}

.img-background img,
.image-gallery-item-link img {
    outline: 1px solid #dadada;
}

.img-background img:hover,
.image-gallery-item-link img:hover {
    outline: 2px solid #dff1d6;
    /*outline-offset: -2px;
    background: #e9f9e9;*/
}

.image-center {
    text-align: center;
}

.image-shadow {
    -moz-box-shadow: 0px 0px 10px #444;
    -webkit-box-shadow: 0px 0px 10px #444;
    box-shadow: 0px 0px 10px #444;
}

.one-news-image {
    /*margin: 9px 0 0 9px;*/
    /*padding-top: 9px;*/
}

main .page-content img.one-news-image {
    /*height: 100% !important;*/
    margin: 10px 10px !important;
}

.fastengal-image-container,
.image-gallery-container {
    height: 100%;
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-align: -webkit-center;
    text-align: -moz-center;
    margin: 30px 0 50px;
    padding: 15px 0;
    border-top: 1px dashed #93856d;
    border-bottom: 1px dashed #93856d;
    font-size: 0;
}

.fastengal-image,
.image-gallery-item {
    display: inline-table;
    margin: 10px;
    width: 178px;
    vertical-align: middle;
}

@media (max-width: 767px) {
    #jquery-lightbox {
        max-width: calc(133vh + 25px);
        max-height: calc(133vw + 25px);
    }

    .fastengal-image,
    .image-gallery-item {
        width: 166px;
    }
}

@media (max-width: 480px) {
    #jquery-lightbox {
        min-width: 100%;
    }

    .fastengal-image,
    .image-gallery-item {
        width: calc(50% - 20px);
    }
}

@media (max-height: 480px) {
    #jquery-lightbox {
        min-height: 95%;
    }
}
