/* Enhanced Festival Image Gallery Styles */

/* Gallery Section Container */
.festival-gallery-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 3rem;
    margin: 3rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(50, 52, 142, 0.1);
}

.festival-gallery-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #32348e;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
}

.festival-gallery-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #32348e 0%, #4549b3 100%);
    border-radius: 2px;
}

.festival-gallery-subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Gallery Grid - Masonry Style */
.festival-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-image-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.gallery-image-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(50, 52, 142, 0.15);
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-image-item:hover .gallery-image {
    transform: scale(1.1);
}

/* Image Overlay */
.gallery-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(50, 52, 142, 0.8) 0%,
        rgba(69, 73, 179, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-image-item:hover .gallery-image-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    text-align: center;
    color: white;
    padding: 1rem;
}

.gallery-expand-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.gallery-expand-text {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
}

/* Image Caption */
.gallery-image-caption {
    padding: 1rem;
    background: white;
}

.gallery-caption-text {
    font-size: 0.9rem;
    color: #495057;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Load More Button */
.gallery-load-more {
    text-align: center;
    margin-top: 2rem;
}

.gallery-load-more-btn {
    background: linear-gradient(135deg, #32348e 0%, #4549b3 100%);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(50, 52, 142, 0.3);
}

.gallery-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(50, 52, 142, 0.4);
    background: linear-gradient(135deg, #4549b3 0%, #32348e 100%);
}

.gallery-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Enhanced Modal Styles */
.festival-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    backdrop-filter: blur(10px);
    animation: modalFadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-modal-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.gallery-modal-caption {
    padding: 1.5rem;
    background: white;
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Modal Navigation */
.gallery-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
}

.gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
}

.gallery-modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.gallery-modal-prev {
    left: 2rem;
}

.gallery-modal-next {
    right: 2rem;
}

.gallery-modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Modal Counter */
.gallery-modal-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.gallery-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(50, 52, 142, 0.3);
    border-radius: 50%;
    border-top-color: #32348e;
    animation: spin 1s ease-in-out infinite;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .festival-gallery-section {
        padding: 2rem;
    }
    
    .festival-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-image-container {
        height: 200px;
    }
    
    .gallery-modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .gallery-modal-close {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .festival-gallery-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .festival-gallery-title {
        font-size: 1.8rem;
    }
    
    .festival-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .gallery-image-container {
        height: 180px;
    }
    
    .gallery-modal-content {
        padding: 1rem;
    }
    
    .gallery-modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .gallery-modal-prev {
        left: 1rem;
    }
    
    .gallery-modal-next {
        right: 1rem;
    }
    
    .gallery-modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .festival-gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-image-container {
        height: 220px;
    }
    
    .gallery-modal-image-container {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .gallery-modal-caption {
        padding: 1rem;
        font-size: 0.9rem;
    }
} 