/* ============================================================
   CreditFix India - Animations CSS
   ============================================================ */

/* Keyframe Animations */
@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); }
}

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

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.3); }
  50%  { transform: scale(1.08); }
  70%  { transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%  { transform: translateY(-12px); }
}

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

@keyframes ripple {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

@keyframes gradientShift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

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

/* Utility animation classes */
.animate-slide-left  { animation: slideInLeft  .7s ease forwards; }
.animate-slide-right { animation: slideInRight .7s ease forwards; }
.animate-slide-up    { animation: slideInUp    .7s ease forwards; }
.animate-zoom-in     { animation: zoomIn       .6s ease forwards; }
.animate-bounce-in   { animation: bounceIn     .8s ease forwards; }
.animate-float       { animation: float 3s ease-in-out infinite; }
.animate-spin-slow   { animation: rotateSlow 8s linear infinite; }

/* Delay utilities */
.delay-100 { animation-delay: .1s; }
.delay-200 { animation-delay: .2s; }
.delay-300 { animation-delay: .3s; }
.delay-400 { animation-delay: .4s; }
.delay-500 { animation-delay: .5s; }
.delay-600 { animation-delay: .6s; }
.delay-700 { animation-delay: .7s; }
.delay-800 { animation-delay: .8s; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* Page transition overlay */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 99998;
  transform: translateY(100%);
  transition: transform .5s cubic-bezier(.77,0,.175,1);
}

.page-transition.entering { transform: translateY(0); }
.page-transition.leaving  { transform: translateY(-100%); }

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

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .6s ease, height .6s ease, opacity .6s ease;
  opacity: 0;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
  opacity: 0;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--secondary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* Glow effect */
.glow-blue {
  box-shadow: 0 0 20px rgba(29,78,216,.5), 0 0 40px rgba(29,78,216,.25);
}

.glow-green {
  box-shadow: 0 0 20px rgba(16,185,129,.5), 0 0 40px rgba(16,185,129,.25);
}

/* Card hover lift */
.hover-lift {
  transition: transform .3s ease, box-shadow .3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,.12);
}

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rotateSlow .8s linear infinite;
  display: inline-block;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* Number counter animation (JS triggered) */
.counter-animated {
  transition: all .05s ease;
}

/* Fade in sections */
@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-animate { animation: sectionFadeIn .8s ease forwards; }

/* Modal animations */
@keyframes modalIn {
  from { opacity: 0; transform: scale(.9) translateY(-20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-animate { animation: modalIn .4s cubic-bezier(.34,1.56,.64,1); }

/* Progress bar animation */
@keyframes progressFill {
  from { width: 0; }
}

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