/* Внутренние страницы: шапка страницы, колонка текста, боковая карточка, оформление блоков редактора */

.narrow{max-width:860px}

/* Шапка страницы */
.page-head{padding-block:clamp(24px,3vw,40px) clamp(28px,3.5vw,48px);background:var(--bg);border-bottom:1px solid var(--line)}
.page-head .wrap{display:flex;flex-direction:column;gap:14px}
.page-title{font-size:clamp(2rem,1.4rem + 2.2vw,3.1rem);max-width:22ch}
.crumbs ol{display:flex;flex-wrap:wrap;gap:4px 8px;margin:0;padding:0;list-style:none;font-size:.92rem;color:var(--muted)}
.crumbs li+li::before{content:"/";margin-right:8px;color:var(--line)}
.crumbs a{color:var(--muted)}
.crumbs a:hover{color:var(--brand-text)}

/* Текст + боковая карточка */
.page-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:clamp(32px,4vw,64px);align-items:start;padding-block:clamp(32px,4vw,56px)}
.page-aside{position:sticky;top:96px}
.aside-card{padding:24px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);display:flex;flex-direction:column;gap:12px}
.aside-card .btn{width:100%}
.aside-status{display:flex;align-items:center;gap:8px;color:var(--brand-text);font-weight:600;font-size:.95rem}
.aside-facts{display:flex;flex-direction:column;gap:10px;margin-top:6px;padding-top:16px;border-top:1px solid var(--line);font-size:.93rem;color:var(--muted)}
.aside-facts li{display:flex;align-items:center;gap:10px}
.aside-facts .i{color:var(--brand-text);width:22px;height:22px}
.aside-facts .mark-metro{width:22px;height:22px;font-size:.78rem;flex:none}
@media (max-width:1024px){
  .page-layout{grid-template-columns:1fr}
  .page-aside{position:static}
  .aside-card{max-width:560px}
}

