/* ==========================================================
   Внутренние страницы: политика, фотографии.
   Подключается после css/style.css
   ========================================================== */

/* Шапка внутренних страниц */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); background: linear-gradient(180deg, var(--ice), var(--mist)); }
.page-hero .blob--1 { right: -200px; top: -220px; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--step--1); color: var(--muted); margin-bottom: 20px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #9fbfd3; }
.crumbs a { color: var(--muted); }
.page-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 18px; max-width: 18ch; }
.page-hero p { color: var(--muted); font-size: var(--step-1); max-width: 62ch; margin: 0; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: var(--step--1); font-weight: 600; }
.pill .ico { width: 16px; height: 16px; color: var(--blue); }

/* Документ */
.doc-layout { display: grid; grid-template-columns: 260px 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; padding-block: clamp(40px, 6vw, 80px); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 4px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); font-size: var(--step--1); }
.toc p { font-weight: 800; margin: 0 0 8px; }
.toc a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; transition: .2s; }
.toc a:hover, .toc a.is-active { background: var(--ice); color: var(--blue-deep); }
.prose { max-width: 74ch; }
.prose section { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose section:last-child { border-bottom: 0; }
.prose h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); letter-spacing: -0.02em; margin-bottom: 20px; }
.prose h3 { font-weight: 800; font-size: var(--step-1); margin: 28px 0 10px; }
.prose p, .prose li { color: #2b4659; line-height: 1.7; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 6px; margin-bottom: 1em; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0 8px; font-size: var(--step--1); background: #fff; border-radius: var(--radius-s); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--ice); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius-m); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--yolk); margin: 20px 0; }
.callout .ico { color: var(--blue); flex: none; margin-top: 3px; }
.callout p { margin: 0; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Мини-подвал внутренних страниц */
.footer--mini { padding-top: 64px; }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}

@media (max-width: 1220px) { .nav--inline { display: none; } }

/* ==========================================================
   Внутренние страницы сайта: общие компоненты
   ========================================================== */
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.narrow { max-width: 920px; }
.page-hero__inner { position: relative; display: grid; gap: 32px; }
.page-hero--side .page-hero__inner { grid-template-columns: 1fr 340px; align-items: end; }
.page-hero h1 { max-width: 22ch; text-wrap: balance; }
.page-hero p a { font-weight: 700; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: 26px; box-shadow: var(--shadow-soft); display: grid; gap: 10px; }
.hero-card__label { margin: 0; color: var(--muted); font-size: var(--step--1); font-weight: 600; }
.hero-card__phone { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.hero-card__price { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--blue-deep); }
.hero-card .btn { justify-self: stretch; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow-soft); }
.panel .h3 { margin-bottom: 18px; }
.panel--warm { background: #fffaf0; border-color: #f6e3b5; }
.panel--warm .checks li::before { background-color: #fff3d6; }
.prose-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow-soft); }
.prose-block .h2 { margin-bottom: 16px; font-size: var(--step-2); }
.prose-block .h2:not(:first-child) { margin-top: 28px; }
.prose-block .h4 { margin: 24px 0 12px; }
.prose-block p { color: #2b4659; line-height: 1.7; max-width: 70ch; }

/* врачи */
.dgroup { margin-bottom: 40px; }
.dgroup > .h3 { margin-bottom: 16px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; margin-top: 20px; }
.dgroup .dgrid { margin-top: 0; }
.dcard { display: flex; flex-direction: column; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; box-shadow: var(--shadow-soft); transition: transform .35s var(--ease), box-shadow .35s; scroll-margin-top: calc(var(--header-h) + 24px); }
.dcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.dcard__top { display: flex; gap: 14px; align-items: center; }
.dcard__avatar { flex: none; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--ice), #bfe3f5); color: var(--blue-deep); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.dcard__avatar .ico { width: 28px; height: 28px; }
.dcard__name { margin: 0; font-size: var(--step-0); font-weight: 800; line-height: 1.3; }
.dcard__name a { color: var(--ink); text-decoration: none; }
.dcard__name a:hover { color: var(--blue-deep); text-decoration: underline; }
.dcard__spec { margin: 2px 0 0; color: var(--blue-deep); font-size: var(--step--1); font-weight: 600; }
.dcard__facts { list-style: none; display: grid; gap: 6px; font-size: var(--step--1); color: var(--muted); }
.dcard__facts li { display: flex; gap: 8px; align-items: flex-start; }
.dcard__facts .ico { width: 16px; height: 16px; color: var(--blue); margin-top: 3px; }
.dcard__price { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 14px; border-top: 1px dashed var(--line); margin-top: auto; }
.dcard__price dt { font-size: .78rem; color: var(--muted); }
.dcard__price dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.dcard .btn { align-self: flex-start; }

/* таблицы цен */
.ptable { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 0 0 1px var(--line), var(--shadow-soft); margin-top: 20px; }
.ptable th { text-align: left; background: var(--ice); padding: 12px 18px; font-size: var(--step--1); color: var(--muted); font-weight: 700; }
.ptable td { padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.ptable td:last-child, .ptable th:last-child { text-align: right; white-space: nowrap; font-weight: 800; }
.ptable--3 td:nth-child(2), .ptable--3 th:nth-child(2) { text-align: right; white-space: nowrap; font-weight: 800; }
.ptable tr:hover td { background: var(--mist); }
.price-group { margin-bottom: 36px; }
.price-group__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.price-group__head a { font-weight: 700; font-size: var(--step--1); white-space: nowrap; }
.price-group .ptable { margin-top: 12px; }

/* карточки-фичи */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; margin-top: 20px; }
.fcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; display: grid; gap: 8px; align-content: start; transition: transform .35s var(--ease), box-shadow .35s; }
.fcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.fcard__ico { width: 48px; height: 48px; border-radius: 14px; background: var(--ice); color: var(--blue); display: grid; place-items: center; margin-bottom: 4px; }
.fcard p { margin: 0; color: var(--muted); font-size: var(--step--1); line-height: 1.6; }
.fcard a { font-weight: 600; }

