/* Страница «Услуги и цены». Дополняет assets/dentro-home.css — там живёт вся
 * дизайн-система: шрифт, цвета, кнопки, шапка, подвал, контейнер .wrap.
 * Здесь только то, чего на главной нет: хлебные крошки, большой поиск, список
 * результатов, группы направлений и блок помощи.
 */

/* ── хлебные крошки ──────────────────────────────────────────────────────── */
.crumbs { padding: 16px 0 0; font-size: 14px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: '→'; color: #9db4c0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }

/* ── вступление ──────────────────────────────────────────────────────────── */
.intro { padding: 24px 0 8px; }
.intro__sub { margin-top: 12px; font-size: 19px; color: var(--muted); max-width: 640px; }
.intro__note { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* ── большой поиск ───────────────────────────────────────────────────────── */
.csearch { padding: 24px 0 8px; }
.csearch__box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 20px;
}
/* Видимый заголовок был отдельной строкой над полем — из-за него блок был
   заметно выше окружающих карточек (п.3 ТЗ, ~25-30% ниже). Смысл того же текста
   теперь несёт placeholder, а для скринридера подпись оставлена скрытой. */
.csearch__label {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.csearch__field { position: relative; display: flex; align-items: center; }
.csearch__icon { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.csearch__input {
  width: 100%; min-height: 52px; padding: 12px 16px 12px 46px;
  border: 1px solid var(--line); border-radius: 14px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
}
.csearch__input:focus { border-color: var(--blue-2); outline: none; box-shadow: 0 0 0 3px rgba(28, 130, 173, .15); }
.csearch__input::placeholder { color: #90a6b1; }
.csearch__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; }
.csearch__status { font-size: 14px; color: var(--muted); min-height: 20px; }
.csearch__clear[hidden] { display: none; }

/* ── результаты ──────────────────────────────────────────────────────────── */
.results { margin-top: 8px; display: grid; gap: 8px; }
.results[hidden] { display: none; }
.res {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px 24px;
  padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.res:hover, .res--active { border-color: var(--blue-2); box-shadow: var(--shadow); }
.res--active { outline: 2px solid var(--blue-2); outline-offset: 1px; }
.res__main { min-width: 0; }
.res__name { display: block; font-size: 17px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.res__dir { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); text-decoration: none; width: fit-content; }
a.res__dir:hover { color: var(--blue); text-decoration: underline; }
.res__price { font-size: 18px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.res__price--ask { font-size: 15px; font-weight: 500; color: var(--muted); }
.res__acts { display: flex; align-items: center; gap: 12px; }

.results__more { display: flex; justify-content: center; margin-top: 16px; }
.results__more[hidden] { display: none; }

.empty {
  margin-top: 16px; padding: 32px 24px; text-align: center;
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty[hidden] { display: none; }
.empty__text { font-size: 17px; color: var(--ink); max-width: 520px; margin: 0 auto; }
.empty__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ── группы направлений ──────────────────────────────────────────────────── */
.group { margin-top: 40px; }
.group:first-of-type { margin-top: 0; }
/* Тег сменён с h2 на h3 (правильная иерархия, п.21 ТЗ), но визуальный размер должен
   остаться прежним — тем, что раньше подставлял общий .dentro-home h2 (эта строка
   специфичнее общего правила по тегу, поэтому теперь не зависит от того, что за тег
   на самом деле: .dentro-home .group__title — два класса всегда весомее класса+тега). */
.dentro-home .group__title { font-size: 40px; letter-spacing: -.3px; margin-bottom: 20px; }
.dircards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dircard {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.dircard:hover, .dircard:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-hi); border-color: #c7dde8; }
.dircard__icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--bg-soft);
  color: var(--blue); display: flex; align-items: center; justify-content: center;
}
.dircard__icon svg { width: 24px; height: 24px; }
.dircard__title { font-size: 19px; font-weight: 700; }
.dircard__note { font-size: 15px; color: var(--muted); flex: 1 1 auto; }
.dircard__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; margin-top: 4px; min-height: 24px; }
.dircard__count { color: var(--muted); }
.dircard__price { font-weight: 700; color: var(--blue); }
.dircard__go {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px;
  margin-top: 8px; font-weight: 700; color: var(--blue);
}
.dircard__go::after { content: '→'; transition: transform .2s ease; }
.dircard:hover .dircard__go::after { transform: translateX(3px); }

/* ── блок помощи ─────────────────────────────────────────────────────────── */
.help {
  display: flex; align-items: center; justify-content: space-between; gap: 24px 32px;
  flex-wrap: wrap; padding: 32px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.help__title { font-size: 24px; font-weight: 700; }
.help__text { margin-top: 8px; color: var(--muted); max-width: 560px; }
.help__btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── адаптив ─────────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .dircards { grid-template-columns: repeat(2, 1fr); }
  .dentro-home .group__title { font-size: 36px; }
}
@media (max-width: 1024px) {
  .res { grid-template-columns: 1fr auto; }
  .res__acts { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .intro { padding: 16px 0 0; }
  .intro__sub { font-size: 17px; }
  .csearch { padding: 16px 0 0; }
  .csearch__box { padding: 16px; }
  .csearch__input { min-height: 54px; font-size: 17px; padding-left: 46px; }
  .csearch__icon { left: 14px; width: 20px; height: 20px; }
  .dircards { grid-template-columns: 1fr; }
  .group { margin-top: 32px; }
  .dentro-home .group__title { font-size: 28px; }
  .res { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
  .res__price { font-size: 19px; }
  .res__acts { justify-content: space-between; }
  .res__book { flex: 1 1 auto; }
  .help { padding: 20px; }
  .help__btns { width: 100%; }
  .help__btns .btn { flex: 1 1 auto; }
}
