/*
Theme Name: Пансионат Москва
Theme URI: https://new.mdpv.ru/
Description: Тема сайта ФГБУЗ «Пансионат Москва»: лёгкая, без конструкторов, с версией для слабовидящих и заявками в MAX. Контент страниц правится в обычном редакторе WordPress.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.2
Text Domain: pansionat-moskva
*/

:root {
	--navy: #233a5e;
	--navy-700: #182a45;
	--navy-50: #eef2f8;
	--terra: #b85a33;
	--terra-600: #9c4a29;
	--sand: #f6f1e9;
	--sage: #e3ebe4;
	--ink: #1d2733;
	--muted: #5a6472;
	--line: #e4ded3;
	--bg: #fffdf9;
	--radius: 16px;
	--shadow: 0 8px 28px rgba(24, 42, 69, .08);
	--container: 1160px;
	--font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-head: Georgia, "PT Serif", "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; font: 400 18px/1.65 var(--font); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--terra); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--navy-700); margin: 0 0 .6em; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }
.ico { width: 1.1em; height: 1.1em; flex: none; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: calc(var(--container) + 40px); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 200; background: #fff; padding: 8px 16px; }
.skip-link:focus { left: 8px; }
.hp { position: absolute !important; left: -9999px !important; }
[hidden] { display: none !important; }

/* ===== Кнопки ===== */
.btn, .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
	font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn--primary, .wp-block-button__link { background: var(--terra); color: #fff; }
.btn--primary:hover, .wp-block-button__link:hover { background: var(--terra-600); color: #fff; }
.btn--ghost, .is-style-outline .wp-block-button__link { background: transparent; color: var(--navy); border-color: currentColor; }
.btn--ghost:hover, .is-style-outline .wp-block-button__link:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--block { width: 100%; }
.btn .ico { width: 20px; height: 20px; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }

/* ===== Версия для слабовидящих: панель ===== */
.a11y-panel { background: #000; color: #fff; padding: 10px 0; font-size: 16px; }
.a11y-panel__inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.a11y-panel__group { display: inline-flex; gap: 6px; align-items: center; }
.a11y-panel button { min-width: 40px; min-height: 40px; border: 2px solid #fff; background: #000; color: #fff; font: 700 16px var(--font); cursor: pointer; border-radius: 6px; padding: 0 10px; }
.a11y-panel .sch-bw { background: #fff; color: #000; }
.a11y-panel .sch-blue { background: #9dd1ff; color: #063462; }
.a11y-panel__off { margin-left: auto; }

/* ===== Верхняя строка ===== */
.topbar { background: var(--navy-700); color: rgba(255,255,255,.85); font-size: 15px; }
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 40px; }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; }
.topbar__a11y { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff; font: 600 15px var(--font); cursor: pointer; padding: 6px 0; }
.topbar__a11y:hover { text-decoration: underline; }

/* ===== Шапка ===== */
.header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; background: rgba(255,253,249,.97); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy-700); flex: none; }
.brand__logo { width: 44px; height: 50px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text b { font: 700 1.2rem var(--font-head); }
.brand__text small { font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.brand--light, .brand--light:hover { color: #fff; }
.brand--light .brand__text small { color: rgba(255,255,255,.7); }

.nav { margin-left: auto; }
.nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav .menu > li { position: relative; }
.nav .menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; white-space: nowrap; }
.nav .menu a:hover, .nav .menu .current-menu-item > a, .nav .menu [aria-current="page"] { background: var(--navy-50); color: var(--navy); }
.nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); opacity: .6; }
.nav .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; }
.nav .menu > li:hover > .sub-menu, .nav .menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu a { font-weight: 500; white-space: normal; }
.nav__mobile-contacts { display: none; }
.sub-toggle { display: none; }
.header__contacts { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.header__phone { font: 700 1.25rem var(--font); color: var(--navy-700); text-decoration: none; white-space: nowrap; }
.header__callback { background: none; border: 0; padding: 0; color: var(--terra); font: 600 .9rem var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.header__call, .burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy); align-items: center; justify-content: center; cursor: pointer; flex: none; padding: 0; }
.header__call .ico, .burger .ico { width: 22px; height: 22px; }
.burger__open { display: inline-flex; }
.burger__close { display: none; }
.nav-open .burger__open { display: none; }
.nav-open .burger__close { display: inline-flex; }

@media (max-width: 1240px) {
	.header__contacts { display: none; }
	.header__call { display: inline-flex; margin-left: auto; }
}
@media (max-width: 1080px) {
	.burger { display: inline-flex; }
	.header__call { margin-left: auto; }
	.nav { position: fixed; inset: var(--header-h, 76px) 0 0 0; background: var(--bg); padding: 16px 20px 32px; overflow-y: auto; margin: 0; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; z-index: 60; }
	.nav-open { overflow: hidden; }
	.nav-open .nav { opacity: 1; visibility: visible; }
	.nav .menu { flex-direction: column; gap: 0; }
	.nav .menu > li { border-bottom: 1px solid var(--line); }
	.nav .menu a { font-size: 1.15rem; padding: 14px 4px; white-space: normal; }
	.nav .menu-item-has-children > a::after { display: none; }
	.nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 10px 12px; display: none; min-width: 0; }
	.nav .is-open > .sub-menu { display: block; }
	.nav .sub-toggle { display: grid; position: absolute; right: 0; top: 6px; width: 44px; height: 44px; border: 0; background: var(--navy-50); border-radius: 10px; color: var(--navy); cursor: pointer; place-items: center; }
	.nav .is-open > .sub-toggle .ico { transform: rotate(180deg); }
	.nav__mobile-contacts { display: grid; gap: 10px; margin-top: 24px; }
}
@media (max-width: 720px) {
	.topbar { display: none; }
	.header__inner { min-height: 64px; gap: 10px; }
	.brand__logo { width: 36px; height: 41px; }
	.brand__text b { font-size: 1.05rem; }
	.brand__text small { font-size: .66rem; }
}
@media (max-width: 360px) { .brand__text small { display: none; } }

/* ===== Заголовок страницы ===== */
.page-hero { background: var(--sand); border-bottom: 1px solid var(--line); padding: 40px 0 36px; }
.page-hero h1 { margin: 0; }
.page-hero__lead { margin: 14px 0 0; font-size: 1.15rem; color: var(--muted); max-width: 760px; }
.page-hero__meta { margin: 10px 0 0; color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* ===== Контент ===== */
.entry { padding-top: 40px; padding-bottom: 64px; }
.entry > :where(p, ul, ol, h2, h3, h4, .wp-block-details, blockquote) { max-width: 860px; }
.entry--narrow { max-width: 900px; }
.entry h2 { margin-top: 1.6em; }
.entry > h2:first-child, .entry > .wp-block-group:first-child h2:first-child { margin-top: 0; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .35em; }
.entry figure { margin: 0 0 24px; }
.entry .wp-block-image img { border-radius: var(--radius); }
.entry__cover img { border-radius: var(--radius); width: 100%; }
.wp-block-columns { display: flex; gap: 28px; margin-bottom: 28px; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
@media (max-width: 780px) { .wp-block-columns { flex-wrap: wrap; } .wp-block-column { flex-basis: 100% !important; } }
.wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.lead, .has-large-font-size { font-size: 1.2rem; color: var(--muted); }

/* Таблицы: на телефоне прокручиваются внутри себя */
.wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.wp-block-table table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.wp-block-table th, .wp-block-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.wp-block-table thead th { background: var(--navy); color: #fff; font-weight: 600; }
.wp-block-table tbody tr:nth-child(even) { background: #fbf8f3; }
/* Последняя колонка (цена) без переноса — только в таблицах из 3 колонок и больше; в двухколоночных текст переносится */
.wp-block-table table:has(td:nth-child(3)) td:last-child { white-space: nowrap; font-weight: 600; }
.wp-block-table.has-fixed-layout table, .wp-block-table table.has-fixed-layout { table-layout: auto; }
@media (max-width: 720px) { .wp-block-table table:has(th:nth-child(4)) { min-width: 600px; } .wp-block-table th, .wp-block-table td { padding: 10px; } }

/* Раскрывающиеся блоки */
.wp-block-details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 0 20px; }
.wp-block-details summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; color: var(--navy-700); }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; color: var(--terra); font-size: 1.4rem; line-height: 1; }
.wp-block-details[open] summary::after { content: "−"; }
.wp-block-details[open] { padding-bottom: 8px; }

/* Ссылки на документы */
.doc-link { display: inline-flex; gap: 10px; align-items: flex-start; text-decoration: none; }
.doc-link::before { content: attr(data-ext); flex: none; text-transform: uppercase; font: 700 .68rem/1 var(--font); color: #fff; background: var(--terra); border-radius: 5px; padding: 5px 6px; margin-top: 4px; }
.doc-link[data-ext^="xls"]::before { background: #2e7d4f; }
.doc-link[data-ext^="doc"]::before { background: #2b5797; }
.doc-link:hover { text-decoration: underline; }
.pm-docs { list-style: none; padding: 0 !important; margin: 0 0 24px; display: grid; gap: 4px; max-width: 900px; }
.pm-docs li { padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: 0; }

/* ===== Секции главной (группы блоков с классами) ===== */
.entry--front { padding: 0; }
.entry--front > * { margin-left: auto; margin-right: auto; }
.pm-section { padding: clamp(48px, 7vw, 88px) max(20px, calc((100% - var(--container)) / 2)); margin: 0; }
.pm-section--sand { background: var(--sand); }
.pm-section--sage { background: var(--sage); }
.pm-section--navy { background: var(--navy); color: #fff; }
.pm-section--navy h2, .pm-section--navy h3 { color: #fff; }
.pm-section--navy a:not(.wp-block-button__link) { color: #ffd9c7; }
.pm-section > h2 { max-width: 760px; }
.pm-section > .pm-sub { max-width: 760px; color: var(--muted); font-size: 1.12rem; margin-top: -.3em; margin-bottom: 32px; }
.pm-section--navy > .pm-sub { color: rgba(255,255,255,.8); }

.pm-hero { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(40px, 6vw, 72px); background: linear-gradient(180deg, var(--sand), var(--bg)); }
.pm-hero .wp-block-columns { align-items: center; gap: clamp(24px, 4vw, 56px); margin: 0; }
.pm-hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
.pm-hero .pm-hero__lead { font-size: 1.22rem; color: var(--muted); }
.pm-hero .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 24px; box-shadow: var(--shadow); }
.pm-hero__facts { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 24px 0 0; }
.pm-hero__facts li { position: relative; padding-left: 28px; margin: 0; font-weight: 600; color: var(--navy-700); }
.pm-hero__facts li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--sage); box-shadow: inset 0 0 0 4px var(--navy); }
@media (max-width: 560px) { .pm-hero__facts { grid-template-columns: minmax(0, 1fr); } }

.pm-notice { border: 1px solid #e9cdbf; background: #fdf3ee; border-radius: var(--radius); padding: 20px 24px; font-size: .98rem; }
.pm-notice h2, .pm-notice h3 { font-size: 1.1rem; margin-bottom: .4em; color: var(--terra-600); }
.pm-notice p:last-child { margin: 0; }

/* Карточки (колонки с классом pm-cards) */
.pm-cards { gap: 20px; }
.pm-cards > .wp-block-column { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pm-cards > .wp-block-column > :last-child { margin-bottom: 0; }
.pm-cards h3 { margin-bottom: .4em; }
.pm-cards p { color: var(--muted); font-size: 1rem; }
.pm-cards .wp-block-image { margin: -24px -24px 18px; }
.pm-cards .wp-block-image img { border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.pm-cards .wp-block-buttons { margin: auto 0 0; padding-top: 12px; }
.pm-section--navy .pm-cards > .wp-block-column { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); box-shadow: none; }
.pm-section--navy .pm-cards p { color: rgba(255,255,255,.78); }
.pm-price { font: 700 1.6rem var(--font-head); color: var(--terra) !important; margin: 0 0 6px !important; }
.pm-price small, .pm-price-note { font: 400 .9rem var(--font); color: var(--muted); }

.pm-features > .wp-block-column { text-align: left; }
.pm-features h3::before { content: ""; display: block; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px; background: var(--sage) center / 24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23233a5e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E"); }

.pm-services { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; max-width: none !important; }
.pm-services li { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 46px; position: relative; font-weight: 600; color: var(--navy-700); }
.pm-services li::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; background: var(--terra) center / 11px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
.pm-services a { text-decoration: none; color: inherit; }
.pm-services a:hover { color: var(--terra); }

.pm-quote { align-items: center; }
.pm-quote .wp-block-image img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 24px; width: 100%; max-width: 380px; }
.pm-quote blockquote, .pm-quote .wp-block-quote { margin: 0; border-left: 4px solid var(--terra); padding: 6px 0 6px 24px; font: italic 1.45rem/1.45 var(--font-head); color: var(--navy-700); }
.pm-quote cite { display: block; margin-top: 14px; font: 600 1rem var(--font); font-style: normal; color: var(--muted); }

.pm-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #e9eef0; }
.pm-map iframe { display: block; width: 100%; height: 420px; border: 0; }
.pm-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.pm-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.pm-partners { align-items: center; }
.pm-partners .wp-block-column { text-align: center; }
.pm-partners img { max-height: 72px; width: auto !important; filter: grayscale(1); opacity: .8; transition: .2s; }
.pm-partners img:hover { filter: none; opacity: 1; }
.pm-partners p { font-size: .85rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 780px) { .pm-partners .wp-block-column { flex-basis: calc(50% - 14px) !important; } }

/* Новости (блок «Последние записи» и страница новостей) */
.wp-block-latest-posts.wp-block-latest-posts { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; max-width: none !important; }
.wp-block-latest-posts li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0; }
.wp-block-latest-posts__post-title { font: 700 1.15rem/1.3 var(--font-head); color: var(--navy-700); text-decoration: none; display: block; margin-bottom: 6px; }
.wp-block-latest-posts__post-date { font-size: .88rem; color: var(--muted); display: block; margin-bottom: 8px; }
.wp-block-latest-posts__post-excerpt { font-size: .98rem; color: var(--muted); margin: 0; }
.wp-block-latest-posts__featured-image img { border-radius: 10px; margin-bottom: 12px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.news-card__img img, .news-card__ph { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--sage); }
.news-card__body { padding: 20px 22px 24px; }
.news-card time { font-size: .88rem; color: var(--muted); }
.news-card h2 { font-size: 1.2rem; margin: 6px 0 8px; }
.news-card h2 a { text-decoration: none; color: var(--navy-700); }
.news-card p { color: var(--muted); font-size: .98rem; margin: 0; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.nav-links { display: flex; gap: 8px; margin-top: 32px; }
.nav-links .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.nav-links .current { background: var(--navy); color: #fff; }

/* ===== Формы ===== */
.pm-form { max-width: 560px; }
.pm-form__fields { display: grid; gap: 14px; }
.pm-form .field { margin: 0; display: grid; gap: 6px; }
.pm-form label { font-weight: 600; font-size: .95rem; }
.pm-form .opt { font-weight: 400; color: var(--muted); }
.pm-form input:not([type="checkbox"]), .pm-form select, .pm-form textarea { width: 100%; padding: 13px 14px; border: 2px solid var(--line); border-radius: 10px; font: 400 1rem var(--font); background: #fff; color: var(--ink); }
.pm-form input:focus, .pm-form select:focus, .pm-form textarea:focus { border-color: var(--navy); outline: none; }
.pm-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .88rem; color: var(--muted); }
.pm-form .consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); flex: none; }
.pm-form .is-invalid { border-color: var(--terra) !important; }
.pm-form__error { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fdf0ea; color: var(--terra-600); font-weight: 600; font-size: .95rem; }
.pm-form__ok { padding: 20px; border-radius: 12px; background: var(--sage); display: grid; gap: 6px; }
.pm-form.is-sending button[type="submit"] { opacity: .7; cursor: progress; }
.pm-section--navy .pm-form label, .pm-section--navy .pm-form .consent { color: rgba(255,255,255,.9); }
.pm-form-box { background: #fff; border-radius: 24px; padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); color: var(--ink); }
.pm-section--navy .pm-form-box label, .pm-section--navy .pm-form-box .consent { color: var(--ink); }

/* ===== Модальное окно ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(24,42,69,.55); }
.modal__box { position: relative; background: #fff; border-radius: 20px; padding: 32px 28px 28px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--shadow); }
.modal__box h2 { margin-bottom: .3em; font-size: 1.6rem; }
.modal__close { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--sand); color: var(--navy); cursor: pointer; display: grid; place-items: center; }

/* ===== Подвал ===== */
.footer { background: var(--navy-700); color: rgba(255,255,255,.78); padding: 56px 0 24px; font-size: .97rem; }
.footer a { color: #fff; }
.footer a:hover { color: #ffd9c7; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__title { font: 700 1rem var(--font); color: #fff; margin: 0 0 14px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__phone { font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.footer__legal { font-size: .85rem; margin-top: 16px; }
.footer__rating { margin-top: 16px; border: 0; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: .85rem; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: minmax(0, 1fr); } }

/* Нижняя панель на телефоне */
.mobile-bar { display: none; }
@media (max-width: 720px) {
	body { padding-bottom: 76px; }
	.mobile-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,253,249,.97); border-top: 1px solid var(--line); }
	.mobile-bar .btn { padding: 13px 10px; font-size: .95rem; }
	.nav-open .mobile-bar { display: none; }
}

/* ===== Версия для слабовидящих: режимы ===== */
html.a11y-size-2 { font-size: 125%; }
html.a11y-size-3 { font-size: 150%; }
html.a11y-size-2 body { font-size: 22px; }
html.a11y-size-3 body { font-size: 26px; }
html.a11y body { letter-spacing: .02em; }
html.a11y * { box-shadow: none !important; text-shadow: none !important; transition: none !important; }
html.a11y-scheme-bw body, html.a11y-scheme-bw body *:not(.a11y-panel):not(.a11y-panel *) { background: #fff !important; color: #000 !important; border-color: #000 !important; }
html.a11y-scheme-wb body, html.a11y-scheme-wb body *:not(.a11y-panel):not(.a11y-panel *) { background: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-scheme-blue body, html.a11y-scheme-blue body *:not(.a11y-panel):not(.a11y-panel *) { background: #9dd1ff !important; color: #063462 !important; border-color: #063462 !important; }
html.a11y a { text-decoration: underline !important; }
html.a11y .wp-block-button__link, html.a11y .btn { border: 2px solid currentColor !important; }
html.a11y-noimg img, html.a11y-noimg .wp-block-image, html.a11y-noimg .pm-map, html.a11y-noimg .footer__rating { display: none !important; }
html.a11y .brand__logo { display: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .header, .footer, .mobile-bar, .modal, .a11y-panel { display: none !important; } }

.pm-section--tight { padding-top: 8px; padding-bottom: 8px; }
.pm-hero + .pm-section--tight { margin-top: -24px; }
.wp-block-table table:has(th:nth-child(4)) :is(td, th):nth-child(n+3) { white-space: nowrap; }
.wp-block-table table:has(th:nth-child(4)) td:nth-child(4) { font-weight: 400; color: var(--muted); font-size: .88rem; }
.wp-block-table table:has(th:nth-child(4)) td:nth-child(3) { font-weight: 600; }

/* ===== Реквизиты ===== */
.pm-req-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 8px; margin: 0 0 24px; max-width: none !important; }
.pm-req-card h3 { margin: 0 0 12px; font-size: 1.15rem; color: var(--navy); }
.pm-req-cols { gap: 24px; margin-bottom: 0; }
.pm-req-cols > .wp-block-column { display: flex; }
.pm-req-cols .pm-req-card { flex: 1; }
.wp-block-table.pm-req { border: 0; border-radius: 0; background: none; overflow: visible; }
.wp-block-table.pm-req table { table-layout: fixed; }
.wp-block-table.pm-req td { padding: 10px 0; border-bottom: 1px solid var(--line); background: none !important; vertical-align: top; }
.wp-block-table.pm-req tr:last-child td { border-bottom: 0; }
.wp-block-table.pm-req td:first-child { width: 40%; padding-right: 16px; color: var(--muted); font-size: .92rem; }
.wp-block-table.pm-req td:last-child { white-space: normal; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pm-req-copy { cursor: copy; border-radius: 6px; transition: background .15s; }
.pm-req-copy:hover { background: var(--navy-50) !important; }
.pm-req-copy.is-copied::after { content: "  ✓ скопировано"; font-weight: 400; color: #2e7d4f; font-size: .85rem; }
@media (max-width: 560px) {
	.wp-block-table.pm-req tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
	.wp-block-table.pm-req tr:last-child { border-bottom: 0; }
	.wp-block-table.pm-req td { display: block; width: auto !important; padding: 2px 0; border: 0; }
}

/* ===== Новости ===== */
.pm-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 0 0 8px; }
.pm-news__card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
.pm-news__card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.pm-news__img { aspect-ratio: 16 / 10; background: var(--sage); overflow: hidden; }
.pm-news__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-news__ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--sage), var(--navy-50)); }
.pm-news__ph img { width: 64px; height: auto; object-fit: contain; opacity: .55; }
.pm-news__body { padding: 18px 22px 22px; display: grid; gap: 6px; }
.pm-news__body time { font-size: .88rem; color: var(--muted); }
.pm-news__body h3 { font-size: 1.15rem; margin: 0; color: var(--navy-700); }
.pm-news__body p { margin: 0; color: var(--muted); font-size: .97rem; }
.news-card__ph { display: grid !important; place-items: center; background: linear-gradient(135deg, var(--sage), var(--navy-50)) !important; }
.wp-block-table.pm-req table, .wp-block-table.pm-req td, .wp-block-table.pm-req th { border: 0 !important; }
.wp-block-table.pm-req tr { background: none !important; }
.wp-block-table.pm-req tr + tr td { border-top: 1px solid var(--line) !important; }
@media (max-width: 560px) { .wp-block-table.pm-req tr + tr td { border-top: 0 !important; } .wp-block-table.pm-req tr + tr { border-top: 1px solid var(--line); } }
