/* =====================================================
   ANIMATIONS - Slide Transitions & Effects
   ===================================================== */

/* Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.1);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Rotate Animations */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 53%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--accent-gold);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-gold), 0 0 40px var(--accent-gold);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   Animation Classes
   ===================================================== */

/* Base Animation Properties */
.animate {
    animation-duration: 0.6s;
    animation-fill-mode: both;
    animation-timing-function: ease-out;
}

.animate--fast {
    animation-duration: 0.3s;
}

.animate--slow {
    animation-duration: 1s;
}

.animate--delay-1 {
    animation-delay: 0.1s;
}

.animate--delay-2 {
    animation-delay: 0.2s;
}

.animate--delay-3 {
    animation-delay: 0.3s;
}

.animate--delay-4 {
    animation-delay: 0.4s;
}

.animate--delay-5 {
    animation-delay: 0.5s;
}

/* Fade Classes */
.animate-fadeIn {
    animation-name: fadeIn;
}

.animate-fadeInUp {
    animation-name: fadeInUp;
}

.animate-fadeInDown {
    animation-name: fadeInDown;
}

.animate-fadeInLeft {
    animation-name: fadeInLeft;
}

.animate-fadeInRight {
    animation-name: fadeInRight;
}

/* Scale Classes */
.animate-scaleIn {
    animation-name: scaleIn;
}

.animate-popIn {
    animation-name: popIn;
}

/* Slide Classes */
.animate-slideInRight {
    animation-name: slideInRight;
}

.animate-slideInLeft {
    animation-name: slideInLeft;
}

/* Other Classes */
.animate-rotateIn {
    animation-name: rotateIn;
}

.animate-bounce {
    animation-name: bounce;
    animation-duration: 1s;
}

