/* ===== Global smooth / inertial motion ===== */
html { scroll-behavior: smooth; }

body {
  opacity: 0;
  animation: pageIn 0.45s ease forwards;
}
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* Floating widgets — viewport fixed */
#pareek-wa-root,
#pareek-chat-btn,
#pareek-chat-panel {
  position: fixed !important;
  z-index: 99999 !important;
}
#pareek-wa-root {
  left: 1rem !important;
  right: auto !important;
  bottom: 1rem !important;
  top: auto !important;
}
#pareek-chat-btn {
  right: 1rem !important;
  left: auto !important;
  bottom: 5.5rem !important;
  top: auto !important;
}
#pareek-chat-panel {
  right: 1rem !important;
  left: auto !important;
  bottom: 9.5rem !important;
}
#emergency-banner {
  position: fixed !important;
  z-index: 100000 !important;
  left: 0; right: 0; top: 0;
}

/* Header — inertial hide/show */
#site-header {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  will-change: transform;
}
#site-header.nav-hidden {
  transform: translateY(-110%);
}
#site-header.nav-shadow {
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.14);
}

a { transition: color 0.25s ease, background-color 0.25s ease, opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
img { transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }

/* Soft cards — heavier lift */
.card-hover, .soft-card {
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease;
  will-change: transform;
}
.card-hover:hover, .soft-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 22px 44px -16px rgba(2, 132, 199, 0.22);
  border-color: rgba(2, 132, 199, 0.35);
  background-color: rgba(240, 249, 255, 0.65);
}

/* Scroll reveal — inertial rise */
.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.32s; }

button, .btn-anim, a.px-6, a.px-4 {
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    background-color 0.25s ease;
}
button:hover, a.px-6:hover {
  transform: translateY(-2px);
}
button:active { transform: scale(0.97); }

/* Stats numbers pop */
#clinic-stats [data-count] {
  transition: transform 0.2s ease;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}

/* Lightbox already separate */

@media (prefers-reduced-motion: reduce) {
  body { animation: none; opacity: 1; transform: none; }
  #site-header { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* Premium motion extras */
.casino-spinning {
  text-shadow: 0 0 12px rgba(2, 132, 199, 0.35);
  filter: blur(0.3px);
}
.casino-done {
  animation: casinoPop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes casinoPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

#clinic-stats .soft-card {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.7s ease;
}
#clinic-stats .soft-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 28px 50px -20px rgba(2, 132, 199, 0.25);
}

/* Magnetic-style buttons */
.btn-glow:hover {
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15), 0 12px 28px -8px rgba(2, 132, 199, 0.4);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-children.visible > * { opacity: 1; transform: none; }

/* Page sections deeper inertia */
.reveal {
  opacity: 0;
  transform: translateY(48px) scale(0.96);
  filter: blur(2px);
  transition:
    opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}


/* CRITICAL: never put transform/filter on body — breaks position:fixed children */
html, body {
  transform: none !important;
  filter: none !important;
  perspective: none !important;
}

/* Floating action buttons — always viewport pinned */
#pareek-wa-root {
  position: fixed !important;
  left: 16px !important;
  right: auto !important;
  bottom: 20px !important;
  top: auto !important;
  z-index: 99999 !important;
  margin: 0 !important;
  transform: none !important;
  will-change: auto;
}
#pareek-chat-btn {
  position: fixed !important;
  right: 20px !important;
  left: auto !important;
  bottom: 20px !important;
  top: auto !important;
  z-index: 99999 !important;
  margin: 0 !important;
  transform: none !important;
}
#pareek-chat-panel {
  position: fixed !important;
  right: 20px !important;
  left: auto !important;
  bottom: 88px !important;
  top: auto !important;
  z-index: 99999 !important;
  transform: none !important;
}
#emergency-banner {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  z-index: 100000 !important;
  transform: none !important;
}

/* Header hide / show on scroll */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
  will-change: transform;
}
#site-header.nav-hidden {
  transform: translateY(-110%);
}
#site-header.nav-shadow {
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.14);
}

/* FIXED WIDGETS + NO BODY TRANSFORM (fixed pos break) */
html, body { transform: none !important; filter: none !important; }
#pareek-wa-root {
  position: fixed !important; left: 16px !important; right: auto !important;
  bottom: 20px !important; top: auto !important; z-index: 99999 !important;
  transform: none !important; margin: 0 !important;
}
#pareek-chat-btn {
  position: fixed !important; right: 20px !important; left: auto !important;
  bottom: 20px !important; top: auto !important; z-index: 99999 !important;
  transform: none !important;
}
#pareek-chat-panel {
  position: fixed !important; right: 20px !important; left: auto !important;
  bottom: 88px !important; top: auto !important; z-index: 99999 !important;
  transform: none !important;
}
#site-header {
  position: sticky; top: 0; z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
