/* ============================================================
   Virtual Physio.ca — Premium UI Upgrade
   Design: Clean telemedicine, trust-first, subtle 3D depth
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --blue: #2E86DE;
  --blue-dark: #1a6bbf;
  --blue-light: #e8f4ff;
  --green: #27AE60;
  --green-dark: #1e8449;
  --green-light: #e8f8f0;
  --white: #ffffff;
  --bg: #F8FAFC;
  --grey: #6b7c93;
  --ink: #0d2137;
  --ink-soft: #1e3a52;
  --muted: #f5f9fc;
  --muted-2: #eef4f9;
  --line: #dce8f0;
  --shadow-sm: 0 2px 12px rgba(13, 33, 55, 0.08);
  --shadow-md: 0 8px 30px rgba(13, 33, 55, 0.12);
  --shadow-lg: 0 20px 60px rgba(13, 33, 55, 0.16);
  --shadow-blue: 0 8px 28px rgba(46, 134, 222, 0.28);
  --shadow-green: 0 8px 28px rgba(39, 174, 96, 0.24);
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --transition: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: "Montserrat", Arial, sans-serif;
  --font-body: "Roboto Condensed", Arial, sans-serif;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  animation: pageReveal 600ms ease forwards;
  -webkit-tap-highlight-color: rgba(46, 134, 222, 0.15);
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(9, 20, 32, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 900;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}
body.nav-open::before {
  opacity: 1;
  pointer-events: auto;
}

@keyframes pageReveal {
  to { opacity: 1; }
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
  transition: color var(--transition);
}
a:hover { color: var(--green-dark); }

h1, h2, h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 6.5vw, 5.4rem); max-width: 11ch; }
h2 { font-size: clamp(1.75rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width: min(1200px, calc(100% - 40px));
  max-width: 100%;
  margin-inline: auto;
}
.narrow {
  width: min(840px, calc(100% - 40px));
  max-width: 100%;
}

/* ── Skip link ───────────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 999;
  transform: translateY(-160%);
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  transition: transform 220ms ease;
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Header / Navbar ─────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition: box-shadow var(--transition), background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(220, 232, 240, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 4px 24px rgba(13, 33, 55, 0.09);
}

.navbar {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: min-height var(--transition);
}

.site-header.scrolled .navbar { min-height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
}
.brand img {
  width: clamp(160px, 17vw, 210px);
  height: 56px;
  object-fit: contain;
  transition: transform var(--transition);
}
.brand:hover img { transform: scale(1.03); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-menu a {
  position: relative;
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}
.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 4px; left: 50%;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: translateX(-50%);
  transition: width var(--transition);
}
.nav-menu a:hover { color: var(--blue); background: var(--blue-light); }
.nav-menu a:hover::after { width: 60%; }
.nav-menu a[aria-current="page"] { color: var(--blue); }
.nav-menu a[aria-current="page"]::after { width: 60%; }

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1.3rem;
  border: 0;
  border-radius: var(--radius);
  font: 700 0.97rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  will-change: transform;
}

.nav-cta,
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #1a6bbf 100%);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}
.nav-cta:hover,
.btn-primary:hover {
  color: var(--white);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 36px rgba(46, 134, 222, 0.38);
}

.btn-secondary {
  background: var(--white);
  color: var(--blue);
  border: 2px solid var(--blue);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-green);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav-toggle:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-sm);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  margin: 5px auto;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 300ms ease, opacity 300ms ease;
}
.nav-toggle span:nth-child(1) {
  transform-origin: center;
}
.nav-toggle span:nth-child(2) {
  transform-origin: center;
}
.nav-toggle span:nth-child(3) {
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero-section {
  min-height: calc(100vh - 80px);
  display: grid;
  align-items: center;
  padding: 3rem 20px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      125deg,
      rgba(240, 248, 255, 0.96) 0%,
      rgba(245, 252, 248, 0.95) 45%,
      rgba(39, 174, 96, 0.08) 100%
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'%3E%3Cg fill='none' stroke='%232E86DE' stroke-opacity='0.10' stroke-width='2'%3E%3Ccircle cx='220' cy='180' r='120'/%3E%3Ccircle cx='1120' cy='320' r='180'/%3E%3Cpath d='M400 460h120m-60-60v120'/%3E%3Cpath d='M1220 170h120m-60-60v120'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
}

/* Decorative background blobs */
.hero-section::before {
  content: "";
  display: none;
}
.hero-section::after {
  content: "";
  display: none;
}

.hero-grid,
.split-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  min-width: 0;
}

