/**
 * Agios Vasileios Theme - Animations
 *
 * @package Agios_Vasileios
 * @since 1.0.0
 */

/* ==========================================================================
   Ticker Animation (Announcements Bar)
   ========================================================================== */

@keyframes avl-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.avl-animate-ticker {
    animation: avl-ticker 45s linear infinite;
}

/* Pause on hover */
.avl-announcements:hover .avl-animate-ticker {
    animation-play-state: paused;
}

/* ==========================================================================
   Hero Image Slow Zoom
   ========================================================================== */

@keyframes avl-slow-zoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.08);
    }
}

.avl-animate-slow-zoom {
    animation: avl-slow-zoom 18s ease-out forwards;
}

/* ==========================================================================
   Fade In Animations
   ========================================================================== */

@keyframes avl-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes avl-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes avl-fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.avl-animate-fade-in {
    animation: avl-fade-in 1s ease-out forwards;
}

.avl-animate-fade-in-up {
    animation: avl-fade-in-up 1s ease-out forwards;
}

.avl-animate-fade-in-down {
    animation: avl-fade-in-down 1s ease-out forwards;
}

/* Animation delays */
.avl-animate-delay-100 { animation-delay: 0.1s; }
.avl-animate-delay-200 { animation-delay: 0.2s; }
.avl-animate-delay-300 { animation-delay: 0.3s; }
.avl-animate-delay-400 { animation-delay: 0.4s; }
.avl-animate-delay-500 { animation-delay: 0.5s; }
.avl-animate-delay-600 { animation-delay: 0.6s; }
.avl-animate-delay-700 { animation-delay: 0.7s; }
.avl-animate-delay-800 { animation-delay: 0.8s; }
.avl-animate-delay-900 { animation-delay: 0.9s; }
.avl-animate-delay-1000 { animation-delay: 1s; }

/* ==========================================================================
   Mobile Menu Animation
   ========================================================================== */

@keyframes avl-menu-slide-down {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 400px;
    }
}

@keyframes avl-menu-slide-up {
    from {
        opacity: 1;
        max-height: 400px;
    }
    to {
        opacity: 0;
        max-height: 0;
    }
}

.avl-mobile-nav--opening {
    animation: avl-menu-slide-down 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.avl-mobile-nav--closing {
    animation: avl-menu-slide-up 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ==========================================================================
   Lightbox Animation
   ========================================================================== */

@keyframes avl-lightbox-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes avl-lightbox-image-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.avl-lightbox--opening {
    animation: avl-lightbox-fade-in 0.4s ease-out forwards;
}

.avl-lightbox--opening .avl-lightbox__image {
    animation: avl-lightbox-image-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

/* ==========================================================================
   Button Hover Effects
   ========================================================================== */

@keyframes avl-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.avl-animate-pulse {
    animation: avl-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

@keyframes avl-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.avl-animate-spin {
    animation: avl-spin 1s linear infinite;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .avl-animate-ticker {
        animation: none;
    }

    .avl-animate-slow-zoom {
        animation: none;
    }

    .avl-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}
