/* Animations for AuditBest Website Redesign 2025 */

/* Particle Animation for Hero Background */
@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-15px) translateX(10px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

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

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Slide Up Animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide Down Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide Left Animation */
@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide Right Animation */
@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale Animation */
@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Shake Animation */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

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

/* Button Hover Animation */
@keyframes buttonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(46, 196, 182, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 196, 182, 0);
  }
}

/* Typing Animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Ripple Animation */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Particle Animation Classes */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.particle-1 {
  width: 15px;
  height: 15px;
  animation: float 8s ease-in-out infinite, pulse 4s ease-in-out infinite;
}

.particle-2 {
  width: 20px;
  height: 20px;
  animation: float 12s ease-in-out infinite, pulse 6s ease-in-out infinite;
}

.particle-3 {
  width: 10px;
  height: 10px;
  animation: float 10s ease-in-out infinite, pulse 5s ease-in-out infinite;
}

.particle-4 {
  width: 25px;
  height: 25px;
  animation: float 15s ease-in-out infinite, pulse 7s ease-in-out infinite;
}

/* Animation Utility Classes */
.animate-fade-in {
  animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
  animation: slideUp 1s ease forwards;
}

.animate-slide-down {
  animation: slideDown 1s ease forwards;
}

.animate-slide-left {
  animation: slideLeft 1s ease forwards;
}

.animate-slide-right {
  animation: slideRight 1s ease forwards;
}

.animate-scale-up {
  animation: scaleUp 1s ease forwards;
}

.animate-bounce {
  animation: bounce 1s ease infinite;
}

.animate-shake {
  animation: shake 0.5s ease infinite;
}

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

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

.animate-typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--color-turquoise);
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* Animation Delay Utility Classes */
.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

.delay-400 {
  animation-delay: 400ms;
}

.delay-500 {
  animation-delay: 500ms;
}

.delay-600 {
  animation-delay: 600ms;
}

.delay-700 {
  animation-delay: 700ms;
}

.delay-800 {
  animation-delay: 800ms;
}

.delay-900 {
  animation-delay: 900ms;
}

.delay-1000 {
  animation-delay: 1000ms;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 15px rgba(46, 196, 182, 0.5);
}

/* Ripple Effect */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.ripple-effect:active::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  animation: ripple 0.5s linear;
}