/* Оформление содержимого страниц (блоки редактора WordPress) */
.prose{min-width:0;max-width:780px;overflow-wrap:anywhere;font-size:1.05rem;line-height:1.7;color:var(--ink)}
.prose>*+*{margin-top:1.1em}
.prose h2,.prose h3,.prose h4{letter-spacing:-.02em;line-height:1.2;margin-top:1.8em;margin-bottom:.4em;color:var(--ink)}
.prose h2{font-size:clamp(1.5rem,1.2rem + 1vw,1.95rem);font-weight:700}
.prose h3{font-size:1.3rem;font-weight:650}
.prose h4{font-size:1.1rem;font-weight:650}
.prose>h2:first-child,.prose>h3:first-child{margin-top:0}
.prose p{margin:0}
.prose a{color:var(--brand-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.prose a:hover{text-decoration-thickness:2px}
.prose strong,.prose b{font-weight:650}
.prose ul,.prose ol{padding-left:0;margin:0;list-style:none;display:flex;flex-direction:column;gap:.5em}
.prose ul>li{position:relative;padding-left:1.6em}
.prose ul>li::before{content:"";position:absolute;left:.35em;top:.68em;width:7px;height:7px;border-radius:50%;background:var(--brand)}
.prose ol{counter-reset:zv}
.prose ol>li{position:relative;padding-left:2.1em;counter-increment:zv}
.prose ol>li::before{content:counter(zv);position:absolute;left:0;top:.1em;width:1.5em;height:1.5em;border-radius:50%;background:var(--brand-soft);color:var(--brand-text);font-size:.85em;font-weight:700;display:grid;place-items:center}
.prose img{border-radius:var(--r-sm);height:auto}
.prose figure{margin:0}
.prose figcaption,.prose .wp-element-caption{font-size:.9rem;color:var(--muted);margin-top:.5em;text-align:center}
.prose .has-black-color{color:inherit!important}
.prose .has-text-align-center{text-align:center}
.prose .has-text-align-right{text-align:right}
.prose hr,.prose .wp-block-separator{border:0;border-top:1px solid var(--line);margin-block:2em;opacity:1}
.prose .wp-block-spacer{height:16px!important}
.prose blockquote,.prose .wp-block-quote{margin:1.6em 0;padding:20px 24px;border:0;border-radius:var(--r-sm);background:var(--brand-soft);color:var(--ink)}
.prose .wp-block-quote cite{display:block;margin-top:8px;font-size:.92rem;color:var(--muted);font-style:normal}
.prose .wp-block-columns{display:flex;flex-wrap:wrap;gap:24px;margin-block:1.4em}
.prose .wp-block-column{flex:1 1 240px;min-width:0}
.prose .wp-block-column>*+*{margin-top:.8em}
.prose .wp-block-image{margin-block:1.4em}
.prose .wp-block-image img{width:auto;max-width:100%}
.prose .wp-block-image.aligncenter,.prose .aligncenter{margin-inline:auto;text-align:center}
.prose .wp-block-image.aligncenter img{margin-inline:auto}
.prose .alignleft{float:left;margin:0 20px 12px 0;max-width:45%}
.prose .alignright{float:right;margin:0 0 12px 20px;max-width:45%}
.prose .wp-block-gallery{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px!important;margin-block:1.4em}
.prose .wp-block-gallery figure{width:auto!important;margin:0!important}
.prose .wp-block-gallery img{width:100%!important;height:100%!important;aspect-ratio:1;object-fit:cover}
.prose .wp-block-media-text{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:24px;align-items:center;margin-block:1.6em}
.prose .wp-block-media-text.has-media-on-the-right{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
.prose .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media{order:2}
.prose .wp-block-media-text__content{padding:0!important}
.prose .wp-block-media-text__content>*+*{margin-top:.8em}
.prose video{width:100%;border-radius:var(--r-sm)}
.prose iframe{max-width:100%;border:0;border-radius:var(--r-sm)}
.prose .wp-block-embed__wrapper iframe{width:100%;aspect-ratio:16/9;height:auto}
.prose .wp-block-group.has-background{padding:20px 24px;border-radius:var(--r-sm)}
.prose .wp-block-button__link{display:inline-flex;align-items:center;min-height:48px;padding:0 22px;border-radius:var(--pill);background:var(--cta);color:var(--on-brand);text-decoration:none;font-weight:600}
.prose::after{content:"";display:block;clear:both}
@media (max-width:640px){
  .prose{font-size:1rem}
  .prose .wp-block-media-text,.prose .wp-block-media-text.has-media-on-the-right{grid-template-columns:1fr}
  .prose .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media{order:0}
  .prose .alignleft,.prose .alignright{float:none;margin:0 0 12px;max-width:100%}
}

/* Таблицы (TablePress и обычные) */
.prose table{width:100%;border-collapse:separate;border-spacing:0;font-size:.97rem;margin-block:1.4em;border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden;background:var(--surface)}
.prose th,.prose td{padding:12px 16px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
.prose tr:last-child td{border-bottom:0}
.prose thead th{background:var(--brand-soft);color:var(--ink);font-weight:650}
.prose tr>td:last-child:nth-child(2){white-space:nowrap;text-align:right;font-weight:600}
.prose .tablepress tbody tr:hover td{background:color-mix(in srgb,var(--brand-soft) 45%,transparent)}
.prose .dataTables_wrapper .dataTables_filter,.prose .dataTables_wrapper .dataTables_length,.prose .dataTables_wrapper .dataTables_info,.prose .dataTables_wrapper .dataTables_paginate{display:none}
.prose tr>th:last-child:nth-child(2){white-space:nowrap}
@media (max-width:560px){
  .prose table{font-size:.92rem}
  .prose th,.prose td{padding:10px 12px}
}

/* Формы (Contact Form 7) */
.prose .wpcf7 form{display:flex;flex-direction:column;gap:14px;padding:24px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line)}
.prose .wpcf7 p{margin:0}
.prose .wpcf7 label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:.95rem}
.prose .wpcf7 input[type=text],.prose .wpcf7 input[type=email],.prose .wpcf7 input[type=tel],.prose .wpcf7 textarea{width:100%;border:1.5px solid var(--line);border-radius:var(--r-sm);background:var(--bg);color:var(--ink);font:inherit;padding:12px 14px;font-weight:400}
.prose .wpcf7 textarea{min-height:140px;resize:vertical}
.prose .wpcf7 input:focus,.prose .wpcf7 textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}
.prose .wpcf7 input[type=submit]{align-self:flex-start;min-height:52px;padding:0 26px;border:0;border-radius:var(--pill);background:var(--cta);color:var(--on-brand);font:inherit;font-weight:600;cursor:pointer}
.prose .wpcf7 input[type=submit]:hover{background:var(--cta-hover)}

/* Другие услуги */
.related{padding-top:0}
.related-box{padding:24px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line);display:flex;flex-direction:column;gap:16px}
.related-box .chip{background:var(--bg)}
.chip-current{background:var(--brand)!important;color:var(--on-brand);border-color:var(--brand)}

