/* ==========================================================================
   SINGLE PROJECT SWIPER & VERTICAL SCROLL LIGHTBOX
   Author: Antigravity - Senior Developer
   ========================================================================== */

/* Main Swiper Slider */
.project-gallery-swiper {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.project-gallery-swiper .swiper-slide {
    width: 100%;
}

.project-gallery-swiper .swiper-slide a {
    display: block;
    cursor: zoom-in;
    outline: none;
}

/* Custom Navigation arrows */
.project-gallery-swiper .swiper-button-next,
.project-gallery-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
}

.project-gallery-swiper .swiper-button-next::after,
.project-gallery-swiper .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 900;
}

.project-gallery-swiper .swiper-button-next:hover,
.project-gallery-swiper .swiper-button-prev:hover {
    background: #bb232b; /* Theme Red Color */
    transform: scale(1.05);
}

/* Thumbnails Swiper Slider */
.project-thumbs-swiper {
    width: 100%;
    margin-top: 10px;
    padding: 2px 0;
}

.project-thumbs-swiper .swiper-slide {
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
}

.project-thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #bb232b; /* Theme Red Color active border */
}

/* ==========================================================================
   CUSTOM LIGHTBOX POPUP - VERTICAL STACKED SCROLL
   ========================================================================== */

/* Lock Body Scroll when popup is open */
body.custom-lightbox-open {
    overflow: hidden !important;
    height: 100vh !important;
}

/* Fullscreen Lightbox Backdrop */
.custom-lightbox-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(6, 6, 6, 0.88); /* Semi-transparent dark background */
    backdrop-filter: blur(12px) saturate(130%); /* Elegant blur effect */
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Open State */
.custom-lightbox-popup.open {
    opacity: 1;
    visibility: visible;
}

/* Scroll Container inside Popup */
.custom-lightbox-scroll-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 80px 20px 60px 20px; /* Padding top for close button, bottom for spacing */
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Enable momentum scrolling on iOS */
}

/* Scrollbar Customization for modern browsers */
.custom-lightbox-scroll-container::-webkit-scrollbar {
    width: 8px;
}
.custom-lightbox-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}
.custom-lightbox-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.custom-lightbox-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
}

/* Stacked Images List */
.custom-lightbox-images-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px; /* Spacing between stacked images */
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Single Stacked Image Item */
.custom-lightbox-image-item {
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1), transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Staggered transition on open */
.custom-lightbox-popup.open .custom-lightbox-image-item {
    opacity: 1;
    transform: translateY(0);
}

/* Image Element inside Popup */
.custom-lightbox-image-item img {
    max-width: 100%;
    max-height: 85vh;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease;
}

/* Close Button (Fixed top right) */
.custom-lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 55px;
    line-height: 40px;
    font-weight: 300;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000000;
    transition: color 0.25s ease, transform 0.25s ease;
    outline: none;
    box-shadow: none !important;
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    min-height: 50px;
}

.custom-lightbox-close:hover {
    color: #fff;
    transform: scale(1.15) rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .custom-lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 45px;
    }
    .custom-lightbox-scroll-container {
        padding: 30px 10px 30px;
    }
    .custom-lightbox-images-list {
        gap: 25px;
    }
    .project-gallery-swiper .swiper-button-next,
    .project-gallery-swiper .swiper-button-prev {
        width: 36px;
        height: 36px;
    }
    .project-gallery-swiper .swiper-button-next::after,
    .project-gallery-swiper .swiper-button-prev::after {
        font-size: 14px;
    }
}
