/* Gallery Styles */

/* Lightbox Customization */
#lightbox {
    background: rgba(0, 0, 0, 0.9) !important;
}

.lb-data .lb-caption {
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.7) !important;
    padding: 10px 15px !important;
    border-radius: 6px !important;
    max-width: 80% !important;
    margin: 0 auto !important;
}

.lb-data .lb-number {
    font-size: 12px !important;
    color: #ccc !important;
    background: rgba(0, 0, 0, 0.5) !important;
    padding: 5px 10px !important;
    border-radius: 15px !important;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    transition: all 0.3s ease !important;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    background: rgba(220, 53, 69, 0.8) !important;
    transform: scale(1.1) !important;
}

.lb-dataContainer {
    background: transparent !important;
    border-radius: 8px !important;
}

/* Loading Animation */
.lb-loader {
    border: 4px solid rgba(255, 255, 255, 0.3) !important;
    border-top: 4px solid #dc3545 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Gallery Item Hover Effects */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(0, 0, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Gallery Image Transitions */
.gallery-image {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

/* Gallery Overlay Animations */
.gallery-overlay {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-overlay {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.9), rgba(0, 0, 0, 0.7));
}

/* Button Hover Effects */
.view-gallery-btn {
    position: relative;
    overflow: hidden;
}

.view-gallery-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.view-gallery-btn:hover::before {
    width: 300px;
    height: 300px;
}

.view-gallery-btn i {
    transition: transform 0.3s ease;
}

.view-gallery-btn:hover i {
    transform: rotate(360deg);
}

/* Filter Animations */
.filter-select {
    transition: all 0.3s ease;
}

.filter-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

/* Gallery Grid Stagger Animation */
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1.0s; }
.gallery-item:nth-child(11) { animation-delay: 1.1s; }
.gallery-item:nth-child(12) { animation-delay: 1.2s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.1rem;
    color: var(--text-medium);
}

.gallery-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(220, 53, 69, 0.3);
    border-top: 3px solid #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Responsive Lightbox */
@media (max-width: 768px) {
    .lb-nav a.lb-prev,
    .lb-nav a.lb-next {
        width: 40px !important;
        height: 40px !important;
    }
    
    .lb-data .lb-caption {
        font-size: 12px !important;
        max-width: 90% !important;
    }
    
    .lb-data .lb-number {
        font-size: 10px !important;
    }
}

/* Print Styles */
@media print {
    .gallery-filters,
    .gallery-overlay,
    .view-gallery-btn {
        display: none !important;
    }
    
    .gallery-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .gallery-grid {
        display: block !important;
    }
    
    .gallery-item {
        width: 100% !important;
        margin-bottom: 20px !important;
    }
}