/* Блог */
.posts-grid{grid-template-columns:repeat(3,1fr)}
@media (max-width:860px){.posts-grid{display:grid;grid-auto-flow:row;grid-template-columns:1fr 1fr;overflow:visible;margin-inline:0;padding-inline:0}}
@media (max-width:560px){.posts-grid{grid-template-columns:1fr}}
.post-cover{margin:0 0 1.4em}
.post-cover img{width:100%;max-height:440px;object-fit:cover;border-radius:var(--r)}
.pager{margin-top:28px}
.pager .nav-links{display:flex;gap:8px;flex-wrap:wrap}
.pager .page-numbers{display:grid;place-items:center;min-width:44px;height:44px;padding:0 14px;border-radius:var(--pill);border:1.5px solid var(--line);background:var(--surface);font-weight:600}
.pager .page-numbers.current{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}

/* Поиск */
.search-page-form{margin-bottom:24px}
.search-list{display:flex;flex-direction:column;gap:10px}
.search-list a{display:flex;flex-direction:column;gap:6px;padding:18px 20px;border-radius:var(--r-sm);background:var(--surface);border:1px solid var(--line)}
.search-list a:hover{border-color:var(--brand)}
.search-list .h3{font-size:1.1rem}

/* 404 */
.notfound .wrap{display:flex;flex-direction:column;gap:18px}

/* Врачи */
.team{display:grid;grid-template-columns:repeat(4,1fr);gap:28px 20px}
.team .doc-extra{font-size:.85rem;margin-top:-6px}
.team-cta{margin-top:clamp(40px,5vw,64px);padding:clamp(24px,3vw,36px);border-radius:var(--r);background:var(--brand-soft);display:flex;flex-direction:column;gap:12px}
@media (max-width:1024px){.team{grid-template-columns:repeat(3,1fr)}}
@media (max-width:760px){.team{grid-template-columns:1fr 1fr;gap:24px 14px}.team .h3{font-size:1.05rem}}

/* Старое оформление текста цветом (синий, зелёный) приводим к цветам сайта */
.prose span[style*="color"]{color:inherit!important}
.prose iframe[src*="rating-badge"]{width:150px;height:50px;border-radius:10px}