.hero-grid > *,
.split-grid > *,
.contact-grid > *,
.footer-grid > * {
  min-width: 0;
}

.hero-copy p {
  max-width: 58ch;
  font-size: 1.18rem;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.2);
  color: var(--green-dark);
  font: 800 0.8rem var(--font-display);
  letter-spacing: 0;
  text-transform: uppercase;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.5rem 0;
}

/* Trust strip */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  max-width: 560px;
  margin: 2.2rem 0 0;
}
.trust-strip div {
  padding: 1.1rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.trust-strip div:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(46, 134, 222, 0.3);
}
.trust-strip dt {
  color: var(--blue);
  font: 800 1.8rem var(--font-display);
  line-height: 1;
}
.trust-strip dd {
  margin: 0.2rem 0 0;
  color: var(--grey);
  font-size: 0.9rem;
}

/* Hero visual */
.hero-visual {
  position: relative;
  min-height: 480px;
  display: grid;
  place-items: center;
  perspective: 1000px;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 6% 4% 0 8%;
  border-radius: 50% 50% var(--radius-xl) var(--radius-xl);
  background: linear-gradient(150deg, var(--blue) 0%, var(--green) 100%);
  opacity: 0.12;
  transform: rotate(-3deg);
  filter: blur(2px);
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 10% 6% 2% 12%;
  border-radius: 50% 50% var(--radius-xl) var(--radius-xl);
  background: linear-gradient(150deg, var(--blue-light), var(--green-light));
  z-index: 0;
}
.hero-visual img {
  position: relative;
  z-index: 1;
  width: min(420px, 82vw);
  max-height: 560px;
  object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(13, 33, 55, 0.2));
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero-visual:hover img { transform: scale(1.03) translateY(-6px); }

/* ── Sections ────────────────────────────────────────────── */
.section,
.page-hero {
  padding: 60px 20px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #eaf5fb 0%, #f8fefc 60%, #ffffff 100%);
}
.page-hero::before {
  content: "";
  display: none;
}
.page-hero h1 { max-width: 13ch; }

.section-heading {
  max-width: 740px;
  margin-bottom: 2.5rem;
}
.section-heading p { color: var(--grey); font-size: 1.1rem; }

.soft-bg { background: var(--muted); }
.split-band { background: var(--muted-2); }
.local-seo-band {
  background:
    linear-gradient(135deg, rgba(232, 244, 255, 0.82), rgba(232, 248, 240, 0.74)),
    var(--white);
}

/* ── Service / Highlight Cards ───────────────────────────── */
.highlight-grid,
.service-detail-grid,
.blog-grid,
.profile-grid,
.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

.service-card,
.service-detail-card,
.blog-card,
.profile-card,
.values-panel,
.contact-panel,
.booking-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.booking-hero p {
  max-width: 58ch;
}

.health-icon-row {
  display: flex;
  gap: 0.7rem;
  margin: 1rem 0;
}

.booking-note {
  margin-top: 1.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--muted);
  font-size: 0.92rem;
}

.service-card,
.service-detail-card,
.blog-card,
.profile-card {
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  will-change: transform;
}

/* 3D card tilt via JS — base state */
.service-card,
.service-detail-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.service-card:hover,
.service-detail-card:hover,
.blog-card:hover,
.profile-card:hover {
  transform: translateY(-6px);
  border-color: rgba(39, 174, 96, 0.4);
  box-shadow: 0 18px 44px rgba(13, 33, 55, 0.14);
}

.icon-pill,
.medical-icon {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 1.1rem;
  border-radius: 14px;
  background: rgba(39, 174, 96, 0.1);
  color: var(--green-dark);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: background var(--transition), transform var(--transition);
}
.service-card:hover .icon-pill,
.service-detail-card:hover .medical-icon { transform: scale(1.1) rotate(-3deg); }

.medical-icon {
  background: rgba(46, 134, 222, 0.1);
  color: var(--blue);
  border-radius: 14px;
}

.service-detail-grid,
.blog-grid,
.profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.single-profile { grid-template-columns: minmax(0, 880px); }
.single-profile .profile-card {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  column-gap: 1.8rem;
  align-items: start;
}

.service-detail-card { min-height: 270px; }
.service-detail-card a,
.blog-card a { font-weight: 700; color: var(--blue); }
.service-detail-card a:hover,
.blog-card a:hover { color: var(--green-dark); }

