/* Сузір’я довіри — site styles. Tokens mirror the design system. */
:root {
  --brand-cream: #fffaf3;
  --brand-brown: #69513b;
  --brand-gold: #d9a569;
  --ink: #3a2c20;
  --ink-muted: #7a6450;
  --ink-soft: #5c4836;  /* secondary reading text: 8.3:1 on cream (AAA); --ink-muted stays for meta (dates, labels) */
  --gold-text: #876030;
  --surface-100: var(--brand-cream);
  --surface-200: #f6ecdd;
  --surface-card: #ffffff;
  --gold-100: #f7e9d6;
  --line: #eadcc8;
  --line-strong: #a88763;
  --on-brown: var(--brand-cream);
  --on-brown-muted: #e9dccb;
  --focus: var(--brand-brown);
  --success: #3f6b4e;
  --danger: #a63d2f;

  --font-serif: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --font-sans: "Noto Sans", "Segoe UI", Arial, sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius-sm: 8px; --radius-md: 16px; --radius-lg: 28px; --radius-pill: 999px;
  --shadow-soft: 0 1px 2px rgba(105,81,59,.06), 0 8px 24px rgba(105,81,59,.08);
  --shadow-lift: 0 2px 4px rgba(105,81,59,.08), 0 18px 40px rgba(105,81,59,.14);
  --container-max: 1200px; --gutter-desktop: 32px; --gutter-mobile: 16px;
  --header-h: 84px; --header-h-mobile: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface-100); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; }
body.is-locked { overflow: hidden; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.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; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--brand-brown); color: var(--on-brown); padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }

.container { width: 100%; max-width: calc(var(--container-max) + 2 * var(--gutter-desktop)); margin: 0 auto; padding: 0 var(--gutter-desktop); }
.section { padding: var(--space-9) 0; }
.section--band { background: var(--surface-200); }
.section--tight { padding-top: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; }
.center { text-align: center; }
.mt-6 { margin-top: var(--space-6); }

/* ---------- Type ---------- */
.eyebrow { font-family: var(--font-serif); font-size: 18px; line-height: 24px; letter-spacing: .3em; text-transform: lowercase; color: var(--gold-text); margin-bottom: var(--space-3); }
.heading { max-width: 720px; margin-bottom: var(--space-7); }
.heading--center { margin-left: auto; margin-right: auto; text-align: center; }
.heading__title { font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 46px; color: var(--brand-brown); }
.heading__title--h1 { font-size: 48px; line-height: 54px; }
.heading__lead { margin-top: var(--space-4); font-size: 18px; line-height: 30px; color: var(--ink-muted); }
.divider { display: block; width: 220px; height: 17px; margin: var(--space-4) auto 0; color: var(--brand-gold); }
.prose p + p { margin-top: var(--space-4); }
.prose h2 { font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 36px; color: var(--brand-brown); margin: var(--space-7) 0 var(--space-3); }
.prose ul { list-style: disc; padding-left: 1.2em; margin-top: var(--space-3); }
.prose a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); border: 1.5px solid transparent; border-radius: var(--radius-pill); font-family: var(--font-sans); font-weight: 600; font-size: 15px; line-height: 20px; letter-spacing: .01em; cursor: pointer; white-space: nowrap; padding: 12px 22px; transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
.btn .icon { width: 20px; height: 20px; }
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--brand-brown); color: var(--on-brown); }
.btn--primary:hover { background: var(--ink); }
.btn--secondary { background: var(--brand-gold); color: var(--ink); }
.btn--secondary:hover { background: #cf9757; }
.btn--outline { background: transparent; color: var(--brand-brown); border-color: var(--line-strong); }
.btn--outline:hover { border-color: var(--brand-brown); background: var(--gold-100); }
.btn--ghost { background: transparent; color: var(--brand-brown); padding-left: 8px; padding-right: 8px; }
.btn--ghost:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn[disabled] { opacity: .55; cursor: progress; }

.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .02em; background: var(--gold-100); color: var(--brand-brown); }
.chip { font: 600 15px/20px var(--font-sans); padding: 10px 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); background: var(--surface-card); color: var(--brand-brown); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--brand-brown); }
.chip[aria-pressed="true"] { background: var(--brand-brown); border-color: var(--brand-brown); color: var(--on-brown); }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,250,243,.97); border-bottom: 1px solid var(--line); transition: box-shadow .2s ease; }
.header.is-scrolled { box-shadow: var(--shadow-soft); }
.header__bar { display: flex; align-items: center; gap: var(--space-6); height: var(--header-h); }
.header__logo img { height: 54px; width: auto; }
.header__nav { display: flex; gap: var(--space-6); margin: 0 auto; }
.header__link { font-weight: 500; font-size: 15px; color: var(--ink); padding: 6px 0; border-bottom: 1.5px solid transparent; }
.header__link:hover, .header__link[aria-current="page"] { color: var(--brand-brown); border-bottom-color: var(--brand-gold); }
.header__actions { display: flex; align-items: center; gap: var(--space-5); }
.header__phone { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; color: var(--brand-brown); white-space: nowrap; }
.header__phone .icon { width: 20px; height: 20px; }
.header__burger { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; color: var(--brand-brown); cursor: pointer; }
.header__burger .icon { width: 26px; height: 26px; }
.header__burger .icon-close { display: none; }
.header.is-open .header__burger .icon-menu { display: none; }
.header.is-open .header__burger .icon-close { display: block; }
.header__sheet { display: none; padding: var(--space-4) var(--gutter-mobile) var(--space-6); background: var(--surface-100); border-top: 1px solid var(--line); box-shadow: var(--shadow-lift); max-height: calc(100vh - var(--header-h-mobile)); overflow-y: auto; }
.header.is-open .header__sheet { display: grid; gap: var(--space-3); }
.header__sheet-link { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--font-serif); font-size: 24px; line-height: 30px; color: var(--brand-brown); }
.header__sheet .btn:first-of-type { margin-top: var(--space-3); }

