/* ============================================================
   SHREE BANASHANKARI DIAGNOSTIC CENTER - ANIMATIONS
   ============================================================ */

/* ========== AOS CUSTOM CONFIG ========== */
[data-aos] {
  pointer-events: none;
}
[data-aos].aos-animate {
  pointer-events: auto;
}

/* ========== COUNTER ANIMATION ========== */
.counter-wrap {
  display: inline-block;
  position: relative;
}

/* ========== PULSE RING ========== */
.pulse-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring::before,
.pulse-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(30,140,74,0.15);
  animation: rippleRing 2.5s ease-out infinite;
}

.pulse-ring::before {
  inset: -12px;
  animation-delay: 0s;
}

.pulse-ring::after {
  inset: -24px;
  animation-delay: 0.6s;
}

@keyframes rippleRing {
  0% { opacity: 0.8; transform: scale(0.85); }
  100% { opacity: 0; transform: scale(1.2); }
}

/* ========== GRADIENT TEXT ANIMATION ========== */
.gradient-text-anim {
  background: linear-gradient(90deg, #0d2461, #1e8c4a, #0d2461);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

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

/* ========== FLOATING ANIMATION ========== */
.anim-float {
  animation: floatUpDown 4s ease-in-out infinite;
}

.anim-float-slow {
  animation: floatUpDown 6s ease-in-out infinite;
}

.anim-float-delay {
  animation: floatUpDown 4s ease-in-out 1.5s infinite;
}

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

/* ========== FADE IN UTILITIES ========== */
.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.2s; }
.fade-in-3 { animation-delay: 0.3s; }
.fade-in-4 { animation-delay: 0.4s; }
.fade-in-5 { animation-delay: 0.5s; }
.fade-in-6 { animation-delay: 0.6s; }

/* ========== STAGGER CHILDREN ========== */
.stagger-children > * {
  opacity: 0;
}

.stagger-children.aos-animate > *:nth-child(1) {
  animation: fadeInUp 0.6s ease 0.1s forwards;
}
.stagger-children.aos-animate > *:nth-child(2) {
  animation: fadeInUp 0.6s ease 0.2s forwards;
}
.stagger-children.aos-animate > *:nth-child(3) {
  animation: fadeInUp 0.6s ease 0.3s forwards;
}
.stagger-children.aos-animate > *:nth-child(4) {
  animation: fadeInUp 0.6s ease 0.4s forwards;
}
.stagger-children.aos-animate > *:nth-child(5) {
  animation: fadeInUp 0.6s ease 0.5s forwards;
}
.stagger-children.aos-animate > *:nth-child(6) {
  animation: fadeInUp 0.6s ease 0.6s forwards;
}

/* ========== SHIMMER LOADING ========== */
.shimmer {
  background: linear-gradient(90deg, #f0f4ff 25%, #e0e8ff 50%, #f0f4ff 75%);
  background-size: 400% 100%;
  animation: shimmerAnim 1.5s ease infinite;
}

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

/* ========== HERO PARTICLE ANIMATIONS ========== */
.hero-particle-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -80px;
  animation-duration: 7s;
}

.hero-particle-2 {
  width: 200px;
  height: 200px;
  bottom: 40px;
  left: -60px;
  animation-duration: 5s;
  animation-delay: 1s;
}

.hero-particle-3 {
  width: 100px;
  height: 100px;
  top: 40%;
  left: 30%;
  animation-duration: 8s;
  animation-delay: 2s;
}

/* ========== ICON SPIN HOVER ========== */
.icon-spin-hover {
  transition: transform 0.5s ease;
}

.icon-spin-hover:hover {
  transform: rotate(360deg);
}

/* ========== BUTTON RIPPLE ========== */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: none;
  pointer-events: none;
  width: 100px;
  height: 100px;
  left: 50%;
  top: 50%;
  margin-left: -50px;
  margin-top: -50px;
}

.btn-ripple:active::after {
  animation: rippleEffect 0.4s ease;
}

@keyframes rippleEffect {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

/* ========== ECG LINE ANIMATION ========== */
.ecg-animated path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawECG 3s ease forwards;
}

@keyframes drawECG {
  to { stroke-dashoffset: 0; }
}

/* ========== SCROLL PROGRESS BAR ========== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 9999;
  width: 0%;
  transition: width 0.05s linear;
}

/* ========== CARD TILT EFFECT ========== */
.tilt-card {
  transition: transform 0.15s ease;
}

/* ========== TYPEWRITER ========== */
.typewriter {
  overflow: hidden;
  border-right: 2px solid #7dc9a5;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end) forwards, cursorBlink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes cursorBlink {
  from, to { border-color: transparent; }
  50% { border-color: #7dc9a5; }
}

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ========== GLASSMORPHISM CARD ========== */
.glass-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
}

.glass-card-dark {
  background: rgba(13, 36, 97, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

/* ========== NOTIFICATION TOAST ========== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--secondary);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: slideInLeft 0.3s ease, slideOutLeft 0.3s ease 3s forwards;
  max-width: 340px;
}

.toast.error { border-left-color: var(--accent); }
.toast.warning { border-left-color: #f59e0b; }

.toast i {
  font-size: 1rem;
  color: var(--secondary);
}

.toast.error i { color: var(--accent); }
.toast.warning i { color: #f59e0b; }

@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-120%); opacity: 0; }
}
