/* ─────────────────────────────────────────────────────────────────────
   ПОТОК — редизайн страницы «Контакты»
   Источник дизайна: Claude Design handoff (см. memory/reference_design_bundle.md).
   Все правила скоупированы под `.cp-page`. Адаптив трёхступенчатый:
   • >=992px — две колонки (карта + каналы), форма двухколоночная;
   • 576–991px — одна колонка, address-card вылазит из карты в отдельный блок;
   • <576px — одна колонка, чипы topic и поля формы в столбец, часы по центру.
   ───────────────────────────────────────────────────────────────────── */

.cp-page {
  /* ── Палитра / токены ──────────────────────────────────────────── */
  --gold: #bba88c;
  --gold-dark: #8f7a5e;
  --graphite-nav: #2d323c;
  --graphite-text: #30323D;
  --graphite-top: #1f2129;

  --bg: #ffffff;
  --bg-soft: #f7f5f1;
  --bg-cool: #f8f9fa;
  --border: #e6e3dd;

  --text: #30323D;
  --text-muted: #6b6f78;
  --text-dim: #8a8e96;

  --shadow-card: 0 8px 24px rgba(45, 50, 60, 0.08);
  --shadow-card-hover: 0 14px 32px rgba(143, 122, 94, 0.18);

  --r-card: 16px;
  --r-input: 12px;
  --r-pill: 999px;

  --cp-container: 1200px;
  --cp-gutter: 24px;

  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.cp-page *,
.cp-page *::before,
.cp-page *::after { box-sizing: border-box; }

.cp-page img,
.cp-page svg { display: block; max-width: 100%; }

.cp-page a { color: inherit; text-decoration: none; }

/* ── Контейнер и типографика ─────────────────────────────────────── */
.cp-container {
  max-width: var(--cp-container);
  margin: 0 auto;
  padding: 0 var(--cp-gutter);
}

.cp-page h1,
.cp-page h2,
.cp-page h3,
.cp-page h4 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.cp-page h1 { font-size: 44px; letter-spacing: -0.5px; }
.cp-page h2 { font-size: 32px; letter-spacing: -0.3px; }
.cp-page h3 { font-size: 20px; font-weight: 500; }
.cp-page h4 { font-size: 16px; font-weight: 500; }

.cp-page .accent {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  color: var(--gold);
  font-size: 1.1em;
  font-style: italic;
  /* Dancing Script italic у заглавных букв имеет широкий росчерк,
     который заходит на хвост соседней буквы — разводим небольшим
     лево-правым padding-ом. См. правку на /booking/. */
  display: inline-block;
  padding: 0 0.12em;
}

.cp-page .eyebrow {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cp-page p { margin: 0 0 1em; }
.cp-page p:last-child { margin-bottom: 0; }

/* ── Кнопки (повторяем токены из брендбука) ──────────────────────── */
.cp-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  transition: all .18s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  text-align: center;
}
.cp-page .btn:focus { box-shadow: none; }
.cp-page .btn-gold { background: var(--gold); color: #fff; }
.cp-page .btn-gold:hover {
  background: var(--gold-dark);
  box-shadow: 0 8px 18px rgba(143, 122, 94, 0.3);
  color: #fff;
}
.cp-page .btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold-dark);
}
.cp-page .btn-outline:hover { background: var(--gold); color: #fff; }
.cp-page .btn-lg { padding: 15px 28px; font-size: 15px; }

/* ── HERO ─────────────────────────────────────────────────────────── */
.cp-hero {
  /* Фон тот же, что и у основной части страницы (var(--bg)). Тонкая */
  /* нижняя граница оставлена, чтобы визуально отделить от секции с */
  /* картой. Заказчик просил снять «золотистый» фон. */
  background: var(--bg);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}
.cp-hero h1 { margin: 8px 0 16px; }
.cp-hero .lede {
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.6;
  margin: 0;
}

.cp-breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.cp-breadcrumb a {
  color: var(--gold-dark);
  border-bottom: 1px dashed transparent;
  transition: border-color .15s;
}
.cp-breadcrumb a:hover { border-bottom-color: currentColor; }
.cp-breadcrumb .sep { color: var(--border); }

/* ── Секции ──────────────────────────────────────────────────────── */
.cp-page .cp-section { padding: 56px 0; background: #fff; }
.cp-page .cp-section + .cp-section { padding-top: 0; }

/* ── КАРТА + АДРЕС ──────────────────────────────────────────────── */
.contacts-section { padding-top: 40px; }
.contacts-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
}

.map-wrap {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 520px;
  background: var(--bg-soft);
}
/* iframe Яндекс.Конструктора лезет в .map-wrap через JS, обёрнут в .map-frame */
.map-frame {
  position: absolute;
  inset: 0;
}
.map-frame > * { width: 100% !important; height: 100% !important; }
.map-frame iframe,
.map-frame > div {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.address-card {
  position: absolute;
  left: 20px; right: 20px; bottom: 20px;
  background: #fff;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex; gap: 18px; align-items: flex-start;
  z-index: 2;
}
.address-card .seal {
  width: 44px; height: 44px; border-radius: var(--r-pill);
  background: var(--gold);
  display: grid; place-items: center;
  color: #fff; flex: none;
}
.address-card .address-text { flex: 1; min-width: 0; }
.address-card h3 {
  margin: 0 0 4px;
  font-size: 17px; font-weight: 500;
}
.address-card .sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}
.address-card .route-links {
  margin-top: 12px;
  display: flex; gap: 16px;
  font-size: 13px;
  flex-wrap: wrap;
}
.address-card .route-links a {
  color: var(--gold-dark);
  border-bottom: 1px solid rgba(143, 122, 94, 0.3);
  padding-bottom: 1px;
  transition: color .15s;
}
.address-card .route-links a:hover { color: var(--gold); }

/* ── СПОСОБЫ СВЯЗИ + ЧАСЫ ──────────────────────────────────────── */
.contacts-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.channel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all .15s;
  text-decoration: none;
  color: var(--text);
}
.channel:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 18px rgba(143, 122, 94, 0.12);
  color: var(--text);
}
.channel .ic {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(187, 168, 140, 0.14);
  display: grid; place-items: center;
  color: var(--gold-dark);
  flex: none;
}
.channel .ic svg { width: 22px; height: 22px; }
.channel .cw {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.channel .ch-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.channel .ch-value {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}
.channel .ch-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.channel .arr {
  color: var(--text-dim);
  flex: none;
  transition: transform .15s, color .15s;
}
.channel:hover .arr { color: var(--gold-dark); transform: translateX(2px); }

.channel.primary {
  background: linear-gradient(135deg, #fdfaf3, #f7f1e3);
  border-color: rgba(187, 168, 140, 0.4);
}
.channel.primary .ic {
  background: var(--gold);
  color: #fff;
}

.hours-block {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px 24px;
}
.hours-block h4 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14.5px;
  color: var(--text);
  border-bottom: 1px dashed var(--border);
  gap: 12px;
}
.hours-row:last-child { border-bottom: 0; }
.hours-row .day { color: var(--text-muted); }
.hours-row .time { font-family: 'Roboto Mono', monospace; white-space: nowrap; }

/* ── ГАЛЕРЕЯ КЛИНИКИ ────────────────────────────────────────────── */
.gallery-section { background: var(--bg-soft); padding: 64px 0; }
.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.gallery-head h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  margin: 0;
}
.gallery-head .eyebrow { margin-bottom: 8px; }
.gallery-meta {
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 14px;
}
.gallery-tile {
  appearance: none;
  border: 0;
  padding: 0;
  background: var(--bg-soft);
  border-radius: var(--r-card);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  transition: transform .2s ease, box-shadow .2s;
  font-family: inherit;
}
.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-tile:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-card-hover);
}
.gallery-tile.feature { grid-row: span 2; }
.gallery-tile .tile-num {
  position: absolute;
  top: 14px; left: 14px;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(45, 50, 60, 0.45);
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.gallery-tile .tile-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px 12px;
  color: #fff;
  font-size: 13.5px;
  text-align: left;
  background: linear-gradient(to top, rgba(45, 50, 60, 0.72), transparent);
  pointer-events: none;
}

/* ── ФОРМА ────────────────────────────────────────────────────────── */
.form-section { background: #fff; padding: 64px 0; }
.form-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.form-side h2 {
  font-size: clamp(26px, 2.8vw, 34px);
  margin: 0 0 14px;
  line-height: 1.15;
}
.form-side .eyebrow { margin-bottom: 12px; }
.form-side p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 22px;
  max-width: 420px;
}
.form-side .promise-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.form-side .promise-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}
.form-side .promise-list svg {
  width: 16px; height: 16px;
  color: var(--gold);
  margin-top: 2px;
  flex: none;
}

.cp-form {
  background: var(--bg-soft);
  border-radius: 18px;
  padding: 32px;
  border: 1px solid var(--border);
}

/* Honeypot — скрытое поле для антиспама. */
.cp-form .hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* «Eyebrow»-стиль ярлыка для топика — только для явного класса.        */
/* Раньше тут было `.cp-form label` — это ловило и обычные label-ы у    */
/* полей, и `.cp-check` с согласиями (текст уезжал в КАПС). Теперь      */
/* «eyebrow» применяется только к .cp-field-label, остальные label-ы   */
/* стилизуются нормальным регистром через `.cp-field label:not(.cp-check)` */
/* ниже, а `.cp-check` сам по себе.                                    */
.cp-field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 500;
}
.cp-form .req { color: var(--gold-dark); }

.topic-choice {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 0 0 18px;
}
.topic-btn {
  appearance: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.topic-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.topic-btn.is-active {
  background: var(--graphite-nav);
  color: #fff;
  border-color: var(--graphite-nav);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cp-field { margin-bottom: 14px; }
.cp-field.cp-field-full { grid-column: 1 / -1; }

.cp-field label:not(.cp-check) {
  font-size: 13.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.cp-form input[type="text"],
.cp-form input[type="tel"],
.cp-form input[type="email"],
.cp-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  background: #fff;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.cp-form input:focus,
.cp-form textarea:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(187, 168, 140, 0.15);
}
.cp-form textarea {
  resize: vertical;
  min-height: 90px;
}

.field-time {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.time-pill {
  appearance: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.time-pill:hover { border-color: var(--gold); }
.time-pill.is-active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

.cp-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0 12px;
}
.cp-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  cursor: pointer;
  margin: 0;
  line-height: 1.45;
}
.cp-check input { margin-top: 2px; flex: none; accent-color: var(--gold-dark); }
.cp-check a { color: var(--gold-dark); border-bottom: 1px dashed currentColor; }
.cp-check a:hover { color: var(--gold); }

.cp-foot-meta {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 0 0 18px;
}
.cp-foot-meta a {
  color: var(--gold-dark);
  border-bottom: 1px dashed currentColor;
}

.cp-captcha { margin: 0 0 16px; }

.cp-foot { display: flex; justify-content: flex-end; }
.cp-foot .btn { min-width: 200px; }

/* ── КРИЗИС-БЛОК ─────────────────────────────────────────────────── */
.cp-crisis {
  background: var(--bg-soft);
  padding: 56px 0;
  position: relative;
  border-top: 1px solid var(--border);
}
.cp-crisis::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--gold);
}
.cp-crisis-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cp-crisis-text { flex: 1 1 320px; }
.cp-crisis-text h3 { font-size: 26px; margin: 4px 0 8px; font-weight: 700; }
.cp-crisis-text p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.55;
}
.cp-crisis-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── ЛАЙТБОКС ─────────────────────────────────────────────────────── */
.cp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(31, 33, 41, 0.94);
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.cp-lightbox.is-open { display: flex; }
.cp-lb-stage {
  max-width: 92vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cp-lb-stage img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  display: block;
}
.cp-lb-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Roboto', sans-serif;
}
.cp-lb-close,
.cp-lb-nav {
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s;
}
.cp-lb-close:hover,
.cp-lb-nav:hover { background: rgba(255, 255, 255, 0.18); }
.cp-lb-close { position: absolute; top: 20px; right: 20px; }
.cp-lb-prev  { position: absolute; left: 20px;  top: 50%; transform: translateY(-50%); }
.cp-lb-next  { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }

/* ── АДАПТИВ ──────────────────────────────────────────────────────── */

/* Планшет: одна колонка, address-card вылазит из карты под неё.    */
/* На дизайне map-wrap превращается в flex-column с фиксированной    */
/* высотой карты (320px) и address-card отдельным блоком ниже.       */
@media (max-width: 991px) {
  .cp-page h1 { font-size: 34px; }
  .cp-page h2 { font-size: 26px; }
  .cp-hero { padding: 48px 0 32px; }
  .cp-hero .lede { font-size: 15.5px; }

  .contacts-grid { grid-template-columns: 1fr; gap: 18px; }

  .map-wrap {
    border: 0;
    border-radius: 0;
    overflow: visible;
    min-height: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .map-frame {
    position: static;
    height: 320px;
    border-radius: var(--r-card);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-soft);
  }
  .address-card {
    position: static;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px 200px;
  }
  .gallery-tile.feature { grid-column: span 2; grid-row: span 1; }

  .form-layout { grid-template-columns: 1fr; gap: 28px; }
  .form-side p { max-width: none; }

  .cp-crisis-actions { width: 100%; }
  .cp-crisis-actions .btn { flex: 1 1 auto; }
}

/* Мобильный: 1 колонка во всём, address-card складывается, чипы    */
/* topic — в столбец, поля формы — в столбец, hours-row центрируется. */
@media (max-width: 576px) {
  .cp-page h1 { font-size: 28px; }
  .cp-hero { padding: 36px 0 24px; }

  .map-frame { height: 260px; }

  .address-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px;
  }
  .address-card .seal {
    width: 36px; height: 36px;
    align-self: flex-start;
  }

  .channel { padding: 18px 18px; gap: 14px; }
  .channel .ic { width: 42px; height: 42px; }
  .channel .ch-value { font-size: 16px; }

  .hours-block { padding: 18px; text-align: center; }
  .hours-block h4 { text-align: center; }
  .hours-row {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
    text-align: center;
  }

  .gallery-section { padding: 48px 0; }
  .gallery-head { margin-bottom: 20px; }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 200px);
  }
  .gallery-tile.feature { grid-column: auto; }

  .form-section { padding: 48px 0; }
  .cp-form { padding: 22px; border-radius: 14px; }
  .topic-choice { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .cp-foot { justify-content: stretch; }
  .cp-foot .btn { width: 100%; min-width: 0; }

  .cp-crisis { padding: 48px 0; }
  .cp-crisis-text h3 { font-size: 22px; }
  .cp-crisis-actions { flex-direction: column; }
  .cp-crisis-actions .btn { width: 100%; }

  .cp-lb-close,
  .cp-lb-nav { width: 40px; height: 40px; }
  .cp-lb-close { top: 12px; right: 12px; }
  .cp-lb-prev  { left: 8px; }
  .cp-lb-next  { right: 8px; }
  .cp-lb-caption { bottom: 12px; font-size: 13px; }
}