/* ---------- Hero ---------- */
.hero { padding: var(--space-8) 0 var(--space-9); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: var(--space-6); }
.hero__brand { margin: var(--space-2) 0 0; line-height: 0; }
.hero__brand img { width: 100%; max-width: 580px; height: auto; }
.hero__rule { display: block; width: 300px; height: 23px; margin: var(--space-5) 0 var(--space-4); color: var(--brand-gold); }
.hero__tagline { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 34px; line-height: 42px; color: var(--brand-brown); }
.hero__lead { margin-top: var(--space-5); font-size: 18px; line-height: 30px; max-width: 520px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.hero__facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-6); color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.hero__facts li { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero__facts .icon { width: 14px; height: 14px; color: var(--brand-gold); }
.hero__art img { width: 100%; max-width: 520px; height: auto; margin-left: auto; }

/* ---------- Service card ---------- */
.service { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
a.service:hover { box-shadow: var(--shadow-soft); border-color: transparent; transform: translateY(-2px); }
.service__icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: var(--radius-pill); background: var(--gold-100); color: var(--brand-brown); margin-bottom: var(--space-2); }
.service__icon .icon { width: 26px; height: 26px; }
.service__title { font-family: var(--font-serif); font-weight: 500; font-size: 25px; line-height: 31px; color: var(--brand-brown); }
.service__text { color: var(--ink-muted); }
.service__foot { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.service__more { display: inline-flex; align-items: center; gap: var(--space-1); font-weight: 600; font-size: 15px; color: var(--brand-brown); }
.service__more .icon { width: 18px; height: 18px; }

/* Services page: detailed entries */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
.svc-group { margin-top: var(--space-7); }
.svc-group[hidden] { display: none; }
.svc-group__title { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-serif); font-weight: 400; font-size: 32px; line-height: 38px; color: var(--brand-brown); margin-bottom: var(--space-5); }
.svc-group__title .service__icon { margin: 0; }
.svc { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3) var(--space-6); padding: var(--space-6); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); }
.svc + .svc { margin-top: var(--space-4); }
.svc:target { border-color: var(--brand-gold); box-shadow: var(--shadow-soft); }
.svc__title { font-family: var(--font-serif); font-weight: 500; font-size: 25px; line-height: 31px; color: var(--brand-brown); }
.svc__text { color: var(--ink); grid-column: 1; }
.svc__meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: 14px; color: var(--ink-muted); }
.svc__meta a { color: var(--gold-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.svc__cta { grid-column: 2; grid-row: 1 / span 3; align-self: center; }

/* ---------- Doctor card ---------- */
.doctor { display: grid; grid-template-columns: 320px 1fr; gap: var(--space-6); align-items: center; padding: var(--space-5); background: var(--surface-card); border-radius: var(--radius-lg); border: 1px solid var(--line); }
.doctor--vertical { grid-template-columns: 1fr; align-items: start; gap: var(--space-5); }
.doctor--vertical .doctor__photo { aspect-ratio: 4 / 3; }
.doctor--vertical .doctor__body { padding: 0 var(--space-3) var(--space-3); }
.doctor__photo { aspect-ratio: 4 / 5; border-radius: calc(var(--radius-lg) - 8px); overflow: hidden; background: var(--gold-100); }
.doctor__photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor__placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); color: var(--ink-muted); font-size: 14px; }
.doctor__placeholder img { height: 96px; width: auto; }
.doctor__roles { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.doctor__name { font-family: var(--font-serif); font-weight: 500; font-size: 30px; line-height: 36px; color: var(--brand-brown); }
.doctor__name a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.doctor__text { margin: var(--space-3) 0 var(--space-5); }
.doctor__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.doctor:not(.doctor--vertical) .doctor__actions .social { margin-left: auto; }

/* ---------- Social ---------- */
.social { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.social a { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); color: var(--brand-brown); transition: background-color .18s ease, border-color .18s ease; }
.social a:hover { background: var(--gold-100); border-color: var(--brand-brown); }
.social .icon { width: 22px; height: 22px; }
.social--lg { gap: var(--space-3); }
.social--lg a { width: 56px; height: 56px; }
.social--lg .icon { width: 26px; height: 26px; }
.social--on-brown a { border-color: var(--on-brown-muted); color: var(--on-brown); }
.social--on-brown a:hover { background: rgba(255,250,243,.12); border-color: var(--on-brown); }

/* ---------- Doctor page bits ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.crumbs a:hover { color: var(--brand-brown); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }
.facts { display: grid; gap: var(--space-4); }
.facts li { display: flex; gap: var(--space-3); align-items: baseline; font-size: 17px; line-height: 28px; padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.facts .icon { width: 16px; height: 16px; color: var(--brand-gold); transform: translateY(2px); }
.todo { color: var(--ink-muted); font-style: italic; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: var(--space-5); }
.step { display: grid; grid-template-columns: 48px 1fr; column-gap: var(--space-4); }
.step__num { grid-row: span 2; display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: var(--radius-pill); border: 1.5px solid var(--brand-gold); font-family: var(--font-serif); font-size: 24px; font-weight: 500; color: var(--brand-brown); background: var(--surface-card); }
.step__title { font-family: var(--font-serif); font-size: 22px; line-height: 28px; font-weight: 500; color: var(--brand-brown); margin: 8px 0 4px; }
.step__text { color: var(--ink-muted); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-5) 0; cursor: pointer; font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 28px; color: var(--brand-brown); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--gold-text); transition: transform .2s ease; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq__a { padding: 0 var(--space-7) var(--space-5) var(--space-5); color: var(--ink-soft); }

/* ---------- Form ---------- */
.form { display: grid; gap: var(--space-4); padding: var(--space-6); background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.form__title { font-family: var(--font-serif); font-weight: 500; font-size: 28px; line-height: 34px; color: var(--brand-brown); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-weight: 600; font-size: 14px; line-height: 20px; }
.field__label span { color: var(--danger); }
.input { width: 100%; font: 400 16px/24px var(--font-sans); color: var(--ink); background: var(--surface-card); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; appearance: none; }
.input::placeholder { color: var(--ink-muted); }
.input:hover { border-color: var(--brand-brown); }
.input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--brand-brown); }
.input[aria-invalid="true"] { border-color: var(--danger); }
textarea.input { resize: vertical; min-height: 88px; }
.select { position: relative; }
.select .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--brand-brown); width: 20px; height: 20px; }
.select .input { padding-right: 40px; }
.field__error { font-size: 14px; line-height: 20px; color: var(--danger); }
.field__error:empty { display: none; }
.check { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--ink-muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--brand-brown); }
.check a { color: var(--gold-text); text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: 14px; line-height: 20px; color: var(--danger); text-align: center; }
.form__status:empty { display: none; }
.form-done { display: grid; gap: var(--space-3); justify-items: center; text-align: center; padding: var(--space-7) var(--space-6); background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.form-done[hidden] { display: none; }
.form-done__ok { display: inline-flex; width: 56px; height: 56px; border-radius: var(--radius-pill); background: var(--gold-100); color: var(--success); align-items: center; justify-content: center; }
.form-done h3 { font-family: var(--font-serif); font-weight: 500; font-size: 28px; line-height: 34px; color: var(--brand-brown); }

/* ---------- Contacts ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-6); align-items: stretch; }
.contacts__list { display: grid; gap: var(--space-5); align-content: start; }
.contacts__list li { display: flex; gap: var(--space-4); align-items: flex-start; }
.contacts__icon { display: inline-flex; width: 44px; height: 44px; flex: none; align-items: center; justify-content: center; border-radius: var(--radius-pill); background: var(--gold-100); color: var(--brand-brown); }
.contacts__label { display: block; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.contacts__value { display: block; font-weight: 600; font-size: 18px; line-height: 26px; }
a.contacts__value:hover { color: var(--brand-brown); text-decoration: underline; }
.contacts__map { min-height: 340px; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-200); border: 1px solid var(--line); display: flex; }
.contacts__map iframe { border: 0; width: 100%; min-height: 340px; }
.contacts__map-ph { flex: 1; display: flex; flex-direction: column; gap: var(--space-2); align-items: center; justify-content: center; color: var(--ink-muted); text-align: center; padding: var(--space-5); }

/* ---------- Footer ---------- */
.footer { background: var(--brand-brown); color: var(--on-brown); padding: var(--space-8) 0 var(--space-5); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-6); }
.footer__brand img { height: 52px; width: auto; }
.footer__brand p { margin-top: var(--space-4); font-family: var(--font-serif); font-style: italic; font-size: 20px; line-height: 28px; color: var(--on-brown-muted); }
.footer__col { display: flex; flex-direction: column; gap: var(--space-2); font-size: 15px; line-height: 24px; color: var(--on-brown-muted); }
.footer__col h2 { font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 28px; color: var(--brand-gold); margin-bottom: var(--space-2); }
.footer__col a:hover { color: var(--on-brown); text-decoration: underline; }
.footer :focus-visible { outline-color: var(--brand-gold); }
.footer__legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid rgba(255,250,243,.2); font-size: 14px; line-height: 22px; color: var(--on-brown-muted); }
.footer__legal a:hover { color: var(--on-brown); text-decoration: underline; }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: var(--space-2); padding: var(--space-3) var(--gutter-mobile) calc(var(--space-3) + env(safe-area-inset-bottom)); background: rgba(255,250,243,.97); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(105,81,59,.08); }
.callbar .btn { flex: 1; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: var(--space-9) 0; }
.notfound img { height: 140px; width: auto; margin: 0 auto var(--space-5); }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .header__nav, .header__actions .btn { display: none; }
  .header__burger { display: inline-flex; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .hero__brand img { max-width: 500px; }
  .hero__tagline { font-size: 30px; line-height: 38px; }
  .split { grid-template-columns: 1fr; gap: var(--space-7); }
  .doctor { grid-template-columns: 260px 1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  html { scroll-padding-top: calc(var(--header-h-mobile) + 12px); }
  body { padding-bottom: 72px; }
  .container { padding: 0 var(--gutter-mobile); }
  .section { padding: var(--space-8) 0; }
  .header__bar { height: var(--header-h-mobile); gap: var(--space-3); }
  .header__logo img { height: 44px; }
  .header__actions { margin-left: auto; gap: var(--space-2); }
  .header__phone span { display: none; }
  .header__phone { width: 44px; height: 44px; justify-content: center; border-radius: var(--radius-pill); background: var(--gold-100); }
  .heading { margin-bottom: var(--space-6); }
  .heading__title { font-size: 30px; line-height: 36px; }
  .heading__title--h1 { font-size: 34px; line-height: 40px; }
  .heading__lead { font-size: 16px; line-height: 26px; }
  .eyebrow { font-size: 16px; letter-spacing: .24em; }
  .hero { padding: var(--space-5) 0 var(--space-8); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .hero__art { order: -1; }
  .hero__art img { max-width: 210px; margin: 0 auto; }
  .hero__text { text-align: center; }
  .hero__brand img { max-width: 340px; margin: 0 auto; }
  .hero__rule { width: 240px; height: 18px; margin: var(--space-4) auto var(--space-3); }
  .hero__tagline { font-size: 25px; line-height: 32px; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__facts { justify-content: center; }
  .hero__lead { font-size: 17px; line-height: 28px; margin-top: var(--space-4); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .grid-3, .grid-2, .grid-doctors { grid-template-columns: 1fr; gap: var(--space-4); }
  .service { padding: var(--space-5); }
  .service__title, .svc__title { font-size: 22px; line-height: 28px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter-mobile)) var(--space-5); padding: 0 var(--gutter-mobile) 4px; scrollbar-width: none; }
  .svc-group__title { font-size: 26px; line-height: 32px; }
  .svc { grid-template-columns: 1fr; padding: var(--space-5); }
  .svc__cta { grid-column: 1; grid-row: auto; justify-self: stretch; }
  .svc__cta .btn { width: 100%; }
  .doctor { grid-template-columns: 1fr; padding: var(--space-4); gap: var(--space-4); }
  .doctor:not(.doctor--vertical) .doctor__photo { aspect-ratio: 1 / 1; }
  .doctor__name { font-size: 24px; line-height: 30px; }
  .doctor__actions .btn--secondary { width: 100%; }
  .doctor:not(.doctor--vertical) .doctor__actions .social { margin-left: 0; }
  .faq summary { font-size: 19px; line-height: 26px; padding: var(--space-4) 0; }
  .faq__a { padding-right: 0; }
  .form { padding: var(--space-5); }
  .contacts { grid-template-columns: 1fr; }
  .contacts__map, .contacts__map iframe { min-height: 240px; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .footer__legal { flex-direction: column; }
  .callbar { display: flex; }
}


/* ---------- Dropdown nav ---------- */
.dropdown { position: relative; }
.dropdown__toggle { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; border-bottom: 1.5px solid transparent; cursor: pointer; font: inherit; font-weight: 500; font-size: 15px; color: var(--ink); padding: 6px 0; }
.dropdown__toggle .icon { width: 18px; height: 18px; transition: transform .2s ease; }
.dropdown__toggle.is-current { color: var(--brand-brown); border-bottom-color: var(--brand-gold); }
.dropdown__menu { position: absolute; top: calc(100% + 10px); left: -16px; min-width: 220px; display: none; flex-direction: column; padding: var(--space-2); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); z-index: 60; }
.dropdown.is-open .dropdown__menu { display: flex; }
.dropdown.is-open .dropdown__toggle .icon { transform: rotate(180deg); }
.dropdown__link { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 15px; color: var(--ink); }
.dropdown__link:hover, .dropdown__link[aria-current="page"] { background: var(--gold-100); color: var(--brand-brown); }

/* ---------- Values / cards grid ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.values--3 { grid-template-columns: repeat(3, 1fr); }
.value { padding: var(--space-6); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); }
.value .service__icon { margin-bottom: var(--space-4); }
.value__title { font-family: var(--font-serif); font-weight: 500; font-size: 23px; line-height: 29px; color: var(--brand-brown); margin-bottom: var(--space-2); }
.value p { color: var(--ink-muted); }

/* ---------- About ---------- */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center; }
.about-hero .heading { margin-bottom: var(--space-3); }
.about-hero__tagline { font-family: var(--font-serif); font-style: italic; font-size: 26px; line-height: 34px; color: var(--brand-brown); margin-bottom: var(--space-5); }
.about-hero__photo img, .rounded { width: 100%; height: auto; border-radius: var(--radius-lg); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.gallery__item figcaption { margin-top: var(--space-2); font-size: 14px; color: var(--ink-muted); }
.gallery__btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-md); overflow: hidden; }
.gallery__btn img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .3s ease; }
.gallery__btn:hover img { transform: scale(1.03); }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: var(--space-4); padding: var(--space-6); background: rgba(58,44,32,.92); }
.lightbox figure { max-width: min(1100px, 100%); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: var(--radius-md); }
.lightbox figcaption { margin-top: var(--space-3); text-align: center; color: var(--on-brown); }
.lightbox__close, .lightbox__nav { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: var(--radius-pill); border: 1.5px solid var(--on-brown-muted); background: transparent; color: var(--on-brown); cursor: pointer; flex: none; }
.lightbox__close { position: absolute; top: 16px; right: 16px; }
.lightbox__prev .icon { transform: rotate(180deg); }
.lightbox :focus-visible { outline-color: var(--brand-gold); }

