/* Enhanced Animations for CashBolt Website */

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

.fade-in {
  animation: fadeIn 1s ease forwards;
}

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

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

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

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

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

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

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

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

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

.bounce {
  animation: bounce 2s infinite;
}

/* Pulse Animation - Enhanced */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(92, 255, 92, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(92, 255, 92, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(92, 255, 92, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Float Animation - Enhanced */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

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

/* Glow Animation - Enhanced */
@keyframes glow {
  from {
    box-shadow: 0 0 8px rgba(92, 255, 92, 0.5), 0 0 15px rgba(92, 255, 92, 0.3);
  }
  to {
    box-shadow: 0 0 20px rgba(92, 255, 92, 0.8), 0 0 40px rgba(92, 255, 92, 0.5);
  }
}

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

/* Text Glow Animation - Enhanced */
@keyframes textGlow {
  from {
    text-shadow: 0 0 8px rgba(92, 255, 92, 0.5), 0 0 15px rgba(92, 255, 92, 0.3);
  }
  to {
    text-shadow: 0 0 15px rgba(92, 255, 92, 0.8), 0 0 30px rgba(92, 255, 92, 0.5);
  }
}

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

/* Rotate Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate {
  animation: rotate 10s linear infinite;
}

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

.shake {
  animation: shake 0.8s ease-in-out;
}

/* Animate on scroll - visible class */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
}

.animate-on-scroll.fade-up.visible {
  transform: translateY(0);
}

.animate-on-scroll.fade-up {
  transform: translateY(30px);
}

.animate-on-scroll.fade-left.visible {
  transform: translateX(0);
}

.animate-on-scroll.fade-left {
  transform: translateX(-30px);
}

.animate-on-scroll.fade-right.visible {
  transform: translateX(0);
}

.animate-on-scroll.fade-right {
  transform: translateX(30px);
}

.animate-on-scroll.fade-scale.visible {
  transform: scale(1);
}

.animate-on-scroll.fade-scale {
  transform: scale(0.9);
}

/* Button hover animations - Enhanced */
.btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background-color: var(--color-enhanced-green);
}

/* Card hover animations - Enhanced */
.feature-card, .benefit-card, .offer-card, .ninja-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.3s ease;
}

.feature-card:hover, .benefit-card:hover, .offer-card:hover, .ninja-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(92, 255, 92, 0.2), 0 10px 10px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.08);
}

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

.animated-gradient {
  background: linear-gradient(270deg, var(--color-dark-green), var(--color-enhanced-green), var(--color-light-green));
  background-size: 600% 600%;
  animation: gradientAnimation 15s ease infinite;
}

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

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--color-enhanced-green) }
}

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

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

.ripple:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(92, 255, 92, 0.8) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.ripple:active:after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* NEW ANIMATIONS */

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

.count-up {
  animation: countUp 2s ease-out forwards;
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(92, 255, 92, 0.2) 50%, 
    rgba(255, 255, 255, 0) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* Highlight Pulse */
@keyframes highlightPulse {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(92, 255, 92, 0.15);
  }
  100% {
    background-color: transparent;
  }
}

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

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

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 0 10px 10px rgba(0, 0, 0, 0.1);
}

/* Tilt Effect */
.tilt {
  transition: transform 0.3s ease;
}

.tilt:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
}

/* Attention Seeker */
@keyframes attention {
  0%, 100% {
    transform: scale(1);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: scale(1.05);
  }
  20%, 40%, 60%, 80% {
    transform: scale(1);
  }
}

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

/* Border Glow */
@keyframes borderGlow {
  0% {
    border-color: rgba(92, 255, 92, 0.3);
    box-shadow: 0 0 5px rgba(92, 255, 92, 0.3);
  }
  50% {
    border-color: rgba(92, 255, 92, 0.8);
    box-shadow: 0 0 20px rgba(92, 255, 92, 0.5);
  }
  100% {
    border-color: rgba(92, 255, 92, 0.3);
    box-shadow: 0 0 5px rgba(92, 255, 92, 0.3);
  }
}

.border-glow {
  border: 1px solid rgba(92, 255, 92, 0.3);
  animation: borderGlow 2s infinite;
}

/* Fade In Up Staggered */
.fade-in-up-1 {
  animation: slideUp 0.6s ease forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

.fade-in-up-2 {
  animation: slideUp 0.6s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.fade-in-up-3 {
  animation: slideUp 0.6s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

.fade-in-up-4 {
  animation: slideUp 0.6s ease forwards;
  animation-delay: 0.7s;
  opacity: 0;
}

/* Continuous Floating Animation for Multiple Elements */
.float-1 {
  animation: float 3s ease-in-out infinite;
}

.float-2 {
  animation: float 3.5s ease-in-out infinite;
  animation-delay: 0.2s;
}

.float-3 {
  animation: float 4s ease-in-out infinite;
  animation-delay: 0.4s;
}

/* Apply animations to specific elements */
.hero h1 {
  animation: fadeIn 1s ease forwards, textGlow 2s ease-in-out infinite alternate;
  animation-delay: 0.2s;
}

.hero p {
  animation: fadeIn 1s ease forwards;
  animation-delay: 0.4s;
}

.hero-cta {
  animation: fadeIn 1s ease forwards;
  animation-delay: 0.6s;
}

.btn-primary {
  animation: pulse 2s infinite;
}

.feature-icon {
  animation: float 3s ease-in-out infinite;
}

.stat-number {
  animation: countUp 2s ease-out forwards;
}

.section-subtitle {
  animation: textGlow 2s ease-in-out infinite alternate;
}

.section-divider {
  animation: shimmer 3s infinite;
}

/* JavaScript-triggered animations */
.js-fade-in {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js-fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

.js-fade-in.from-bottom {
  transform: translateY(30px);
}

.js-fade-in.from-left {
  transform: translateX(-30px);
}

.js-fade-in.from-right {
  transform: translateX(30px);
}
