/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.lightbox-content img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ff6b6b;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-nav:hover {
    color: #007cba;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 16px;
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-radius: 5px;
    max-width: 80%;
}

/* دعم RTL */
[dir="rtl"] .lightbox-close {
    right: auto;
    left: 30px;
}

[dir="rtl"] .lightbox-nav.prev {
    left: auto;
    right: 20px;
}

[dir="rtl"] .lightbox-nav.next {
    right: auto;
    left: 20px;
}

@media (max-width: 768px) {
    .lightbox-content img {
        max-width: 95%;
        max-height: 80%;
    }
    
    .lightbox-nav {
        font-size: 35px;
        padding: 15px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}