/* Lazy Loading Animations and Page Transitions */

/* Base lazy animation class */
.lazy-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.lazy-animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for article cards */
.articles-list .article-card {
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

/* Splide slide animations - disabled to prevent carousel issues */
/* .splide__slide {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s ease;
}

.splide__slide.is-active {
    opacity: 1;
    transform: translateX(0);
} */

/* Section entrance animations */
.featured-category-section,
.latest-articles,
.custom-banner-section {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.featured-category-section.animate-in,
.latest-articles.animate-in,
.custom-banner-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth page transitions */
.site-main {
    opacity: 0;
    animation: fadeInPage 0.5s ease forwards;
}

@keyframes fadeInPage {
    to {
        opacity: 1;
    }
}

/* Enhanced menu line animation */
nav a::after {
    box-shadow: 0 0 8px rgba(246, 168, 40, 0.3);
}

nav a:hover::after {
    box-shadow: 0 0 12px rgba(246, 168, 40, 0.5);
}

/* Additional animation effects */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.scale-in.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* Fade in animation */
.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.fade-in.animate-in {
    opacity: 1;
}

/* Bounce animation */
.bounce-in {
    opacity: 0;
    transform: scale(0.3);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounce-in.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* Rotate in animation */
.rotate-in {
    opacity: 0;
    transform: rotate(-180deg) scale(0.3);
    transition: all 0.6s ease;
}

.rotate-in.animate-in {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Responsive animations */
@media (max-width: 768px) {
    .lazy-animate {
        transform: translateY(20px);
        transition: all 0.4s ease;
    }
    
    .featured-category-section,
    .latest-articles,
    .custom-banner-section {
        transform: translateY(30px);
        transition: all 0.6s ease;
    }
}

@media (max-width: 480px) {
    .lazy-animate {
        transform: translateY(15px);
        transition: all 0.3s ease;
    }
    
    .featured-category-section,
    .latest-articles,
    .custom-banner-section {
        transform: translateY(20px);
        transition: all 0.5s ease;
    }
}

/* Animation delays for different elements */
.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }

/* Splide slide animation delays - disabled to prevent carousel issues */
/* .splide__slide:nth-child(1) { animation-delay: 0.1s; }
.splide__slide:nth-child(2) { animation-delay: 0.2s; }
.splide__slide:nth-child(3) { animation-delay: 0.3s; }
.splide__slide:nth-child(4) { animation-delay: 0.4s; }
.splide__slide:nth-child(5) { animation-delay: 0.5s; }
.splide__slide:nth-child(6) { animation-delay: 0.6s; } */

/* Loading spinner for lazy loading */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #f6a828;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progressive loading effect */
.progressive-load {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.progressive-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Hover animations for interactive elements */
.interactive-hover {
    transition: all 0.3s ease;
}

.interactive-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Pulse animation for attention */
.pulse-attention {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Shake animation for errors */
.shake-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Success animation */
.success-animation {
    animation: successPop 0.6s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
} 