/* ---------- Blog ---------- */
.post { display: flex; flex-direction: column; background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.post__cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) var(--space-6) var(--space-6); flex: 1; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); font-size: 14px; color: var(--ink-muted); }
.post__title { font-family: var(--font-serif); font-weight: 500; font-size: 25px; line-height: 31px; color: var(--brand-brown); }
.post__title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.post__excerpt { color: var(--ink-muted); }
.post__body .service__more { margin-top: auto; }
.post--featured { display: grid; grid-template-columns: 1.2fr 1fr; margin-bottom: var(--space-5); }
.post--featured .post__cover img { height: 100%; }
.post--featured .post__body { justify-content: center; padding: var(--space-7); }
.post--featured .post__title { font-size: 34px; line-height: 40px; }
.post--featured .btn { align-self: flex-start; margin-top: var(--space-3); }
.empty { padding: var(--space-7) 0; text-align: center; color: var(--ink-muted); display: grid; gap: var(--space-3); justify-items: center; }
.article { max-width: 760px; min-width: 0; }
.article__head { margin-bottom: var(--space-6); }
.article__title { font-family: var(--font-serif); font-weight: 400; font-size: 46px; line-height: 52px; color: var(--brand-brown); margin: var(--space-4) 0 var(--space-3); }
.article__lead { font-size: 19px; line-height: 31px; color: var(--ink-muted); }
.author { display: inline-flex; align-items: center; gap: var(--space-3); margin-top: var(--space-5); }
.author img { width: 40px; height: auto; }
.author > span { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.author strong { color: var(--ink); font-size: 15px; }
.author:hover strong { text-decoration: underline; }
.article__cover img { width: 100%; height: auto; border-radius: var(--radius-lg); }
.article__body { margin-top: var(--space-7); font-size: 18px; line-height: 30px; }
.article__body blockquote { margin: var(--space-6) 0; padding: var(--space-2) 0 var(--space-2) var(--space-5); border-left: 0; font-family: var(--font-serif); font-style: italic; font-size: 26px; line-height: 36px; color: var(--brand-brown); position: relative; }
.article__body blockquote::before { content: "✦"; position: absolute; left: 0; top: 6px; font-style: normal; font-size: 16px; color: var(--brand-gold); }
.article__share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 14px; }
.article__share .icon { width: 18px; height: 18px; }
.article__cta, .crosslink { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5); margin-top: var(--space-7); padding: var(--space-6) var(--space-7); background: var(--surface-200); border-radius: var(--radius-lg); }
.crosslink { margin-top: 0; background: var(--surface-card); border: 1px solid var(--line); }
.crosslink .heading__lead { margin-top: var(--space-2); max-width: 560px; }

