/* ==========================================
   Swimgo - Animations
   ========================================== */

/* ---- Scroll-triggered animations ---- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* Fade Up */
[data-animate="fade-up"] {
    transform: translateY(40px);
}

/* Fade Down */
[data-animate="fade-down"] {
    transform: translateY(-40px);
}

/* Fade Left */
[data-animate="fade-left"] {
    transform: translateX(-40px);
}
[data-animate="fade-left"].animated {
    transform: translateX(0);
}

/* Fade Right */
[data-animate="fade-right"] {
    transform: translateX(40px);
}
[data-animate="fade-right"].animated {
    transform: translateX(0);
}

/* Scale */
[data-animate="scale"] {
    transform: scale(.9);
}
[data-animate="scale"].animated {
    transform: scale(1);
}

/* Delay classes */
[data-delay="100"] { transition-delay: .1s; }
[data-delay="200"] { transition-delay: .2s; }
[data-delay="300"] { transition-delay: .3s; }
[data-delay="400"] { transition-delay: .4s; }
[data-delay="500"] { transition-delay: .5s; }
[data-delay="600"] { transition-delay: .6s; }

/* ---- Hover animations ---- */
.hover-lift {
    transition: transform .3s ease, box-shadow .3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

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

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

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

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

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

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

/* ---- Ring animation for WhatsApp button ---- */
@keyframes ring {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102,.4); }
    70% { box-shadow: 0 0 0 15px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

.whatsapp-float a {
    animation: ring 2s infinite;
}

/* ---- Fade In on load ---- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn .6s ease forwards;
}

/* ---- Slide up on load ---- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp .6s ease forwards;
}

/* ---- Counter number animation ---- */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    
    [data-animate] {
        opacity: 1;
        transform: none;
    }
}
