.tgn-g-gallery-display-image {
    background-size: cover;
    background-position: center center;
    width: 100%;
    padding-top: 66.66%;
}

.tgn-g-gallery-display-image-container {
    float: left;
    width: calc(33.33333333% - 40px);
    margin-right: 60px;
    margin-top: 60px;
    cursor: pointer;
    z-index: 4;
    position: relative;
}

#tgn-g-gallery-display-images-container {
    overflow: hidden;
}

.tgn-g-gallery-display-image-container:nth-child(1), .tgn-g-gallery-display-image-container:nth-child(2), .tgn-g-gallery-display-image-container:nth-child(3) {
    margin-top: 0;
}

.tgn-g-gallery-display-image-container:nth-child(3n) {
    margin-right: 0;
}

#loader {
    border: 8px solid var(--bg-accent);
    border-top: 8px solid var(--font);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 2s linear infinite;
    margin-left: auto;
    margin-right: auto;
    margin-top: 30px;

}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#tgn-g-gallery-image-view {
    top: 50%;
    transform: translate(-50%, -50%);
    left: 50%;
    width: 600px;
    height: 390px;
    background-size: cover;
    background-position: center center;
    position: fixed;
    visibility: hidden;
    opacity: 0;
    z-index: 100;
    overflow: hidden;
    border: white solid 10px;
    transition: opacity .5s, visibility .5s;
}

#tgn-g-gallery-image-view.active {
    visibility: visible;
    opacity: 1;
}

#tgn-g-gallery-image-blackout {
    position: fixed;
    top: 0;
    left: 0;
    visibility: hidden;
    opacity: 0;
    background: black;
    z-index: 100;
    width: 100%;
    height: 100%;
    transition: opacity .5s, visibility .5s;
}

#tgn-g-gallery-image-blackout.active {
    visibility: visible;
    opacity: 0.5;
}

.notmarkable {
    -ms-user-select: None;
    -moz-user-select: None;
    -webkit-user-select: None;
    user-select: None;
}

.tgn-g-gallery-image-view-overlay-button-arrow {
    cursor: pointer;
}

.tgn-g-gallery-image-view-overlay-button {
    position: absolute;
    cursor: pointer;
    display: inline;
    height: 100%;
    width: 25%;
}


.tgn-g-gallery-image-view-overlay-button-arrow {
    position: absolute;
    width: 30px;
    top: calc(50% - 24px);
    opacity: 0;
    transition: opacity 500ms;
}

#tgn-g-gallery-image-view-overlay-right-arrow {
    right: 10px;
    display: inline;
    margin-right: -40px;
    transition: margin-left 500ms;
}

#tgn-g-gallery-image-view-overlay-left-arrow {
    display: inline;
    left: 10px;
    margin-left: -40px;
    transition: margin-left 500ms;

}

#tgn-g-gallery-image-view-container-right:hover #tgn-g-gallery-image-view-overlay-right-arrow {
    visibility: visible;
    opacity: 1;
    transition: opacity 500ms, margin-right 500ms;
    margin-right: 0;
}

#tgn-g-gallery-image-view-container-left:hover #tgn-g-gallery-image-view-overlay-left-arrow {
    visibility: visible;
    opacity: 1;
    transition: opacity 500ms, margin-left 500ms;
    margin-left: 0;
}

.tgn-g-gallery-image-view-overlay-button:hover {
    background-color: var(--font);
}

#tgn-g-gallery-image-view-overlay-right {
    right: 0;
    opacity: 0;
    transition: opacity 500ms;
    background: linear-gradient(90deg, rgba(78, 84, 83, 0) 0%, rgba(78, 84, 83, 1) 100%);
}

#tgn-g-gallery-image-view-overlay-left {
    opacity: 0;
    transition: opacity 500ms;
    background: linear-gradient(90deg, rgba(78, 84, 83, 1) 0%, rgba(78, 84, 83, 0) 100%);
}

#tgn-g-gallery-image-view-container-right:hover #tgn-g-gallery-image-view-overlay-right {
    opacity: 1;
    visibility: visible;
    transition: opacity 500ms;
    background: linear-gradient(90deg, rgba(78, 84, 83, 0) 0%, rgba(78, 84, 83, 1) 100%);

}

#tgn-g-gallery-image-view-container-left:hover #tgn-g-gallery-image-view-overlay-left {
    opacity: 1;
    visibility: visible;
    transition: opacity 500ms;
    background: linear-gradient(90deg, rgba(78, 84, 83, 1) 0%, rgba(78, 84, 83, 0) 100%);
}

@media (max-width: 1000px) {
    .tgn-g-gallery-display-image-container {
        margin-right: 30px;
        margin-top: 30px;
        width: calc(33.33333333% - 20px);
    }
}

@media (max-width: 730px) {
    .tgn-g-gallery-display-image-container {
        width: calc(50% - 15px);
    }

    .tgn-g-gallery-display-image-container:nth-child(3) {
        margin-top: 30px;
    }

    .tgn-g-gallery-display-image-container:nth-child(3n) {
        margin-right: 30px;
    }

    .tgn-g-gallery-display-image-container:nth-child(2n) {
        margin-right: 0;
    }
}

@media (max-width: 500px) {
    .tgn-g-gallery-display-image-container {
        width: 100%;
        margin-top: 30px !important;
    }

    .tgn-g-gallery-display-image-container:first-child {
        margin-top: 0 !important;
    }
}

@media (max-width: 730px) and (max-aspect-ratio: 3/2) {
    #tgn-g-gallery-image-view {
        width: 500px;
        height: 330px;
    }
}

@media (max-width: 600px) and (max-aspect-ratio: 3/2) {
    #tgn-g-gallery-image-view {
        width: 400px;
        height: 265px;
    }
}

@media (max-width: 500px) and (max-aspect-ratio: 3/2) {
    #tgn-g-gallery-image-view {
        width: 360px;
        height: 240px;
    }
}

@media (max-width: 400px) and (max-aspect-ratio: 3/2) {
    #tgn-g-gallery-image-view {
        width: 270px;
        height: 190px;
    }
}

@media (max-height: 450px) and (min-aspect-ratio: 3/2) {
    #tgn-g-gallery-image-view {
        width: 500px;
        height: 330px;
    }
}

@media (max-height: 370px) and (min-aspect-ratio: 3/2) {
    #tgn-g-gallery-image-view {
        width: 400px;
        height: 265px;
    }
}

@media (max-height: 300px) and (min-aspect-ratio: 3/2) {
    #tgn-g-gallery-image-view {
        width: 360px;
        height: 240px;
    }
}

@media (max-height: 260px) and (min-aspect-ratio: 3/2) {
    #tgn-g-gallery-image-view {
        width: 270px;
        height: 190px;
    }
}