/* ---------- Hearing test (product) ---------- */
.hero--product { padding-top: var(--space-6); }
.hero--product .crumbs { margin-bottom: var(--space-6); }
.product__title { font-family: var(--font-serif); font-weight: 400; font-size: 54px; line-height: 60px; color: var(--brand-brown); }
.product__visual { position: relative; }
.audiogram { width: 100%; max-width: 520px; height: auto; margin-left: auto; display: block; filter: drop-shadow(0 18px 40px rgba(105,81,59,.14)); }
.ag-bg { fill: var(--surface-card); stroke: var(--line); }
.ag-grid line { stroke: var(--line); stroke-width: 1; }
.ag-r, .ag-l { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ag-r { stroke: var(--brand-brown); } .ag-r.ag-pts circle { fill: var(--surface-card); }
.ag-l { stroke: var(--brand-gold); }
.ag-lab text { font: 600 11px var(--font-sans); fill: var(--ink-muted); }
.product__badge { position: absolute; right: 28px; top: -22px; display: flex; flex-direction: column; padding: var(--space-4) var(--space-5); background: var(--brand-brown); color: var(--on-brown); border-radius: var(--radius-md); box-shadow: var(--shadow-lift); font-size: 14px; line-height: 20px; }
.product__badge strong { font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 28px; }
.incl-list { display: grid; gap: var(--space-3); }
.incl { display: flex; gap: var(--space-4); padding: var(--space-4) var(--space-5); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); }
.incl__check { display: inline-flex; width: 36px; height: 36px; flex: none; align-items: center; justify-content: center; border-radius: var(--radius-pill); background: var(--gold-100); color: var(--brand-brown); }
.incl__check .icon { width: 20px; height: 20px; }
.incl h3 { font-family: var(--font-serif); font-weight: 500; font-size: 21px; line-height: 27px; color: var(--brand-brown); }
.incl p { color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.steps--row { grid-template-columns: repeat(4, 1fr); }
.steps--row .step { display: block; text-align: center; }
.steps--row .step__num { margin: 0 auto var(--space-4); }
.quiz-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--space-8); align-items: start; }
.quiz { padding: var(--space-6); background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); display: grid; gap: var(--space-4); }
.quiz__list { display: grid; gap: 0; counter-reset: q; }
.quiz__q { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); counter-increment: q; }
.quiz__q p::before { content: counter(q) ". "; color: var(--gold-text); font-weight: 600; }
.quiz__q.is-missing p { color: var(--danger); }
.quiz__opts { display: flex; gap: var(--space-2); flex: none; }
.quiz__opts label { cursor: pointer; }
.quiz__opts input { position: absolute; opacity: 0; pointer-events: none; }
.quiz__opts span { display: inline-flex; min-width: 56px; justify-content: center; padding: 8px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); font-weight: 600; font-size: 14px; color: var(--brand-brown); }
.quiz__opts input:checked + span { background: var(--brand-brown); border-color: var(--brand-brown); color: var(--on-brown); }
.quiz__opts input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.quiz__progress { font-size: 14px; color: var(--ink-muted); text-align: right; }
.quiz__result { padding: var(--space-5); background: var(--gold-100); border-radius: var(--radius-md); }
.quiz__result h3 { font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 32px; color: var(--brand-brown); margin-bottom: var(--space-2); }
.quiz__result .hero__actions { margin-top: var(--space-4); }

