/* ==========================================================================
   Caicedo Cleaning
   Lightbox
   ========================================================================== */

/* Prevent page scrolling while lightbox is open */
body.gallery-lightbox-open {
    overflow: hidden;
    touch-action: none;
}

/* ==========================================================================
   Lightbox Container
   ========================================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
    z-index: 99999;
}

.lightbox.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Overlay
   ========================================================================== */

.lightbox-overlay {
    position: absolute;
    inset: 0;
    cursor: zoom-out;
}

/* ==========================================================================
   Content Container
   ========================================================================== */

.lightbox-container {
    position: relative;
    z-index: 2;
    width: min(1200px, 95vw);
    max-height: 95vh;

    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   Main Image
   ========================================================================== */

.lightbox-image-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightboxImage {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    border-radius: 18px;
    object-fit: contain;

    box-shadow: 0 25px 70px rgba(0, 0, 0, .45);

    opacity: 1;
    transform: scale(1);

    transition:
        opacity .20s ease,
        transform .20s ease;
}

#lightboxImage.gallery-image-changing {
    opacity: 0;
    transform: scale(.98);
}

/* ==========================================================================
   Caption
   ========================================================================== */

.lightbox-caption {
    margin-top: 20px;
    color: #fff;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
    max-width: 900px;
    padding: 0 20px;
}

/* ==========================================================================
   Previous / Next Buttons
   ========================================================================== */

.lightbox-prev,
.lightbox-next {

    position: absolute;
    top: 45%;
    transform: translateY(-50%);

    width: 60px;
    height: 60px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,.92);

    color: #333;

    font-size: 32px;

    cursor: pointer;

    transition: .25s;

    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-prev:hover,
.lightbox-next:hover {

    background: #fc780c;
    color: #fff;

    transform: translateY(-50%) scale(1.08);

}

/* ==========================================================================
   Close Button
   ========================================================================== */

.lightbox-close {

    position: absolute;

    top: -60px;
    right: 0;

    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    background: #fff;

    color: #333;

    cursor: pointer;

    font-size: 28px;

    transition: .25s;

}

.lightbox-close:hover {

    background: #fc780c;
    color: #fff;

    transform: rotate(90deg);

}

/* ==========================================================================
   Thumbnails
   ========================================================================== */

.lightbox-thumbnails {

    width: 100%;

    display: flex;

    justify-content: center;

    gap: 12px;

    overflow-x: auto;

    margin-top: 25px;

    padding: 10px 5px;

    scrollbar-width: thin;

}

.lightbox-thumbnails::-webkit-scrollbar {

    height: 8px;

}

.lightbox-thumbnails::-webkit-scrollbar-thumb {

    background: #fc780c;
    border-radius: 50px;

}

.lightbox-thumb {

    width: 95px;
    height: 70px;

    object-fit: cover;

    border-radius: 10px;

    border: 3px solid transparent;

    opacity: .55;

    cursor: pointer;

    transition: .25s;

    flex-shrink: 0;

}

.lightbox-thumb:hover {

    opacity: 1;

    transform: scale(1.06);

}

.lightbox-thumb.active {

    opacity: 1;

    border-color: #fc780c;

    transform: scale(1.06);

}

/* ==========================================================================
   Keyboard Focus
   ========================================================================== */

.lightbox-prev:focus-visible,
.lightbox-next:focus-visible,
.lightbox-close:focus-visible,
.lightbox-thumb:focus-visible {

    outline: 3px solid #fc780c;
    outline-offset: 4px;

}

/* ==========================================================================
   Loading Animation
   ========================================================================== */

#lightboxImage.loading {

    filter: blur(6px);
    opacity: .45;

}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width:1200px){

    .lightbox-prev{

        left:10px;

    }

    .lightbox-next{

        right:10px;

    }

}

@media (max-width:900px){

    #lightboxImage{

        max-height:65vh;

    }

    .lightbox-prev,
    .lightbox-next{

        width:52px;
        height:52px;
        font-size:26px;

    }

}

@media (max-width:600px){

    .lightbox-container{

        width:95vw;

    }

    #lightboxImage{

        max-height:55vh;

    }

    .lightbox-prev,
    .lightbox-next{

        width:44px;
        height:44px;

        font-size:22px;

    }

    .lightbox-close{

        top:-45px;

    }

    .lightbox-thumb{

        width:70px;
        height:55px;

    }

    .lightbox-caption{

        font-size:15px;

    }

}




body.lightbox-open {
    overflow: hidden;
}

.lightbox.is-loading .lightbox-image-wrapper {
    opacity: 0.6;
}

.lightbox-image-wrapper {
    transition: opacity 0.2s ease;
}

.lightbox-thumb-button.active {
    outline: 3px solid #fc780c;
    outline-offset: 2px;
}