/* My Dental Clinic — стилі сайту */

:root {
  --brown: #4F3329;
  --cream: #F8F0EC;
  --caramel: #B8876F;

  --bg: #F8F0EC;
  --bg-alt: #F1E5DE;
  --surface: #FFFFFF;
  --surface-2: #F6ECE6;
  --text: #3E2820;
  --text-2: #7A5F55;
  --line: rgba(79, 51, 41, .13);
  --line-strong: rgba(79, 51, 41, .25);
  --accent: #4F3329;
  --accent-hover: #3A241C;
  --on-accent: #F8F0EC;
  --soft: #E9D8CE;
  --ok: #2F7D4F;
  --err: #B3261E;
  --shadow: 0 1px 2px rgba(79, 51, 41, .06), 0 8px 24px -8px rgba(79, 51, 41, .16);
  --shadow-lg: 0 24px 60px -20px rgba(79, 51, 41, .35);

  --r: 20px;
  --r-sm: 12px;
  --wrap: 1200px;
  --gut: 16px;
  --hdr: 68px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #221612;
  --bg-alt: #2B1D18;
  --surface: #33231D;
  --surface-2: #3D2A23;
  --text: #F8F0EC;
  --text-2: #CDB7AC;
  --line: rgba(248, 240, 236, .12);
  --line-strong: rgba(248, 240, 236, .24);
  --accent: #F8F0EC;
  --accent-hover: #FFFFFF;
  --on-accent: #3A241C;
  --soft: #4A332A;
  --ok: #7FD1A0;
  --err: #FF8A80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.ic--sm { width: 16px; height: 16px; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--caramel); outline-offset: 2px; border-radius: 6px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.wrap--narrow { max-width: calc(880px + var(--gut) * 2); }
@media (min-width: 768px) { :root { --gut: 24px; --hdr: 76px; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.4em; border: 1.5px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface); border-color: var(--accent); color: var(--text); }
.btn--sm { min-height: 40px; padding: 0 1.1em; font-size: .875rem; }
.btn--lg { min-height: 54px; padding: 0 1.7em; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; }
.link-arrow .ic { transition: transform .2s; }
.link-arrow:hover .ic { transform: translateX(3px); }

/* ---------- Шапка ---------- */
.promo-bar { background: var(--accent); color: var(--on-accent); font-size: .875rem; text-align: center; padding: 8px 0; }
.promo-bar a { color: inherit; font-weight: 600; margin-left: .5em; }
.hdr {
  position: sticky; top: 0; z-index: 40; height: var(--hdr);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background-color .35s;
}
.hdr.is-scrolled { border-bottom-color: var(--line); }
.hdr__in { height: 100%; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; color: var(--text); flex: none; }
.logo__img { height: 38px; width: auto; }
@media (min-width: 768px) { .logo__img { height: 44px; } }
.nav { flex: 1; display: none; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 2px; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 999px;
  background: none; border: 0; cursor: pointer; font-weight: 500; font-size: .92rem; text-decoration: none; white-space: nowrap;
}
.nav__link:hover, .nav__link[aria-expanded="true"] { background: var(--surface); }
.nav__link[aria-expanded="true"] .ic { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% + 10px); left: -24px; width: min(880px, 90vw);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 24px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.nav__item--mega.is-open .mega { opacity: 1; visibility: visible; transform: none; }
.mega__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 28px; }
.mega__title { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; margin-bottom: 6px; }
.mega__title .ic { color: var(--caramel); }
.mega__link { display: block; padding: 4px 0 4px 28px; color: var(--text-2); text-decoration: none; font-size: .9rem; }
.mega__link:hover { color: var(--text); }
.hdr__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hdr__phone { display: none; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; white-space: nowrap; font-size: .95rem; }
.hdr__cta { display: none; }
.theme-toggle, .burger {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s;
}
.theme-toggle:hover, .burger:hover { border-color: var(--line-strong); }
.theme-toggle .ic { grid-area: 1 / 1; transition: transform .45s cubic-bezier(.3, 1.4, .6, 1), opacity .3s; }
.theme-toggle__moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="dark"] .theme-toggle__sun { opacity: 0; transform: rotate(90deg) scale(.5); }
[data-theme="dark"] .theme-toggle__moon { opacity: 1; transform: none; }
@media (min-width: 640px) { .hdr__cta { display: inline-flex; } }
@media (min-width: 1100px) {
  .nav { display: block; }
  .burger { display: none; }
  .hdr__phone { display: inline-flex; }
}
@media (min-width: 1100px) and (max-width: 1240px) { .hdr__phone span { display: none; } .nav__link { padding: 10px 9px; } }

.drawer {
  position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto;
  display: flex; flex-direction: column; padding: 0 var(--gut) calc(24px + env(safe-area-inset-bottom));
}
.drawer[hidden] { display: none; }
.drawer__head { height: var(--hdr); display: flex; align-items: center; justify-content: space-between; flex: none; }
.drawer__nav { display: flex; flex-direction: column; padding: 8px 0 24px; border-bottom: 1px solid var(--line); }
.drawer__group summary { list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: 1.25rem; font-weight: 700; padding: 12px 0; cursor: pointer; }
.drawer__group summary::-webkit-details-marker { display: none; }
.drawer__group[open] summary .ic { transform: rotate(180deg); }
.drawer__cat { display: block; font-weight: 600; padding: 10px 0 4px; text-decoration: none; }
.drawer__sub { display: block; padding: 6px 0 6px 14px; color: var(--text-2); text-decoration: none; border-left: 2px solid var(--line); }
.drawer__link { font-size: 1.25rem; font-weight: 700; padding: 12px 0; text-decoration: none; }
.drawer__foot { padding-top: 24px; display: grid; gap: 16px; }

/* ---------- Мобільна панель ---------- */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.mbar__btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: .7rem; font-weight: 600; text-decoration: none; background: none; border: 0; cursor: pointer; border-radius: 12px; }
.mbar__btn .ic { width: 22px; height: 22px; }
.mbar__btn--viber .ic { color: #7360F2; }
.mbar__btn--tg .ic { color: #229ED9; }
.mbar__btn--wa .ic { color: #25D366; }
.mbar__btn--main { background: var(--accent); color: var(--on-accent); }
body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
@media (min-width: 1100px) { .mbar { display: none; } body { padding-bottom: 0; } }

/* ---------- Секції ---------- */
.sec { padding: 56px 0; }
.sec--tight { padding: 28px 0 40px; }
.sec--alt { background: var(--bg-alt); }
.sec:not(.sec--alt) + .sec:not(.sec--alt):not(.sec--cta) { padding-top: 0; }
@media (min-width: 900px) { .sec { padding: 88px 0; } .sec--tight { padding: 32px 0 56px; } }
.sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.sec__head .sec__title { margin-bottom: 0; }
.sec__title { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin-bottom: 24px; }
.sec__sub { color: var(--text-2); margin: 8px 0 0; }
.sec__more { margin-top: 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--text-2); margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.card--pad { padding: 20px; display: block; }
@media (min-width: 768px) { .card--pad { padding: 28px; } }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 28px; text-align: center; color: var(--text-2); }
.empty__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero { padding: 24px 0 40px; overflow: hidden; }
.hero__grid { display: grid; gap: 32px; align-items: center; }
.hero__title { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -.025em; margin-bottom: 20px; }
.hero__lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--text-2); max-width: 36em; margin-bottom: 28px; }
.hero__btns, .phero__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__btns .btn { flex: 1 1 auto; }
@media (min-width: 560px) { .hero__btns .btn { flex: 0 0 auto; } }
.hero__facts { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--text-2); font-size: .92rem; }
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts a { text-decoration: none; color: var(--text); font-weight: 600; }
.hero__media { position: relative; max-width: 520px; width: 100%; justify-self: center; }
.hero__photo { border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 4.2; box-shadow: var(--shadow-lg); background: var(--soft); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__badge {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-lg); font-weight: 600; font-size: .9rem; border: 1px solid var(--line);
  animation: float 6s ease-in-out infinite;
}
.hero__badge .ic { color: var(--caramel); }
.hero__badge--a { left: -8px; bottom: 28px; }
.hero__badge--b { right: -8px; top: 24px; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (min-width: 900px) {
  .hero { padding: 40px 0 72px; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 56px; }
  .hero__photo { aspect-ratio: 4 / 4.6; }
  .hero__badge--a { left: -36px; }
  .hero__badge--b { right: -24px; }
}

.stats-sec { padding: 0 0 16px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stats__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.stats__item strong { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; letter-spacing: -.02em; }
.stats__item span { color: var(--text-2); font-size: .9rem; line-height: 1.35; }
.stats--col { grid-template-columns: 1fr; }
@media (min-width: 900px) { .stats:not(.stats--col) { grid-template-columns: repeat(4, 1fr); } .stats__item { padding: 24px 28px; } }

/* ---------- Картки послуг ---------- */
.svc-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .svc-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.svc {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.svc__ic { width: 48px; height: 48px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; color: var(--text); }
.svc__ic .ic { width: 26px; height: 26px; }
.svc__title { font-weight: 700; font-size: 1.12rem; line-height: 1.3; }
.svc__text { color: var(--text-2); font-size: .92rem; }
.svc__subs { font-size: .82rem; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 10px; }
.svc__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.svc__price { font-weight: 700; }
.svc__go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); transition: transform .25s; }
.svc:hover .svc__go { transform: rotate(-45deg); }

/* ---------- До / після ---------- */
.ba { max-width: 980px; margin: 0 auto; }
.ba__stage {
  position: relative; aspect-ratio: 3 / 2; border-radius: var(--r); overflow: hidden; background: var(--soft);
  box-shadow: var(--shadow); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; --pos: 50%;
}
.ba__case { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.ba__case.is-active { opacity: 1; }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__cap { position: absolute; left: 12px; right: 12px; bottom: 12px; text-align: center; color: #fff; font-size: .85rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.ba__tag { position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(34, 22, 18, .6); color: #fff; backdrop-filter: blur(6px); pointer-events: none; }
.ba__tag--l { left: 14px; }
.ba__tag--r { right: 14px; }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; outline: none; }
.ba__handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .35); }
.ba__knob {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%;
  background: #fff; color: #4F3329; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
  transition: transform .2s;
}
.ba__handle:focus-visible .ba__knob, .ba__stage.is-drag .ba__knob { transform: translate(-50%, -50%) scale(1.08); }
.ba__knob .ic { margin: 0 -3px; }
.ba__stage.is-hint .ba__handle, .ba__stage.is-hint .ba__before { transition: left .8s cubic-bezier(.5, 0, .2, 1), clip-path .8s cubic-bezier(.5, 0, .2, 1); }
.ba__nav { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.ba__arrow { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.ba__arrow:hover { border-color: var(--accent); }
.ba__thumbs { flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; justify-content: safe center; }
.ba__thumbs::-webkit-scrollbar { display: none; }
.ba__thumb { flex: none; width: 76px; height: 50px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; opacity: .55; cursor: pointer; background: var(--soft); transition: opacity .2s, border-color .2s; }
.ba__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ba__thumb.is-active, .ba__thumb:hover { opacity: 1; border-color: var(--accent); }
@media (min-width: 768px) { .ba__thumb { width: 96px; height: 64px; } }

/* ---------- Лікарі ---------- */
.doc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (min-width: 1000px) { .doc-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 380px)); } }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.doc__photo { display: block; text-decoration: none; aspect-ratio: 4 / 4.4; background: var(--soft); overflow: hidden; }
.doc__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.doc:hover .doc__photo img { transform: scale(1.04); }
.doc__ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-2); font-size: .85rem;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--caramel) 30%, transparent), transparent 60%), var(--soft); }
.doc__ph .ic { width: 64px; height: 64px; opacity: .6; }
.doc__body { padding: 18px 20px 20px; }
.doc__name { font-size: 1.08rem; margin-bottom: 4px; }
.doc__name a { text-decoration: none; }
.doc__pos { color: var(--text-2); font-size: .92rem; margin-bottom: 10px; }
.doc__exp { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; background: var(--soft); padding: 5px 10px; border-radius: 999px; margin: 0; }

