/* ============================================
   BrightSmile — Animations & Micro-interactions
   Premium Healthcare Aesthetic
   ============================================ */

/* ── Floating WhatsApp Button ── */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white; width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; z-index: 9999; text-decoration: none;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
  animation: wapulse 2s infinite;
  transition: all 0.3s ease;
}
.whatsapp-float:hover {
  transform: scale(1.12); color: white;
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
}

@keyframes wapulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ── Floating Call Button ── */
.call-float {
  position: fixed; bottom: 28px; left: 28px;
  background: linear-gradient(135deg, var(--primary, #0F3B25) 0%, #1a5c3a 100%);
  color: white; width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; z-index: 9999; text-decoration: none;
  box-shadow: 0 6px 24px rgba(15, 59, 37, 0.35);
  transition: all 0.3s ease;
  animation: callpulse 2.5s infinite;
}
.call-float:hover {
  transform: scale(1.12); color: white;
  background: linear-gradient(135deg, #0c2f1d 0%, #145230 100%);
  box-shadow: 0 8px 32px rgba(15, 59, 37, 0.45);
}

@keyframes callpulse {
  0%   { box-shadow: 0 0 0 0 rgba(15, 59, 37, 0.4); }
  70%  { box-shadow: 0 0 0 14px rgba(15, 59, 37, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 59, 37, 0); }
}

/* ── Hover Lift Effect for Cards ── */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
              box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
              border-color 0.4s ease;
  will-change: transform, box-shadow;
}
.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover, 0 16px 48px rgba(15, 59, 37, 0.12));
}

/* ── GSAP Initial Visibility States ── */
.fade-up-hero { opacity: 0; visibility: hidden; }
.fade-up-scroll { opacity: 0; visibility: hidden; }

/* ── Scroll-triggered fade-in (CSS fallback) ── */
.fade-in-visible {
  opacity: 1 !important; visibility: visible !important;
  transform: translateY(0) !important;
}

/* ── FAQ Accordion ── */
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
              padding 0.4s ease, opacity 0.3s ease;
  padding: 0 28px; opacity: 0;
}
.faq-item.active .faq-answer {
  max-height: 500px; padding: 0 28px 24px; opacity: 1;
}

/* ── Button Press Feedback ── */
.btn:active {
  transform: scale(0.96) translateY(1px) !important;
  transition: transform 0.1s !important;
}

/* ── Smooth Image Zoom on Card Hover ── */
.card-img-zoom {
  overflow: hidden; border-radius: var(--radius-card, 20px) var(--radius-card, 20px) 0 0;
}
.card-img-zoom img {
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.card-img-zoom:hover img,
.hover-lift:hover .card-img-zoom img {
  transform: scale(1.06);
}

/* ── Gradient Shimmer on Cards ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-bg {
  background: linear-gradient(90deg, transparent 0%, rgba(164, 226, 109, 0.04) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3s ease infinite;
}

/* ── Page Loader ── */
.loader-wrapper {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: white; z-index: 99999;
  display: flex; justify-content: center; align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader-wrapper.hide { opacity: 0; visibility: hidden; }
.tooth-loader i {
  font-size: 48px; color: var(--accent, #A4E26D);
  animation: spinTooth 2s linear infinite;
}
@keyframes spinTooth {
  0%   { transform: rotateY(0deg) scale(1); }
  50%  { transform: rotateY(180deg) scale(1.1); }
  100% { transform: rotateY(360deg) scale(1); }
}

/* ── Form States ── */
.form-processing {
  position: relative; opacity: 0.7; pointer-events: none;
}
.form-spinner {
  display: inline-block; width: 22px; height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.3); border-radius: 50%;
  border-top-color: white; animation: spin 1s ease-in-out infinite;
  margin-right: 10px; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Success Message ── */
.success-message {
  display: none;
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.3);
  padding: 24px; border-radius: var(--radius-card, 20px);
  text-align: center; margin-top: 20px;
  animation: fadeUpIn 0.5s ease forwards;
}
.success-message i {
  font-size: 40px; color: var(--whatsapp, #25D366); margin-bottom: 10px;
}
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Staggered entrance for grid children ── */
.stagger-children > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.40s; }

/* ── Smooth section divider ── */
.section-divider {
  width: 60px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent, #A4E26D) 0%, var(--health-accent, #2D9B63) 100%);
  margin: 0 auto 24px;
}

/* ── Gradient text (utility) ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary, #0F3B25) 0%, var(--health-accent, #2D9B63) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Subtle background patterns ── */
.pattern-dots {
  background-image: radial-gradient(circle, rgba(15, 59, 37, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── 3D Tilt Cards ── */
.service-card {
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease;
  will-change: transform;
}

.service-card:hover {
  box-shadow: 0 25px 50px rgba(10, 126, 164, 0.25);
}

/* Disable tilt on mobile — performance */
@media (max-width: 768px) {
  .service-card {
    transform: none !important;
  }
}

/* ── 3D Flip Counter ── */
.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: #0A7EA4;
  transition: transform 0.08s ease;
  transform-style: preserve-3d;
  display: inline-block;
}

.stat-card {
  text-align: center;
  padding: 2rem;
  perspective: 500px;
}