/* смотрите также */
.related { background: #fff; }
.related .h3 { margin-bottom: 18px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.rel { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--mist); text-decoration: none; color: var(--ink); transition: border-color .25s, transform .3s var(--ease), background-color .25s; }
.rel:hover { border-color: var(--blue); background: #fff; transform: translateY(-2px); color: var(--ink); }
.rel .ico { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: #fff; color: var(--blue); flex: none; }
.rel span { display: grid; font-size: var(--step--1); color: var(--muted); line-height: 1.35; min-width: 0; }
.rel strong { color: var(--ink); font-size: var(--step-0); }

/* статьи */
.acard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.acard { position: relative; display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: var(--radius-l); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .35s var(--ease), box-shadow .35s, border-color .25s; }
.acard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: var(--blue); color: var(--ink); }
.acard__ico { width: 52px; height: 52px; border-radius: 16px; background: var(--ice); color: var(--blue); display: grid; place-items: center; }
.acard .news-item__tag { justify-self: start; }
.acard p { margin: 0; color: var(--muted); font-size: var(--step--1); }
.page-hero--article h1 { font-size: var(--step-3); max-width: 26ch; margin-top: 14px; }
.article-body { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(22px, 4vw, 48px); box-shadow: var(--shadow-soft); max-width: 820px; }
.article-body h2 { font-size: var(--step-2); margin: 32px 0 12px; }
.article-body h2:first-child { margin-top: 0; }
.article-body ol, .article-body ul { padding-left: 22px; }

/* лицензии */
.lic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; margin-top: 20px; }
.lic-grid[hidden] { display: none; }
.lic { display: block; border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-soft); transition: transform .3s var(--ease); }
.lic:hover { transform: translateY(-4px); }
.lic img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.callout[hidden] { display: none; }
p.callout { align-items: flex-start; }

/* книга жалоб */
.form--light { box-shadow: var(--shadow-soft); border: 1px solid var(--line); }
.seg-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-radio label { position: relative; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-radio span { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: var(--step--1); transition: .2s; }
.seg-radio input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg-radio input:focus-visible + span { outline: 3px solid var(--yolk); outline-offset: 2px; }

/* карта сайта */
.smap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.smap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; }
.smap .h4 { margin-bottom: 12px; }
.smap ul { list-style: none; display: grid; gap: 8px; }
.smap a { color: var(--ink); text-decoration: none; font-weight: 600; }
.smap a:hover { color: var(--blue-deep); text-decoration: underline; }

