/* Additional Styles for Modern Gallery Plugin */

/* Enhanced Lightbox Styles */
.lb-outerContainer {
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.lb-dataContainer {
    border-radius: 0 0 15px 15px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
}

.lb-data .lb-caption {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-align: center;
    padding: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.9;
    transition: all 0.3s ease;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lb-closeContainer {
    padding: 10px;
}

.lb-close {
    opacity: 0.8;
    transition: all 0.3s ease;
}

.lb-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Enhanced Lightbox Centering */
.lb-outerContainer {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

.lb-dataContainer {
    position: relative;
    margin-top: 10px;
}

/* Enhanced Gallery Items */
.gallery-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    transform: translateX(100%);
}

.gallery-item img {
    transition: all 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.15);
    filter: brightness(1.1);
}

/* Enhanced Image Overlay */
.image-overlay {
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    backdrop-filter: blur(5px);
}

.image-overlay .image-title {
    font-size: 16px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    display: block;
    margin-bottom: 5px;
}

.image-overlay .image-category {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    display: block;
}

/* Loading Animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    z-index: 10000;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

/* Gallery Category Animation */
.gallery-category {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Enhanced Hover Effects */
.gallery-item.hover-effect {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.gallery-item.clicked {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .lb-outerContainer {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }
    

    
    .gallery-item:hover img {
        transform: scale(1.05);
    }
}

@media (max-width: 480px) {
    .lb-data .lb-caption {
        font-size: 14px;
        padding: 10px;
    }
    

}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

/* Enhanced Focus States */

.gallery-item:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5);
}

/* Loading States */
.gallery-item.loading {
    pointer-events: none;
}

.gallery-item.loading img {
    opacity: 0.5;
}

.gallery-item.lightbox-opening {
    transform: scale(0.95);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
}

.gallery-item.clicked {
    transform: scale(0.9);
    transition: transform 0.1s ease;
}

/* Error States */
.gallery-item.error img {
    opacity: 0.3;
    filter: grayscale(100%);
}

.gallery-item.error::after {
    content: 'خطأ في تحميل الصورة';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 12px;
    text-align: center;
} 