/* ═══════════════════════════════════════════
   Effects, Micro-interactions & Animations
   Enhanced with motion-compatible scroll reveals
   ═══════════════════════════════════════════ */

/* ── Theme Toggle Animation ── */
.theme-toggle-icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-toggle-icon:hover {
  transform: rotate(15deg);
}

/* ── Stagger Children ── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}
.stagger-children.visible > *:nth-child(1) { animation: revealUp 0.6s 0.05s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.stagger-children.visible > *:nth-child(2) { animation: revealUp 0.6s 0.12s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.stagger-children.visible > *:nth-child(3) { animation: revealUp 0.6s 0.19s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.stagger-children.visible > *:nth-child(4) { animation: revealUp 0.6s 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.stagger-children.visible > *:nth-child(5) { animation: revealUp 0.6s 0.33s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.stagger-children.visible > *:nth-child(6) { animation: revealUp 0.6s 0.40s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.stagger-children.visible > *:nth-child(7) { animation: revealUp 0.6s 0.47s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.stagger-children.visible > *:nth-child(8) { animation: revealUp 0.6s 0.54s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

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

/* ── Reveal Variants ── */
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* ── Blob Float Animation ── */
.blob-animate {
  animation: blobFloat 20s infinite ease-in-out;
}
.blob-animate-delay { animation-delay: -7s; }
.blob-animate-delay-2 { animation-delay: -14s; }

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Floating Particles ── */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  animation: particleDrift linear infinite;
}

@keyframes particleDrift {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ── Card Hover Effects ── */
.card-hover {
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(8, 145, 178, 0.25);
}

/* ── Tilt Effect (JS-controlled) ── */
.tilt-card {
  transition: transform 0.15s ease;
  transform-style: preserve-3d;
}

/* ── Glow Pulse on Focus ── */
.glow-hover:hover {
  box-shadow: var(--shadow-glow);
}

/* ── Gradient Text Shimmer ── */
.shimmer-text {
  background: linear-gradient(
    90deg, 
    var(--primary) 0%, 
    var(--secondary) 40%, 
    var(--primary-light) 60%, 
    var(--primary) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 4s ease infinite;
}

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

/* ── Pulse Animation ── */
.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Status Dot ── */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.status-dot.online {
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  animation: pulse 2s infinite;
}

/* ── FAQ Accordion Animation ── */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), padding 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.faq-item.open .faq-content {
  max-height: 300px;
  opacity: 1;
  padding-top: 1rem;
  padding-bottom: 0.25rem;
}
.faq-item .faq-icon {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* ── Mobile Menu ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  padding: 5rem 2rem 2.5rem;
  gap: 0.25rem;
  border-left: 1px solid var(--border);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu nav a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.mobile-menu nav a:hover {
  background: rgba(13, 148, 136, 0.08);
  color: var(--primary);
}


/* ── Virtual Assistant ── */
.va-trigger {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(8, 145, 178, 0.35);
  display: flex; align-items: center; justify-content: center;
  color: white; position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.va-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(8, 145, 178, 0.5);
}
.va-trigger .online-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 12px; height: 12px; background: #10B981;
  border-radius: 50%; border: 2px solid var(--bg);
  animation: pulse 2s infinite;
}

.va-popover {
  position: absolute; bottom: calc(100% + 0.75rem); right: 0;
  width: 300px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.75rem; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(8px) scale(0.95);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom right;
}
.va-popover.open {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}

/* ── Animated Wave Divider ── */
.wave-divider-wrap {
  width: 100%; overflow: hidden; line-height: 0;
  position: relative; height: 80px; margin-bottom: -2px;
}
.wave-svg { width: 100%; height: 80px; display: block; }
.wave-path-1 {
  fill: var(--bg-surface-alt);
  opacity: 0.9;
  animation: waveFlow1 8s ease-in-out infinite;
}
.wave-path-2 {
  fill: var(--bg-surface-alt);
  opacity: 0.55;
  animation: waveFlow2 6s ease-in-out infinite;
}
@supports (d: path("")) {
  @keyframes waveFlow1 {
    0%,100% { d: path("M0,40 C240,80 480,0 720,40 C960,80 1200,0 1440,40 L1440,80 L0,80 Z"); }
    50%      { d: path("M0,30 C240,0 480,80 720,30 C960,0 1200,80 1440,30 L1440,80 L0,80 Z"); }
  }
  @keyframes waveFlow2 {
    0%,100% { d: path("M0,50 C360,10 720,70 1080,30 C1260,10 1380,50 1440,50 L1440,80 L0,80 Z"); }
    50%      { d: path("M0,35 C360,65 720,20 1080,55 C1260,70 1380,35 1440,35 L1440,80 L0,80 Z"); }
  }
}
/* Fallback translate animation for browsers that don't support d: path() */
@supports not (d: path("")) {
  @keyframes waveFlow1 { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(0.85) translateY(4px); } }
  @keyframes waveFlow2 { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(1.15) translateY(-4px); } }
}

/* ── Gradient Border Animation ── */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
  background-size: 200% 100%;
  border-radius: 0 0 4px 4px;
  animation: gradientSlide 3s linear infinite;
}

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

/* ── Counter Glow ── */
.stat-glow {
  text-shadow: 0 0 20px rgba(8, 145, 178, 0.25);
}

/* ── Progress Ring ── */
.progress-ring {
  transform: rotate(-90deg);
}
.progress-ring circle {
  transition: stroke-dashoffset 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Skeleton / Loading ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ── Marquee ── */
.marquee {
  overflow: hidden;
  white-space: nowrap;
}
.marquee-inner {
  display: inline-flex;
  gap: 3rem;
  animation: marqueeScroll 30s linear infinite;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Ripple ── */
@keyframes ripple {
  to { transform: scale(2.5); opacity: 0; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .stagger-children > * { opacity: 1; transform: none; animation: none; }
  .blob-animate { animation: none; }
  .faq-content { transition: none; }
  .mobile-menu { transition: none; }
  .va-popover { transition: none; }
  .pulse { animation: none; }
  .shimmer-text { animation: none; }
  .particle { animation: none; }
  .marquee-inner { animation: none; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; transition: none; }
  .wave-path-1, .wave-path-2 { animation: none; }
}

/* ── Redesigned Premium Effects ── */

/* Rotating Conic Gradient Ring */
.doctor-avatar-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.25);
}
.doctor-avatar-wrap::before {
  content: '';
  position: absolute;
  width: 140%;
  height: 140%;
  background: conic-gradient(var(--primary), var(--secondary), var(--accent), var(--primary));
  animation: rotateRing 4s linear infinite;
  z-index: 1;
}
.doctor-avatar-wrap .doctor-avatar {
  position: relative;
  z-index: 2;
  width: calc(100% - 6px) !important;
  height: calc(100% - 6px) !important;
  border-radius: 50%;
  overflow: hidden;
  border: none !important;
}
@keyframes rotateRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Sweeping Gradient Top Bar */
.doctor-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: sweepBar 3s linear infinite;
}
@keyframes sweepBar {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* Live Heartbeat Line */
.heartbeat-wrap {
  width: 100%;
  height: 35px;
  overflow: hidden;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  position: relative;
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.04);
}
.heartbeat-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: pulseLine 3.5s linear infinite;
}
@keyframes pulseLine {
  0% { stroke-dashoffset: 600; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -600; }
}

/* 4 Floating Micro-Badges */
.micro-badge {
  position: absolute;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  pointer-events: none;
  z-index: 15;
}
.micro-badge-1 {
  top: 10%; left: -18%;
  animation: microFloat1 4.5s infinite ease-in-out;
}
.micro-badge-2 {
  top: 45%; right: -22%;
  animation: microFloat2 5s infinite ease-in-out;
}
.micro-badge-3 {
  bottom: 25%; left: -20%;
  animation: microFloat3 4.8s infinite ease-in-out;
}
.micro-badge-4 {
  bottom: -5%; right: -5%;
  animation: microFloat4 5.2s infinite ease-in-out;
}
@keyframes microFloat1 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes microFloat2 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes microFloat3 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
@keyframes microFloat4 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-9px) rotate(-1.5deg); } }

/* Specialty Pills coding */
.pill-teal { background: rgba(13, 148, 136, 0.1); color: var(--primary); border: 1px solid rgba(13, 148, 136, 0.2); }
.pill-emerald { background: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }
.pill-indigo { background: rgba(99, 102, 241, 0.1); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.2); }

/* Drifting Leaves */
.leaf-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.leaf-svg {
  position: absolute;
  bottom: -40px;
  fill: var(--primary);
  opacity: 0.1;
  animation: driftLeaf linear infinite;
}
@keyframes driftLeaf {
  0% { transform: translateY(0) rotate(0deg) translateX(0); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-110vh) rotate(360deg) translateX(50px); opacity: 0; }
}

/* Underline self-drawing */
.hero-title-accent {
  position: relative;
  display: inline-block;
}
.hero-title-accent::after {
  content: '';
  position: absolute;
  bottom: 0px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.6s;
}
.hero.visible .hero-title-accent::after,
.visible .hero-title-accent::after {
  transform: scaleX(1);
}

/* Mouse Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
  pointer-events: none;
}
.mouse-icon {
  width: 26px;
  height: 42px;
  border-radius: 14px;
  border: 2px solid var(--text-muted);
  position: relative;
  opacity: 0.7;
}
.mouse-wheel {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--primary);
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.8s infinite;
}
@keyframes scrollWheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 15px); }
}

/* Mesh Canvas & Dot grid background */
#mesh-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}
.dot-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.15;
  mask-image: radial-gradient(circle, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle, black 30%, transparent 80%);
}

/* Ambient Orbs */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  z-index: 1;
  pointer-events: none;
}
.ambient-orb-1 {
  width: 350px; height: 350px;
  background: var(--primary);
  top: 10%; left: 5%;
  animation: orbFloat1 18s infinite ease-in-out;
}
.ambient-orb-2 {
  width: 400px; height: 400px;
  background: var(--secondary);
  bottom: 15%; right: 10%;
  animation: orbFloat2 22s infinite ease-in-out alternate;
}
.ambient-orb-3 {
  width: 300px; height: 300px;
  background: var(--accent);
  top: 40%; left: 45%;
  animation: orbFloat3 20s infinite ease-in-out;
}
@keyframes orbFloat1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, -40px) scale(1.08); } }
@keyframes orbFloat2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, 60px) scale(0.92); } }
@keyframes orbFloat3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 30px) scale(1.1); } }

