/* =========================================================
   AZ DEVELOPER
   GALLERY PAGE
   ========================================================= */


/* =========================================================
   HERO
   ========================================================= */

.gallery-hero {
    position: relative;

    min-height: 570px;

    display: flex;
    align-items: flex-end;

    padding: 150px 0 90px;

    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            rgba(5, 12, 8, .95),
            rgba(5, 12, 8, .62),
            rgba(5, 12, 8, .25)
        ),
        url("https://images.unsplash.com/photo-1500534623283-312aade485b7?auto=format&fit=crop&w=2200&q=90")
        center / cover no-repeat;

    color: #fff;
}


.gallery-hero-overlay {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(4, 9, 6, .65),
            transparent 55%
        );
}


.gallery-hero .container {
    position: relative;

    z-index: 2;
}


.gallery-hero-content {
    max-width: 850px;
}


.gallery-breadcrumb {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 30px;

    color: rgba(255, 255, 255, .55);

    font-size: 10px;
}


.gallery-breadcrumb a {
    color: rgba(255, 255, 255, .65);

    transition: var(--transition);
}


.gallery-breadcrumb a:hover {
    color: var(--primary-light);
}


.gallery-breadcrumb i {
    color: rgba(255, 255, 255, .30);

    font-size: 8px;
}


.gallery-hero h1 {
    margin: 10px 0 0;

    color: #fff;

    font-size: clamp(3.8rem, 6.5vw, 6.5rem);

    line-height: .95;

    letter-spacing: -3px;
}


.gallery-hero h1 span {
    color: var(--primary-light);
}


.gallery-hero-content > p {
    max-width: 620px;

    margin-top: 25px;

    color: rgba(255, 255, 255, .68);

    font-size: 14px;

    line-height: 1.8;
}


/* =========================================================
   GALLERY SECTION
   ========================================================= */

.gallery-section {
    background: var(--light);
}


.gallery-heading {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 40px;

    margin-bottom: 40px;
}


.gallery-heading > p {
    max-width: 330px;

    margin: 0;

    color: var(--text-secondary);

    font-size: 12px;

    line-height: 1.8;
}


/* =========================================================
   FILTERS
   ========================================================= */

.gallery-filters {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 35px;

    padding-bottom: 18px;

    border-bottom: 1px solid var(--border);
}


.gallery-filter {
    min-height: 40px;

    padding: 0 17px;

    border: 1px solid var(--border);

    background: #fff;

    color: var(--text-secondary);

    font-family: var(--font-body);

    font-size: 9px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .7px;

    cursor: pointer;

    transition:
        background .3s ease,
        border-color .3s ease,
        color .3s ease,
        transform .3s ease;
}


.gallery-filter:hover {
    border-color: var(--primary);

    color: var(--primary);

    transform: translateY(-1px);
}


.gallery-filter.active {
    border-color: var(--dark);

    background: var(--dark);

    color: #fff;
}


/* =========================================================
   GALLERY GRID
   ========================================================= */

.gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    grid-auto-rows: 270px;

    gap: 12px;

    transition: opacity .25s ease;
}


.gallery-item {
    position: relative;

    overflow: hidden;

    background: #ddd;

    opacity: 1;

    transform: scale(1);

    transition:
        opacity .35s ease,
        transform .35s ease;
}


.gallery-item.hidden {
    display: none;
}


.gallery-large {
    grid-column: span 2;

    grid-row: span 2;
}


.gallery-tall {
    grid-row: span 2;
}


.gallery-wide {
    grid-column: span 2;
}


.gallery-image-button {
    position: relative;

    width: 100%;
    height: 100%;

    padding: 0;

    display: block;

    border: 0;

    background: transparent;

    overflow: hidden;

    cursor: pointer;
}


.gallery-image-button img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .7s cubic-bezier(.2,.7,.2,1);
}


.gallery-image-button:hover img {
    transform: scale(1.07);
}


/* =========================================================
   IMAGE OVERLAY
   ========================================================= */

.gallery-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    padding: 25px;

    background:
        linear-gradient(
            to top,
            rgba(4, 9, 6, .86),
            rgba(4, 9, 6, 0) 65%
        );

    color: #fff;

    opacity: .95;

    transition:
        background .35s ease;
}


