.grid {
    position: relative;
    width: 100%;
    margin: 0 auto 66px;
}

.js .grid::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-size: 60px auto;
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
}

.js .grid--loaded::after {
    opacity: 0;
}



.grid__item {
    width: 466px;
    padding: 20px;
}

@media screen and (min-width:2268px) {
    .grid__item {
        width: 600px;
    }
}

@media screen and (min-width:2200px) and (max-width:2268px) {
    .grid__item {
        width: 560px;
    }
}

@media screen and (min-width:1920px) and (max-width:2200px) {
    .grid__item {
        width: 500px;
    }
}


@media(max-width:1903px) {
    .grid__item {
        width: 466px;
    }
}

@media(max-width:1800px) {
    .grid__item {
        width: 438px;
    }
}

@media(max-width:1680px) {
    .grid__item {
        width: 389px;
        padding: 15px;
    }
}

@media(max-width:1328px) {
    .grid__item {
        width: 328px;
        padding: 10px;
    }
}

@media(max-width:1024px) {
    .grid__item {
        width: 450px;
        padding: 10px;
    }
}

@media(max-width:1018px) {
    .grid__item {
        width: 400px;
        padding: 10px;
    }
}

@media(max-width:908px) {
    .grid__item {
        width: 328px;
        padding: 10px;
    }
}

@media(max-width:750px) {
    .grid__item {
        width: 308px;
        padding: 5px;
    }
}

@media(max-width:700px) {

    .grid {
        width: 100% !important;
        margin-bottom: 0;
    }

    .grid__item {
        width: 100%;
        margin-bottom: 10px;
    }
}

.grid__item--current {
    opacity: 0 !important;
}

.img-wrap {
    position: relative;
    display: block;
}

.img-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0.42)));
    background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.42) 100%);
    background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.42) 100%);
    background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.42) 100%);
    background-image: linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.42) 100%);
}

.img-wrap:focus,
.img-wrap:hover {
    outline: none;
}

.img-wrap img {
    display: block;
    width: 100%;
}

.preview {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    display: -webkit-flex;
    display: -ms-flex;
    display: flex;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -ms-flex-line-pack: center;
    -webkit-align-content: center;
    align-content: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.preview--open {
    pointer-events: auto;
}


/* circle overlay (generated SVG) */

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.overlay circle {
    -webkit-transition: fill-opacity 0.3s, -webkit-transform 0s 0.3s;
    transition: fill-opacity 0.3s, transform 0s 0.3s;
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
    -webkit-transform: scale3d(0, 0, 1);
    transform: scale3d(0, 0, 1);
    fill: #1f1d1d;
    fill-opacity: 0;
}

.preview--open .overlay circle {
    -webkit-transition: -webkit-transform 0.4s;
    transition: transform 0.4s;
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
    fill-opacity: 1;
}

.clone {
    position: fixed;
    z-index: 110;
    -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.5, 1, 0.2, 1);
    transition: transform 0.6s cubic-bezier(0.5, 1, 0.2, 1);
    -webkit-backface-visibility: hidden;
}

.original {
    position: relative;
    z-index: 120;
    display: block;
    object-fit: contain;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
    -webkit-backface-visibility: hidden;
}

.preview--open .animate {
    /* open */
    -webkit-transition: -webkit-transform 0.6s, opacity 0.2s;
    transition: transform 0.6s, opacity 0.2s;
}

.animate {
    /* close */
    -webkit-transition: -webkit-transform 0.3s, opacity 0.2s;
    transition: transform 0.3s, opacity 0.2s;
}

.description {
    color: #fff;
    text-align: left;
    font-size: 16px;
    padding: 16px 28px;
    position: relative;
    z-index: 11;
    -webkit-transition: left 500ms, bottom 500ms;
    -moz-transition: left 500ms, bottom 500ms;
    -ms-transition: left 500ms, bottom 500ms;
    -o-transition: left 500ms, bottom 500ms;
    transition: left 500ms, bottom 500ms;
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: calc(100% - 20px);
}

.description::before {
    content: "";
    position: absolute;
    top: 50%;
    margin-top: -1px;
    left: -20px;
    width: 34px;
    height: 2px;
    background: #fff;
}

.grid__item:hover .description {
    bottom: 24px;
    left: 42px;
    width: calc(100% - 84px);
    background: rgba(0, 124, 194, 0.68);
}

.description p {
    margin: 4px 0;
    font-size: 12px;
    color: #a9a7a7;
}

.js .description--grid {
    display: none;
}

.description--preview {
    color: #fff;
    position: fixed;
    z-index: 140;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2em 1em;
    text-align: center;
    opacity: 0;
    background: linear-gradient(180deg, transparent, #1f1d1d);
    -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
    transition: opacity 0.3s, transform 0.3s;
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
}

.preview--open .description--preview {
    opacity: 1;
    -webkit-transition-delay: 0.2s;
    transition-delay: 0.2s;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}


/* Close button */

.action {
    font-size: 1.5em;
    margin: 0;
    padding: 0;
    cursor: pointer;
    vertical-align: top;
    color: #6bd68a;
    border: none;
    background: none;
}

.action--close {
    position: fixed;
    z-index: 150;
    top: 100px;
    right: 50px;
    padding: 1em;
    opacity: 0;
    -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
    transition: opacity 0.3s, transform 0.3s;
    -webkit-transform: scale3d(0.6, 0.6, 1);
    transform: scale3d(0.6, 0.6, 1);
}

.action--close i {
    font-size: 30px;
    color: #007cc2;
}

.preview--image-loaded .action--close {
    opacity: 1;
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
}

.text-hidden {
    position: absolute;
    display: block;
    overflow: hidden;
    width: 0;
    height: 0;
    color: transparent;
}