/* МЦ «Кардиомед». Цвета — из логотипа и вывески. */
:root {
  --brand: #395694;
  --brand-deep: #2b4378;
  --red: #d71920;
  --red-deep: #b3141a;
  --ink: #1b2a50;
  --ink-soft: #46557a;
  --paper: #ffffff;
  --mist: #eef2f9;
  --line: #d3dbea;
  --warn-bg: #fff6e5;
  --warn-line: #e3a72f;
  --ok: #15803d;
  --serif: "Prata", Georgia, serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.2; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
h2, .h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin-bottom: 1.1rem; }
h3, .h3 { font: 600 1.15rem/1.35 var(--sans); margin-bottom: .4rem; }
p { margin: 0 0 .9rem; }
:focus-visible { outline: 3px solid #f2a33a; outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-soft); }
.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(46rem, 100% - 2rem); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: .75rem; z-index: 60; background: var(--ink); color: #fff; padding: .6rem .9rem; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .55rem 1.5rem; border-radius: 999px; border: 0; font: 600 1rem/1.2 var(--sans); text-decoration: none; text-align: center; cursor: pointer; transition: background-color .2s, color .2s; }
.btn--sm { min-height: 2.6rem; padding: .45rem 1.1rem; font-size: .95rem; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); color: #fff; }
.btn--line { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }

/* Плашки */
.notice { background: #fff1f1; border-bottom: 1px solid #f0b6b8; font-size: .95rem; padding: .6rem 0; }
.notice__dates { color: var(--ink-soft); }
.warn { background: var(--warn-bg); border-left: 4px solid var(--warn-line); padding: .8rem 1rem; border-radius: 0 8px 8px 0; }
.warn--strong { border-left-color: var(--red); background: #fff3f3; }
.note { font-size: .95rem; color: var(--ink-soft); margin-top: 1.5rem; }
.note--top { margin-top: 0; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 30; background: var(--brand); box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.top__row { display: flex; align-items: center; justify-content: space-between; min-height: 4.75rem; gap: 1rem; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: #fff; flex-shrink: 0; }
.logo img { width: 190px; height: auto; }
.logo small { font-size: .75rem; font-weight: 600; line-height: 1; }
.logo:hover { color: #fff; }
.nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .35rem 1.2rem; font-size: .95rem; font-weight: 500; }
.nav > a:not(.btn) { color: rgba(255,255,255,.88); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav > a:not(.btn):hover, .nav > a[aria-current="page"] { color: #fff; border-bottom-color: #fff; }
.menu-btn { display: none; }

/* Первый экран */
.hero { position: relative; padding: 3rem 0 0; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding-bottom: 5.5rem; }
.eyebrow { color: var(--brand); font-weight: 600; margin-bottom: 1rem; }
.hero h1 { max-width: 14ch; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 38em; }
.lead--sm { font-size: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 2rem; }
.facts { display: grid; grid-template-columns: repeat(2, auto); justify-content: start; gap: 2.2rem; margin: 0; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.facts dt { font-size: .875rem; color: var(--ink-soft); margin-bottom: .25rem; }
.facts dd { margin: 0; font-weight: 600; }
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1.25rem; }
.pulse { position: absolute; left: 0; bottom: .5rem; width: 100%; height: 5rem; }
.pulse path { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.4s cubic-bezier(.65,0,.35,1) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Заголовок внутренней страницы */
.page-head { background: var(--mist); padding: 2.5rem 0 2rem; }
.page-head h1 { margin-bottom: .6rem; }
.page-head .lead { margin-bottom: 0; }
.crumbs { font-size: .95rem; margin-bottom: .6rem; }
.dates { color: var(--ink-soft); font-size: .95rem; }

/* Секции */
.section { padding: 4.5rem 0; }
.section--tight { padding: 3rem 0 0; }
.section--flush { padding-top: 2rem; }
.section--tint { background: var(--mist); }
.head-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 1rem; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: start; }
.group-title { margin-top: 2.5rem; }
.group-title:first-child { margin-top: 0; }
.sub { font: 600 1.25rem/1.3 var(--sans); margin: 2.5rem 0 1rem; }
.rounded { border-radius: 1rem; }

/* Плитки на главной */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tiles a { display: flex; flex-direction: column; gap: .4rem; height: 100%; padding: 1.4rem; border: 1px solid var(--line); border-radius: 1rem; text-decoration: none; color: var(--ink); border-top: 4px solid var(--brand); }
.tiles a:hover { border-color: var(--brand); }
.tiles b { font-size: 1.1rem; }
.tiles span { color: var(--ink-soft); font-size: .95rem; }

/* Синяя полоса */
.band { background: var(--brand); color: #eef2fa; padding: 4.5rem 0; }
.band h2 { color: #fff; }
.band__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.band__quote { font: 400 clamp(1.25rem, 2.2vw, 1.6rem)/1.45 var(--serif); color: #fff; }
.band img { border-radius: 1rem; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.link-light { color: #fff; font-weight: 600; }
.link-light:hover { color: #fff; }

/* Карточки новостей и материалов */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.card a { display: flex; flex-direction: column; gap: .5rem; height: 100%; text-decoration: none; color: var(--ink); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .9rem; background: var(--mist); }
.card__meta { font-size: .875rem; color: var(--ink-soft); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.card__title { font-size: 1.1rem; line-height: 1.35; }
.card a:hover .card__title { color: var(--brand); text-decoration: underline; }
.card__text { color: var(--ink-soft); font-size: .95rem; }
.tag { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: var(--mist); color: var(--brand-deep); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.tag--announce { background: #fff1d6; color: #7a4b00; }
.tag--change { background: #ffe4e4; color: #8f1116; }

/* Услуги */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.svc { padding: 1.4rem; border: 1px solid var(--line); border-radius: 1rem; min-width: 0; }
.svc h3 { min-width: 0; hyphens: auto; overflow-wrap: anywhere; }
.svc__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; align-items: flex-start; }
.svc p { color: var(--ink-soft); }
.svc__cond { font-size: .95rem; margin: 0; }
.svc__cond b { color: var(--ink); }

/* Таблицы */
.table { width: 100%; border-collapse: collapse; font-size: .975rem; }
.table th, .table td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: .875rem; color: var(--ink-soft); font-weight: 600; }
.table--compact th, .table--compact td { padding: .35rem .5rem; }
.hours { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.aside { padding: 1.4rem; border: 1px solid var(--line); border-radius: 1rem; }
.phone { font: 400 1.35rem/1.2 var(--serif); color: var(--ink); text-decoration: none; }

/* Врачи */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-row { display: grid; grid-template-columns: 5.5rem 1.2fr 1fr; gap: 1.5rem; align-items: center; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.doc-row img, .doc-row .person__mono { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; object-position: center 25%; }
.doc-row h3 { margin-bottom: .2rem; }
.doc-row p { margin: 0; font-size: .95rem; }
.person__mono { display: grid; place-items: center; background: var(--mist); color: var(--brand); font: 400 1.6rem/1 var(--serif); border: 1px solid var(--line); }
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; }
.person img, .person .person__mono { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: .9rem; margin-bottom: .8rem; }
.person h3 { hyphens: auto; }
.person p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* О центре */
.prose-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.big { font: 400 1.25rem/1.5 var(--serif); margin-bottom: 2rem; }
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.values li { background: #fff; border-radius: 1rem; padding: 1.4rem; border-top: 4px solid var(--red); }
.values p { margin: 0; color: var(--ink-soft); }

/* Здоровье */
.program { background: #fff; border-radius: 1rem; padding: 1.5rem; margin-bottom: 1rem; }
.program__dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 2rem; margin: .8rem 0 0; }
.program__dl dt { font-size: .875rem; color: var(--ink-soft); }
.program__dl dd { margin: 0; }
.past { padding-left: 1.2rem; }
.state--moved { color: #7a4b00; }
.state--cancelled { color: var(--red-deep); }

/* Текст статьи */
.prose h2 { font: 600 1.35rem/1.3 var(--sans); margin: 2rem 0 .8rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .35rem; }
.prose img { margin-bottom: 1.5rem; }
.meta { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; display: grid; gap: .6rem; }
.meta dt { font-size: .875rem; color: var(--ink-soft); }
.meta dd { margin: 0; }

/* Документы, архив */
.docs, .archive { list-style: none; margin: 0; padding: 0; }
.docs li { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.archive li { padding: .5rem 0; border-bottom: 1px solid var(--line); }

/* Контакты */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; }
.box { border: 1px solid var(--line); border-radius: 1rem; padding: 1.4rem; }
.box p:last-child { margin-bottom: 0; }
.steps { padding-left: 1.3rem; }
.steps li { margin-bottom: .6rem; }

/* Форма */
.form { display: grid; gap: 1.4rem; margin-top: 1.5rem; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 600; margin-bottom: .35rem; padding: 0; }
.field__help { font-size: .9rem; color: var(--ink-soft); margin: 0 0 .45rem; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field textarea {
  width: 100%; font: inherit; color: var(--ink); padding: .7rem .85rem; border: 1.5px solid #8b97b3; border-radius: .6rem; background: #fff; }
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus { outline: 3px solid #f2a33a; outline-offset: 1px; border-color: var(--brand); }
.has-error input, .has-error textarea { border-color: var(--red); }
.field__error { color: var(--red-deep); font-weight: 600; font-size: .95rem; margin: .4rem 0 0; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.choice { display: inline-flex; gap: .5rem; align-items: center; font-weight: 400; cursor: pointer; }
.choice--block { display: flex; align-items: flex-start; }
.choice input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); flex-shrink: 0; margin-top: .2rem; }
.form-error { border: 2px solid var(--red); background: #fff3f3; border-radius: .6rem; padding: .8rem 1rem; color: var(--red-deep); font-weight: 600; }
.form-error p { margin: 0; }
.consent { background: var(--mist); border-radius: .8rem; padding: 1.2rem; }
.consent__text { font-size: .95rem; }
.consent__text p:last-child { margin-bottom: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.receipt { border: 2px solid var(--ok); border-radius: 1rem; padding: 1.4rem; margin-bottom: 1.5rem; }
.receipt p { margin: 0 0 .3rem; }
.receipt__num { font: 400 2rem/1.2 var(--serif); color: var(--ink); }

/* Подвал */
.foot { background: var(--brand-deep); color: #dbe3f2; font-size: .95rem; margin-top: 0; }
.foot a { color: #fff; }
.foot__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; padding: 3rem 0 1.5rem; }
.foot__grid p { margin: 0 0 .35rem; }
.foot__name, .foot__h { font-weight: 600; color: #fff; }
.foot__bottom { border-top: 1px solid rgba(255,255,255,.2); padding: 1.2rem 0 2rem; font-size: .875rem; }
.foot__bottom p { margin: 0 0 .3rem; }

/* Планшет */
@media (max-width: 64rem) {
  .js .menu-btn { display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0 1rem; border: 1.5px solid #fff; border-radius: 999px; background: none; font: 600 .95rem var(--sans); color: #fff; cursor: pointer; }
  .top__row { flex-wrap: wrap; }
  .js .nav { display: none; }
  .nav { width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: .25rem 0 1rem; }
  .js .nav.is-open { display: flex; }
  .nav > a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.2); font-size: 1.05rem; }
  .nav > a[aria-current="page"] { border-bottom-color: rgba(255,255,255,.2); text-decoration: underline; }
  .nav .btn { margin-top: 1rem; }
  .hero__grid, .band__grid, .split, .prose-grid, .hours { grid-template-columns: 1fr; gap: 2rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
/* Телефон */
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .section, .band { padding: 3rem 0; }
  .hero { padding-top: 2rem; }
  .hero__grid { padding-bottom: 4.5rem; }
  .lead { font-size: 1.075rem; }
  .actions .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: 1fr; gap: 1rem; }
  .tiles, .cards, .values, .services, .program__dl, .foot__grid { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .doc-row { grid-template-columns: 4rem 1fr; gap: .4rem 1rem; }
  .doc-row img, .doc-row .person__mono { width: 4rem; height: 4rem; font-size: 1.2rem; }
  .doc-row__slots { grid-column: 1 / -1; }
  .svc__head { flex-direction: column; gap: .3rem; }
  .table thead { display: none; }
  .table tr { display: block; border-bottom: 1px solid var(--line); padding: .4rem 0; }
  .table td, .table th { display: block; border: 0; padding: .15rem 0; }
  .logo img { width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse path { animation: none; stroke-dashoffset: 0; }
}
