
/* =========================================================
   PROJECT IMAGE SECTIONS
========================================================= */

.pj-hero-grid > .tint,
.pj-hero-grid .pj-hero-side .tint {
    overflow: hidden;
    position: relative;
}

.pj-hero-grid img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================================
   FEATURED PROJECT IMAGE
========================================================= */

.project-featured-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 760px;
    object-fit: cover;
}


/* =========================================================
   BEFORE & AFTER — TWO COLUMN SLIDER
========================================================= */

.project-before-after {
    overflow: hidden;
}

.ba-slider {
    position: relative;
    margin-top: 40px;
}


/* ---------------------------------------------------------
   SLIDE
--------------------------------------------------------- */

.ba-slides {
    position: relative;
    width: 100%;
}

.ba-slide {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ba-slide.active {
    display: grid;
}


/* ---------------------------------------------------------
   IMAGE
--------------------------------------------------------- */

.ba-column {
    min-width: 0;
}

.ba-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eee;
}

.ba-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.ba-column:hover .ba-image-wrap img {
    transform: scale(1.025);
}


/* ---------------------------------------------------------
   LABEL
--------------------------------------------------------- */

.ba-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 18px 0 0;

    border-bottom: 1px solid rgba(0, 0, 0, .12);
    padding-bottom: 18px;
}

.ba-label span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--stone);
}

.ba-label strong {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}


/* ---------------------------------------------------------
   CONTROLS
--------------------------------------------------------- */

.ba-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
}

.ba-prev,
.ba-next {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0, 0, 0, .15);
    background: transparent;
    color: var(--ink);

    cursor: pointer;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease;
}

.ba-prev:hover,
.ba-next:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.ba-prev i,
.ba-next i {
    font-size: 14px;
}


/* ---------------------------------------------------------
   COUNTER
--------------------------------------------------------- */

.ba-counter {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 75px;
    justify-content: center;

    font-size: 11px;
    letter-spacing: .12em;
    color: var(--stone);
}

.ba-counter span:first-child {
    color: var(--ink);
}

.ba-counter-line {
    width: 25px;
    height: 1px;
    background: currentColor;
}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 768px) {

    .ba-slide {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .ba-image-wrap {
        aspect-ratio: 4 / 3;
    }

    .ba-label {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .ba-controls {
        margin-top: 28px;
    }

    .ba-prev,
    .ba-next {
        width: 44px;
        height: 44px;
    }
}

/*
|--------------------------------------------------------------------------
| Divider
|--------------------------------------------------------------------------
*/

.compare-line {
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, .25);
    pointer-events: none;
}

.compare-handle {
    position: absolute;
    z-index: 6;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
    pointer-events: none;
}

.compare-handle svg {
    width: 24px;
    height: 24px;
}


/*
|--------------------------------------------------------------------------
| Before / After Labels
|--------------------------------------------------------------------------
*/

.compare-tag {
    position: absolute;
    z-index: 7;
    top: 20px;
    padding: 8px 14px;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    font-size: 11px;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
    pointer-events: none;
}

.compare-tag.left {
    left: 20px;
}

.compare-tag.right {
    right: 20px;
}


/* =========================================================
   IMAGE GALLERY
========================================================= */

.masonry .gallery-item {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.masonry .gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .45s ease;
}

.masonry .gallery-item:hover img {
    transform: scale(1.035);
}


/* =========================================================
   IMAGE MODAL / LIGHTBOX
========================================================= */

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(10, 10, 10, .94);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}

.image-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.image-modal-content {
    position: relative;
    width: min(1200px, 92vw);
    height: min(85vh, 850px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-image {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 15px 60px rgba(0, 0, 0, .4);
}


/* Close */

.image-modal-close {
    position: fixed;
    top: 22px;
    right: 28px;
    z-index: 10;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: .25s ease;
}

.image-modal-close:hover {
    background: #fff;
    color: #111;
}


/* Previous / Next */

.image-modal-prev,
.image-modal-next {
    position: fixed;
    top: 50%;
    z-index: 10;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: .25s ease;
}

.image-modal-prev {
    left: 25px;
}

.image-modal-next {
    right: 25px;
}

.image-modal-prev:hover,
.image-modal-next:hover {
    background: #fff;
    color: #111;
}


/* Counter */

.image-modal-counter {
    position: fixed;
    left: 50%;
    bottom: 25px;
    transform: translateX(-50%);
    z-index: 10;
    color: rgba(255,255,255,.85);
    font-size: 12px;
    letter-spacing: .12em;
}


/* Prevent body scrolling */

body.modal-open {
    overflow: hidden;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .compare {
        aspect-ratio: 4 / 3;
    }

    .compare-handle {
        width: 44px;
        height: 44px;
    }

    .compare-handle svg {
        width: 20px;
        height: 20px;
    }

    .compare-tag {
        top: 12px;
        padding: 7px 10px;
        font-size: 9px;
    }

    .compare-tag.left {
        left: 12px;
    }

    .compare-tag.right {
        right: 12px;
    }

    .image-modal {
        padding: 15px;
    }

    .image-modal-content {
        width: 100%;
        height: 80vh;
    }

    .image-modal-image {
        max-width: 94vw;
        max-height: 78vh;
    }

    .image-modal-close {
        top: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
    }

    .image-modal-prev,
    .image-modal-next {
        top: auto;
        bottom: 18px;
        width: 44px;
        height: 44px;
        transform: none;
    }

    .image-modal-prev {
        left: 20px;
    }

    .image-modal-next {
        right: 20px;
    }

    .image-modal-counter {
        bottom: 31px;
    }
}