/* ==========================================
   LIGHTBOX MODAL STYLES
   ========================================== */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.lightbox-image {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease-out;
}

@keyframes lightboxZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    background: white;
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
    z-index: 10;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-counter {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.lightbox-thumbnails {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    max-width: 90%;
    overflow-x: auto;
    scrollbar-width: thin;
}

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

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

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

.lightbox-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 0.375rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    opacity: 0.6;
}

.lightbox-thumb:hover {
    opacity: 1;
    border-color: white;
    transform: scale(1.05);
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: white;
}

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

/* Gallery main image transition */
.gallery-image {
    transition: opacity 0.3s ease-in-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lightbox-content {
        padding: 1rem;
    }
    
    .lightbox-image {
        max-width: 95%;
        max-height: 60vh;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
    
    .lightbox-close {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }
    
    .lightbox-counter {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }
    
    .lightbox-thumbnails {
        max-width: 95%;
        padding: 0.5rem;
    }
    
    .lightbox-thumb {
        width: 60px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .lightbox-prev svg,
    .lightbox-next svg {
        width: 24px;
        height: 24px;
    }
}