.keyword-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.keyword-grid a,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.keyword-grid a:hover,
.text-link:hover {
  color: var(--blue);
  border-color: rgba(46, 134, 222, 0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.values-panel .text-link {
  margin-top: 1rem;
  width: 100%;
}

/* ── Doctor Spotlight (Homepage) ─────────────────────────── */
.doctor-spotlight {
  background: linear-gradient(
    140deg,
    rgba(46, 134, 222, 0.06) 0%,
    rgba(255, 255, 255, 1) 45%,
    rgba(39, 174, 96, 0.06) 100%
  );
}

.doctor-card {
  display: grid;
  grid-template-columns: minmax(230px, 340px) 1fr;
  gap: clamp(1.25rem, 3.5vw, 2.4rem);
  align-items: center;
  padding: clamp(1.3rem, 3.8vw, 2rem);
  border: 1px solid rgba(220, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 36px rgba(13, 33, 55, 0.1);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.doctor-card:hover {
  transform: translateY(-5px);
  border-color: rgba(46, 134, 222, 0.35);
  box-shadow: 0 20px 44px rgba(13, 33, 55, 0.14);
}

.doctor-image-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, #eef6ff, #f2fbf6);
  border: 1px solid rgba(220, 232, 240, 0.8);
  box-shadow: var(--shadow-md);
}

.doctor-image-wrap img {
  width: 100%;
  height: 100%;
  max-height: 430px;
  object-fit: contain;
  transition: transform 420ms ease;
}

.doctor-card:hover .doctor-image-wrap img {
  transform: scale(1.03);
}

.doctor-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(39, 174, 96, 0.35);
  color: var(--green-dark);
  font: 700 0.76rem var(--font-display);
  letter-spacing: 0;
  text-transform: uppercase;
}

.doctor-copy h3 {
  font-size: clamp(1.45rem, 3.2vw, 2rem);
}

.doctor-copy .role {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(46, 134, 222, 0.1);
  color: var(--blue);
}

.doctor-copy p {
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ── Check list ─────────────────────────────────────────── */
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li {
  position: relative;
  padding: 0.7rem 0 0.7rem 2.2rem;
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}
.check-list li:last-child { border-bottom: 0; }
.check-list li:hover { background: var(--blue-light); border-radius: var(--radius); }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.1rem;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

/* ── Panels ──────────────────────────────────────────────── */
.values-panel,
.contact-panel,
.booking-form {
  padding: clamp(1.4rem, 4vw, 2.2rem);
  border-radius: var(--radius-lg);
}

/* ── Profile card ────────────────────────────────────────── */
.profile-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--muted);
  transition: transform 400ms ease;
}
.profile-card:hover img { transform: scale(1.02); }
.role, .blog-card span { color: var(--green-dark); font-weight: 700; }

/* ── Badge grid ──────────────────────────────────────────── */
.badge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.badge-grid span {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.badge-grid span:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-list { display: grid; gap: 0.9rem; }

details {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
details:hover { border-color: rgba(46, 134, 222, 0.3); box-shadow: var(--shadow-md); }
details[open] { border-color: rgba(39, 174, 96, 0.35); }

summary {
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  color: var(--ink);
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  user-select: none;
  transition: color var(--transition), background var(--transition);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 1.1rem;
  font-weight: 800;
  transition: transform 300ms ease, background var(--transition);
}
details[open] summary::after { transform: rotate(45deg); background: var(--green-light); color: var(--green-dark); }
summary:hover { color: var(--blue); background: var(--blue-light); }

details p {
  padding: 0 1.4rem 1.2rem;
  color: var(--grey);
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

/* ── Form ────────────────────────────────────────────────── */
.form-row { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.booking-form--premium {
  background: linear-gradient(180deg, #ffffff 0%, #fdfefe 100%);
  border: 1px solid #d4e6f2;
  box-shadow: 0 16px 42px rgba(13, 33, 55, 0.12);
}

.with-icon .input-wrap {
  position: relative;
}

.field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #5b7894;
  pointer-events: none;
  font-size: 0.95rem;
}

label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

input, select, textarea {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid #c5d8e4;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}
.with-icon input,
.with-icon select {
  padding-left: 2.35rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46, 134, 222, 0.15);
  background: rgba(232, 244, 255, 0.3);
}
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) {
  border-color: #a0c0d4;
}
textarea { resize: vertical; min-height: 120px; }

.field-error {
  min-height: 1rem;
  margin-top: 0.1rem;
  font-size: 0.82rem;
  color: #b12626;
}
.field-error:empty {
  display: none;
}

.problem-area-group {
  margin: 0.8rem 0 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fcff;
}

.problem-area-group legend {
  padding: 0 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-soft);
}

.problem-area-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.problem-area-list label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.86rem;
  font-weight: 600;
}

.problem-area-list input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}

.booking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.whatsapp-quick {
  border-color: #1e8449;
  color: #1e8449;
}

.trust-note {
  margin-top: 0.85rem;
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-status {
  min-height: 1.5rem;
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  color: var(--green-dark);
  font-weight: 700;
  background: var(--green-light);
  border: 1px solid rgba(39, 174, 96, 0.25);
  display: none;
}
.form-status:not(:empty) { display: block; }

.booking-form .btn[disabled] {
  cursor: not-allowed;
  opacity: 0.9;
}

.booking-form .btn.is-loading {
  box-shadow: 0 8px 20px rgba(46, 134, 222, 0.2);
  transform: none;
}

.booking-form .btn.is-success {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  box-shadow: 0 10px 28px rgba(39, 174, 96, 0.3);
  color: var(--white);
}

.booking-toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px);
  opacity: 0;
  z-index: 500;
  width: min(92vw, 420px);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(39, 174, 96, 0.3);
  background: #e8f8f0;
  color: var(--green-dark);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  text-align: center;
  transition: transform 240ms ease, opacity 240ms ease;
}

.booking-toast.error {
  border-color: rgba(225, 70, 70, 0.28);
  background: #fdebec;
  color: #8a1f1f;
}

.booking-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  padding: 3.5rem 0 2.5rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  display: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.9fr;
  gap: 2.5rem;
}

.site-footer a,
.site-footer .brand { color: var(--white); }
.site-footer a:hover { color: var(--green); }
.site-footer h2 { font-size: 1rem; color: var(--white); margin-bottom: 0.8rem; }
.site-footer p { color: rgba(255, 255, 255, 0.7); }

.footer-brand { margin-bottom: 1rem; }
.footer-brand img { width: 170px; height: auto; max-height: 58px; filter: brightness(1.05); }

/* ── Chatbot ─────────────────────────────────────────────── */
.chatbot {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 200;
  display: grid;
  justify-items: end;
  gap: 0.65rem;
  width: auto;
  pointer-events: none;
}

.fab-stack {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.65rem;
  width: auto;
  pointer-events: auto;
}

.whatsapp-fab {
  width: 50px;
  height: 50px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #27AE60 0%, #1e8449 100%);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(39, 174, 96, 0.35);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.whatsapp-fab svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.whatsapp-fab:hover {
  color: var(--white);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 15px 35px rgba(39, 174, 96, 0.42);
  filter: saturate(1.08);
}

.chat-toggle {
  width: 56px;
  height: 56px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green) 0%, #1e8449 100%);
  color: var(--white);
  box-shadow: 0 8px 28px rgba(39, 174, 96, 0.35);
  font: 800 0 var(--font-display);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.chat-toggle::before {
  content: "AI";
  font-size: 0.9rem;
  letter-spacing: 0;
}
.chat-toggle:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 36px rgba(39, 174, 96, 0.45);
}

.chat-panel {
  order: -1;
  width: min(370px, calc(100vw - 32px));
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform-origin: bottom right;
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease;
  pointer-events: auto;
}
.chat-panel[hidden] {
  display: block !important;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85) translateY(10px);
}
.chat-panel:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
}
.chat-header strong { font-size: 0.97rem; }

.chat-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition), border-color var(--transition);
}
.chat-close:hover { background: rgba(255,255,255,0.15); border-color: white; }

.chat-log {
  display: grid;
  gap: 0.7rem;
  max-height: 280px;
  overflow: auto;
  padding: 1rem;
  scroll-behavior: smooth;
}

.chat-message {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  background: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  animation: msgIn 250ms ease forwards;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-message.user {
  margin-left: 2rem;
  background: rgba(39, 174, 96, 0.13);
  border: 1px solid rgba(39, 174, 96, 0.2);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid var(--line);
  background: var(--muted);
}
.chat-form input { min-height: 44px; border-radius: var(--radius); }
.chat-form button {
  padding: 0 1rem;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.chat-form button:hover { transform: scale(1.05); box-shadow: var(--shadow-blue); }

/* ── Scroll animations ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 650ms cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }

/* ── Accessibility ───────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 920px) {
  h1 { max-width: 14ch; }

  .site-header {
    z-index: 920;
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: rgba(220, 232, 240, 0.78);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
  }

  body.nav-open .site-header {
    z-index: 980;
  }

  .navbar {
    position: relative;
    min-height: 72px;
  }

  .nav-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1002;
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
    box-shadow: 0 10px 28px rgba(13, 33, 55, 0.08);
  }

  .nav-cta { display: none; }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(88vw, 390px);
    height: 100vh;
    height: 100dvh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
    margin: 0;
    padding: calc(92px + env(safe-area-inset-top)) 1rem calc(1.25rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-left: 1px solid rgba(220, 232, 240, 0.95);
    box-shadow: -30px 0 70px rgba(13, 33, 55, 0.28);
    transform: translate3d(110%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 340ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 340ms ease;
    will-change: transform;
  }

  .nav-menu.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-menu li { width: 100%; }

  .nav-menu a {
    display: flex;
    align-items: center;
    min-height: 56px;
    width: 100%;
    padding: 0.95rem 1.05rem;
    border: 1px solid rgba(220, 232, 240, 0.85);
    border-radius: var(--radius);
    color: var(--ink);
    font: 800 1rem var(--font-display);
    letter-spacing: 0;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 24px rgba(13, 33, 55, 0.05);
  }

  .nav-menu a::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.75rem;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(39, 174, 96, 0.12);
    flex: 0 0 auto;
  }

  .nav-menu a::after { display: none; }

  .nav-menu a:hover,
  .nav-menu a:focus-visible,
  .nav-menu a[aria-current="page"] {
    color: var(--blue);
    background: var(--blue-light);
    border-color: rgba(46, 134, 222, 0.22);
  }

  .brand img { width: 160px; height: 50px; }

  .hero-grid, .split-grid, .contact-grid, .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-visual { order: 0; }
  .hero-copy { order: 1; }

  .doctor-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .doctor-copy .role {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-section { min-height: auto; }
  .hero-visual { min-height: 320px; order: -1; }

  .highlight-grid, .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .keyword-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .problem-area-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  input,
  select,
  textarea,
  .btn,
  .nav-toggle,
  .chat-toggle,
  .whatsapp-fab {
    min-height: 48px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  body { font-size: 17px; }

  .container, .narrow { width: 100%; }

  .section,
  .page-hero,
  .hero-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .contact-panel,
  .booking-form {
    padding: clamp(1.1rem, 5vw, 1.4rem);
  }

  .brand img { width: 138px; height: 44px; }
  .footer-brand img { width: 150px; }

  .nav-menu {
    width: min(88vw, 340px);
    padding-inline: 1rem;
  }

  .button-row { flex-direction: column; }
  .button-row .btn,
  .nav-cta,
  .booking-form .btn { width: 100%; }

  .doctor-copy .button-row {
    justify-content: center;
  }

  .trust-strip { grid-template-columns: 1fr; gap: 0.65rem; }

  .highlight-grid,
  .service-detail-grid,
  .blog-grid,
  .profile-grid,
  .badge-grid,
  .keyword-grid { grid-template-columns: 1fr; }

  .single-profile .profile-card { grid-template-columns: 1fr; }

  .chatbot {
    right: max(10px, env(safe-area-inset-right));
    left: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
    max-width: calc(100vw - 20px);
  }
  .fab-stack { width: auto; }
  .whatsapp-fab,
  .chat-toggle {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
  }
  .chat-panel {
    width: min(340px, calc(100vw - 20px));
    max-height: calc(100dvh - 120px);
  }

  /* Reduce animations on mobile */
  .reveal { transform: translateY(12px); }
  .service-card:hover,
  .service-detail-card:hover { transform: translateY(-3px); }
}

@media (max-width: 480px) {
  .section,
  .page-hero { padding-top: 40px; padding-bottom: 40px; }

  .hero-section { padding-top: 2rem; padding-bottom: 2.2rem; }

  h1 { font-size: clamp(1.95rem, 8.4vw, 2.6rem); }
  h2 { font-size: clamp(1.45rem, 6.5vw, 1.9rem); }

  .navbar { min-height: 72px; }
  .site-header.scrolled .navbar { min-height: 62px; }

  .doctor-image-wrap img { max-height: 360px; }
  .compact-optional { display: none; }
  .problem-area-list {
    grid-template-columns: 1fr;
  }

  .booking-toast {
    width: calc(100vw - 20px);
    font-size: 0.94rem;
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .container,
  .narrow {
    width: 100%;
  }

  .section,
  .page-hero {
    padding: 52px 12px;
  }

  .hero-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .highlight-grid,
  .service-detail-grid,
  .blog-grid,
  .profile-grid,
  .badge-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  .container,
  .narrow {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
  }

  .brand img {
    max-width: calc(100vw - 40px);
    width: auto;
    height: auto;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
  }

  .hero-copy {
    order: 0;
  }

  .hero-visual {
    order: 1;
    min-height: 320px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .highlight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-detail-grid,
  .blog-grid,
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1025px) {
  .nav-menu, .nav-cta {
    display: flex !important;
  }
}