#site-header.nav-hidden { transform: translateY(-110%); }
#site-header.nav-shadow { box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.14); }

#site-header.nav-smart,
#site-header {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}
#site-header.nav-hidden {
  transform: translateY(-110%) !important;
}
body { padding-top: 0; }
/* offset content under fixed header — pages already use pt-24 */


/* Nav offset: spacer collapses when header hides */
#pareek-nav-spacer {
  transition: height 0.25s ease;
  pointer-events: none;
}
#site-nav {
  margin: 0;
  padding: 0;
}


/* =========================================================
   MOBILE REAL UX — phone look (desktop unchanged ≥1024px)
   ========================================================= */
@media (max-width: 1023px) {
  /* Hide ALL floating Call / WhatsApp / Chat on mobile */
  #pareek-wa-root,
  #pareek-chat-btn,
  #pareek-chat-panel {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Clean page chrome */
  html { -webkit-text-size-adjust: 100%; }
  body {
    overflow-x: hidden;
    background: #f8fafc;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  /* Tighter header */
  #site-header {
    backdrop-filter: blur(12px);
  }
  #site-header a[href="/index.html"] {
    max-width: calc(100% - 3.5rem);
    gap: 0.45rem !important;
  }
  #site-header a[href="/index.html"] img {
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 0.65rem !important;
  }
  #site-header a[href="/index.html"] div div:first-child {
    font-size: 0.9rem !important;
    line-height: 1.15 !important;
  }
  #site-header a[href="/index.html"] div div:last-child {
    font-size: 0.65rem !important;
    line-height: 1.2 !important;
  }
  #nav-toggle {
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px !important;
  }
  #nav-mobile {
    max-height: min(72vh, 30rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.35rem 1rem;
  }
  #nav-mobile a {
    display: block;
    padding: 0.9rem 1rem !important;
    min-height: 48px;
    font-size: 1rem !important;
    border-radius: 12px;
    margin: 2px 0;
  }
  #nav-mobile a[href="/booking.html"] {
    margin: 0.6rem 0.5rem 0 !important;
    border-radius: 14px !important;
  }

  /* Content */
  main {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    padding-bottom: 5.25rem !important; /* room for bottom bar */
  }
  h1 { font-size: 1.55rem !important; line-height: 1.25 !important; }
  h2 { font-size: 1.2rem !important; }

  /* Cards: flat, touch-friendly, no hover lift */
  .soft-card, .card-hover,
  .rounded-2xl.border {
    border-radius: 1rem !important;
  }
  .soft-card:hover, .card-hover:hover {
    transform: none !important;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06) !important;
    background-color: inherit !important;
  }
  .soft-card:active, .card-hover:active {
    transform: scale(0.985) !important;
  }

  /* Forms: no iOS zoom */
  input, select, textarea, button {
    font-size: 16px !important;
    max-width: 100%;
  }
  input, select, textarea {
    border-radius: 12px !important;
    min-height: 48px;
  }

  /* Buttons full-width where stacked */
  .hero-gradient a,
  section a.px-6.py-3 {
    min-height: 48px;
  }

  img, video { max-width: 100%; height: auto; }
  table { display: block; width: 100%; overflow-x: auto; }

  /* Stats / grids */
  .grid { gap: 0.65rem !important; }

  /* Footer simpler */
  footer {
    padding-bottom: 5rem;
  }
  footer .grid {
    gap: 1.25rem !important;
  }

  /* Less motion for battery/perf */
  html { scroll-behavior: auto; }
  body { animation: none !important; opacity: 1 !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Bottom app bar — phones only */
@media (max-width: 767px) {
  #pareek-mobile-bar {
    display: flex !important;
    z-index: 99990 !important;
  }
  #pareek-mobile-bar .grid {
    width: 100%;
  }
  #pareek-mobile-bar a {
    min-height: 56px;
    font-size: 11px;
    letter-spacing: 0.01em;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablet: still no floats, no bottom bar needed as much */
  #pareek-mobile-bar { display: none !important; }
  main { padding-bottom: 2rem !important; }
}

@media (min-width: 1024px) {
  #pareek-mobile-bar { display: none !important; }
}
