/* ===================================
   Advanced Animations
   =================================== */

/* Fade in on scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger animation for grid items */
.animate-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-stagger.animated > *:nth-child(1) { transition-delay: 0.1s; }
.animate-stagger.animated > *:nth-child(2) { transition-delay: 0.2s; }
.animate-stagger.animated > *:nth-child(3) { transition-delay: 0.3s; }
.animate-stagger.animated > *:nth-child(4) { transition-delay: 0.4s; }
.animate-stagger.animated > *:nth-child(5) { transition-delay: 0.5s; }
.animate-stagger.animated > *:nth-child(6) { transition-delay: 0.6s; }
.animate-stagger.animated > *:nth-child(7) { transition-delay: 0.7s; }
.animate-stagger.animated > *:nth-child(8) { transition-delay: 0.8s; }

.animate-stagger.animated > * {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax effect */
.parallax {
    transition: transform 0.1s ease-out;
}

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

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

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

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

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

/* Glow effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 107, 53, 0.6);
    }
}

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

/* Gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Bounce in */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease;
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease;
}

/* Rotate in */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

.rotate-in {
    animation: rotateIn 0.8s ease;
}

/* Enhanced card hover */
.card-hover-enhance {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover-enhance::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.2), transparent);
    transition: left 0.5s ease;
}

.card-hover-enhance:hover::before {
    left: 100%;
}

.card-hover-enhance:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.3);
}

/* Icon spin on hover */
.icon-spin-hover i {
    transition: transform 0.4s ease;
}

.icon-spin-hover:hover i {
    transform: rotate(360deg);
}

/* Button ripple effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:hover::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* Floating animation */
@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Number counter animation enhancement */
.stat-number {
    animation: bounceIn 1s ease;
}

/* Logo pulse on page load */
.logo img {
    animation: pulse 1.5s ease-in-out;
}