﻿/* =========================================================
   Gallery Page
   ========================================================= */

.gallery-page {
    background: #fff;
}


/* =========================================================
   Breadcrumb
   ========================================================= */

.gallery-breadcrumb {
    border-bottom: 1px solid #eee;
    background: #fbfdff;
}

.gallery-breadcrumb-inner {
    min-height: 54px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.gallery-breadcrumb-inner a,
.gallery-breadcrumb-inner span {
    color: #777;
    font-size: 13px;
    line-height: 21px;
}

.gallery-breadcrumb-inner a:hover {
    color: #078ad4;
}

.gallery-breadcrumb-inner span {
    color: #999;
}

.gallery-breadcrumb-inner i {
    width: 6px;
    height: 6px;
    border-top: 1px solid #aaa;
    border-right: 1px solid #aaa;
    transform: rotate(45deg);
}


/* =========================================================
   Gallery
   ========================================================= */

.gallery-section {
    padding: 70px 0 85px;
    background: #fff;
}

.gallery-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}


/* =========================================================
   Gallery Item
   ========================================================= */

.gallery-item {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 9px;
    background: #f5f5f5;
    overflow: hidden;
    position: relative;
}

.gallery-item > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .45s ease;
}

.gallery-item > span {
    background: rgba(0, 0, 0, .38);
    opacity: 0;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .3s ease;
}

.gallery-item > span i {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #078ad4;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(.8);
    transition: transform .3s ease;
}

.gallery-item:hover > img {
    transform: scale(1.06);
}

.gallery-item:hover > span {
    opacity: 1;
}

.gallery-item:hover > span i {
    transform: scale(1);
}


/* =========================================================
   Lightbox
   ========================================================= */

.gallery-lightbox {
    width: 100%;
    height: 100%;
    padding: 70px 90px;
    background: rgba(0, 0, 0, .88);
    opacity: 0;
    visibility: hidden;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 99999;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.gallery-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox-image {
    max-width: 1200px;
    max-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-image img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    width: auto;
    height: auto;
    display: block;
    border-radius: 5px;
}


/* =========================================================
   Close
   ========================================================= */

.gallery-lightbox-close {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: absolute;
    right: 28px;
    top: 22px;
}

.gallery-lightbox-close::before,
.gallery-lightbox-close::after {
    content: "";
    width: 25px;
    height: 2px;
    background: #fff;
    position: absolute;
    left: 10px;
    top: 21px;
}

.gallery-lightbox-close::before {
    transform: rotate(45deg);
}

.gallery-lightbox-close::after {
    transform: rotate(-45deg);
}


/* =========================================================
   Previous / Next
   ========================================================= */

.gallery-lightbox-prev,
.gallery-lightbox-next {
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition:
        background .25s ease,
        border-color .25s ease;
}

.gallery-lightbox-prev {
    left: 28px;
}

.gallery-lightbox-next {
    right: 28px;
}

.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    border-color: #078ad4;
    background: #078ad4;
}

.gallery-lightbox-prev i,
.gallery-lightbox-next i {
    width: 10px;
    height: 10px;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    position: absolute;
    left: 50%;
    top: 50%;
}

.gallery-lightbox-prev i {
    transform: translate(-35%, -50%) rotate(-45deg);
}

.gallery-lightbox-next i {
    transform: translate(-65%, -50%) rotate(135deg);
}


/* =========================================================
   Tablet
   ========================================================= */

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

    .gallery-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .gallery-lightbox {
        padding-left: 75px;
        padding-right: 75px;
    }

}


/* =========================================================
   Mobile
   ========================================================= */

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

    .gallery-breadcrumb-inner {
        min-height: 48px;
    }

    .gallery-breadcrumb-inner a,
    .gallery-breadcrumb-inner span {
        font-size: 12px;
    }

    .gallery-section {
        padding: 45px 0 55px;
    }

    .gallery-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gallery-item {
        border-radius: 6px;
    }

    .gallery-item > span {
        display: none;
    }

    .gallery-lightbox {
        padding: 60px 15px;
    }

    .gallery-lightbox-image {
        max-height: calc(100vh - 120px);
    }

    .gallery-lightbox-image img {
        max-height: calc(100vh - 120px);
    }

    .gallery-lightbox-close {
        width: 40px;
        height: 40px;
        right: 8px;
        top: 8px;
    }

    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        width: 38px;
        height: 38px;
        background: rgba(0, 0, 0, .35);
        z-index: 2;
    }

    .gallery-lightbox-prev {
        left: 8px;
    }

    .gallery-lightbox-next {
        right: 8px;
    }

}