/* Lightbox Modal Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 1400px;
    max-height: 90vh;
    width: 90%;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox-image.loaded {
    opacity: 1;
    transform: scale(1);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    transition: color 0.3s ease, transform 0.2s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    color: #ccc;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 30px;
    cursor: pointer;
    padding: 20px 15px;
    transition: background-color 0.3s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 10001;
}

/* Loading spinner */
.lightbox-loader {
    position: absolute;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Make gallery images clickable */
.gallery-img-wrapper {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-img-wrapper:hover {
    transform: scale(1.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        width: 95%;
        max-height: 80vh;
        height: 80vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
    }
    
    .lightbox-nav {
        font-size: 24px;
        padding: 15px 10px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-counter {
        bottom: 10px;
        font-size: 14px;
        padding: 8px 16px;
    }
}