.animate-pulse {
    animation-name: pulse;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

.animate-float {
    animation-name: float;
    animation-duration: 3s;
    animation-iteration-count: infinite;
}

.animate-glow {
    animation-name: glow;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

/* =====================================================
   Slide Transitions
   ===================================================== */

/* Slide Entering */
.slide.slide-enter {
    animation: fadeInUp 0.5s ease-out forwards;
}

.slide.slide-enter-right {
    animation: slideInRight 0.5s ease-out forwards;
}

.slide.slide-enter-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

/* Slide Exiting */
.slide.slide-exit {
    animation: fadeOut 0.3s ease-out forwards;
}

.slide.slide-exit-left {
    animation: slideOutLeft 0.5s ease-out forwards;
}

.slide.slide-exit-right {
    animation: slideOutRight 0.5s ease-out forwards;
}

/* =====================================================
   Element Animations on Slide Active
   ===================================================== */

.slide.active .slide-title {
    animation: fadeInDown 0.6s ease-out 0.1s both;
}

.slide.active .slide-subtitle {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.slide.active .slide-body {
    animation: fadeIn 0.6s ease-out 0.3s both;
}

.slide.active .card {
    animation: fadeInUp 0.5s ease-out both;
}

.slide.active .card:nth-child(1) { animation-delay: 0.2s; }
.slide.active .card:nth-child(2) { animation-delay: 0.3s; }
.slide.active .card:nth-child(3) { animation-delay: 0.4s; }
.slide.active .card:nth-child(4) { animation-delay: 0.5s; }

.slide.active .stat-item {
    animation: popIn 0.5s ease-out both;
}

.slide.active .stat-item:nth-child(1) { animation-delay: 0.2s; }
.slide.active .stat-item:nth-child(2) { animation-delay: 0.3s; }
.slide.active .stat-item:nth-child(3) { animation-delay: 0.4s; }

.slide.active .feature-box {
    animation: fadeInLeft 0.5s ease-out both;
}

.slide.active .feature-box:nth-child(1) { animation-delay: 0.1s; }
.slide.active .feature-box:nth-child(2) { animation-delay: 0.2s; }
.slide.active .feature-box:nth-child(3) { animation-delay: 0.3s; }
.slide.active .feature-box:nth-child(4) { animation-delay: 0.4s; }

.slide.active .timeline-item {
    animation: fadeInLeft 0.5s ease-out both;
}

.slide.active .timeline-item:nth-child(1) { animation-delay: 0.2s; }
.slide.active .timeline-item:nth-child(2) { animation-delay: 0.3s; }
.slide.active .timeline-item:nth-child(3) { animation-delay: 0.4s; }
.slide.active .timeline-item:nth-child(4) { animation-delay: 0.5s; }

.slide.active .comparison-side--croatia {
    animation: fadeInLeft 0.6s ease-out 0.2s both;
}

.slide.active .comparison-vs {
    animation: popIn 0.5s ease-out 0.4s both;
}

.slide.active .comparison-side--russia {
    animation: fadeInRight 0.6s ease-out 0.2s both;
}

.slide.active .region-card {
    animation: scaleIn 0.5s ease-out both;
}

.slide.active .region-card:nth-child(1) { animation-delay: 0.1s; }
.slide.active .region-card:nth-child(2) { animation-delay: 0.2s; }
.slide.active .region-card:nth-child(3) { animation-delay: 0.3s; }
.slide.active .region-card:nth-child(4) { animation-delay: 0.4s; }

.slide.active .icon-item {
    animation: fadeInUp 0.4s ease-out both;
}

.slide.active .icon-item:nth-child(1) { animation-delay: 0.1s; }
.slide.active .icon-item:nth-child(2) { animation-delay: 0.15s; }
.slide.active .icon-item:nth-child(3) { animation-delay: 0.2s; }
.slide.active .icon-item:nth-child(4) { animation-delay: 0.25s; }

.slide.active .food-icons span {
    animation: bounce 0.6s ease-out both;
}

.slide.active .food-icons span:nth-child(1) { animation-delay: 0.1s; }
.slide.active .food-icons span:nth-child(2) { animation-delay: 0.15s; }
.slide.active .food-icons span:nth-child(3) { animation-delay: 0.2s; }
.slide.active .food-icons span:nth-child(4) { animation-delay: 0.25s; }
.slide.active .food-icons span:nth-child(5) { animation-delay: 0.3s; }

/* Hover Animations */
.card:hover {
    transform: translateY(-5px);
    transition: transform var(--transition-normal);
}

.btn:hover {
    transform: translateY(-2px);
    transition: transform var(--transition-fast);
}

.nav-btn:hover,
.menu-toggle:hover {
    transform: scale(1.1);
    transition: transform var(--transition-fast);
}

/* Staggered List Items */
.slide.active .styled-list li {
    animation: fadeInLeft 0.4s ease-out both;
}

.slide.active .styled-list li:nth-child(1) { animation-delay: 0.1s; }
.slide.active .styled-list li:nth-child(2) { animation-delay: 0.15s; }
.slide.active .styled-list li:nth-child(3) { animation-delay: 0.2s; }
.slide.active .styled-list li:nth-child(4) { animation-delay: 0.25s; }
.slide.active .styled-list li:nth-child(5) { animation-delay: 0.3s; }
.slide.active .styled-list li:nth-child(6) { animation-delay: 0.35s; }

/* Chart Animation */
.slide.active .chart-container {
    animation: fadeIn 0.6s ease-out 0.3s both;
}

.slide.active .chart-bar {
    animation: growUp 0.8s ease-out both;
}

@keyframes growUp {
    from {
        height: 0;
    }
}

/* Table Animation */
.slide.active table {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.slide.active tr {
    animation: fadeInUp 0.4s ease-out both;
}

.slide.active tr:nth-child(1) { animation-delay: 0.1s; }
.slide.active tr:nth-child(2) { animation-delay: 0.15s; }
.slide.active tr:nth-child(3) { animation-delay: 0.2s; }
.slide.active tr:nth-child(4) { animation-delay: 0.25s; }
.slide.active tr:nth-child(5) { animation-delay: 0.3s; }
