/* Shared structure for the clinic pages: layout, forms, booking, treatment page, FAQ, footer basics.
   Colours, fonts and shapes come from the variables in style.css, so this file rarely needs editing. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-body, 1rem)/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus, var(--brand)); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 32px, var(--wrap, 1180px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 60ch; }
.sample { font-size: .78em; font-weight: 500; color: var(--muted); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .3em; min-height: 48px; padding: 12px 22px; border: 1.5px solid transparent; border-radius: var(--btn-radius, var(--radius)); font-weight: 600; text-decoration: none; cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover, var(--brand)); }
.btn-ghost { border-color: var(--line-strong, var(--line)); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }

/* ---------- header + mobile menu (each theme styles the look) ---------- */
.header { position: sticky; top: 0; z-index: 40; }
.header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; text-decoration: none; border-radius: var(--radius); }
.nav a[aria-current="page"] { font-weight: 700; }
.header-cta { display: flex; gap: 8px; align-items: center; }
.nav-toggle { display: none; margin-left: auto; width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: var(--radius); background: transparent; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; margin: auto; background: currentColor; position: relative; transition: transform .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 960px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav, .header-cta .btn-ghost { display: none; }
  .nav-open .nav { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--menu-bg, var(--bg)); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(0,0,0,.25); }
  .nav-open .nav a { padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .header-cta { order: 2; }
  .nav-toggle { order: 3; margin-left: 0; }
  .header .logo { margin-right: auto; }
}
@media (max-width: 520px) { .hide-sm { display: none; } }
@media (max-width: 420px) { .header-cta .btn { padding: 10px 14px; min-height: 44px; font-size: .92rem; } }

/* ---------- open status ---------- */
[data-open-status] { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; }
[data-open-status]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
[data-open-status].is-open::before { background: var(--ok, #1a9e6f); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok, #1a9e6f) 22%, transparent); }

/* ---------- page heading ---------- */
.page-head { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 10px 0 14px; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--eyebrow, var(--brand)); }

/* ---------- treatment list ---------- */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--gap, 20px); list-style: none; }
.t-card { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.t-card h3 { font-size: 1.3rem; }
.t-card p { color: var(--muted); }
.t-card .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; padding-top: 12px; font-size: .9rem; }
.t-card .meta b { font-weight: 700; }
.t-card .links { display: flex; gap: 16px; font-weight: 600; }
.t-card .links a { text-underline-offset: 4px; }
.price-note { margin-top: 28px; color: var(--muted); font-size: .95rem; }

