/* -- Gallery - Nav -- */

.gallery-nav-list {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    max-width: 1450px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    background-color: #f0f0f0;
    border: 2px solid #e0e0e0;
}
.gallery-nav-disabled::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}
.gallery-nav-item {
    width: 25%;
    z-index: 0;
}
.gallery-nav-button {
    position: relative;
    width: 100%;
    background-color: transparent;
    border: none;
    text-align: center;
    padding: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: color .4s, background-color .4s;
}
.gallery-nav-button:hover {
    background-color: #fff;
    color: #111;
}
.gallery-nav-button::after {
    content: "";
    position: absolute;
    top: 20%;
    left: 10%;
    width: 80%;
    height: 60%;
    opacity: 0;
    background: var(--light-blue);
    z-index: -1;
    transition: all .2s;
}
.gallery-nav-button-active {
    color: #fff;
}
.gallery-nav-button-active::after {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
}

@media (max-width: 1400px) {
    .gallery-nav-item {
        width: 50%;
    }
}

@media (max-width: 750px) {
    .gallery-nav-item {
        width: 100%;
    }
}



/* -- Gallery - Main -- */

.gallery-wrapper {
    max-width: 1450px;
    width: 100%;
    margin: 0 auto;
    transition: opacity .4s, transform .4s;
}
.gallery-fade-out {
    opacity: 0;
    transform: translateX(-30px);
}
.gallery-message {
    font-size: 1.25rem;
    font-style: italic;
    text-align: center;
    font-weight: 600;
    margin-bottom: 40px;
}
.gallery-loader {
    display: block;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 5px solid #eee;
    border-top-color: var(--blue);
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#gallery_output {
    display: flex;
    flex-wrap: wrap;
    margin: 40px auto 60px;
    padding: 0;
}
.gallery-item {
    position: relative;
    max-width: 24%;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px .5% 0;
}
.gallery-item img {
    width: auto;
    height: 115%;
    transition: opacity .5s, transform .5s;
}
.gallery-item img.vertical-img {
    width: 115%;
    height: auto;
}
.gallery-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    fill: #111;
    opacity: 0;
    transition: opacity .5s;
}
.gallery-item:hover .gallery-icon {
    opacity: 1;
}
.gallery-item:hover img {
    opacity: .6;
    transform: scale(1.05);
}

@media screen and (max-width: 1200px) {
    .gallery-item {
        flex: 33%;
        max-width: 32%;
    }
}

@media screen and (max-width: 900px) {
    .gallery-item {
        flex: 50%;
        max-width: 49%;
    }
}

@media screen and (max-width: 600px) {
    .gallery-item {
        flex: 100%;
        max-width: 100%;
        height: auto;
    }
    .gallery-item img {
        width: 100%;
        height: auto;
    }
}