/* ---------- Hearing aids catalogue ---------- */
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-6); align-items: start; }
.catalog__toggle { display: none; }
.catalog__filters { position: sticky; top: calc(var(--header-h) + 16px); padding: var(--space-5); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); }
.facet { border: 0; margin: 0 0 var(--space-5); padding: 0; }
.facet__title { font-family: var(--font-serif); font-weight: 500; font-size: 20px; line-height: 26px; color: var(--brand-brown); margin-bottom: var(--space-2); padding: 0; }
.facet__opt { display: flex; align-items: center; gap: var(--space-2); padding: 6px 0; cursor: pointer; font-size: 15px; }
.facet__opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-brown); }
.facet__opt.is-zero { opacity: .5; }
.facet__count { margin-left: auto; font-size: 13px; color: var(--ink-muted); }
.catalog__count { margin-bottom: var(--space-4); color: var(--ink-muted); }
.aids { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.aid { display: flex; flex-direction: column; background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease; }
.aid:hover { box-shadow: var(--shadow-soft); border-color: transparent; }
.aid__img { display: block; background: var(--brand-cream); border-bottom: 1px solid var(--line); }
.aid__img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.aid__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); flex: 1; }
.aid__type { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-text); }
.aid__name { font-family: var(--font-serif); font-weight: 500; font-size: 23px; line-height: 29px; color: var(--brand-brown); }
.aid__name a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.aid__brand { font-size: 14px; color: var(--ink-muted); }
.aid__feats { display: grid; gap: 6px; margin: var(--space-2) 0 var(--space-4); font-size: 14px; line-height: 20px; }
.aid__feats li { display: flex; align-items: center; gap: var(--space-2); }
.aid__feats .icon { width: 18px; height: 18px; color: var(--brand-gold); }
.aid__actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.aid-detail { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; }
.aid-detail__img { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.aid-detail__img img { width: 100%; height: auto; }
.specs { width: 100%; border-collapse: collapse; margin: var(--space-6) 0; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { font-weight: 500; color: var(--ink-muted); width: 45%; padding-right: var(--space-4); }

@media (max-width: 1199px) {
  .header__nav { display: none; }
  .header__burger { display: inline-flex; }
  .header__actions .btn { display: none; }
}
@media (max-width: 1023px) {
  .values { grid-template-columns: repeat(2, 1fr); }
  .about-hero, .quiz-wrap, .aid-detail { grid-template-columns: 1fr; gap: var(--space-7); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .post--featured { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: 1fr; }
  .catalog__toggle { display: inline-flex; justify-self: start; }
  .catalog__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .catalog__filters { display: none; position: static; }
  .catalog__filters.is-open { display: block; }
  .catalog__filters form { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
  .catalog__filters .facet { margin: 0; }
  .catalog__filters [type="reset"] { grid-column: 1 / -1; justify-self: start; }
  .aids { grid-template-columns: repeat(2, 1fr); }
  .aid-detail__img { position: static; }
  .steps--row { grid-template-columns: repeat(2, 1fr); }
  .product__title { font-size: 46px; line-height: 52px; }
}
@media (max-width: 767px) {
  .values, .values--3, .gallery, .aids { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .about-hero__tagline { font-size: 22px; line-height: 30px; }
  .post--featured .post__body { padding: var(--space-5); }
  .post--featured .post__title, .article__title { font-size: 30px; line-height: 36px; }
  .article__body { font-size: 17px; line-height: 28px; }
  .article__body blockquote { font-size: 22px; line-height: 30px; }
  .article__cta, .crosslink { padding: var(--space-5); }
  .article__cta .btn, .crosslink .btn { width: 100%; }
  .product__title { font-size: 34px; line-height: 40px; }
  .hero--product .hero__text { text-align: left; }
  .hero--product .hero__facts { justify-content: flex-start; }
  .product__visual { order: 2; }
  .product__badge { position: static; margin-top: var(--space-3); align-self: flex-start; }
  .steps--row { grid-template-columns: 1fr; }
  .steps--row .step { display: grid; text-align: left; }
  .steps--row .step__num { margin: 0; }
  .quiz { padding: var(--space-4); }
  .quiz__q { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .catalog__filters form { grid-template-columns: 1fr; }
  .aid__img img { max-height: 210px; }
  .lightbox { padding: var(--space-3); gap: var(--space-2); }
  .lightbox__nav { position: absolute; bottom: 20px; }
  .lightbox__prev { left: calc(50% - 60px); } .lightbox__next { right: calc(50% - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Hearing aids emphasis ---------- */
.header__link--accent { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1.5px solid var(--brand-gold); border-radius: var(--radius-pill); color: var(--brand-brown); font-weight: 600; background: var(--gold-100); }
.header__link--accent .icon { width: 13px; height: 13px; color: var(--brand-gold); }
.header__link--accent:hover, .header__link--accent[aria-current="page"] { background: var(--brand-brown); border-color: var(--brand-brown); color: var(--on-brown); }
.header__link--accent:hover .icon, .header__link--accent[aria-current="page"] .icon { color: var(--brand-gold); }
.header__sheet-link--accent { color: var(--brand-brown); font-weight: 500; }
.header__sheet-link--accent > span { display: inline-flex; align-items: center; gap: 10px; }
.header__sheet-link--accent > span .icon { width: 16px; height: 16px; color: var(--brand-gold); }
.section--brown { background: var(--brand-brown); color: var(--on-brown); }
.section--brown :focus-visible { outline-color: var(--brand-gold); }
.eyebrow--on-brown { color: var(--brand-gold); }
.promo { display: grid; grid-template-columns: 1fr 1.35fr; gap: var(--space-8); align-items: center; }
.promo__title { color: var(--on-brown); font-size: 44px; line-height: 50px; }
.promo__lead { margin-top: var(--space-4); font-size: 18px; line-height: 30px; color: var(--on-brown-muted); }
.promo__pts { display: grid; gap: var(--space-2); margin-top: var(--space-5); }
.promo__pts li { display: flex; gap: var(--space-2); align-items: center; }
.promo__pts .icon { width: 20px; height: 20px; color: var(--brand-gold); }
.btn--on-brown { background: transparent; color: var(--on-brown); border-color: var(--on-brown-muted); }
.btn--on-brown:hover { background: rgba(255,250,243,.12); border-color: var(--on-brown); }
.aids--promo { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); color: var(--ink); }
.aids--promo .aid__body { padding: var(--space-4); }
.aids--promo .aid__name { font-size: 20px; line-height: 26px; }
.aids--promo .aid__brand { display: none; }
.svc-group__links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: calc(-1 * var(--space-2)) 0 var(--space-5); }
.callout { display: flex; align-items: center; gap: var(--space-4); margin: calc(-1 * var(--space-5)) 0 var(--space-6); padding: var(--space-4) var(--space-5); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); max-width: 720px; transition: border-color .2s ease, box-shadow .2s ease; }
.callout:hover { border-color: var(--brand-gold); box-shadow: var(--shadow-soft); }
.callout .service__icon { margin: 0; flex: none; }
.callout > span:nth-child(2) { display: flex; flex-direction: column; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.callout strong { color: var(--brand-brown); font-size: 16px; }
.callout > .icon { margin-left: auto; color: var(--brand-brown); }
@media (max-width: 1199px) { .promo { grid-template-columns: 1fr; gap: var(--space-7); } }
@media (max-width: 767px) {
  .promo__title { font-size: 32px; line-height: 38px; }
  .promo__lead { font-size: 16px; line-height: 26px; }
  .aids--promo { grid-template-columns: 1fr; }
  .aids--promo .aid { flex-direction: row; }
  .aids--promo .aid__img { width: 38%; flex: none; border-bottom: 0; border-right: 1px solid var(--line); display: flex; align-items: center; }
  .aids--promo .aid__feats, .aids--promo .aid__type { display: none; }
  .section--brown .hero__actions .btn { width: 100%; }
}

/* ---------- Django port: replacements for inline styles (strict CSP, no style="") ---------- */
.sprite { position: absolute; }
.container--narrow { max-width: 860px; }
.hero__actions--center { justify-content: center; }

/* ---------- Django port: analytics consent banner ---------- */
.consent { position: fixed; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); z-index: 60;
  max-width: 560px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5); background: var(--surface-card); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lift); }
.consent__text { margin: 0; flex: 1 1 260px; font-size: 14px; }
.consent__actions { display: flex; gap: var(--space-2); }
@media (max-width: 767px) { .consent { bottom: 84px; } }  /* above the mobile call bar */

/* ---------- Django port: booking dialog (all «Записатися» links open it) ---------- */
.booking-modal { width: min(560px, calc(100% - 2 * var(--gutter-mobile))); max-height: calc(100dvh - 2 * var(--space-5));
  padding: 0; border: 0; border-radius: var(--radius-lg); background: transparent; overflow: visible; }
.booking-modal::backdrop { background: rgba(58, 44, 32, .55); }
.booking-modal[open] { animation: booking-in .2s ease-out; }
.booking-modal > .form, .booking-modal > .form-done { max-height: calc(100dvh - 2 * var(--space-5)); overflow-y: auto; margin: 0;
  box-shadow: var(--shadow-lift); }
.booking-modal__close { position: absolute; top: var(--space-3); right: var(--space-3); z-index: 1; width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; border-radius: var(--radius-pill); background: var(--surface-200);
  color: var(--brand-brown); cursor: pointer; }
.booking-modal__close:hover { background: var(--gold-100); }
.booking-modal__close .icon { width: 20px; height: 20px; }
.booking-modal .form__title { padding-right: 48px; }
@keyframes booking-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .booking-modal[open] { animation: none; } }
@media (max-width: 767px) {
  .booking-modal { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .booking-modal > .form, .booking-modal > .form-done { max-height: 92dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}
.booking-cta__text { margin: 0 0 var(--space-5); color: var(--ink-muted); }
.booking-cta > .btn + .btn { margin-top: var(--space-3); }  /* only the card's own stacked buttons, not the messenger row */

/* ---------- Django port: booking via Telegram / Viber bots ---------- */
/* equal-width pair: every button gets the width of the widest one (Telegram / Viber) */
.msg-buttons { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; gap: var(--space-2); }
.msg-buttons .btn { justify-content: center; }
.msg-buttons .icon { width: 18px; height: 18px; }
.msg-icons { display: inline-flex; gap: var(--space-2); }
.msg-icon { display: inline-flex; width: 40px; height: 40px; flex: none; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); background: var(--gold-100); color: var(--brand-brown); transition: background .18s ease; }
.msg-icon:hover { background: var(--brand-gold); }
.msg-icon .icon { width: 20px; height: 20px; }
.form__alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-3);
  padding-top: var(--space-4); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 14px; }
.contacts__subtitle { font-family: var(--font-serif); font-weight: 400; font-size: 26px; line-height: 1.25; color: var(--brand-brown); margin: 0 0 var(--space-4); }
.header__sheet .msg-buttons { justify-self: center; margin: var(--space-2) 0; }
.header__sheet .msg-buttons .btn { margin-top: 0; }  /* not the sheet's "first button" spacing */
.callbar .msg-icons { flex: none; }
.callbar .msg-icon { width: 46px; height: 46px; }
.callbar .btn { flex: 1 1 0; min-width: 0; padding-left: var(--space-3); padding-right: var(--space-3); }
.footer__msg { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-1); color: var(--on-brown); white-space: nowrap; }
.footer__msg .icon { width: 18px; height: 18px; color: var(--brand-gold); }
@media (max-width: 767px) {
  .footer__nav { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--space-4); }
  .footer__nav h2 { grid-column: 1 / -1; }
}