.gallery-image-button:hover .gallery-overlay {
    background:
        linear-gradient(
            to top,
            rgba(4, 9, 6, .92),
            rgba(4, 9, 6, .08) 75%
        );
}


.gallery-overlay > div {
    display: flex;

    flex-direction: column;

    gap: 5px;

    text-align: left;
}


.gallery-overlay span {
    color: var(--primary-light);

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 1.4px;
}


.gallery-overlay strong {
    max-width: 240px;

    color: #fff;

    font-family: var(--font-heading);

    font-size: 19px;

    line-height: 1.15;

    font-weight: 500;
}


.gallery-overlay > i {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid rgba(255, 255, 255, .35);

    color: #fff;

    font-size: 13px;

    transform: translateY(10px);

    opacity: 0;

    transition:
        opacity .3s ease,
        transform .3s ease;
}


.gallery-image-button:hover
.gallery-overlay > i {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.gallery-empty {
    display: none;

    padding: 80px 20px;

    text-align: center;
}


.gallery-empty.show {
    display: block;
}


.gallery-empty-icon {
    width: 65px;
    height: 65px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 auto 20px;

    background: #fff;

    border: 1px solid var(--border);

    color: var(--primary);

    font-size: 23px;
}


.gallery-empty h3 {
    margin-bottom: 8px;

    color: var(--dark);

    font-family: var(--font-heading);

    font-size: 24px;
}


.gallery-empty p {
    margin: 0;

    color: var(--text-muted);

    font-size: 11px;
}


/* =========================================================
   GALLERY CTA
   ========================================================= */

.gallery-cta {
    padding: 90px 0;

    background:
        linear-gradient(
            100deg,
            rgba(5, 12, 8, .97),
            rgba(5, 12, 8, .88)
        ),
        url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=2200&q=90")
        center / cover no-repeat;

    color: #fff;
}


.gallery-cta-inner {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 50px;
}


.gallery-cta h2 {
    margin: 10px 0 0;

    color: #fff;

    font-size: clamp(3rem, 5vw, 5rem);

    line-height: .98;

    letter-spacing: -2px;
}


.gallery-cta h2 span {
    color: var(--primary-light);
}


.gallery-cta p {
    max-width: 580px;

    margin: 18px 0 0;

    color: rgba(255, 255, 255, .60);

    font-size: 13px;

    line-height: 1.8;
}


.gallery-cta-actions {
    display: flex;

    align-items: flex-start;

    flex-direction: column;

    gap: 18px;

    flex-shrink: 0;
}


.gallery-visit-link {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: rgba(255, 255, 255, .80);

    font-size: 9px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .8px;

    transition: var(--transition);
}


.gallery-visit-link:hover {
    color: var(--primary-light);
}


.gallery-visit-link i {
    transition: transform .3s ease;
}


.gallery-visit-link:hover i {
    transform: translate(3px, -3px);
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.gallery-lightbox {
    position: fixed;

    z-index: 99999;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 70px 90px;

    background: rgba(3, 8, 5, .96);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}


.gallery-lightbox.show {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


.lightbox-content {
    width: 100%;

    max-width: 1100px;

    max-height: calc(100vh - 120px);
}


.lightbox-image-wrapper {
    width: 100%;

    height: calc(100vh - 220px);

    min-height: 350px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}


.lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 100%;

    display: block;

    object-fit: contain;

    box-shadow:
        0 30px 100px rgba(0, 0, 0, .4);

    transform: scale(.96);

    opacity: 0;

    transition:
        opacity .25s ease,
        transform .25s ease;
}


.gallery-lightbox.show
.lightbox-image-wrapper img {
    opacity: 1;

    transform: scale(1);
}


/* =========================================================
   LIGHTBOX CLOSE
   ========================================================= */

.lightbox-close {
    position: absolute;

    top: 25px;
    right: 30px;

    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, .18);

    background: rgba(255, 255, 255, .04);

    color: #fff;

    font-size: 15px;

    cursor: pointer;

    transition: var(--transition);
}


.lightbox-close:hover {
    background: #fff;

    color: var(--dark);
}


/* =========================================================
   LIGHTBOX NAVIGATION
   ========================================================= */

.lightbox-nav {
    position: absolute;

    top: 50%;

    width: 52px;
    height: 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, .18);

    background: rgba(255, 255, 255, .04);

    color: #fff;

    font-size: 19px;

    cursor: pointer;

    transform: translateY(-50%);

    transition: var(--transition);
}


