*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* Sticky nav */
.sticky-nav {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.nav-link {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  color: #475569;
  background: transparent;
  text-decoration: none;
  transition: all .2s ease;
}
.nav-link:hover {
  background: #0D9488;
  color: #fff;
}

/* Section backgrounds */
.section-white { background: #fff; padding: 5rem 0; }
.section-light { background: #F8FAFC; padding: 5rem 0; }

/* Phone links in footer — clearly tappable (override inline classes with !important) */
footer a[href^="tel:"] {
  color: #0D9488 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-color: rgba(13,148,136,.3) !important;
  font-weight: 500;
  transition: text-decoration-color .2s, color .2s;
}
footer a[href^="tel:"]:hover {
  text-decoration-color: #0D9488 !important;
  color: #0F766E !important;
}

@media (max-width: 767px) {
  .section-white, .section-light { padding: 3rem 0; }
  .hero-section { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .nav-link { padding: 6px 14px; font-size: .82rem; }
  .hero-section [style*="height:400px"] { height: 220px !important; border-radius: 16px !important; }
  .hero-section a[href*="online-record"]:first-of-type { padding: 10px 20px !important; font-size: .9rem !important; width: 100%; text-align: center; box-sizing: border-box; }
  #doctors .fade-in { width: 100% !important; max-width: 320px; }
  .review-slide .p-7 { padding: 1.25rem !important; }
  .section-light .p-7 { padding: 1.25rem !important; }
  h2.text-3xl { font-size: 1.5rem !important; line-height: 1.3 !important; }
  footer .gap-8 { gap: 1.5rem !important; }
  .floating-cta { z-index: 9997 !important; }
}

/* Hero gradient */
.hero-section {
  background: linear-gradient(180deg, #F0FDFA 0%, #FFFFFF 100%);
}

/* Card hover lift */
.card-hover { transition: all .25s ease; }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -8px rgba(0,0,0,.10);
}

/* Doctor photo */
.doctor-photo-lg {
  width: 180px; height: 180px; object-fit: cover;
  border-radius: 50%; border: 4px solid #F0FDFA;
}
.doctor-photo-placeholder {
  width: 120px; height: 120px; border-radius: 50%;
  background: #F0FDFA;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: #0D9488;
}

/* Price in service card */
.price-large {
  font-size: 32px; font-weight: 700; color: #0D9488;
  letter-spacing: -.02em;
}
@media (max-width: 767px) { .price-large { font-size: 26px; } }

/* Star rating color */
.star-rating { color: #F59E0B; font-size: 1.1rem; }

/* Review text italic */
.review-text { font-style: italic; }

/* Table for prices */
.table-wrap {
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.06); background: #fff;
}
.price-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.price-table thead th {
  background: #1E293B; color: #fff; font-weight: 600;
  font-size: .9rem; padding: 1.1rem 1.5rem; text-align: left;
}
.price-table thead th:last-child { text-align: right; }
.price-table tbody td {
  padding: 1.1rem 1.5rem; vertical-align: middle;
  border: none; border-bottom: 1px solid #E2E8F0;
}
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody tr:nth-child(even) td { background: #F8FAFC; }
.price-table tbody tr:last-child td:first-child { border-radius: 0 0 0 24px; }
.price-table tbody tr:last-child td:last-child { border-radius: 0 0 24px 0; }
.price-table td:last-child { text-align: right; font-size: 1.1rem; font-weight: 600; color: #0D9488; }
@media (max-width: 767px) {
  .price-table thead { display: none; }
  .price-table tbody tr { display: block; padding: 16px; border-bottom: 1px solid #E2E8F0; }
  .price-table tbody tr:nth-child(even) { background: #F8FAFC; }
  .price-table tbody td { display: block; padding: 4px 0; border: none; text-align: left !important; }
  .price-table tbody td:first-child { font-weight: 600; }
  .price-table tbody td:last-child { font-size: 1.3rem; font-weight: 700; color: #0D9488; text-align: left !important; border-bottom: none; }
}

/* Sidebar card for online-record */
.sidebar-card {
  background: #F0FDFA; border: 1px solid transparent;
  border-radius: 24px;
}

/* Badges */
.badge {
  display: inline-block; padding: .3em .65em;
  font-size: .8rem; font-weight: 500; border-radius: 6px;
}
.badge-teal { background: #0D9488; color: #fff; }

/* Demo notice */
.demo-notice {
  position: fixed; bottom: 12px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.95);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  z-index: 9999;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  font-size: .85rem;
  color: #64748B;
}
@media (max-width: 767px) {
  .demo-notice { font-size: .75rem; padding: 6px 14px; white-space: normal; max-width: 90%; }
}

/* Hero cross-fade slideshow */
.hero-slide {
  transition: opacity 1.2s ease-in-out;
}

/* Reviews carousel — 3 at a time */
.reviews-carousel {
  position: relative;
  min-height: 260px;
}
.review-slide {
  position: absolute;
  top: 0; left: 0; right: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility .8s ease;
}
.review-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
}
.carousel-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}
.carousel-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #CBD5E1;
  border: none;
  cursor: pointer;
  transition: background .3s, transform .2s;
  padding: 0;
}
.carousel-dot.active { background: #0D9488; }
.carousel-dot:hover { transform: scale(1.3); }

/* Animations */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-d1 { transition-delay: 0s; }
.fade-in-d2 { transition-delay: .1s; }
.fade-in-d3 { transition-delay: .2s; }
.fade-in-d4 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .fade-in { opacity: 1; transform: none; }
}

/* Mobile nav slide animation */
#navMobile {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  visibility: hidden;
  transition: max-height .35s ease, opacity .35s ease, padding .35s ease, border-top-width .35s ease, visibility .35s ease;
}
#navMobile.nav-open {
  max-height: 500px;
  opacity: 1;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-top-width: 1px;
  visibility: visible;
}

/* Mobile CTA bar */
.mobile-cta {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid #E2E8F0;
  padding: 10px 16px; z-index: 9998;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
@media (max-width: 767px) {
  .mobile-cta { display: flex; }
  main { padding-bottom: 80px !important; }
}

/* Floating CTA — glassmorphism, always visible */
.floating-cta {
  position: fixed;
  top: 50%; right: 28px;
  z-index: 9998;
  transform: translateY(-50%);
  padding: 16px 32px;
  border-radius: 50px;
  background: rgba(13,148,136,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: 0 8px 32px rgba(13,148,136,.3);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  cursor: pointer;
  animation: ctaFadeIn .7s ease .5s both;
}
.floating-cta:hover {
  transform: translateY(calc(-50% + -3px)) scale(1.02);
  box-shadow: 0 14px 40px rgba(13,148,136,.4);
  background: rgba(13,148,136,.97);
  color: #fff;
}
.floating-cta:active {
  transform: translateY(calc(-50% + -1px)) scale(.98);
}
/* CTA icon */
.floating-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.18);
  flex-shrink: 0;
}
.floating-cta-icon svg {
  width: 18px; height: 18px;
  fill: none; stroke: #fff; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
/* Entrance animation */
@keyframes ctaFadeIn {
  from { opacity: 0; transform: translateY(calc(-50% + 16px)) scale(.95); }
  to { opacity: 1; transform: translateY(-50%) scale(1); }
}
@media (max-width: 767px) {
  .floating-cta { display: none; }
}