/* ---------- Django port: doctor list cards — same structure, buttons aligned at the bottom ---------- */
.doctor--vertical { grid-template-rows: auto 1fr; align-content: start; }
.doctor--vertical .doctor__body { display: flex; flex-direction: column; }
.doctor--vertical .doctor__actions { margin-top: auto; padding-top: var(--space-4); }
/* Every card on a doctors grid is the same size: rows as tall as the tallest card, name ≤ 2 lines,
   description exactly 3 lines tall (clamped; the full text is on the doctor's page). */
.grid-doctors { grid-auto-rows: 1fr; grid-template-columns: repeat(2, minmax(0, 1fr)); }  /* minmax: long names can't widen a column */
.doctor--vertical .doctor__body { align-self: stretch; }  /* fill the card, so the buttons reach its bottom */
.doctor--vertical .doctor__name { overflow-wrap: anywhere; hyphens: auto; }
/* The prototype's tablet rule turned every doctor card horizontal; list cards are too narrow for that. */
.doctor.doctor--vertical { grid-template-columns: 1fr; }
@media (max-width: 767px) { .grid-doctors { grid-template-columns: 1fr; } }
.doctor--vertical .doctor__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.doctor--vertical .doctor__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden; min-height: calc(3 * 26px); margin-bottom: 0; }

