/* ============================================
   أبو شهم - التأثيرات الحركية CSS
   Abu Shahm - CSS Animations & Keyframes
   ============================================ */

/* ============================================
   1. Fade Animations
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   2. 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);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   3. Slide Animations
   ============================================ */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ============================================
   4. Rotate Animations
   ============================================ */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   5. Pulse & Bounce Animations
   ============================================ */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%, 20%, 53%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  70% {
    transform: translateY(-10px);
  }
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.1);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.1);
  }
}

/* ============================================
   6. Glow & Shimmer Effects
   ============================================ */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(244, 124, 32, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(244, 124, 32, 0.6), 0 0 40px rgba(244, 124, 32, 0.2);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(244, 124, 32, 0.3);
  }
  50% {
    border-color: rgba(244, 124, 32, 0.8);
  }
}

/* ============================================
   7. Line & Shape Animations
   ============================================ */
@keyframes lineExpand {
  from {
    width: 0;
  }
  to {
    width: 60px;
  }
}

@keyframes drawLine {
  from {
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes clipReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* ============================================
   8. Float & Drift Animations
   ============================================ */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(1deg);
  }
  66% {
    transform: translateY(5px) rotate(-1deg);
  }
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  20% {
    opacity: 0.4;
  }
  80% {
    opacity: 0.2;
  }
  100% {
    transform: translate(var(--drift-x, 100px), var(--drift-y, -200px)) scale(0.5);
    opacity: 0;
  }
}

/* ============================================
   9. Loading & Skeleton Animations
   ============================================ */
@keyframes skeletonLoading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: skeletonLoading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ============================================
   10. Counter Number Animation
   ============================================ */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   11. Particle Animations (Hero)
   ============================================ */
@keyframes particleFloat1 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(50px, -80px) scale(1.2);
    opacity: 0.5;
  }
  50% {
    transform: translate(-30px, -150px) scale(0.8);
    opacity: 0.2;
  }
  75% {
    transform: translate(70px, -100px) scale(1.1);
    opacity: 0.4;
  }
}

@keyframes particleFloat2 {
  0%, 100% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0.2;
  }
  33% {
    transform: translate(-60px, -100px) scale(1.3);
    opacity: 0.5;
  }
  66% {
    transform: translate(40px, -180px) scale(0.6);
    opacity: 0.15;
  }
}

@keyframes particleFloat3 {
  0%, 100% {
    transform: translate(0, 0) scale(1.1);
    opacity: 0.25;
  }
  50% {
    transform: translate(80px, -120px) scale(0.7);
    opacity: 0.4;
  }
}

/* ============================================
   12. Utility Animation Classes
   ============================================ */

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

/* Duration utilities */
.duration-300 { animation-duration: 0.3s; }
.duration-500 { animation-duration: 0.5s; }
.duration-700 { animation-duration: 0.7s; }
.duration-1000 { animation-duration: 1s; }
.duration-1500 { animation-duration: 1.5s; }
.duration-2000 { animation-duration: 2s; }

/* Animation fill mode */
.fill-forwards { animation-fill-mode: forwards; }
.fill-both { animation-fill-mode: both; }

/* Animation iteration */
.infinite { animation-iteration-count: infinite; }
