/* ==========================================================================
   Maika – Phòng khám Tâm lý Nhi khoa
   ========================================================================== */

:root {
  --ink: #1b2d40;
  --ink-2: #43566b;
  --muted: #66788c;
  --line: #e2eaf3;
  --bg: #fbfdff;
  --cream: #f1f7fd;
  --surface: #ffffff;

  --blue-900: #173f66;
  --blue-800: #2d6aa3;
  --blue-700: #2f74b5;
  --blue-500: #5194c8;
  --blue-100: #d9eaf8;
  --blue-50: #edf5fd;

  --coral: #ffc9ce;
  --coral-600: #d9505f;
  --coral-50: #fdeef0;
  --sun: #f3cd6b;
  --lilac: #c9c2ec;
  --sky: #b6dcef;

  --r-sm: 10px;
  --r: 18px;
  --r-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(27, 45, 64, .06), 0 2px 8px rgba(27, 45, 64, .04);
  --shadow: 0 12px 32px -12px rgba(27, 45, 64, .18);
  --shadow-lg: 0 30px 60px -20px rgba(45, 106, 163, .35);

  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, iframe { max-width: 100%; display: block; }
a { color: var(--blue-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; line-height: 1.12; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
em { font-style: normal; color: var(--blue-500); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--coral-600); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; display: inline-block; vertical-align: -3px; }
.i-lg { width: 30px; height: 30px; fill: none; stroke: var(--blue-700); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--blue-800); --fg: #fff; --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.4em; border-radius: 999px; border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 600; font-size: .98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { box-shadow: 0 8px 20px -8px rgba(45, 106, 163, .6); }
.btn-primary:hover { --bg: var(--blue-900); box-shadow: 0 14px 28px -10px rgba(45, 106, 163, .6); }
.btn-outline { --bg: transparent; --fg: var(--blue-800); --bd: var(--blue-800); }
.btn-outline:hover { --bg: var(--blue-800); --fg: #fff; }
.btn-soft { --bg: var(--blue-50); --fg: var(--blue-800); }
.btn-soft:hover { --bg: var(--blue-100); }
.btn-ghost { --bg: transparent; --fg: var(--ink-2); --bd: var(--line); }
.btn-ghost:hover { --bd: var(--ink-2); }
.btn-light { --bg: #fff; --fg: var(--blue-900); }
.btn-outline-light { --bg: transparent; --fg: #fff; --bd: rgba(255,255,255,.5); }
.btn-outline-light:hover { --bd: #fff; --bg: rgba(255,255,255,.08); }
.btn-sm { padding: .6em 1.05em; font-size: .9rem; }
.btn-lg { padding: 1em 1.7em; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link-arrow { font-weight: 600; text-decoration: none; color: var(--blue-700); }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--blue-900); color: #d3e5f5; font-size: .84rem; }
.topbar-inner { display: flex; gap: 24px; justify-content: space-between; align-items: center; min-height: 40px; }
.topbar-inner > * { display: inline-flex; gap: 8px; align-items: center; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar .i { width: 15px; height: 15px; }

.header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(251, 253, 255, .85); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0,0,0,.3); }
.header-inner { display: flex; align-items: center; gap: 32px; height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 58px; height: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-family: var(--serif); font-size: 1.75rem; font-weight: 800; color: var(--blue-500); letter-spacing: 0; position: relative; }
.logo-text b::after { content: ""; position: absolute; left: 1.05em; top: -.05em; width: 7px; height: 7px; background: var(--coral-600); border-radius: 50% 50% 0 50%; transform: rotate(45deg); opacity: .85; }
.logo-text small { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--blue-800); font-weight: 600; margin-top: 2px; }
.logo-light .logo-text b { color: #fff; }
.logo-light .logo-text small { color: #a8c3dd; }
.footer-logo { display: inline-block; background: #fff; border-radius: 24px; padding: 14px 18px; margin-bottom: 18px; }
.footer-logo img { width: 130px; height: auto; }

.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { position: relative; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .95rem; text-decoration: none; transition: color .2s, background .2s; }
.nav a:hover, .nav a.active { color: var(--blue-800); background: var(--blue-50); }
.header-cta { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--blue-50); cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--blue-800); border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-cream { background: var(--cream); }
.section-dark { background: var(--blue-900); color: #dbe9f6; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--coral-600);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow.light { color: var(--coral); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 112px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--blue-50), transparent 70%); z-index: -1;
}
.hero::after {
  content: ""; position: absolute; left: -10%; bottom: -30%; width: 50vw; height: 50vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(closest-side, var(--coral-50), transparent 70%); z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #2fb37a; box-shadow: 0 0 0 0 rgba(47,179,122,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(47,179,122,0); } 100% { box-shadow: 0 0 0 0 rgba(47,179,122,0); } }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.18rem); color: var(--ink-2); max-width: 34em; }
.lead-sm { font-size: 1.08rem; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 44px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; margin: 0; padding-top: 28px; border-top: 1px solid var(--line); max-width: 560px; }
.hero-stats div { min-width: 0; }
.hero-stats dt { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; color: var(--blue-800); line-height: 1.1; }
.hero-stats dd { margin: 4px 0 0; font-size: .86rem; color: var(--muted); }

.hero-visual { position: relative; justify-self: center; width: min(100%, 460px); }
.portrait {
  position: relative; aspect-ratio: 5 / 6; border-radius: 240px 240px var(--r-lg) var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 34%, transparent 35%),
    linear-gradient(180deg, #cfe6f9 0%, #eaf4fd 70%, #fff 100%);
}
.portrait img { width: 82%; height: auto; position: relative; z-index: 1; filter: drop-shadow(0 18px 24px rgba(45,106,163,.18)); }
.portrait .cloud { position: absolute; fill: #fff; opacity: .9; }
.portrait .cloud.c-a { width: 34%; top: 9%; left: -6%; animation: drift 14s ease-in-out infinite; }
.portrait .cloud.c-b { width: 22%; top: 22%; right: -2%; opacity: .75; animation: drift 11s ease-in-out infinite reverse; }
.portrait .cloud.c-c { width: 60%; bottom: -8%; left: -10%; }
@keyframes drift { 50% { transform: translateX(18px); } }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-radius: 16px; box-shadow: var(--shadow);
  font-size: .9rem; line-height: 1.3; animation: float 6s ease-in-out infinite; z-index: 3;
}
.float-card b { display: block; }
.float-card small { color: var(--muted); font-size: .8rem; }
.fc-1 { left: -36px; bottom: -22px; }
.fc-2 { right: -28px; top: 60px; animation-delay: -3s; }
.fc-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-700); }
.fc-icon.accent { background: var(--coral-50); color: var(--coral-600); }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- Trust strip ---------- */
.trust { margin-top: -40px; position: relative; z-index: 2; }
.trust-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface);
  border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.trust-item { display: flex; gap: 16px; padding: 28px 30px; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item b { display: block; margin-bottom: 4px; }
.trust-item p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Doctor ---------- */
.doctor-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.doctor-card { position: sticky; top: 110px; }
.doctor-photo {
  aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(150deg, var(--blue-500), var(--blue-900));
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
}
.doctor-photo span { font-family: var(--serif); font-size: clamp(4rem, 9vw, 7rem); color: rgba(255,255,255,.9); font-weight: 600; }
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.doctor-badges { position: absolute; left: 20px; right: 20px; bottom: -22px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.doctor-badges span { background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: .82rem; font-weight: 600; color: var(--blue-800); box-shadow: var(--shadow); }
.timeline { list-style: none; margin: 32px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--blue-500), var(--coral)); }
.timeline li { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 0 0 26px 34px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--blue-500); }
.tl-year { font-weight: 700; color: var(--blue-700); font-size: .92rem; padding-top: 1px; }
.timeline b { display: block; }
.timeline p { color: var(--muted); margin: 2px 0 0; font-size: .95rem; }
.session-photo { margin: 12px 0 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.session-photo img { width: 100%; height: auto; aspect-ratio: 1041 / 720; object-fit: cover; }
.session-photo figcaption { padding: 14px 20px; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  background: var(--surface); border-radius: var(--r-lg); padding: 34px 30px; border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  display: flex; flex-direction: column;
}
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service p { color: var(--muted); flex: 1; }
.service-icon {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 22px;
  background: linear-gradient(140deg, var(--blue-50), var(--blue-100));
}
.service-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--blue-800); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service:nth-child(2) .service-icon { background: linear-gradient(140deg, var(--coral-50), #fbd3d8); }
.service:nth-child(2) .service-icon svg { stroke: #c9404f; }
.service:nth-child(3) .service-icon { background: linear-gradient(140deg, #f1effc, #e1dcf7); }
.service:nth-child(3) .service-icon svg { stroke: #5b4fa3; }

/* ---------- Conditions ---------- */
.conditions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cond { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.cond h3 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); }
.cond-dot { width: 12px; height: 12px; border-radius: 4px; }
.c1 { background: var(--blue-500); } .c2 { background: var(--coral-600); } .c3 { background: #7d70c9; } .c4 { background: #e2b33d; }
.cond ul { list-style: none; margin: 0; padding: 0; }
.cond li { position: relative; padding: 6px 0 6px 24px; color: var(--ink-2); font-size: .95rem; }
.cond li::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 14px; height: 9px;
  border-left: 2px solid var(--blue-500); border-bottom: 2px solid var(--blue-500); transform: rotate(-45deg) scale(.7);
}

/* ---------- Process ---------- */
.cloud-edge { position: absolute; left: 0; right: 0; top: -1px; height: 48px; width: 100%; fill: var(--bg); transform: translateY(-1px); }
.section-dark { padding-top: calc(clamp(72px, 10vw, 128px) + 24px); }
.section-dark::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: radial-gradient(circle at 90% 10%, rgba(81,148,200,.45), transparent 40%), radial-gradient(circle at 0% 100%, rgba(255,201,206,.12), transparent 40%);
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.steps li { position: relative; padding: 30px 26px; border-radius: var(--r); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.steps span {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; margin-bottom: 20px;
  background: var(--coral); color: var(--blue-900); font-weight: 700; font-family: var(--serif); font-size: 1.3rem;
}
.steps p { margin: 0; color: #b1cbe3; font-size: .95rem; }

/* ---------- Booking page (dat-lich.html) ---------- */
.book-page { padding-top: clamp(40px, 6vw, 72px); }
.book-page h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.book-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 18px 0 0; color: var(--ink-2); font-size: .95rem; }
.book-next .status:empty { display: none; }
.book-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (min-width: 1081px) { .book-options:has(> [hidden]) { grid-template-columns: repeat(3, 1fr); } }   /* no voice line: three ways */
.book-option {
  display: flex; flex-direction: column; position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px 24px 24px; box-shadow: var(--shadow-sm);
}
.book-option.featured { border: 2px solid var(--blue-500); box-shadow: var(--shadow); }
.book-option h2 { font-size: 1.35rem; margin-bottom: .4em; }
.book-option p { color: var(--ink-2); font-size: .95rem; margin: 0 0 14px; }
.book-option .btn { margin-top: auto; min-height: 48px; }
.bo-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--blue-50); display: grid; place-items: center; margin-bottom: 18px; }
.bo-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--blue-800); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.featured .bo-icon { background: var(--blue-800); }
.featured .bo-icon svg { stroke: #fff; }
.bo-tag { position: absolute; top: 20px; right: 20px; font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--coral-50); color: var(--coral-600); }
.bo-example { font-size: .88rem !important; color: var(--muted) !important; }
.bo-example q { color: var(--ink); font-weight: 600; }
.book-more { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; margin-top: 32px; align-items: start; }
.book-more .hours-card { margin: 0; }
.book-help { background: var(--cream); border-radius: var(--r); padding: 22px 24px; }
.book-help h2 { font-size: 1.3rem; }
.book-help p { color: var(--ink-2); margin: 0 0 10px; }
.hours-card { background: var(--surface); border-radius: var(--r); padding: 22px 24px; margin: 28px 0 22px; border: 1px solid var(--line); }
.hours-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.status { font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.status.open { background: #e2f6ec; color: #1d7a50; }
.status.closed { background: var(--coral-50); color: #b1532b; }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.hours li:last-child { border: 0; }
.hours li span:last-child { font-weight: 600; }
.hours li.closed { color: var(--muted); }
.hours li.today { color: var(--blue-700); font-weight: 600; }
.hours li.today span:first-child::after { content: " · Hôm nay"; font-weight: 500; font-size: .82rem; }

.stepper { list-style: none; display: flex; gap: 8px; margin: 0 0 32px; padding: 0; counter-reset: s; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 600; color: var(--muted); padding-bottom: 12px; border-bottom: 3px solid var(--line); transition: .3s; }
.stepper span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink-2); font-size: .8rem; transition: .3s; }
.stepper li.active, .stepper li.complete { color: var(--blue-800); border-color: var(--blue-500); }
.stepper li.active span, .stepper li.complete span { background: var(--blue-800); color: #fff; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; min-width: 0; }
.label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); width: 100%; padding: .8em 1em;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s, background .2s;
}
input:hover, textarea:hover { border-color: #c9d9ea; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 4px rgba(81,148,200,.13); }
.invalid, input.invalid { border-color: #d86a47 !important; box-shadow: 0 0 0 4px rgba(216,106,71,.12) !important; }
textarea { resize: vertical; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 12px 10px; border: 1.5px solid var(--line); border-radius: 12px; font-size: .9rem; font-weight: 500; transition: .2s; }
.seg label:hover span { border-color: var(--blue-500); }
.seg input:checked + span { border-color: var(--blue-800); background: var(--blue-800); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--coral-600); outline-offset: 2px; }

.date-nav { display: flex; gap: 6px; }
.date-nav button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.date-nav button:hover:not([disabled]) { border-color: var(--blue-500); color: var(--blue-800); }
.date-nav button[disabled] { opacity: .35; cursor: default; }
.dates { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.date {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: .2s;
}
.date small { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.date b { font-size: 1.2rem; font-weight: 700; }
.date em { font-style: normal; font-size: .7rem; color: var(--muted); }
.date:hover:not([disabled]) { border-color: var(--blue-500); }
.date[aria-selected="true"] { background: var(--blue-800); border-color: var(--blue-800); color: #fff; }
.date[aria-selected="true"] small, .date[aria-selected="true"] em { color: #c7def3; }
.date[disabled] { opacity: .4; cursor: not-allowed; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--cream) 6px 12px); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; min-height: 48px; }
.slot { padding: 11px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: .93rem; transition: .2s; }
.slot:hover:not([disabled]) { border-color: var(--blue-500); color: var(--blue-800); }
.slot[aria-selected="true"] { background: var(--blue-800); border-color: var(--blue-800); color: #fff; }
.slot[disabled] { color: #aab7b4; text-decoration: line-through; cursor: not-allowed; background: var(--bg); }
.slots-empty { grid-column: 1 / -1; color: var(--muted); font-size: .92rem; padding: 12px; background: var(--bg); border-radius: 12px; text-align: center; }
.skeleton { height: 44px; border-radius: 12px; background: linear-gradient(90deg, var(--line), #f3f6f5, var(--line)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; margin-bottom: 16px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--blue-800); }
.form-error { color: #b1532b; font-size: .9rem; min-height: 1.3em; margin: 0 0 12px; }
.btn-row { display: flex; gap: 12px; justify-content: space-between; }
.btn-row .btn-primary { flex: 1; }

.done { text-align: center; padding: 12px 0; }
.done-icon { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; background: #e2f6ec; display: grid; place-items: center; animation: pop .5s var(--ease); }
.done-icon svg { width: 38px; height: 38px; fill: none; stroke: #1d7a50; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s forwards; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; text-align: left; background: var(--bg); border-radius: var(--r); padding: 20px 24px; margin: 22px 0 14px; }
.summary dt { color: var(--muted); font-size: .9rem; }
.summary dd { margin: 0; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center;
  padding: 22px 0; font-weight: 600; font-size: 1.04rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-800); font-size: 1.3rem; font-weight: 400; transition: transform .3s var(--ease), background .3s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--blue-800); color: #fff; }
.faq details p { color: var(--ink-2); padding-right: 48px; margin-top: -4px; padding-bottom: 12px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: stretch; }
.contact-card { background: var(--surface); border-radius: var(--r-lg); padding: clamp(28px, 4vw, 44px); border: 1px solid var(--line); }
.contact-list { list-style: none; padding: 0; margin: 20px 0 30px; }
.contact-list li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border: 0; }
.contact-list small { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.contact-list a { font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.ci { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; }
.map { border-radius: var(--r-lg); overflow: hidden; min-height: 380px; box-shadow: var(--shadow); background: var(--blue-100); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; filter: saturate(.85); }

/* ---------- CTA ---------- */
.cta { padding: 0 0 clamp(64px, 8vw, 104px); background: var(--cream); }
.cta-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
  padding: clamp(36px, 5vw, 60px); border-radius: var(--r-lg); color: #dbe9f6; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--blue-800), var(--blue-900));
}
.cta-inner::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,201,206,.18); }
.cta h2 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin-bottom: .3em; }
.cta p { margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.footer { background: #13324f; color: #a8c3dd; padding: 72px 0 28px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer h4 { color: #fff; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.footer a { color: #dbe9f6; text-decoration: none; display: block; padding: 3px 0; }
.footer a:hover { color: var(--coral); }
.footer-bottom a { display: inline; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.footer .logo { display: inline-flex; margin-bottom: 16px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 24px; font-size: .82rem; }

/* ---------- Voice assistant ---------- */
.va-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 120; display: flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--blue-800); color: #fff; font-weight: 600; box-shadow: var(--shadow-lg);
  transition: transform .3s var(--ease), opacity .3s;
}
.va-fab:hover { transform: translateY(-3px); }
.va-fab svg { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--coral); fill: none; stroke: var(--blue-900); stroke-width: 2; stroke-linecap: round; }
.va-fab.hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }

.va {
  position: fixed; right: 24px; bottom: 24px; z-index: 130; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 48px));
  display: flex; flex-direction: column; background: var(--surface); border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(23, 63, 102, .45), 0 0 0 1px rgba(0,0,0,.04);
  transform-origin: bottom right; animation: vaIn .35s var(--ease);
}
.va[hidden] { display: none; }
[data-clinic="voice"][hidden] { display: none !important; }
@keyframes vaIn { from { opacity: 0; transform: scale(.9) translateY(20px); } }
.va-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(120deg, var(--blue-800), var(--blue-900)); color: #fff; }
.va-head small { display: block; color: #b8d4ee; font-size: .8rem; }
.va-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; }
.va-avatar span { width: 14px; height: 14px; border-radius: 50%; background: var(--blue-900); box-shadow: 0 0 0 4px rgba(23,63,102,.2); }
.va-close { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.va-close:hover { background: rgba(255,255,255,.22); }
.va-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: .94rem; line-height: 1.5; animation: msgIn .25s var(--ease); white-space: pre-wrap; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg.bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--blue-800); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.interim { opacity: .6; font-style: italic; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: .8rem; padding: 2px; }
.msg.booking { align-self: stretch; max-width: 100%; background: #e2f6ec; border: 1px solid #bfe6d0; color: #145a3a; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }

.va-orb-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0 8px; border-top: 1px solid var(--line); }
.va-orb-wrap small { color: var(--muted); font-size: .8rem; }
.va-orb { position: relative; width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer; background: var(--blue-800); display: grid; place-items: center; transition: transform .2s, background .3s; }
.va-orb:hover { transform: scale(1.05); }
.va-orb svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; position: relative; z-index: 1; }
.va-orb .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue-500); opacity: 0; }
.va.listening .va-orb { background: #d4553a; }
.va.listening .va-orb .ring { animation: ring 1.6s infinite; border-color: #d4553a; }
.va.listening .va-orb .r2 { animation-delay: .8s; }
.va.speaking .va-orb { background: var(--blue-500); }
.va.speaking .va-orb .ring { animation: ring 1.2s infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.va-input { display: flex; gap: 8px; padding: 10px 14px 14px; }
.va-input input { padding: .7em 1em; border-radius: 999px; font-size: .95rem; }
.va-input button { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--blue-50); cursor: pointer; display: grid; place-items: center; }
.va-input button svg { width: 20px; height: 20px; fill: var(--blue-800); }

/* Maika chat box: the .va panel, named Maika */
.maika-avatar { background: #fff; overflow: hidden; flex: none; }
.maika-avatar img { width: 34px; height: auto; }
.maika-chat .msg.bot a { color: var(--blue-700); font-weight: 600; }
.maika-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.maika-chips button {
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--blue-800); background: var(--surface);
  border: 1.5px solid var(--blue-100); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer;
}
.maika-chips button:hover { border-color: var(--blue-500); background: var(--blue-50); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .conditions { grid-template-columns: repeat(2, 1fr); }
  .steps, .book-options { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .fc-1 { left: -12px; bottom: -22px; } .fc-2 { right: -12px; }
}
@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 116px 0 auto 0; flex-direction: column; gap: 0; padding: 12px 20px 24px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .3s var(--ease);
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .header.scrolled .nav, .topbar-hidden .nav { top: 76px; }
  .menu-btn { display: block; }
  .header-cta { margin-left: auto; }
  .hero-grid, .doctor-grid, .faq-wrap, .contact-grid, .book-more { grid-template-columns: 1fr; }
  .book-options { grid-template-columns: 1fr 1fr; }
  .hero-visual { width: min(100%, 380px); margin-top: 12px; }
  .trust { margin-top: 0; padding-top: 8px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); }
  .services { grid-template-columns: 1fr; }
  .doctor-card { max-width: 420px; margin: 0 auto 24px; width: 100%; position: relative; top: auto; }
}
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .container { width: calc(100% - 32px); }
  .header-inner { gap: 12px; }
  .logo-mark { width: 46px; }
  .logo-text b { font-size: 1.45rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 18px; }
  .hero-stats div:last-child { grid-column: 1 / -1; }
  .hero-actions .btn { flex: 1 1 100%; }
  .float-card { padding: 10px 12px; font-size: .8rem; }
  .fc-icon { width: 32px; height: 32px; }
  .fc-1 { left: 8px; bottom: -18px; } .fc-2 { right: -6px; top: 24px; }
  .conditions, .steps, .book-options { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .seg { grid-template-columns: 1fr; }
  .dates { gap: 4px; }
  .date { padding: 8px 2px; border-radius: 10px; }
  .date b { font-size: 1.02rem; }
  .date em { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column-reverse; }
  .footer-grid { grid-template-columns: 1fr; }
  .faq details p { padding-right: 0; }
  .va-fab { right: 16px; bottom: 16px; padding: 8px; }
  .va-fab-label { display: none; }
  .va { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
}
