/* ===== FANTA TROPICAL MIX ANIMATIONS ===== */

/* === KEYFRAMES === */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    25% {
        transform: translateY(-5px) scale(1.02);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
    75% {
        transform: translateY(-5px) scale(1.02);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 122, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 32px rgba(255, 122, 0, 0.5);
    }
}

@keyframes pop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes tilt {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(2deg) scale(1.02);
    }
    75% {
        transform: rotate(-2deg) scale(1.02);
    }
}

@keyframes rise {
    0% {
        bottom: -10%;
        opacity: 0;
        transform: translateX(0) scale(0.8);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: translateX(20px) scale(1.2);
    }
}

/* === ANIMATION CLASSES === */
.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-pulse-delay {
    animation: pulse 2s ease-in-out infinite;
    animation-delay: 0.3s;
}

.animate-pulse-delay-2 {
    animation: pulse 2s ease-in-out infinite;
    animation-delay: 0.6s;
}

.animate-pop {
    animation: pop 0.6s ease-out forwards;
    opacity: 0;
}

.animate-pop-delay {
    animation: pop 0.6s ease-out forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.animate-pop-delay-2 {
    animation: pop 0.6s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.animate-pop-delay-3 {
    animation: pop 0.6s ease-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.animate-pop-delay-4 {
    animation: pop 0.6s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.animate-pop-delay-5 {
    animation: pop 0.6s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.animate-tilt {
    animation: tilt 4s ease-in-out infinite;
}

.animate-rise {
    animation: rise 8s infinite ease-in-out;
}

.animate-rise-delay {
    animation: rise 8s infinite ease-in-out;
    animation-delay: 1s;
}

.animate-rise-delay-2 {
    animation: rise 8s infinite ease-in-out;
    animation-delay: 2s;
}

.animate-rise-delay-3 {
    animation: rise 8s infinite ease-in-out;
    animation-delay: 3s;
}

.animate-rise-delay-4 {
    animation: rise 8s infinite ease-in-out;
    animation-delay: 4s;
}

/* === HOVER ANIMATIONS === */
.fruit-card:hover .fruit-img {
    animation: bounce 0.6s ease-in-out;
}

.cta-button:hover {
    animation: pulse 0.3s ease-in-out;
}

/* === SCROLL ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* === INTERSECTION OBSERVER ANIMATIONS === */
.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === MOBILE OPTIMIZED ANIMATIONS === */
@media (max-width: 768px) {
    .animate-bounce {
        animation-duration: 2.5s;
    }
    
    .animate-float {
        animation-duration: 4s;
    }
    
    .animate-tilt {
        animation-duration: 5s;
    }
    
    /* 모바일에서 부드러운 애니메이션 */
    .fruit-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .fruit-card:hover {
        transform: translateY(-4px);
    }
}

/* === ACCESSIBILITY - REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-float,
    .animate-bounce,
    .animate-pulse,
    .animate-tilt {
        animation: none !important;
    }
    
    /* 기포와 과일 애니메이션은 유지 - 강제로 작동 */
    .bubble {
        animation: rise 8s infinite ease-in-out !important;
    }
    
    /* FANTA 캔 기포 애니메이션도 유지 */
    .fanta-bubble {
        animation-duration: revert !important;
        animation-iteration-count: infinite !important;
    }
    
    .floating-fruit {
        animation-duration: inherit !important;
        animation-iteration-count: infinite !important;
    }
    
    .dynamic-bubble {
        animation: rise 6s infinite ease-in-out !important;
    }
    
    /* 탄산 기포들 강제 활성화 */
    .rising-bubble {
        animation-duration: inherit !important;
        animation-iteration-count: infinite !important;
        animation-timing-function: linear !important;
    }
    
    .fruit-card:hover .fruit-img {
        animation: none !important;
        transform: scale(1.05);
    }
    
    .floating-fruit {
        /* 떠다니는 과일은 애니메이션 유지 */
        position: absolute;
    }
    
    .floating-fruit-img {
        /* 과일 이미지 애니메이션 유지 */
        transform: scale(1);
        position: relative;
    }
}

/* === LOADING ANIMATIONS === */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* === STAGGER ANIMATIONS === */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }