/* ==========================================================================
   СТАРЫЕ СТРАНИЦЫ — новый дизайн (22.11.2026)

   Подключается только в компоненте content-page: клиники, экскурсии, кафе,
   косметология, народная медицина, карта, отзывы, заболевания, контакты.
   Главная, визы Китая и Японии, отели — образец дизайна, их этот файл НЕ трогает.
   ========================================================================== */

/* ── 1. Токены ─────────────────────────────────────────────────────────── */

:root {
  --ink: #141a34;
  --ink-soft: #2c3450;
  --muted: #5a6478;
  --line: #e6e9f2;
  --brand: #161b61;
  --brand-2: #1d3ba8;
  --brand-3: #1d94cf;
  --accent: #e0642f;
  --accent-2: #f5a623;
  --surface: #ffffff;
  --surface-2: #f6f8ff;
  --g-brand: linear-gradient(135deg, #161b61 0%, #1d3ba8 55%, #1d94cf 100%);
  --g-brand-soft: linear-gradient(135deg, #eef2ff 0%, #eaf6ff 100%);
  --g-accent: linear-gradient(135deg, #e0642f 0%, #f5a623 100%);
  --sh-1: 0 1px 2px rgba(20, 26, 52, 0.06), 0 2px 8px rgba(20, 26, 52, 0.05);
  --sh-2: 0 4px 16px rgba(20, 26, 52, 0.08), 0 1px 3px rgba(20, 26, 52, 0.05);
  --sh-3: 0 12px 40px rgba(20, 26, 52, 0.14);
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;
  --wrap: 1180px;
}

/* ── 2. Карточка страницы ──────────────────────────────────────────────── */

.cp {
  max-width: var(--wrap);
  margin: 26px auto 40px;
  padding: 34px 40px 42px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-2);
}

.cp__crumbs {
  font-size: 13.5px;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 20px;
}

.cp__crumbs a { color: #12628b; font-weight: 500; }

.cp__title {
  font-family: Raleway, SBSans, system-ui, sans-serif;
  font-weight: bold;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--brand);
  margin: 0 0 16px;
}

.cp__body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  font-family: SBSans, 'SB-Sans', system-ui, sans-serif;
}

.cp__body h2 {
  font-family: Raleway, sans-serif;
  font-weight: bold;
  font-size: clamp(20px, 2.2vw, 27px);
  color: var(--brand);
  margin: 36px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.cp__body h2:first-child { border-top: 0; padding-top: 0; margin-top: 6px; }

.cp__body h3 {
  font-family: Raleway, sans-serif;
  font-size: 19px;
  color: var(--brand-2);
  margin: 24px 0 10px;
}

.cp__body p { margin: 0 0 14px; }

.cp__body a { color: #12628b; font-weight: 500; }
.cp__body a:hover { color: var(--brand-2); }

/* списки с акцентными маркерами */
.cp__body ul { margin: 0 0 16px; padding-left: 0; list-style: none; }
.cp__body ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
}
.cp__body ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--g-accent);
}

/* ── 3. Старое содержимое: убираем табличную вёрстку и серые шрифты ────── */

.cp__body table { border-collapse: separate; border-spacing: 0; width: 100%; }
.cp__body td, .cp__body th { border: 0; }
.cp__body font { font-family: inherit !important; font-size: inherit !important; }
.cp__body img { max-width: 100%; height: auto; border-radius: var(--r-sm); }
.cp__body center { text-align: left; }

/* ── 4. Таблицы с данными ──────────────────────────────────────────────── */

.cp__body table[border],
.cp__body table[width] { background: #fff; }

.cp-scroll {
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  margin: 0 0 18px;
}

/* ── 5. Аккордеоны ─────────────────────────────────────────────────────── */

.cp__body details {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 18px;
  margin: 0 0 12px;
  background: #fbfcff;
  box-shadow: var(--sh-1);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.cp__body details:hover { box-shadow: var(--sh-2); border-color: #d8dff0; }

.cp__body summary {
  cursor: pointer;
  font-family: Raleway, sans-serif;
  font-weight: 600;
  color: var(--brand);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.cp__body summary::-webkit-details-marker { display: none; }

.cp__body summary::after {
  content: '+';
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
}

.cp__body details[open] summary::after { content: '−'; }

.cp__body details p { margin: 12px 0 0; color: var(--muted); }

/* ── 6. Современные блоки: плашки, чипы, карточки-ссылки ───────────────── */

.cp-note {
  background: var(--g-brand-soft);
  border-left: 4px solid var(--brand-3);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 14px 16px;
  margin: 0 0 18px;
}

.cp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.cp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--brand);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cp-chip:hover { background: #eef3ff; border-color: #cfd9f2; }

.cp-chip { color: #14507a; }

.cp-chip.is-active {
  background: var(--g-brand);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* статистика в шапке раздела */
.cp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 0 0 26px;
}

.cp-stat {
  background: var(--g-brand-soft);
  border: 1px solid #e2e9ff;
  border-radius: var(--r-md);
  padding: 16px 18px;
}

.cp-stat__value {
  font-family: Raleway, sans-serif;
  font-weight: bold;
  font-size: 26px;
  color: var(--brand);
  line-height: 1.1;
}

.cp-stat__label { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* сетка карточек */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  margin: 0 0 26px;
}

.cp-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sh-1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
  border-color: #cfd9f2;
  color: inherit;
}

.cp-card__photo {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #eef2ff 0%, #e6f4ff 60%, #eef7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cp-card__photo img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  box-shadow: 0 8px 22px rgba(20, 26, 52, 0.16);
  background: #fff;
}

.cp-card__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(22, 27, 97, 0.86);
  color: #fff;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.cp-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.cp-card__name {
  font-family: Raleway, sans-serif;
  font-weight: bold;
  font-size: 18px;
  color: var(--brand);
  margin: 0;
}

.cp-card__desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.cp-card__more {
  font-size: 14px;
  font-weight: 600;
  color: #12628b;
  margin-top: 4px;
}

/* ── 7. CTA-панель ─────────────────────────────────────────────────────── */

.cp-cta {
  margin: 30px 0 0;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  background: var(--g-brand);
  color: #fff;
}

.cp-cta h2, .cp-cta h3 {
  color: #fff;
  margin: 0 0 8px;
  font-family: Raleway, sans-serif;
  border: 0;
  padding: 0;
}

.cp-cta p { color: #dfe8ff; margin: 0 0 14px; }

.cp-cta a.cp-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  background: var(--g-accent);
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(224, 100, 47, 0.3);
}

.cp-cta a.cp-cta__button:hover { color: #fff; transform: translateY(-1px); }

.cp-cta a { color: #cfe4ff; }

/* ── 8. Мобильные уточнения ────────────────────────────────────────────── */

@media (max-width: 900px) {
  .cp { margin: 16px 12px 28px; padding: 22px 18px 28px; border-radius: var(--r-md); }
  .cp__title { font-size: 24px; }
  .cp-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
}

@media (max-width: 600px) {
  .cp { margin: 10px 8px 22px; padding: 18px 14px 22px; }
  .cp__title { font-size: 22px; }
  .cp__body { font-size: 16px; }
  .cp__body h2 { font-size: 20px; margin-top: 26px; }
  .cp-grid { grid-template-columns: 1fr; }
  .cp-stats { grid-template-columns: 1fr 1fr; }
  .cp-cta { padding: 20px 18px; }
}

/* ── 9. Шапка-герой страницы клиники ───────────────────────────────────── */

.cp-hero {
  padding: 22px 24px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #f2f6ff 0%, #eefaff 60%, #f7f9ff 100%);
  border: 1px solid #e2eaff;
  margin: 0 0 26px;
}

.cp-hero__lead {
  font-size: 17px;
  color: #2c3450;
  margin: 12px 0 18px;
  max-width: 70ch;
}

.cp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cp-hero__actions .cp-cta__button { text-decoration: none; }

.cp-hero__actions .cp-chip { background: #fff; }

@media (max-width: 600px) {
  .cp-hero { padding: 16px 14px 18px; border-radius: var(--r-md); }
  .cp-hero__lead { font-size: 16px; }
  .cp-hero__actions .cp-cta__button { width: 100%; justify-content: center; }
}

/* ── 10. Карта города и списки объектов ────────────────────────────────── */

.map-figure {
  margin: 0 0 24px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  background: #f4f7ff;
}

.map-figure img { display: block; width: 100%; height: auto; border-radius: 0; }

.map-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px 22px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.map-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: #fbfcff;
  border: 1px solid var(--line);
  font-size: 15px;
  margin: 0;
  padding-left: 10px;
}

.map-list li::before { display: none; }

.map-num {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  font-family: Raleway, sans-serif;
}

.map-list a { text-decoration: none; color: #14507a; font-weight: 500; }
.map-list a:hover { color: var(--brand-3); text-decoration: underline; }

/* ── 11. Отзывы: не рисуем то, что вне экрана ──────────────────────────── */

.cp-reviews-list {
  content-visibility: auto;
  contain-intrinsic-size: 1200px;
}

.cp-reviews-list img {
  border-radius: var(--r-sm);
  max-width: 100%;
  height: auto;
}

.cp-reviews-list table {
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* кнопка-действие */
.cp-cta__button,
a.cp-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  background: var(--g-accent);
  color: #fff !important;
  font-family: Raleway, sans-serif;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(224, 100, 47, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cp-cta__button:hover,
a.cp-cta__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(224, 100, 47, 0.34);
  color: #fff !important;
}

/* CTA-панель: заголовок всегда белый */
.cp .cp-cta h2,
.cp .cp-cta h3,
.cp__body .cp-cta h2,
.cp__body .cp-cta h3 {
  color: #fff !important;
  border: 0;
  padding: 0;
}