/* ---------- Чому ми / галерея ---------- */
.why { display: grid; gap: 32px; }
@media (min-width: 1000px) { .why { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; } }
.why__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.why__list--grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.why__item { display: flex; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.why__item h3 { font-size: 1.02rem; margin-bottom: 4px; }
.why__item p { margin: 0; color: var(--text-2); font-size: .92rem; }
.why__n { font-weight: 700; color: var(--caramel); font-size: .9rem; padding-top: 2px; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r); }
.gallery::-webkit-scrollbar { display: none; }
.gallery__item { scroll-snap-align: start; border-radius: var(--r); overflow: hidden; aspect-ratio: 3 / 4; background: var(--soft); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1000px) {
  .gallery:not(.gallery--wide) { grid-auto-flow: row; grid-template-columns: 1fr 1fr; overflow: visible; position: sticky; top: calc(var(--hdr) + 24px); }
  .gallery:not(.gallery--wide) .gallery__item { aspect-ratio: 4 / 5; }
  .gallery:not(.gallery--wide) .gallery__item:nth-child(n+5) { display: none; }
  .gallery--wide { grid-auto-columns: calc((100% - 36px) / 4); }
}

/* ---------- Ціни ---------- */
.prices { list-style: none; margin: 0 0 16px; padding: 0; }
.prices__row { display: flex; align-items: baseline; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.prices__row:last-child { border-bottom: 0; }
.prices__name { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.prices__name a { text-decoration: none; }
.prices__name a:hover { text-decoration: underline; }
.prices__dots { flex: 1 1 24px; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); min-width: 16px; }
.prices__val { flex: 0 0 auto; font-weight: 700; text-align: right; max-width: 45%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: .9rem; font-weight: 500; }
.chip:hover { border-color: var(--accent); }
.pgroup { margin-bottom: 16px; }
.pgroup__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pgroup__head h2 { font-size: 1.3rem; }

/* ---------- Відгуки ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 86%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
@media (min-width: 768px) { .rail { grid-auto-columns: calc((100% - 28px) / 3); } }
.rail > * { scroll-snap-align: start; }
.rev-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 48px; }
.rev { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.rev__stars { color: #E0A33A; display: flex; gap: 2px; }
.rev__stars .is-off { opacity: .25; }
.rev__text { margin: 0; flex: 1; }
.rev__foot { display: flex; align-items: center; gap: 12px; line-height: 1.3; }
.rev__ava { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; }
.rev__ava--ph { display: grid; place-items: center; background: var(--soft); font-weight: 700; }
.review-form-wrap { display: grid; gap: 24px; }
@media (min-width: 900px) { .review-form-wrap { grid-template-columns: 1fr 1.1fr; gap: 48px; } }
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars-input input { position: absolute; opacity: 0; width: 1px; }
.stars-input label { cursor: pointer; color: var(--line-strong); }
.stars-input label .ic { width: 30px; height: 30px; }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: #E0A33A; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.faq__item summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__ic { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--soft); display: grid; place-items: center; transition: transform .25s; }
.faq__item[open] .faq__ic { transform: rotate(45deg); }
.faq__a { padding: 0 20px 18px; color: var(--text-2); }
.faq__a p:last-child { margin: 0; }

/* ---------- Форма ---------- */
.lead { display: grid; gap: 14px; position: relative; }
.field { display: grid; gap: 6px; }
.field label, .field summary { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line-strong);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23967a6e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 44px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--caramel) 25%, transparent); }
.field.is-err input { border-color: var(--err); }
.field__err { color: var(--err); font-size: .82rem; }
.field--more summary { cursor: pointer; list-style: none; }
.field--more summary::before { content: "+ "; }
.field--more[open] summary { margin-bottom: 6px; }
.lead__note { font-size: .78rem; color: var(--text-2); margin: 0; text-align: center; }
.lead__ok { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; background: var(--surface); border-radius: 14px; }
.lead__ok[hidden] { display: none; }
.lead__ok > .ic { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: var(--ok); color: #fff; }
.lead__fail { color: var(--err); font-size: .9rem; margin: 0; text-align: center; }
.btn.is-loading span::after { content: "…"; }

.sec--cta { padding-top: 32px; }
.cta { display: grid; gap: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 24px; box-shadow: var(--shadow); }
.cta__text p { color: var(--text-2); }
.cta__alt { font-size: .92rem; }
.cta__alt a { font-weight: 600; margin-left: 8px; }
.ticks { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: center; }
.ticks .ic { color: var(--ok); }
@media (min-width: 900px) { .cta { grid-template-columns: 1fr 1fr; padding: 48px; gap: 56px; align-items: center; } }

/* ---------- Контакти ---------- */
.contacts { display: grid; gap: 20px; }
@media (min-width: 900px) { .contacts { grid-template-columns: 1fr 1.3fr; gap: 28px; } }
.contacts__info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 20px; align-content: start; }
.contacts__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contacts__list li { display: flex; gap: 14px; }
.contacts__list li > .ic { margin-top: 2px; color: var(--caramel); }
.contacts__phone { font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.contacts__map { border-radius: var(--r); overflow: hidden; min-height: 320px; background: var(--soft); border: 1px solid var(--line); }
.contacts__map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }
[data-theme="dark"] .contacts__map iframe { filter: invert(.9) hue-rotate(180deg) saturate(.6) brightness(.95); }
.status { font-size: .85rem; color: var(--text-2); }
.status--on { color: var(--ok); }
.status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.msg-row { display: flex; gap: 10px; flex-wrap: wrap; }
.msg { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; }
.msg--wide { width: auto; padding: 0 16px; flex: 1 1 auto; }
.msg--viber { background: #7360F2; }
.msg--telegram { background: #229ED9; }
.msg--whatsapp { background: #1DA851; }

/* ---------- Внутрішні сторінки ---------- */
.phero { padding: 12px 0 32px; }
.phero--simple { padding-bottom: 8px; }
.phero__grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .phero { padding: 16px 0 48px; } .phero__grid { grid-template-columns: 1fr 340px; gap: 48px; } }
.phero__title { font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.1; letter-spacing: -.02em; margin-bottom: 16px; }
.phero__lead { font-size: 1.08rem; color: var(--text-2); max-width: 40em; margin-bottom: 24px; }
.phero__lead p:last-child { margin-bottom: 0; }
.phero__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.phero__price-label { font-size: .85rem; color: var(--text-2); margin: 0; }
.phero__price { font-size: 2rem; font-weight: 700; margin: 0 0 8px; letter-spacing: -.02em; }
.phero__price small { font-size: 1rem; }
.mini-doc { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); text-decoration: none; line-height: 1.3; }
.mini-doc__ph { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--soft); display: grid; place-items: center; flex: none; }
.mini-doc__ph img { width: 100%; height: 100%; object-fit: cover; }
.crumbs ol { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .85rem; color: var(--text-2); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.article-grid { display: grid; gap: 32px; }
@media (min-width: 1000px) { .article-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; } .side__sticky { position: sticky; top: calc(var(--hdr) + 20px); } }
.side__title { font-size: 1.25rem; }
.side .btn { margin-bottom: 12px; }
.prose { font-size: 1.02rem; max-width: 72ch; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.15rem; margin: 1.4em 0 .5em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose a { font-weight: 500; }
.prose blockquote { margin: 1.5em 0; padding: 12px 20px; border-left: 3px solid var(--caramel); background: var(--surface); border-radius: 0 12px 12px 0; }
.prose img { border-radius: var(--r-sm); }
.checklist { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 0; }
.checklist .ic { color: var(--ok); margin-top: 4px; }
.steps { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 0; counter-reset: none; }
.steps__item { display: flex; gap: 16px; position: relative; padding-bottom: 20px; margin: 0 !important; }
.steps__item:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--line); }
.steps__n { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; }
.steps__item h3 { font-size: 1.05rem; margin: 8px 0 4px; }
.steps__item p { color: var(--text-2); margin: 0; }
.reviewed { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 32px; }
.reviewed .ic { color: var(--ok); }
.svc-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .svc-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .svc-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.dprof { display: grid; gap: 28px; }
@media (min-width: 800px) { .dprof { grid-template-columns: 360px 1fr; gap: 48px; align-items: start; } }
.dprof__photo { border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 4.6; background: var(--soft); }
.dprof__photo img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; gap: 12px; margin: 0 0 20px; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; font-weight: 600; }
.certs { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 12px; overflow-x: auto; }
.certs__item { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }

.promo-grid, .post-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.promo { overflow: hidden; }
.promo__img img, .post-card__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.promo__title { font-size: 1.3rem; }
.promo__till { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--caramel); font-size: .9rem; }
.post-card { overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card .card--pad { display: grid; gap: 6px; }
.post-card__title { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.post-cover { border-radius: var(--r); overflow: hidden; margin-bottom: 28px; }

.thanks { text-align: center; }
.thanks .prose { margin: 0 auto 1em; }
.thanks__ic { width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
.thanks__ic .ic { width: 40px; height: 40px; }
.err-code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 700; line-height: 1; margin: 0; color: var(--caramel); letter-spacing: -.04em; }
.thanks .svc-grid { text-align: left; margin-top: 28px; }

/* ---------- Футер ---------- */
.ftr { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 48px 0 24px; margin-top: 24px; font-size: .92rem; }
.ftr__grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.ftr__brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .ftr__grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; } .ftr__brand { grid-column: auto; } }
.ftr .logo__img { height: 48px; margin-bottom: 12px; }
.ftr__title { font-weight: 700; margin-bottom: 12px; }
.ftr__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ftr__list a { text-decoration: none; color: var(--text-2); }
.ftr__list a:hover { color: var(--text); }
.ftr__contacts { grid-column: 1 / -1; }
@media (min-width: 900px) { .ftr__contacts { grid-column: auto; } }
.ftr__contacts a, .ftr__contacts span { display: flex; gap: 10px; align-items: flex-start; }
.ftr__contacts .ic { margin-top: 2px; }
.social { display: flex; gap: 8px; flex-wrap: wrap; }
.social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; transition: background .2s; }
.social a:hover { background: var(--surface); }
.ftr__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-2); font-size: .82rem; }
.ftr__bottom p { margin: 0; }

/* ---------- Модальне вікно ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: end center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20, 12, 9, .55); backdrop-filter: blur(3px); animation: fade .2s; }
.modal__box {
  position: relative; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto;
  background: var(--surface); border-radius: 24px 24px 0 0; padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg); animation: up .3s cubic-bezier(.2, .9, .3, 1);
}
@media (min-width: 560px) { .modal { place-items: center; } .modal__box { border-radius: 24px; padding: 32px; } }
.modal__title { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px; }
.modal__x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }

/* ---------- Cookie ---------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 50; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 12px; font-size: .88rem;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; }
.consent__btns { display: flex; gap: 8px; justify-content: flex-end; }
@media (min-width: 1100px) { .consent { bottom: 20px; left: 20px; } }

/* ---------- Анімація появи ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { 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; }
}
html.theme-anim, html.theme-anim * { transition: background-color .4s ease, color .4s ease, border-color .4s ease !important; }