/* ---------- Django port: homepage hero — one text measure, centred star rule, illustration on the edge ---------- */
.hero--home { padding-bottom: 0; }
.hero--home .hero__grid { grid-template-columns: 1fr 1fr; gap: var(--space-7); }
.hero--home .hero__text { padding-bottom: var(--space-9); }
.hero--home .hero__text > *:not(.hero__facts) { max-width: 560px; }
.hero--home .hero__brand img { max-width: 560px; }
.hero--home .hero__rule { width: 100%; max-width: 560px; }  /* the ornament keeps its ratio, so its star centres under the wordmark */
.hero--home .hero__lead { font-size: 19px; line-height: 31px; color: var(--ink); }
.hero--home .hero__facts { font-size: 15px; line-height: 24px; color: var(--ink); column-gap: var(--space-4); }
.hero--home .hero__facts .icon { width: 16px; height: 16px; }
.hero--home .hero__art { align-self: end; }
/* The planet's base fades out over the transparent bottom ~8% of the image: let it overlap the section edge,
   so the planet "sits" on the next band instead of floating. */
.hero--home .hero__art img { display: block; max-width: 600px; margin: 0 0 -8% auto; }
@media (min-width: 768px) and (max-width: 1199px) {
  .hero--home .hero__grid { grid-template-columns: 1.3fr .7fr; gap: var(--space-5); }
  .hero--home .hero__tagline { font-size: 28px; line-height: 36px; }
  .hero--home .hero__lead { font-size: 18px; line-height: 29px; }
}
@media (max-width: 767px) {
  .hero--home { padding-bottom: var(--space-8); }
  .hero--home .hero__grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .hero--home .hero__text { padding-bottom: 0; }
  .hero--home .hero__text > * { margin-left: auto; margin-right: auto; }
  .hero--home .hero__rule { max-width: 240px; }
  .hero--home .hero__lead { font-size: 17px; line-height: 28px; }
  .hero--home .hero__art { align-self: auto; }
  .hero--home .hero__art img { max-width: 210px; margin: 0 auto; }
  .hero--home .hero__text > *:not(.hero__facts) { max-width: none; }
}

/* ---------- Django port: slim closing booking band (full steps block only on the homepage) ---------- */
.booking-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5) var(--space-7); }
.booking-band__title { font-family: var(--font-serif); font-weight: 400; font-size: 34px; line-height: 40px; color: var(--brand-brown); }
.booking-band__lead { margin-top: var(--space-2); color: var(--ink); max-width: 560px; }
.booking-band__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
@media (max-width: 767px) {
  .booking-band__title { font-size: 28px; line-height: 34px; }
  .booking-band__actions { width: 100%; }
  .booking-band__actions .btn { flex: 1 1 100%; }
}

/* ---------- Django port: doctor page — direction heading, larger photo ---------- */
.dir__title { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); font-family: var(--font-serif);
  font-weight: 400; font-size: 28px; line-height: 34px; color: var(--brand-brown); }
.dir__title .service__icon { margin: 0; }
@media (min-width: 1024px) { .doctor:not(.doctor--vertical) { grid-template-columns: 360px 1fr; } }

/* ---------- Django port: services list — specialist once per direction, text links instead of 19 buttons ---------- */
.svc-group__meta { margin: calc(-1 * var(--space-2)) 0 var(--space-4); font-size: 15px; color: var(--ink); }
.svc-group__meta a { color: var(--gold-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.svc__book { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; color: var(--brand-brown); white-space: nowrap; }
.svc__book .icon { width: 18px; height: 18px; transition: transform .18s ease; }
.svc__book:hover .icon { transform: translateX(3px); }
@media (max-width: 767px) {
  .svc__cta { justify-self: start; }
  .svc__cta .btn, .svc__cta .svc__book { width: auto; }
  /* filter chips: one swipeable row, faded edge hints there is more */
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--gutter-mobile));
    padding-right: var(--space-6); -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
    mask-image: linear-gradient(to right, #000 82%, transparent); }
  .filters::-webkit-scrollbar { display: none; }
  .filters .chip { flex: none; }
}

/* ---------- Django port: blog post — article + sticky right rail (author, booking, contents) ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-8); align-items: start; }
.article-rail { position: sticky; top: calc(var(--header-h) + var(--space-5)); display: grid; gap: var(--space-4); }
.rail-card { display: grid; gap: var(--space-4); padding: var(--space-5); background: var(--surface-card); border: 1px solid var(--line);
  border-radius: var(--radius-md); }
.rail-card__title { font-family: var(--font-serif); font-size: 22px; line-height: 28px; color: var(--brand-brown); }
.rail-card .author { margin: 0; }
.rail-card .msg-buttons { display: grid; grid-auto-columns: minmax(0, 1fr); }  /* full width of the rail card, equal halves */
.rail-card .msg-buttons .btn { padding-left: var(--space-2); padding-right: var(--space-2); }
.toc { display: grid; gap: var(--space-2); padding-left: var(--space-5); list-style: decimal; color: var(--gold-text); font-size: 15px; line-height: 22px; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--brand-brown); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1024px) { .article-layout .article__cta { display: none; } }  /* the rail already offers booking */
@media (max-width: 1023px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-rail { display: none; }
}

