/* css/animations.css */
/* Premium Animations for Babu Adventure Booking Platform */

/* Fade Slide Up */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Fade Slide In */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

/* Pulse Animation */
@keyframes pulse {
  0%, 100% { 
    transform: scale(1); 
  }
  50% { 
    transform: scale(1.05); 
  }
}

/* Gentle Pulse */
@keyframes gentlePulse {
  0%, 100% { 
    transform: scale(1); 
  }
  50% { 
    transform: scale(1.02); 
  }
}

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

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

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

/* Bounce In */
@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);
  }
}

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

/* Ripple Effect */
@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Confetti Fall */
@keyframes confettiFall {
  0% { 
    transform: translateY(-100%) rotate(0deg); 
    opacity: 1; 
  }
  100% { 
    transform: translateY(100vh) rotate(720deg); 
    opacity: 0; 
  }
}

/* Progress Bar Fill */
@keyframes progressFill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

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

/* Glow Pulse */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(0, 102, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.4);
  }
}

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

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */

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

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

/* Button Hover Lift */
.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.97) !important;
}

/* Primary Button Glow */
.btn-primary:focus {
  animation: glowPulse 2s infinite;
}

/* ============================================
   CARD ANIMATIONS
   ============================================ */

/* Card Hover */
.package-card,
.passenger-card,
.extra-service-card,
.option-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.package-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
}

.option-card:hover {
  transform: translateY(-2px);
}

.passenger-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

/* ============================================
   INPUT ANIMATIONS
   ============================================ */

/* Input Focus */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0066FF;
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input Valid State */
input.valid,
select.valid {
  border-color: #34C759;
  background-color: #F5FFF7;
  transition: all 0.3s ease;
}

/* Input Error State */
input.error,
select.error {
  border-color: #FF3B30;
  background-color: #FFF5F5;
  animation: shake 0.5s ease;
}

/* ============================================
   STEP TRANSITIONS
   ============================================ */

/* Form Step Animation */
.form-step {
  animation: fadeSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-step.active {
  animation: fadeSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress Step */
.progress-tracker .step {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-tracker .step span {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   PRICE ANIMATION
   ============================================ */

/* Price Update */
.price-update {
  animation: pulse 0.3s ease;
}

.grand-total {
  transition: all 0.3s ease;
}

/* Number Count Up */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================
   SUCCESS ANIMATIONS
   ============================================ */

/* Success Checkmark */
.success-icon {
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  animation: confettiFall 3s ease-out forwards;
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */

/* Hero Content */
.hero-content {
  animation: fadeSlideUp 0.8s ease-out;
}

.hero-visual {
  animation: slideInRight 0.8s ease-out;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */

/* AOS Overrides */
[data-aos] {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-aos="fade-up"] {
  transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
}

[data-aos="fade-left"] {
  transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
}

/* ============================================
   MICRO INTERACTIONS
   ============================================ */

/* Remove Passenger Button */
.remove-passenger-btn {
  transition: all 0.2s ease;
}

.remove-passenger-btn:hover {
  background: #FFF5F5;
  transform: scale(1.05);
}

/* Add Passenger Button */
.btn-add-passenger {
  transition: all 0.3s ease;
}

.btn-add-passenger:hover {
  transform: translateY(-2px);
  border-color: #0066FF;
}

/* Service Select */
.service-select {
  transition: all 0.2s ease;
}

.service-select:hover {
  border-color: #0066FF;
}

/* Checkbox */
input[type="checkbox"] {
  transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
  accent-color: #0066FF;
}

/* ============================================
   NOTIFICATION ANIMATIONS
   ============================================ */

/* Warning Message */
.warning-message {
  animation: fadeSlideDown 0.3s ease;
  transition: all 0.3s ease;
}

.warning-message.hidden {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .btn:hover {
    transform: none;
  }
  
  .package-card:hover {
    transform: none;
  }
}

/* ============================================
   UTILITY ANIMATION CLASSES
   ============================================ */

.animate-fade-in {
  animation: fadeIn 0.5s ease;
}

.animate-slide-up {
  animation: fadeSlideUp 0.5s ease;
}

.animate-slide-down {
  animation: fadeSlideDown 0.5s ease;
}

.animate-scale-in {
  animation: scaleIn 0.4s ease;
}

.animate-bounce-in {
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

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

/* Animation Delays */
.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-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* Animation Durations */
.duration-fast { animation-duration: 0.2s; }
.duration-normal { animation-duration: 0.4s; }
.duration-slow { animation-duration: 0.6s; }
.duration-very-slow { animation-duration: 0.8s; }

/* ============================================
   GSAP ANIMATION CLASSES
   ============================================ */

.gsap-reveal {
  opacity: 0;
  visibility: hidden;
}

.gsap-reveal.revealed {
  opacity: 1;
  visibility: visible;
}