/* ============================================================
   А-Медия · компоненты прайса: приёмы врачей и анализы
   Токены берутся из нового дизайна, фолбэки — на случай
   вставки на страницу, где :root ещё не подключён.
   ============================================================ */

.amp {
  --amp-teal-900: var(--teal-900, #0D3B41);
  --amp-teal-800: var(--teal-800, #124A51);
  --amp-teal-500: var(--teal-500, #2E7B81);
  --amp-teal-100: var(--teal-100, #DCEAE8);
  --amp-teal-050: var(--teal-050, #EDF4F3);
  --amp-card: var(--card, #FFFFFF);
  --amp-line: var(--line, #E4E8E5);
  --amp-ink: var(--ink, #123A3F);
  --amp-ink-soft: var(--ink-soft, #54696B);
  --amp-flame: var(--flame, #D14E24);
  --amp-flame-dark: var(--flame-dark, #B4401B);
  --amp-flame-050: var(--flame-050, #FBEDE7);
  --amp-r-sm: var(--r-sm, 12px);
  --amp-r-md: var(--r-md, 18px);
  --amp-shadow-sm: var(--shadow-sm, 0 1px 2px rgba(13, 59, 65, .06));
  --amp-shadow-md: var(--shadow-md, 0 10px 30px -12px rgba(13, 59, 65, .18));
  --amp-font-d: var(--font-d, 'Nunito', system-ui, sans-serif);
  --amp-font-b: var(--font-b, 'Golos Text', system-ui, sans-serif);

  padding: 88px 0;
  font-family: var(--amp-font-b);
  color: var(--amp-ink);
  font-size: 16px;
  line-height: 1.6;
}

.amp *,
.amp *::before,
.amp *::after { box-sizing: border-box; }

.amp__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Шапка ─────────────────────────────────────────────── */

.amp__head { margin-bottom: 36px; }

.amp__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--amp-font-b);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--amp-teal-500); margin-bottom: 16px;
}

.amp__eyebrow .amp__ic { width: 14px; height: 14px; color: var(--amp-flame); }

.amp__title {
  margin: 0;
  font-family: var(--amp-font-d);
  font-size: clamp(28px, 4vw, 42px); font-weight: 800;
  line-height: 1.15; letter-spacing: -.01em;
  color: var(--amp-teal-900);
}

.amp__lead { margin: 14px 0 0; color: var(--amp-ink-soft); max-width: 620px; }

.amp__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-top: 28px;
}

.amp__search {
  position: relative; display: flex; align-items: center;
  flex: 1 1 380px; max-width: 480px;
}

.amp__ic--search {
  position: absolute; left: 16px; width: 18px; height: 18px;
  color: var(--amp-teal-500); pointer-events: none;
}

.amp__input {
  width: 100%; font: 500 15px/1 var(--amp-font-b); color: var(--amp-ink);
  background: var(--amp-card);
  border: 1.5px solid var(--amp-line); border-radius: 14px;
  padding: 15px 44px 15px 46px;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none; appearance: none;
}

.amp__input::placeholder { color: var(--amp-ink-soft); opacity: .8; }
.amp__input::-webkit-search-cancel-button { display: none; }
.amp__input:hover { border-color: var(--amp-teal-100); }

.amp__input:focus {
  outline: none; border-color: var(--amp-teal-500);
  box-shadow: 0 0 0 4px rgba(46, 123, 129, .12);
}

.amp__clear {
  position: absolute; right: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: var(--amp-teal-050); color: var(--amp-teal-800);
  cursor: pointer; padding: 0;
}

.amp__clear .amp__ic { width: 16px; height: 16px; }
.amp__clear:hover { background: var(--amp-teal-100); }

.amp__count { margin: 0; font-size: 14px; color: var(--amp-ink-soft); white-space: nowrap; }
.amp__count b { color: var(--amp-teal-800); font-weight: 700; }

/* ── Цена (общая) ──────────────────────────────────────── */

.amp-price {
  font-family: var(--amp-font-d);
  font-size: 21px; font-weight: 800; line-height: 1;
  color: var(--amp-teal-900); white-space: nowrap;
}

.amp-price--ask {
  font-family: var(--amp-font-b);
  font-size: 14px; font-weight: 500; color: var(--amp-ink-soft);
}

/* ── Вариант «Приёмы»: карточки ────────────────────────── */

.amp__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.amp-card {
  background: var(--amp-card);
  border: 1px solid var(--amp-line); border-radius: var(--amp-r-md);
  padding: 24px; display: flex; flex-direction: column; gap: 18px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.amp-card:hover {
  transform: translateY(-3px);
  border-color: var(--amp-teal-100);
  box-shadow: var(--amp-shadow-md);
}

.amp-card__body { flex: 1; }

.amp-card__name {
  margin: 0; font-family: var(--amp-font-d);
  font-size: 18px; font-weight: 700; line-height: 1.3;
  color: var(--amp-teal-900);
}

.amp-card__note { margin: 8px 0 0; font-size: 14px; color: var(--amp-ink-soft); }

.amp-card__side {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding-top: 16px; border-top: 1px dashed var(--amp-line);
}

.amp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 14px/1 var(--amp-font-b);
  color: var(--amp-flame); text-decoration: none;
  padding: 10px 14px; border-radius: var(--amp-r-sm);
  background: var(--amp-flame-050);
  transition: background .18s ease, color .18s ease;
}

.amp-btn .amp__ic--arr { width: 15px; height: 15px; transition: transform .18s ease; }
.amp-btn:hover { background: var(--amp-flame); color: #fff; }
.amp-btn:hover .amp__ic--arr { transform: translateX(3px); }

/* ── Вариант «Анализы»: строки с отбивкой ──────────────── */

.amp__rows {
  background: var(--amp-card);
  border: 1px solid var(--amp-line); border-radius: var(--amp-r-md);
  padding: 6px 10px; overflow: hidden;
}

.amp-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 14px; border-radius: var(--amp-r-sm);
  transition: background .16s ease;
}

.amp-row + .amp-row:not([hidden]) { box-shadow: inset 0 1px 0 var(--amp-line); }
.amp-row:hover { background: var(--amp-teal-050); box-shadow: none; }

.amp-row__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.amp-row__name { font-weight: 500; color: var(--amp-ink); }
.amp-row__note { font-size: 13px; color: var(--amp-ink-soft); }

/* Отбивка точками — как в бумажном прайсе */
.amp-row__dots {
  flex: 1; min-width: 24px; height: 1px; align-self: flex-end; margin-bottom: 7px;
  background-image: radial-gradient(circle, var(--amp-line) 1px, transparent 1px);
  background-size: 6px 2px; background-repeat: repeat-x;
}

.amp-row .amp-price { font-size: 18px; }

/* ── Показать ещё / пустые состояния / подвал ──────────── */

.amp__more-wrap { display: flex; justify-content: center; margin-top: 28px; }

.amp__more {
  font: 700 15px/1 var(--amp-font-b); color: var(--amp-teal-800);
  background: var(--amp-card); border: 1.5px solid var(--amp-line);
  border-radius: 14px; padding: 15px 26px; cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}

.amp__more:hover { border-color: var(--amp-teal-500); color: var(--amp-teal-500); }
.amp__more-num { color: var(--amp-ink-soft); font-weight: 500; }

.amp__nores,
.amp__blank {
  margin: 24px 0 0; padding: 28px 24px; text-align: center;
  background: var(--amp-teal-050); border-radius: var(--amp-r-md);
  color: var(--amp-ink-soft);
}

.amp__blank-title {
  margin: 0 0 6px; font-family: var(--amp-font-d);
  font-size: 18px; font-weight: 700; color: var(--amp-teal-900);
}

.amp__blank-text { margin: 0; }
.amp__tel { color: var(--amp-flame); text-decoration: none; font-weight: 600; white-space: nowrap; }
.amp__tel:hover { text-decoration: underline; }

.amp__foot {
  margin-top: 24px; display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}

.amp__note { margin: 0; font-size: 13px; color: var(--amp-ink-soft); max-width: 720px; }
.amp__stamp { margin: 0; font-size: 13px; color: var(--amp-ink-soft); opacity: .8; }

/* ── Доступность и адаптив ─────────────────────────────── */

.amp a:focus-visible,
.amp button:focus-visible,
.amp input:focus-visible {
  outline: 2px solid var(--amp-teal-500); outline-offset: 3px; border-radius: 6px;
}

@media (max-width: 1000px) {
  .amp__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .amp { padding: 56px 0; }
  .amp__inner { padding: 0 16px; }
  .amp__grid { grid-template-columns: 1fr; gap: 14px; }
  .amp__bar { flex-direction: column; align-items: stretch; }
  .amp__search { max-width: none; }
  .amp__count { text-align: right; }
  .amp__rows { padding: 4px 6px; }

  .amp-row { flex-wrap: wrap; gap: 6px 12px; padding: 14px 10px; }
  .amp-row__body { flex: 1 1 100%; }
  .amp-row__dots { display: none; }
  .amp-row .amp-price { margin-left: auto; }

  .amp-card { padding: 20px 18px; }
  .amp__foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .amp *, .amp *::before, .amp *::after {
    transition-duration: .01ms !important; animation-duration: .01ms !important;
  }
  .amp-card:hover { transform: none; }
}