/* База темы: токены приходят из theme.json как --wp--preset--* / --wp--custom--*, здесь только то, чего пресеты не покрывают. */
:where(body){ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; margin:0; }
*, *::before, *::after{ box-sizing:border-box; }
img{ max-width:100%; height:auto; }
button, input, select, textarea, optgroup{ font:inherit; letter-spacing:inherit; color:inherit; }
:where(h1,h2,h3,h4,p,ul,ol,figure){ margin:0; }

/* Контейнер секции: 1440 макета = 104 поля + 1232 контент. */
:where(.dd-container){ width:100%; max-width:calc(var(--wp--style--global--content-size, 1232px) + 2 * var(--dd-gutter)); margin-inline:auto; padding-inline:var(--dd-gutter); }
:root{ --dd-gutter: var(--wp--custom--gutter, 104px); }
@media (max-width:1279px){ :root{ --dd-gutter:40px; } }
@media (max-width:760px){ :root{ --dd-gutter:16px; } }

/* Заголовки секций: H2 56 / 0.9 / −3%, подзаголовок 16 / 1.5 серый. */
:where(.dd-h2){ font-size:var(--wp--preset--font-size--2-xl); font-weight:600; line-height:.9; line-height:round(.9em, 1px); letter-spacing:-.03em; color:var(--wp--preset--color--ink); }
:where(.dd-lead){ font-size:var(--wp--preset--font-size--base); line-height:1.5; color:var(--wp--preset--color--black-600); }

/* Пилюля-кнопка. :where() — нулевая специфичность, модификаторы блоков применяются независимо от порядка CSS. */
:where(.dd-btn){ display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:52px; padding:0 24px; border:0; border-radius:var(--wp--custom--radius--pill); font-size:var(--wp--preset--font-size--base); font-weight:500; line-height:1; cursor:pointer; text-decoration:none; transition:background-color var(--wp--custom--transition--fast), color var(--wp--custom--transition--fast), transform var(--wp--custom--transition--fast); }
:where(.dd-btn):active{ transform:scale(.98); }
.dd-btn--primary{ background:var(--wp--preset--color--orange); color:var(--wp--preset--color--white); }
:where(.dd-btn--primary):hover{ background:var(--wp--preset--color--orange-hover); }
.dd-btn--light{ background:var(--wp--preset--color--white); color:var(--wp--preset--color--ink); }
.dd-btn--gray{ background:var(--wp--preset--color--black-50); color:var(--wp--preset--color--ink); }
:where(.dd-btn--gray):hover, :where(.dd-btn--light):hover{ background:var(--wp--preset--color--black-100); }
.dd-btn--outline{ background:transparent; color:var(--wp--preset--color--ink); box-shadow:inset 0 0 0 1px var(--wp--preset--color--black-100); }
:where(.dd-btn--outline):hover{ background:var(--wp--preset--color--black-50); }

/* Доступность */
.dd-visually-hidden{ position:absolute!important; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0; }
.dd-skip-link:not(:focus){ clip-path:inset(50%); }
.dd-skip-link{ position:absolute; top:0; left:0; z-index:10000; transform:translateY(-200%); padding:12px 20px; border-radius:0 0 12px 0; background:var(--wp--preset--color--black); color:var(--wp--preset--color--white); font-weight:600; text-decoration:none; }
.dd-skip-link:focus{ transform:translateY(0); }
main[id]:focus{ outline:none; }
:where(a[href], button, [role="button"], [role="tab"], summary, input, select, textarea, [tabindex]:not([tabindex^="-"])):focus-visible{ outline:2px solid var(--wp--preset--color--orange); outline-offset:2px; }
@media (prefers-reduced-motion: reduce){ :where(*){ scroll-behavior:auto!important; transition-duration:0s!important; animation-duration:0s!important; } }

/* Стрелки слайдера (общий паттерн: врачи, результаты, отзывы). */
.dd-arrows{ display:flex; padding:4px; border-radius:var(--wp--custom--radius--xl); box-shadow:inset 0 0 0 1px var(--wp--preset--color--black-100); }
.dd-arrows__btn{ display:grid; place-items:center; width:48px; height:48px; padding:0; border:0; border-radius:var(--wp--custom--radius--xl); background:transparent; color:var(--wp--preset--color--black); cursor:pointer; transition:background-color var(--wp--custom--transition--fast), opacity var(--wp--custom--transition--fast); }
.dd-arrows__btn:hover{ background:var(--wp--preset--color--black-50); }
.dd-arrows__btn:disabled{ cursor:default; background:transparent; } /* в макете крайняя стрелка не гаснет */

/* Старая цена: серая, перечёркнута косой линией (Figma «Line 27», 64×4 поверх цифр).
   --dd-old-halo — цвет подложки: в макете у линии обводка цветом фона, чтобы она «резала» цифры. */
:where(.dd-old){ position:relative; display:inline-block; color:var(--wp--preset--color--black-600); text-decoration:none; }
:where(.dd-old)::after{ content:""; position:absolute; left:-1px; right:-1px; top:50%; height:1.5px; background:currentColor; box-shadow:0 0 0 1px var(--dd-old-halo, transparent); transform:rotate(-3deg); border-radius:1px; }