/* ---------- treatment page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 24px; }
.crumbs a { text-underline-offset: 3px; }
.t-head h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 28px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; max-width: 640px; }
.facts div { padding: 16px 18px; background: var(--surface); }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }
.t-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.t-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 64px); margin-top: clamp(40px, 6vw, 72px); }
@media (max-width: 820px) { .t-body { grid-template-columns: 1fr; } }
.t-body h2, .t-faq h2, .t-more h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 18px; }
.t-steps ol { list-style: none; counter-reset: step; display: grid; gap: 14px; }
.t-steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.t-steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--step-bg, var(--brand)); color: var(--step-ink, var(--brand-ink)); font-weight: 700; }
.t-after ul { display: grid; gap: 12px; padding-left: 1.2em; }
.t-after .note { margin-top: 20px; padding: 16px; border-radius: var(--radius); background: var(--soft, var(--surface)); color: var(--muted); font-size: .92rem; }
.t-faq, .t-more { margin-top: clamp(40px, 6vw, 72px); max-width: 820px; }
.t-more-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; max-width: none; }
.t-more-list a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); }
.t-more-list a:hover { border-color: var(--ink); }
.t-more-list span { color: var(--muted); font-size: .9rem; }
.empty { display: grid; gap: 16px; justify-items: start; padding-block: 40px; }

/* ---------- FAQ accordion ---------- */
details { border-bottom: 1px solid var(--line); }
details summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; flex: none; font-size: 1.4rem; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 0 20px; color: var(--muted); max-width: 70ch; }
.faq-layout { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq-index { position: sticky; top: 100px; display: grid; gap: 4px; list-style: none; }
.faq-index a { display: block; padding: 8px 12px; border-radius: var(--radius); text-decoration: none; color: var(--muted); }
.faq-index a:hover { color: var(--ink); background: var(--soft, var(--surface)); }
.faq-group { margin-bottom: 48px; }
.faq-group h2 { font-size: 1.6rem; margin-bottom: 8px; }
@media (max-width: 820px) { .faq-layout { grid-template-columns: 1fr; } .faq-index { position: static; display: flex; flex-wrap: wrap; } }

/* ---------- forms ---------- */
.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field legend { font-weight: 600; font-size: .95rem; padding: 0; }
.field .hint { font-size: .85rem; color: var(--muted); }
.input { width: 100%; min-height: 50px; padding: 12px 14px; background: var(--input-bg, var(--surface)); border: 1.5px solid var(--line-strong, var(--line)); border-radius: var(--radius); }
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
textarea.input { min-height: 120px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.input[aria-invalid="true"] { border-color: var(--danger, #c4372b); }
.field-error { color: var(--danger, #c4372b); font-size: .88rem; font-weight: 600; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1.5px solid var(--line-strong, var(--line)); border-radius: var(--radius); cursor: pointer; }
.choice input { accent-color: var(--brand); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.slot span { display: grid; place-items: center; min-height: 44px; border: 1.5px solid var(--line-strong, var(--line)); border-radius: var(--radius); font-size: .92rem; font-variant-numeric: tabular-nums; background: var(--input-bg, var(--surface)); }
.slot input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 700; }
.slot input:focus-visible + span { outline: 3px solid var(--focus, var(--brand)); outline-offset: 2px; }
.slot.is-taken span { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.slots-hint { grid-column: 1 / -1; color: var(--muted); font-size: .92rem; padding: 12px 0; }
.form-note { font-size: .88rem; color: var(--muted); }
.done { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.done:focus { outline: none; }
.done h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.done dl { display: grid; gap: 10px; margin: 24px 0; }
.done dl div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; }
.done dt { color: var(--muted); }
.done dd { margin: 0; font-weight: 600; }
.done .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- booking + contact layout ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.aside { display: grid; gap: 20px; }
.card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card h2, .card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours th, .hours td { padding: 8px 0; text-align: left; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; color: var(--brand-text, var(--ink)); }
.contact-list { list-style: none; display: grid; gap: 14px; }
.contact-list li { display: grid; gap: 2px; }
.contact-list span { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.contact-list a { text-underline-offset: 3px; font-weight: 600; }
.map { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--soft, var(--surface)); }
.map svg { width: 100%; height: 100%; }

/* ---------- dentists ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--gap, 20px); list-style: none; }
.doc { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.doc .portrait { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; }
.doc .portrait svg { width: 100%; height: 100%; }
.doc h3 { font-size: 1.25rem; }
.doc .role { font-weight: 600; color: var(--brand-text, var(--brand)); }
.doc .quals, .doc .langs { font-size: .9rem; color: var(--muted); }
.doc .bio { color: var(--muted); }
.doc a { margin-top: auto; font-weight: 600; text-underline-offset: 4px; }

/* ---------- footer ---------- */
.footer { padding-block: 56px 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h2 { font-family: var(--body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; opacity: .7; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--footer-line, var(--line)); font-size: .85rem; opacity: .85; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- floating WhatsApp ---------- */
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border-radius: 999px; background: #1f8a4c; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 30px -8px rgba(0,0,0,.35); }
.wa-float svg { width: 22px; height: 22px; }
.wa-float:hover { background: #18723e; }
@media (max-width: 480px) { .wa-float span { display: none; } .wa-float { padding: 14px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
