/* ============================================
   GALLERY LIGHTBOX - PREMIUM DARK STYLE
   Matching LEKYN Dark Theme
   ============================================ */

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Overlay */
.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 18, 0.95);
    backdrop-filter: blur(8px);
}

/* Container */
.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    background: rgba(42, 42, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    color: #F5F5F3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: #FABF03;
    color: #1D1D1B;
    border-color: #FABF03;
    transform: rotate(90deg);
}

/* Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(42, 42, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    color: #F5F5F3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
}

.lightbox-nav:hover {
    background: #FABF03;
    color: #1D1D1B;
    border-color: #FABF03;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

/* Content */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Image */
.lightbox-image {
    max-width: 100%;
    max-height: calc(85vh - 8rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: lightboxImageFadeIn 0.3s ease;
}

@keyframes lightboxImageFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Caption */
.lightbox-caption {
    background: rgba(42, 42, 39, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: #F5F5F3;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    max-width: 600px;
    backdrop-filter: blur(8px);
}

/* Counter */
.lightbox-counter {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(42, 42, 39, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    padding: 0.5rem 1.25rem;
    color: #F5F5F3;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.lightbox-separator {
    color: #8A8A87;
}

/* Thumbnails Strip */
.lightbox-thumbnails {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(42, 42, 39, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    max-width: 90%;
    overflow-x: auto;
    backdrop-filter: blur(8px);
    scrollbar-width: thin;
    scrollbar-color: #FABF03 rgba(255, 255, 255, 0.1);
}

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

.lightbox-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.lightbox-thumbnails::-webkit-scrollbar-thumb {
    background: #FABF03;
    border-radius: 3px;
}

.lightbox-thumb {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    opacity: 0.5;
}

.lightbox-thumb:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.lightbox-thumb.active {
    border-color: #FABF03;
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(250, 191, 3, 0.2);
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lightbox-container {
        padding: 1rem;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .lightbox-nav {
        width: 3rem;
        height: 3rem;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
    
    .lightbox-counter {
        top: 1rem;
        font-size: 0.8125rem;
        padding: 0.375rem 1rem;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 80%;
    }
    
    .lightbox-image {
        max-height: calc(80vh - 10rem);
        border-radius: 0.5rem;
    }
    
    .lightbox-caption {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }
    
    .lightbox-thumbnails {
        bottom: 1rem;
        padding: 0.75rem;
        gap: 0.5rem;
        max-width: 95%;
    }
    
    .lightbox-thumb {
        width: 3rem;
        height: 3rem;
    }
}

/* Loading State */
.lightbox-image[src=""] {
    display: none;
}

/* Accessibility */
.lightbox-close:focus,
.lightbox-nav:focus,
.lightbox-thumb:focus {
    outline: 2px solid #FABF03;
    outline-offset: 2px;
}

/* Prevent body scroll when lightbox is active */
body.lightbox-open {
    overflow: hidden;
}