/* Прайс: поиск и разделы */
.pr-bar{position:sticky;top:72px;z-index:5;display:flex;flex-direction:column;gap:12px;padding:16px;margin-bottom:16px;border-radius:var(--r);background:color-mix(in srgb,var(--surface) 94%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid var(--line);box-shadow:var(--shadow)}
.pr-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.pr-chips::-webkit-scrollbar{display:none}
.pr-chips .chip{white-space:nowrap;background:var(--bg);cursor:pointer;font:inherit;font-size:.9rem}
.pr-count:empty{display:none}
.prose tr.pr-sec td{cursor:pointer;background:var(--brand-soft);font-size:1rem;position:relative;padding-right:44px}
.prose tr.pr-sec td:first-child::after{content:"";position:absolute;right:18px;top:50%;width:9px;height:9px;border-right:2px solid var(--brand-text);border-bottom:2px solid var(--brand-text);transform:translateY(-70%) rotate(45deg);transition:transform .25s var(--ease)}
.prose tr.pr-sec[aria-expanded="true"] td:first-child::after{transform:translateY(-30%) rotate(-135deg)}
.prose tr.pr-sec td strong{color:var(--brand-text)!important}
.prose tr.pr-sec td strong span{color:inherit!important}
.prose tr.pr-sec td{text-align:left!important;white-space:normal!important;font-weight:400}
.pr-n{display:inline-grid;place-items:center;min-width:28px;height:22px;padding:0 8px;margin-left:6px;border-radius:var(--pill);background:var(--surface);color:var(--muted);font-size:.8rem;font-weight:600;vertical-align:middle}
.prose tr.pr-sec:hover td,.prose tr.pr-sec:focus-visible td{background:color-mix(in srgb,var(--brand-soft) 70%,var(--brand) 10%)}
@media (max-width:1024px){.pr-bar{top:64px}}

/* Карта: загружается по нажатию */
.map-lazy{display:grid;place-items:center;background:linear-gradient(135deg,var(--brand-soft),var(--surface-2))}
.map-cover{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:24px}
.map-cover>.i{width:44px;height:44px;color:var(--brand-text)}
.map-cover p{color:var(--muted)}
.map-cover b{color:var(--ink)}
.map-lazy.loaded{display:block}

/* Письмо директору */
.letter{display:grid;grid-template-columns:.8fr 1.2fr;gap:clamp(32px,5vw,72px);align-items:start}
.letter-side{display:flex;flex-direction:column;gap:14px}
.letter-form{max-width:none}
@media (max-width:860px){.letter{grid-template-columns:1fr}}

/* Видео в статьях не выше экрана */
.prose video{max-height:70vh;width:auto;max-width:100%;display:block;margin-inline:auto;background:#111}

/* Широкие таблицы листаются вбок, а не растягивают страницу */
.table-scroll{overflow-x:auto;margin-block:1.4em;border-radius:var(--r-sm)}
.table-scroll>table{margin:0;min-width:100%}
.prose a img{max-width:100%}
.prose figure a{display:inline-block;max-width:100%}
@media (max-width:640px){
  .prose .wp-block-media-text{grid-template-columns:1fr!important}
  .prose .wp-block-media-text__media img{width:100%}
}
.prose .map-lazy{min-height:320px;border-radius:var(--r);border:1px solid var(--line);overflow:hidden}
.prose .map-lazy iframe{width:100%;min-height:400px;display:block}
/* Виджеты с фиксированной шириной (отзывы Яндекса и т. п.) не шире экрана */
.prose div[style*="width:"]{max-width:100%!important}
@media (max-width:640px){.prose .wp-block-column .wp-block-image img{max-height:380px;width:100%;object-fit:cover;object-position:50% 20%}}

/* Галочка согласия в форме */
.prose .wpcf7 .wpcf7-acceptance label{flex-direction:row;align-items:flex-start;gap:10px;font-weight:400;font-size:.93rem;color:var(--muted)}
.prose .wpcf7 .wpcf7-acceptance input{width:20px;height:20px;margin-top:2px;flex:none;accent-color:var(--brand)}
.prose .wpcf7 .wpcf7-list-item{margin:0}
.prose .wpcf7 input[type=submit]:disabled{opacity:.5;cursor:not-allowed}

.page-layout-plain{grid-template-columns:minmax(0,820px)}

/* ===== О клинике ===== */
.about-intro{display:grid;grid-template-columns:1.05fr .95fr;gap:clamp(32px,5vw,72px);align-items:center}
.about-intro-text{display:flex;flex-direction:column;gap:32px}
.about-big{font-size:clamp(1.3rem,1rem + 1vw,1.75rem);line-height:1.35;letter-spacing:-.02em;font-weight:550;color:var(--ink)}
.about-intro .stats{grid-template-columns:1fr 1fr;gap:24px 20px}
.about-collage{display:grid;grid-template-columns:1.2fr 1fr;grid-template-rows:1fr 1fr;gap:12px;height:clamp(360px,40vw,520px)}
.about-collage figure{margin:0;border-radius:var(--r);overflow:hidden;background:var(--surface-2)}
.about-collage img{width:100%;height:100%;object-fit:cover}
.about-collage .c1{grid-row:span 2}
.equip-split{display:grid;grid-template-columns:1fr 1fr;gap:clamp(32px,5vw,72px);align-items:center}
.equip-photo{margin:0;border-radius:var(--r);overflow:hidden;aspect-ratio:4/3}
.equip-photo img{width:100%;height:100%;object-fit:cover}
.equip-text{display:flex;flex-direction:column;gap:18px}
.equip-text .chip{background:var(--bg)}
.faces{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:20px 24px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line);transition:border-color .2s,box-shadow .3s}
.faces:hover{border-color:var(--brand);box-shadow:var(--shadow)}
.faces-row{display:flex}
.faces-row img{width:64px;height:64px;border-radius:50%;object-fit:cover;object-position:50% 20%;border:3px solid var(--surface);margin-left:-14px;background:var(--surface-2)}
.faces-row img:first-child{margin-left:0}
.mission-note{font-size:1.05rem;opacity:.85;max-width:40ch}
.award{display:grid;grid-template-columns:.8fr 1.2fr;gap:clamp(32px,5vw,72px);align-items:center}
.award-img{margin:0;border-radius:var(--r);overflow:hidden;background:#111;aspect-ratio:1}
.award-img img{width:100%;height:100%;object-fit:cover}
.award-text{display:flex;flex-direction:column;gap:18px}
.docs-cards{display:grid;grid-template-columns:1fr 1.3fr;gap:16px;align-items:start}
.doc-card{padding:24px;border-radius:var(--r);background:var(--bg);border:1px solid var(--line);display:flex;flex-direction:column;gap:14px;max-width:none}
.doc-card.prose>*+*{margin-top:0}
.doc-card .table-scroll{margin:0}
.lic{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.lic a{display:block;border-radius:var(--r-sm);overflow:hidden;border:1px solid var(--line);background:var(--surface)}
.lic img{width:100%;height:auto;display:block;transition:transform .5s var(--ease)}
.lic a:hover img{transform:scale(1.03)}
@media (max-width:900px){
  .about-intro,.equip-split,.award,.docs-cards{grid-template-columns:1fr}
  .about-collage{height:360px}
  .award-img{max-width:420px}
}
@media (max-width:480px){.faces-row img{width:48px;height:48px;margin-left:-12px}}
.doc-card td{text-align:left!important;white-space:normal!important;font-weight:400!important}
.doc-card td:first-child{color:var(--muted);width:42%}

/* ===== Акции ===== */
.offers{display:flex;flex-direction:column;gap:20px}
.offer{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);border-radius:calc(var(--r) + 4px);overflow:hidden;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.offer:nth-child(even){grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}
.offer:nth-child(even) .offer-img{order:2}
.offer-img{margin:0;min-height:320px;max-height:460px;background:var(--surface-2)}
.offer-img img{width:100%;height:100%;object-fit:cover}
.offer-body{padding:clamp(24px,3.5vw,48px);display:flex;flex-direction:column;justify-content:center;gap:14px}
.offer-body .h3{font-size:clamp(1.35rem,1.1rem + .8vw,1.8rem);line-height:1.2}
.offer-body p{color:var(--muted)}
.offer-badge{align-self:flex-start;padding:6px 14px;border-radius:var(--pill);background:var(--brand-soft);color:var(--brand-text);font-weight:650;font-size:.95rem}
@media (max-width:860px){
  .offer,.offer:nth-child(even){grid-template-columns:1fr}
  .offer:nth-child(even) .offer-img{order:0}
  .offer-img{min-height:220px;max-height:300px}
}

/* ===== Документы и правила ===== */
.docs-layout .prose h2{font-size:1.35rem;scroll-margin-top:100px}
.toc ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;counter-reset:none}
.toc a{display:block;padding:8px 10px;border-radius:10px;color:var(--ink);font-size:.95rem;line-height:1.35}
.toc a:hover{background:var(--surface-2);color:var(--brand-text)}
.toc .link{padding:0;margin-top:8px}
@media (max-width:1024px){.docs-layout .page-aside{order:-1}}
.offer-img.is-portrait img{object-position:50% 80%}
.toc ol{padding-left:0!important}

/* Поиск над длинной таблицей цен */
.table-search{margin-top:1.4em}
.table-search+.table-scroll,.table-search+table{margin-top:12px}
.ts-count:empty{display:none}
.price-updated{font-size:.88rem;margin-top:12px!important;text-align:right}
.prose>.pr-bar:first-child{margin-top:0}
.pr-bar+.table-scroll{margin-top:0}

/* Прайс: столбец цены фиксированной ширины, чтобы «Цена» не прыгала при раскрытии разделов;
   заголовки разделов белые, а не голубые */
.page-slug-price .prose table{table-layout:fixed;width:100%}
.page-slug-price .prose th:last-child,.page-slug-price .prose td:last-child{width:140px;text-align:right}
.page-slug-price .prose tr.pr-sec td{width:auto;text-align:left!important}
.prose tr.pr-sec td{background:var(--surface)}
.prose tr.pr-sec[aria-expanded="true"] td{background:var(--brand-soft)}
.prose tr.pr-sec:hover td,.prose tr.pr-sec:focus-visible td{background:var(--surface-2)}
@media (max-width:560px){.page-slug-price .prose th:last-child,.page-slug-price .prose td:last-child{width:110px}}

/* Telegram и MAX рядом в плашке «Записаться на приём» */
.aside-msg{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.aside-msg .btn{padding:0 12px}
.aside-msg .msg-btn{font-size:0;gap:0;padding:0}

/* Раскрывающийся блок с фото (урны на странице кремации): свёрнут, раскрывает тот, кому интересно */
.prose details.urns summary{display:inline-flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;font-weight:600;color:var(--brand-text);list-style:none}
.prose details.urns summary::-webkit-details-marker{display:none}
.prose details.urns summary .i{transition:transform .3s var(--ease)}
.prose details.urns[open] summary .i{transform:rotate(180deg)}
.urn-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 16px;padding-top:12px}
@media (min-width:700px){.urn-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.urn-grid figure{margin:0}
.urn-grid img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:var(--r-sm)}
.urn-grid figcaption{margin-top:8px;font-size:.9rem;line-height:1.45;color:var(--muted)}
.urn-grid figcaption b{display:block;color:var(--ink);font-size:.98rem;font-weight:650}