/* Контролы видео (общие: видео о клинике, этапы консультации). */
.dd-player__controls{ position:absolute; inset:auto 0 0; display:flex; align-items:center; justify-content:space-between; padding:8px; }
.dd-player__buttons{ display:flex; padding:4px; border-radius:var(--wp--custom--radius--xl); background:var(--wp--preset--color--white); }
.dd-player__btn{ display:grid; place-items:center; width:48px; height:48px; padding:0; border:0; border-radius:var(--wp--custom--radius--xl); background:transparent; color:var(--wp--preset--color--black); cursor:pointer; transition:background-color var(--wp--custom--transition--fast); }
.dd-player__btn:hover{ background:var(--wp--preset--color--black-50); }
.dd-player__btn .dd-player__ico-pause, .dd-player.is-playing .dd-player__ico-play{ display:none; }
.dd-player.is-playing .dd-player__ico-pause{ display:block; }
.dd-player__btn span{ display:block; line-height:0; }
.dd-player__time{ display:grid; place-items:center; min-width:64px; height:56px; padding:12px; border-radius:var(--wp--custom--radius--lg); background:rgba(36,37,44,.24); -webkit-backdrop-filter:blur(25px); backdrop-filter:blur(25px); color:var(--wp--preset--color--white); font-size:var(--wp--preset--font-size--sm); font-weight:500; line-height:1.3; font-variant-numeric:tabular-nums; }

/* ── Боковая панель (dialog.dd-drawer): 450 справа, отступы 16, r32, затемнение rgba(40,40,40,.64). ── */
html.dd-drawer-open{ overflow:hidden; }
.dd-drawer{ position:fixed; inset:0; width:100%; max-width:none; height:100%; max-height:none; margin:0; padding:16px; border:0; background:transparent; overflow:hidden; }
.dd-drawer::backdrop{ background:rgba(40,40,40,.64); animation:dd-fade-in var(--wp--custom--transition--normal) ease; }
.dd-drawer[open]{ display:flex; justify-content:flex-end; align-items:stretch; gap:8px; }
.dd-drawer__close{ flex:none; display:grid; place-items:center; width:64px; height:56px; padding:0; border:0; border-radius:var(--wp--custom--radius--xl); /* 8+48+8 × 4+48+4, как в макете */ background:var(--wp--preset--color--white); color:var(--wp--preset--color--black); cursor:pointer; transition:transform var(--wp--custom--transition--fast); }
.dd-drawer__close:hover{ background:var(--wp--preset--color--black-50); }
.dd-drawer__panel{ display:flex; flex-direction:column; width:450px; max-width:100%; padding:32px; overflow-y:auto; border-radius:var(--wp--custom--radius--xl); background:var(--wp--preset--color--white); color:var(--wp--preset--color--black); }
.dd-drawer[open] .dd-drawer__panel, .dd-drawer[open] .dd-drawer__close{ animation:dd-drawer-in var(--wp--custom--transition--normal) var(--wp--custom--transition--ease); }
.dd-drawer.is-closing .dd-drawer__panel, .dd-drawer.is-closing .dd-drawer__close{ transition:transform 200ms ease, opacity 200ms ease; transform:translateX(24px); opacity:0; }
@keyframes dd-drawer-in{ from{ transform:translateX(48px); opacity:0; } }
@keyframes dd-fade-in{ from{ opacity:0; } }
@media (max-width:760px){
	.dd-drawer{ padding:8px; }
	.dd-drawer[open]{ flex-direction:column-reverse; justify-content:flex-start; align-items:flex-end; }
	.dd-drawer__panel{ width:100%; flex:1; padding:24px; border-radius:var(--wp--custom--radius--lg); }
	.dd-drawer__close{ width:48px; height:48px; }
}

/* ── Версия для слабовидящих (кнопка в подвале). Действует только под .dd-a11y — обычный вид 1:1 не трогает. ── */
html.dd-a11y body{ zoom:1.2; }
html.dd-a11y{ --wp--preset--color--black-600:#3A3A3A; --wp--preset--color--black-300:#D0D0D0; --wp--preset--color--black-650:#C8C8CC; }
html.dd-a11y :where(a, button){ text-decoration-thickness:2px; }

/* Индикатор прокрутки ленты (мобильный макет): полоса 80×6 #F5F5F5, бегунок 20 с белой обводкой 2. */
.dd-progress{ display:none; }
@media (max-width:760px){
	.dd-progress{ position:relative; display:block; width:80px; height:6px; margin-inline:auto; border-radius:var(--wp--custom--radius--sm); background:var(--wp--preset--color--black-50); }
	.dd-progress::after{ content:""; position:absolute; left:0; top:0; width:20px; height:6px; box-sizing:border-box; border:2px solid var(--wp--preset--color--white); border-radius:var(--wp--custom--radius--sm); background:var(--wp--preset--color--black); transform:translateX(calc(var(--dd-progress, 0) * 60px)); transition:transform 80ms linear; }
}

/* Перенос, который есть только в мобильном макете (<br class="dd-mbr">): на десктопе — просто пробел. */
@media (min-width:761px){ .dd-mbr{ display:none; } }
@media (max-width:760px){ .dd-dbr{ display:none; } }

.dd-site-map{padding-top:64px;display:flex;flex-direction:column;gap:24px}.dd-site-map h2{font-size:24px;font-weight:500}.dd-site-map ul{padding-left:24px}.dd-site-map li+li{margin-top:12px}.dd-site-map a:hover{color:var(--wp--preset--color--orange)}