.lightbox-nav:hover {
    border-color: var(--primary);

    background: var(--primary);

    color: #fff;
}


.lightbox-prev {
    left: 25px;
}


.lightbox-next {
    right: 25px;
}


/* =========================================================
   LIGHTBOX CAPTION
   ========================================================= */

.lightbox-caption {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    padding-top: 15px;
}


.lightbox-caption > div:first-child {
    display: flex;

    flex-direction: column;

    gap: 5px;
}


.lightbox-caption span {
    color: var(--primary-light);

    font-size: 7px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1.5px;
}


.lightbox-caption h3 {
    margin: 0;

    color: #fff;

    font-family: var(--font-heading);

    font-size: 22px;

    font-weight: 500;
}


.lightbox-counter {
    display: flex;

    align-items: center;

    gap: 7px;

    color: rgba(255, 255, 255, .45);

    font-size: 10px;
}


.lightbox-counter #lightboxCurrent {
    color: #fff;

    font-size: 13px;

    font-weight: 700;
}


/* =========================================================
   BODY LOCK
   ========================================================= */

body.gallery-lightbox-open {
    overflow: hidden;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1199px) {

    .gallery-grid {
        grid-template-columns:
            repeat(3, 1fr);

        grid-auto-rows: 240px;
    }


    .gallery-large {
        grid-column: span 2;
    }

}


@media (max-width: 991px) {

    .gallery-hero {
        min-height: 520px;
    }


    .gallery-heading {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;
    }


    .gallery-grid {
        grid-template-columns:
            repeat(2, 1fr);

        grid-auto-rows: 240px;
    }


    .gallery-large {
        grid-column: span 2;
    }


    .gallery-wide {
        grid-column: span 2;
    }


    .gallery-cta-inner {
        align-items: flex-start;

        flex-direction: column;
    }


    .gallery-lightbox {
        padding: 60px 60px;
    }


    .lightbox-prev {
        left: 12px;
    }


    .lightbox-next {
        right: 12px;
    }

}


@media (max-width: 767px) {

    .gallery-hero {
        min-height: 490px;

        padding-top: 130px;
    }


    .gallery-hero h1 {
        font-size: 3.5rem;

        letter-spacing: -2px;
    }


    .gallery-filters {
        gap: 6px;
    }


    .gallery-filter {
        min-height: 36px;

        padding: 0 12px;

        font-size: 8px;
    }


    .gallery-grid {
        grid-template-columns: 1fr;

        grid-auto-rows: 280px;

        gap: 10px;
    }


    .gallery-large,
    .gallery-tall,
    .gallery-wide {
        grid-column: span 1;

        grid-row: span 1;
    }


    .gallery-overlay {
        padding: 20px;
    }


    .gallery-overlay > i {
        opacity: 1;

        transform: translateY(0);
    }


    .gallery-lightbox {
        padding: 65px 15px 35px;
    }


    .lightbox-image-wrapper {
        height: calc(100vh - 220px);

        min-height: 250px;
    }


    .lightbox-nav {
        top: auto;
        bottom: 80px;

        width: 44px;
        height: 44px;

        transform: none;
    }


    .lightbox-prev {
        left: 20px;
    }


    .lightbox-next {
        right: 20px;
    }


    .lightbox-caption {
        padding-right: 5px;

        padding-left: 5px;
    }


    .lightbox-caption h3 {
        font-size: 18px;
    }


    .gallery-cta {
        padding: 70px 0;
    }


    .gallery-cta-actions {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .gallery-hero h1 {
        font-size: 2.9rem;
    }


    .gallery-filter {
        flex: 1;

        min-width: calc(50% - 6px);

        padding: 0 7px;
    }


    .gallery-lightbox {
        padding-right: 10px;
        padding-left: 10px;
    }


    .lightbox-close {
        top: 15px;
        right: 15px;

        width: 40px;
        height: 40px;
    }


    .lightbox-caption h3 {
        font-size: 16px;
    }


    .gallery-cta h2 {
        font-size: 3rem;
    }

}