/**
 * Global Animation System
 * BackIn Effects and Other Animations
 */

/* ---------- BACKIN ANIMATIONS ---------- */

/* BackInRight Animation */
@keyframes backInRight {
    0% {
        transform: translateX(200px) scale(0.7);
        opacity: 0.7;
    }
    80% {
        transform: translateX(-10px) scale(0.9);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.animate-backInRight {
    animation: backInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* BackInLeft Animation */
@keyframes backInLeft {
    0% {
        transform: translateX(-200px) scale(0.7);
        opacity: 0.7;
    }
    80% {
        transform: translateX(10px) scale(0.9);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.animate-backInLeft {
    animation: backInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* BackInUp Animation */
@keyframes backInUp {
    0% {
        transform: translateY(200px) scale(0.7);
        opacity: 0.7;
    }
    80% {
        transform: translateY(-10px) scale(0.9);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.animate-backInUp {
    animation: backInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* BackInDown Animation */
@keyframes backInDown {
    0% {
        transform: translateY(-200px) scale(0.7);
        opacity: 0.7;
    }
    80% {
        transform: translateY(10px) scale(0.9);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.animate-backInDown {
    animation: backInDown 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ---------- DELAY CLASSES ---------- */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-700 { animation-delay: 0.7s; }
.animation-delay-800 { animation-delay: 0.8s; }

/* ---------- FADE ANIMATIONS ---------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-in both;
}

/* ---------- SCALE ANIMATIONS ---------- */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scaleIn {
    animation: scaleIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ---------- SLIDE ANIMATIONS ---------- */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slideInUp {
    animation: slideInUp 0.6s ease both;
}

/* ---------- BOUNCE ANIMATIONS ---------- */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

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

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

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

/* ---------- ROTATION ANIMATIONS ---------- */
@keyframes rotateIn {
    from {
        transform: rotate(-180deg) scale(0.5);
        opacity: 0;
    }
    to {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

.animate-rotateIn {
    animation: rotateIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ---------- SCROLL TRIGGER CLASSES ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- HOVER EFFECTS ---------- */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

/* ---------- LOADING ANIMATIONS ---------- */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

/* ---------- COUNTER ANIMATIONS ---------- */
.counter-number {
    display: inline-block;
}

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

.counter-animated {
    animation: countUp 0.5s ease both;
}

/* ---------- RESPONSIVE ADJUSTMENTS ---------- */
@media (max-width: 768px) {
    @keyframes backInRight {
        0% {
            transform: translateX(100px) scale(0.8);
            opacity: 0.7;
        }
        100% {
            transform: translateX(0) scale(1);
            opacity: 1;
        }
    }
    
    @keyframes backInLeft {
        0% {
            transform: translateX(-100px) scale(0.8);
            opacity: 0.7;
        }
        100% {
            transform: translateX(0) scale(1);
            opacity: 1;
        }
    }
    
    @keyframes backInUp {
        0% {
            transform: translateY(100px) scale(0.8);
            opacity: 0.7;
        }
        100% {
            transform: translateY(0) scale(1);
            opacity: 1;
        }
    }
    
    @keyframes backInDown {
        0% {
            transform: translateY(-100px) scale(0.8);
            opacity: 0.7;
        }
        100% {
            transform: translateY(0) scale(1);
            opacity: 1;
        }
    }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}