/* ============================================
   DIGITAL SEBA - Animations CSS
   ============================================ */

/* AOS-like scroll animations */
[data-aos] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-aos="fade-up"] { transform: translateY(30px); }
[data-aos="fade-down"] { transform: translateY(-30px); }
[data-aos="fade-left"] { transform: translateX(-30px); }
[data-aos="fade-right"] { transform: translateX(30px); }
[data-aos="zoom-in"] { transform: scale(0.9); }
[data-aos="zoom-out"] { transform: scale(1.1); }
[data-aos="flip-left"] { transform: perspective(600px) rotateY(-20deg); }

[data-aos].aos-animated {
  opacity: 1;
  transform: none;
}

/* Delay classes */
[data-aos-delay="100"] { transition-delay: 0.1s; }
[data-aos-delay="200"] { transition-delay: 0.2s; }
[data-aos-delay="300"] { transition-delay: 0.3s; }
[data-aos-delay="400"] { transition-delay: 0.4s; }
[data-aos-delay="500"] { transition-delay: 0.5s; }
[data-aos-delay="600"] { transition-delay: 0.6s; }
[data-aos-delay="700"] { transition-delay: 0.7s; }
[data-aos-delay="800"] { transition-delay: 0.8s; }

/* Animated gradient background */
@keyframes animGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-gradient {
  background: linear-gradient(-45deg, #2563EB, #4F46E5, #06B6D4, #10B981);
  background-size: 300% 300%;
  animation: animGradient 6s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Pulse animations */
@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 0.4; }
  100% { transform: scale(0.8); opacity: 0.8; }
}

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

/* Text typing animation */
.typing-text::after {
  content: '|';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

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

.spin { animation: spin 1s linear infinite; }

/* Bounce animation */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.bounce { animation: bounce 1.5s ease infinite; }

/* Shimmer effect */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.shimmer-container {
  position: relative;
  overflow: hidden;
}

.shimmer-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 2s infinite;
}

/* Card hover 3D tilt */
.tilt-card {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

.tilt-card:hover {
  transform: perspective(600px) rotateX(3deg) rotateY(5deg);
}

/* Glow pulse */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(37,99,235,0.3); }
  50% { box-shadow: 0 0 40px rgba(37,99,235,0.6); }
}

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

/* Number counter */
.counter-done { animation: countUp 0.5s ease; }

@keyframes countUp {
  from { transform: scale(1.2); color: #2563EB; }
  to { transform: scale(1); }
}

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

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

/* Particle effect (CSS only) */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(37,99,235,0.4);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* Page transition */
.page-enter {
  animation: pageEnter 0.4s ease forwards;
}

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

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

/* Progress bar animation */
@keyframes progressFill {
  from { width: 0; }
  to { width: var(--progress-width, 100%); }
}

.progress-animated {
  animation: progressFill 1s ease forwards;
}

/* Hero animated title words */
.word-reveal {
  display: inline-block;
  overflow: hidden;
}

.word-reveal span {
  display: inline-block;
  animation: wordReveal 0.6s ease forwards;
  transform: translateY(100%);
}

@keyframes wordReveal {
  to { transform: translateY(0); }
}

/* Star rating animation */
@keyframes starFill {
  from { opacity: 0; transform: scale(0.5) rotate(-30deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.star-animated {
  animation: starFill 0.3s ease forwards;
}

/* Notification bell shake */
@keyframes bellShake {
  0%, 100% { transform: rotate(0); }
  10%, 30%, 50%, 70% { transform: rotate(-10deg); }
  20%, 40%, 60% { transform: rotate(10deg); }
  80% { transform: rotate(5deg); }
}

.bell-shake { animation: bellShake 1s ease; }

/* Success checkmark */
@keyframes checkmarkDraw {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

.checkmark-path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkmarkDraw 0.5s ease forwards 0.2s;
}

/* Infinite scroll marquee */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

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

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

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

/* Stagger animation for lists */
.stagger-child {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.stagger-child:nth-child(1) { animation-delay: 0.1s; }
.stagger-child:nth-child(2) { animation-delay: 0.2s; }
.stagger-child:nth-child(3) { animation-delay: 0.3s; }
.stagger-child:nth-child(4) { animation-delay: 0.4s; }
.stagger-child:nth-child(5) { animation-delay: 0.5s; }
.stagger-child:nth-child(6) { animation-delay: 0.6s; }

/* Wavy underline */
.wavy-underline {
  text-decoration: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='4'%3E%3Cpath d='M0 2 Q2.5 0 5 2 Q7.5 4 10 2' fill='none' stroke='%232563EB' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: bottom;
  padding-bottom: 4px;
}

/* Blur fade in */
@keyframes blurFadeIn {
  from { filter: blur(10px); opacity: 0; }
  to { filter: blur(0); opacity: 1; }
}

.blur-fade-in { animation: blurFadeIn 0.5s ease forwards; }

/* Neon glow text */
.neon-text {
  text-shadow: 0 0 10px rgba(37,99,235,0.8), 0 0 20px rgba(37,99,235,0.5), 0 0 40px rgba(37,99,235,0.3);
}

/* Scan line effect */
@keyframes scanLine {
  from { top: -100%; }
  to { top: 200%; }
}

/* Loading dots */
.loading-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