/* 404 */
.page-hero--404 { text-align: left; padding-block: clamp(56px, 10vw, 120px); }
.e404 { font-family: var(--font-display); font-weight: 900; font-size: clamp(4rem, 3rem + 8vw, 9rem); line-height: 1; color: var(--blue); margin: 0 0 8px !important; }

.lor__more { color: #fff; font-weight: 700; text-align: center; font-size: var(--step--1); }
.lor__more:hover { color: var(--yolk); }

@media (max-width: 1024px) {
  .page-hero--side .page-hero__inner { grid-template-columns: 1fr; }
  .hero-card { max-width: 420px; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ptable td, .ptable th { padding: 12px 12px; font-size: var(--step--1); }
  .ptable td:last-child { white-space: normal; min-width: 92px; }
  .ptable--3 td:nth-child(2) { white-space: normal; }
  .price-group__head { flex-direction: column; gap: 4px; }
  .page-hero h1 { font-size: clamp(1.9rem, 1.4rem + 3vw, 2.6rem); }
}
.doc-layout > * { min-width: 0; }
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose td, .prose th { min-width: 120px; }
@media (max-width: 480px) { .page-hero__meta .btn { flex: 1 1 auto; } }
/* таблицы в тексте на телефоне — карточками */
@media (max-width: 600px) {
  .prose table, .prose thead, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose table { overflow: visible; background: none; box-shadow: none; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; margin-bottom: 10px; }
  .prose td, .prose th { border: 0; padding: 4px 0; min-width: 0; }
  .prose td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 700; color: var(--muted); }
}
.pill--link { text-decoration: none; color: var(--blue-deep); transition: border-color .2s, background-color .2s; }
.pill--link:hover { border-color: var(--blue); background: var(--ice); color: var(--blue-deep); }
.consent-doc h2 { font-size: var(--step-1); }
.ptable--cal td:last-child { text-align: left; white-space: normal; font-weight: 500; }
.ptable--cal td:first-child { white-space: nowrap; font-weight: 800; width: 150px; }
.vchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.vchip { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: var(--step--1); }
.panel p { color: #2b4659; line-height: 1.65; }
.video-box { margin-top: 20px; border-radius: var(--radius-l); overflow: hidden; background: var(--ink); box-shadow: var(--shadow-lift); }
.video-box video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--ink); }
[data-optional-video][hidden] { display: none; }
@media (max-width: 600px) { .ptable--cal td:first-child { width: auto; white-space: normal; } }

/* узкие экраны: сетки внутренних страниц не шире экрана */
@media (max-width: 1024px) {
  .page-hero--side .page-hero__inner, .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } }
.ptable { table-layout: auto; max-width: 100%; }
.ptable td, .ptable th { overflow-wrap: break-word; }
.hero-card__phone { white-space: normal; }

/* фотографии в статьях и на страницах, созданных в панели управления */
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius-m); box-shadow: var(--shadow-soft); }
.article-body figure { margin: 28px 0; }
.article-body figcaption { margin-top: 8px; color: var(--muted); font-size: var(--step--1); text-align: center; }
.article-body blockquote { margin: 24px 0; padding: 14px 20px; border-left: 4px solid var(--yolk); background: var(--mist); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.article-body blockquote > :last-child { margin-bottom: 0; }

/* размер и положение фото в статьях (задаются в панели управления) */
.article-body figure img { display: block; width: 100%; }
.article-body figure.img-small { max-width: 380px; margin-inline: auto; }
.article-body figure.img-left, .article-body figure.img-right { width: 46%; margin-top: 6px; margin-bottom: 16px; }
.article-body figure.img-left { float: left; margin-right: 28px; }
.article-body figure.img-right { float: right; margin-left: 28px; }
.article-body h2, .article-body h3, .article-body table, .article-body hr { clear: both; }
.article-body::after { content: ""; display: table; clear: both; }
.article-body s { opacity: .75; }
@media (max-width: 600px) {
  .article-body figure.img-left, .article-body figure.img-right { float: none; width: 100%; margin: 24px 0; }
}