/* ---------- Django port: mobile polish ---------- */
.callbar { transition: transform .25s ease; }
.callbar.is-hidden { transform: translateY(115%); }
@media (prefers-reduced-motion: reduce) { .callbar { transition: none; } }
@media (max-width: 767px) { .hero--home .eyebrow { font-size: 15px; letter-spacing: .14em; } }

/* ---------- Django port: readability — descriptions and leads darker and at 16 px (older visitors) ---------- */
.heading__lead, .article__lead { color: var(--ink-soft); }
.service__text, .step__text, .value p, .post__excerpt, .incl p, .booking-cta__text, .callout > span:nth-child(2),
.svc__text, .dir__text, .doctor__text { color: var(--ink-soft); font-size: 16px; line-height: 26px; }
.form__alt { color: var(--ink-soft); }
.booking-band .msg-icon { width: 52px; height: 52px; background: var(--surface-card); border: 1.5px solid var(--line-strong); }
.booking-band .msg-icon:hover { background: var(--gold-100); border-color: var(--brand-brown); }

/* ---------- Django port: blog cards without a cover (the common case for now) ---------- */
.posts { grid-auto-rows: 1fr; }  /* every card in a blog grid is the same size, with or without an image */
.posts .post__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.posts .post__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.post--text .post__body { padding: var(--space-6); }
.post__icon { margin-bottom: var(--space-1); }
.post--text:not(.post--featured) .post__title { font-size: 27px; line-height: 33px; }
.post--text { transition: box-shadow .18s ease, transform .18s ease; }
.post--text:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .post--text:hover { transform: none; } }
/* Featured without a cover: a text card with an "illustrated cover" panel (topic icon + star rule) */
/* Featured card: the same frame with or without a cover (media | text), so uploading a cover changes nothing else */
.post--featured, .post--featured.post--text { grid-template-columns: 1fr 1fr; min-height: 360px; }
.post--featured .post__cover { display: block; min-height: 100%; }
.post--featured .post__cover img { height: 100%; aspect-ratio: auto; }
.post--featured .post__body { justify-content: center; padding: var(--space-7); }
.post__art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4);
  min-height: 320px; padding: var(--space-7); background: var(--surface-200); text-decoration: none; }
.post__art-icon { display: inline-flex; width: 120px; height: 120px; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); background: var(--gold-100); color: var(--brand-brown); }
.post__art-icon .icon { width: 56px; height: 56px; stroke-width: 1.2; }
.post__art-rule { width: 220px; height: 16px; color: var(--brand-gold); }
.post__art-label { font-family: var(--font-serif); font-size: 18px; letter-spacing: .3em; text-transform: lowercase; color: var(--gold-text); }
.post__author { font-size: 15px; color: var(--ink-soft); }
@media (max-width: 1023px) {
  .post--featured, .post--featured.post--text { grid-template-columns: 1fr; min-height: 0; }
  .post--featured .post__cover img { aspect-ratio: 16 / 9; }
  /* no cover: the panel becomes a compact strip (icon + topic) instead of a big empty block */
  .post__art { flex-direction: row; justify-content: flex-start; gap: var(--space-4); min-height: 0;
    padding: var(--space-4) var(--space-6); }
  .post__art-icon { width: 56px; height: 56px; }
  .post__art-icon .icon { width: 28px; height: 28px; }
  .post__art-rule { display: none; }
  .post__art-label { font-size: 16px; letter-spacing: .2em; }
}
@media (max-width: 767px) {
  .posts { grid-auto-rows: auto; }
  .post--featured .post__body { padding: var(--space-5); }
}

/* ---------- Django port: doctor page — service cards grouped by direction (any number of directions) ---------- */
.dir-block + .dir-block { margin-top: var(--space-7); }
.svc-cards { grid-auto-rows: 1fr; }
.svc-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) var(--space-6) var(--space-6);
  background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-md); }
.svc-card__title { font-family: var(--font-serif); font-weight: 500; font-size: 23px; line-height: 29px; color: var(--brand-brown);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-height: calc(2 * 29px); }  /* same card height in every direction */
.svc-card__text { color: var(--ink-soft); font-size: 16px; line-height: 26px; display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
@media (max-width: 767px) { .svc-cards { grid-auto-rows: auto; } .svc-card__title { min-height: 0; } .svc-card__text { min-height: 0; } }

/* ---------- Django port: empty lists (blog, doctors, hearing-aid catalogue before content is added) ---------- */
.empty-state { display: grid; justify-items: center; gap: var(--space-3); max-width: 640px; margin: var(--space-6) auto 0;
  padding: var(--space-8) var(--space-6); text-align: center; background: var(--surface-card); border: 1px solid var(--line);
  border-radius: var(--radius-md); }
.empty-state__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: color-mix(in srgb, var(--brand-gold) 18%, transparent); color: var(--brand-brown); }
.empty-state__icon .icon { width: 32px; height: 32px; }
.empty-state__rule { width: 120px; height: 12px; color: var(--brand-gold); }
.empty-state__title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 30px; line-height: 36px; color: var(--brand-brown); }
.empty-state__text { margin: 0; max-width: 52ch; color: var(--ink-soft); font-size: 17px; line-height: 28px; }
.empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-3); }
@media (max-width: 767px) { .empty-state { padding: var(--space-6) var(--space-4); } .empty-state__title { font-size: 25px; line-height: 31px; }
  .empty-state__actions .btn { width: 100%; justify-content: center; } }
