/* ===== Legacy Animation Port ===== */
/* This restores the flash-free animation from the legacy version */

@keyframes fadeInUpLegacy {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.gallery-item {
    /* Ensure initial state is invisible to prevent flash */
    opacity: 0;
    /* Use forwards to keep the end state (visible) */
    animation-fill-mode: forwards;
}

.gallery-item.fade-in-up {
    animation: fadeInUpLegacy 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Static visible state to allow hover effects to work after animation */
.gallery-item.visible {
    opacity: 1;
    animation: none;
}

/* Stagger delays managed by JS or CSS */
.gallery-item.delay-100 {
    animation-delay: 0.1s;
}

.gallery-item.delay-200 {
    animation-delay: 0.2s;
}

.gallery-item.delay-300 {
    animation-delay: 0.3s;
}

.gallery-item.delay-400 {
    animation-delay: 0.4s;
}

.gallery-item.delay-500 {
    animation-delay: 0.5s;
}

.gallery-item.delay-600 {
    animation-delay: 0.6s;
}

.gallery-item.delay-700 {
    animation-delay: 0.7s;
}

.gallery-item.delay-800 {
    animation-delay: 0.8s;
}

.gallery-item.delay-900 {
    animation-delay: 0.9s;
}

.gallery-item.delay-1000 {
    animation-delay: 1.0s;
}