/* Gallery Smooth Transitions */

/* Fade-in animation for gallery sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Apply fade-in to gallery sections on load */
.gallery {
    animation: fadeIn 0.6s ease-out;
}

.gallery__unit {
    animation: fadeInUp 0.5s ease-out backwards;
}

/* Stagger animation for gallery items */
.gallery__unit:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery__unit:nth-child(2) {
    animation-delay: 0.2s;
}

.gallery__unit:nth-child(3) {
    animation-delay: 0.3s;
}

.gallery__unit:nth-child(4) {
    animation-delay: 0.4s;
}

.gallery__unit:nth-child(5) {
    animation-delay: 0.5s;
}

.gallery__unit:nth-child(n+6) {
    animation-delay: 0.6s;
}

/* Gallery quote fade-in */
.gallery-quote {
    animation: fadeIn 0.8s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: backwards;
}

/* Gallery preview buttons */
.gallery-preview {
    animation: fadeIn 0.5s ease-out;
}

/* Smooth transition for filter buttons */
.gallery-preview__button {
    transition: all 0.3s ease;
}

/* Page transition overlay */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--main-color);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Loading state for gallery */
.gallery-container.loading .gallery {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Prevent animation on resize */
.no-transition * {
    animation: none !important;
    transition: none !important;
}

/* Index page animations */
.main__title {
    animation: fadeInUp 0.8s ease-out;
}

.hero {
    animation: fadeIn 0.8s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
}

.exhibitions {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: backwards;
}

.about {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: backwards;
}

/* Exhibition items stagger */
.exhibition__item {
    animation: fadeInUp 0.6s ease-out backwards;
}

.exhibition__item:nth-child(1) {
    animation-delay: 0.4s;
}

.exhibition__item:nth-child(2) {
    animation-delay: 0.5s;
}

.exhibition__item:nth-child(3) {
    animation-delay: 0.6s;
}

.exhibition__item:nth-child(n+4) {
    animation-delay: 0.7s;
}
