/* Lean Lightbox - Lightweight Image Lightbox */

/* Lightbox Overlay */
.lean-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lean-lightbox.active {
    display: flex;
    opacity: 1;
}

/* Lightbox Content Container */
.lean-lightbox-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Lightbox Image */
.lean-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* Lightbox Caption */
.lean-lightbox-caption {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 12px 20px;
    margin-top: 15px;
    border-radius: 4px;
    max-width: 600px;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}

/* Close Button */
.lean-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.lean-lightbox-close:hover {
    transform: scale(1.1);
}

/* Navigation Arrows */
.lean-lightbox-prev,
.lean-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 100000;
}

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

.lean-lightbox-prev {
    left: 30px;
}

.lean-lightbox-next {
    right: 30px;
}

/* Loading Spinner */
.lean-lightbox-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: lean-spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -20px;
    margin-top: -20px;
}

@keyframes lean-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Counter */
.lean-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 30px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 100000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lean-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
    
    .lean-lightbox-prev,
    .lean-lightbox-next {
        font-size: 30px;
        padding: 8px 12px;
    }
    
    .lean-lightbox-prev {
        left: 10px;
    }
    
    .lean-lightbox-next {
        right: 10px;
    }
    
    .lean-lightbox-counter {
        top: 10px;
        left: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .lean-lightbox-caption {
        font-size: 13px;
        padding: 10px 15px;
        margin-top: 10px;
    }
    
    .lean-lightbox-image {
        max-height: 70vh;
    }
}

/* Cursor for lightbox images */
.lightbox-image {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.lightbox-image:hover {
    opacity: 0.9;
}

