/* LA VECCHIA LIGHTBOX - ULTRA CLEAN & MODERN */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    opacity: 0;
}

.image-lightbox.is-open {
    display: flex;
    animation: lv-glass-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* GLASS MORPH BACKDROP */
.lv-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    opacity: 0;
    animation: lv-backdrop-blur-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* MODERN GLASS CLOSE BUTTON */
.lv-lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0;
    appearance: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(-10px);
    animation: lv-button-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.lv-lightbox-close:hover,
.lv-lightbox-close:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(90deg);
    outline: none;
}

.lv-lightbox-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 2;
}

/* MAIN CONTENT */
.lv-lightbox-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
}

/* TRACK */
.lv-lightbox-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* SLIDE */
.lv-lightbox-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 2px;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    animation: lv-slide-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* IMAGE */
.lv-lightbox-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: auto;
    cursor: grab;
    user-select: none;
    opacity: 0;
    animation: lv-image-zoom-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: bicubic;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.lv-lightbox-slide img:active {
    cursor: grabbing;
}

/* THUMBNAILS */
.lv-lightbox-thumbnails {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 102;
    min-height: 110px;
    align-items: center;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(20px);
    animation: lv-thumbs-slide-up 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    flex-wrap: nowrap;
}

.lv-lightbox-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.lv-lightbox-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.lv-lightbox-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.lv-lightbox-thumbnail {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    padding: 0;
    margin: 0;
    appearance: none;
    background: none;
    transform: scale(0.95);
}

.lv-lightbox-thumbnail:hover,
.lv-lightbox-thumbnail:focus {
    opacity: 0.9;
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05) translateY(-5px);
    outline: none;
}

.lv-lightbox-thumbnail.is-active {
    opacity: 1;
    border-color: #d4af37;
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

.lv-lightbox-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* CAPTION ONLY - NO FILE NAMES */
.lv-lightbox-info {
    position: absolute;
    bottom: 130px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 103;
    pointer-events: none;
    padding: 0 20px;
}

/* COMPLETELY HIDE ANY CAPTION THAT'S JUST A FILE NAME */
.lv-lightbox-caption {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    max-width: 80%;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0;
    transform: translateY(10px);
    animation: lv-caption-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
    display: none; /* Hidden by default */
}

/* HIDE CAPTIONS THAT ARE JUST FILE NAMES (e.g., "I11A0940") */
.lv-lightbox-caption:empty,
.lv-lightbox-caption:contains("IMG_"),
.lv-lightbox-caption:contains("DSC_"),
.lv-lightbox-caption:matches("[A-Z][0-9]"), /* Pattern like I11A0940 */
.lv-lightbox-caption[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
}

/* ANIMATIONS */
@keyframes lv-glass-fade-in {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

@keyframes lv-backdrop-blur-in {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

@keyframes lv-button-fade-in {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lv-slide-fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes lv-image-zoom-in {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes lv-thumbs-slide-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lv-caption-fade-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lv-glass-fade-out {
    0% {
        opacity: 1;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    100% {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
    .lv-lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .lv-lightbox-close svg {
        width: 18px;
        height: 18px;
    }
    
    .lv-lightbox-thumbnails {
        padding: 12px;
        min-height: 90px;
    }
    
    .lv-lightbox-thumbnail {
        width: 70px;
        height: 70px;
    }
    
    .lv-lightbox-info {
        bottom: 110px;
    }
    
    .lv-lightbox-caption {
        max-width: 90%;
        font-size: 14px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .lv-lightbox-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .lv-lightbox-caption {
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* COMPLETELY DISABLE ELEMENTOR'S DEFAULT LIGHTBOX */
.elementor-lightbox {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.swiper-container, 
.pswp {
    display: none !important;
}

/* FIX BODY SCROLL WITHOUT JUMPING */
body.has-image-lightbox.image-lightbox-open {
    overflow: hidden;
    position: relative;
    height: 100vh;
}