/* ============================================
   FiftyDevs - Animations Stylesheet
   ============================================ */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 202, 2, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 202, 2, 0.5);
    }
}

/* Rotationanimations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Float Animation */
@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatAnimationReverse {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(20px);
    }
}

/* Bounce Animations */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@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);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Color Shift Animation */
@keyframes colorShift {
    0% {
        color: #ffca02;
    }
    50% {
        color: #259bfd;
    }
    100% {
        color: #52cf2b;
    }
}

/* Gradient Shift Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Flip Animation */
@keyframes flipX {
    from {
        transform: perspective(400px) rotateX(0);
    }
    to {
        transform: perspective(400px) rotateX(360deg);
    }
}

@keyframes flipY {
    from {
        transform: perspective(400px) rotateY(0);
    }
    to {
        transform: perspective(400px) rotateY(360deg);
    }
}

/* Draw Animation */
@keyframes drawLine {
    from {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
    }
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

/* Parallax Animation */
@keyframes parallax {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(20px);
    }
}

/* Wobble Animation */
@keyframes wobble {
    0% {
        transform: translateX(0);
    }
    15% {
        transform: translateX(-5px) rotate(-5deg);
    }
    30% {
        transform: translateX(5px) rotate(3deg);
    }
    45% {
        transform: translateX(-5px) rotate(-3deg);
    }
    60% {
        transform: translateX(3px) rotate(2deg);
    }
    75% {
        transform: translateX(-2px) rotate(-1deg);
    }
    100% {
        transform: translateX(0);
    }
}

/* Heartbeat Animation */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.1);
    }
}

/* Application Classes */

.animate-fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s ease-in-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.8s ease-in-out 0.4s both;
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease-in-out;
}

.animate-fade-down {
    animation: fadeInDown 0.8s ease-in-out;
}

.animate-fade-left {
    animation: fadeInLeft 0.8s ease-in-out;
}

.animate-fade-right {
    animation: fadeInRight 0.8s ease-in-out;
}

.animate-slide-down {
    animation: slideInDown 0.6s ease-out;
}

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-glow {
    animation: glow 2s infinite;
}

.animate-rotate {
    animation: rotate 10s linear infinite;
}

.animate-rotate-slow {
    animation: rotateSlow 20s linear infinite;
}

.animate-float {
    animation: floatAnimation 6s ease-in-out infinite;
}

.animate-float-reverse {
    animation: floatAnimationReverse 6s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-wobble {
    animation: wobble 0.6s ease-in-out;
}

.animate-heartbeat {
    animation: heartbeat 1.3s ease-in-out infinite;
}

.animate-flip-x {
    animation: flipX 1.5s ease-in-out;
}

.animate-flip-y {
    animation: flipY 1.5s ease-in-out;
}

/* Scroll Triggered Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease-out;
}

/* Stagger Animation */
.stagger-item:nth-child(1) {
    animation-delay: 0s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.2s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.3s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.4s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.5s;
}

.stagger-item:nth-child(7) {
    animation-delay: 0.6s;
}

.stagger-item:nth-child(8) {
    animation-delay: 0.7s;
}

.stagger-item:nth-child(9) {
    animation-delay: 0.8s;
}

.stagger-item:nth-child(10) {
    animation-delay: 0.9s;
}

.stagger-item:nth-child(n+11) {
    animation-delay: 1s;
}

/* Combine animations with stagger */
.stagger-item {
    animation: fadeInUp 0.6s ease-out both;
}

/* For product cards hover state */
.product-card {
    transition: all 0.3s ease-out;
}

.product-card:hover {
    animation: none;
}

/* Gradient animation */
.gradient-animation {
    background: linear-gradient(135deg, #ffca02, #259bfd, #52cf2b, #ffca02);
    background-size: 300% 300%;
    animation: gradientShift 15s ease infinite;
}

/* Text gradient animation */
.text-gradient-animate {
    background: linear-gradient(90deg, #ffca02, #259bfd, #52cf2b, #ffca02);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

/* Loading animation */
@keyframes loading {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.loading-dot {
    animation: loading 1.4s infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Smooth transitions */
.smooth-transition * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3D Perspective Hover */
.perspective-hover {
    perspective: 1000px;
}

.perspective-hover:hover {
    transform: rotateX(5deg) rotateY(5deg);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Infinite scroll animations */
@keyframes infiniteScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

.infinite-scroll {
    animation: infiniteScroll 20s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
