/* =============================================================
   sanpin.css — страница норм качества воды
   ============================================================= */

.sp-main { background: #F4F1EA; padding-top: 40px; padding-bottom: 48px; }

/* ── Хиро ──────────────────────────────────────────────────── */
.sp-hero {
  background: var(--dark);
  color: #fff;
  padding: 24px 0 48px;
}
.sp-hero__label {
  display: inline-block;
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 14px;
}
.sp-hero__title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px;
}
.sp-hero__sub {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,.7);
  margin: 0;
}

/* ── Поиск ──────────────────────────────────────────────────── */
.sp-search {
  padding: 16px 0 0;
}
.sp-search__inner {
  position: relative;
}
.sp-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.sp-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 40px 12px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font-base);
  font-size: var(--fs-base);
  background: #fff;
  color: inherit;
  outline: none;
  transition: border-color var(--tr);
}
.sp-search__input:focus { border-color: var(--blue); }
.sp-search__input::placeholder { color: var(--muted); }
.sp-search__clear[hidden] { display: none; }
.sp-search__clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color var(--tr);
}
.sp-search__clear:hover { color: var(--dark); }

/* ── Контент ─────────────────────────────────────────────────── */
.sp-content { padding: 24px 0 48px; }

/* ── Группа ──────────────────────────────────────────────────── */
.sp-group { margin-bottom: 12px; }

.sp-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: 600;
  color: inherit;
  text-align: left;
  transition: background var(--tr), border-color var(--tr);
}
.sp-group__header:hover { border-color: #b5bcc8; }
.sp-group.is-open .sp-group__header {
  border-radius: var(--r-md) var(--r-md) 0 0;
  border-bottom-color: transparent;
}
.sp-group__count {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}
.sp-group__chevron {
  flex-shrink: 0;
  transition: transform var(--tr);
  color: var(--muted);
}
.sp-group.is-open .sp-group__chevron { transform: rotate(180deg); }

.sp-group__body {
  display: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: #fff;
}
.sp-group.is-open .sp-group__body { display: block; }

/* ── Таблица ─────────────────────────────────────────────────── */
.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
  min-width: 520px;
}
.sp-table thead th {
  padding: 10px 12px;
  background: #F4F1EA;
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
  text-align: right;
}
.sp-table thead th:first-child { text-align: left; }

.sp-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #edeae4;
  vertical-align: middle;
  text-align: right;
  white-space: nowrap;
}
.sp-table tbody tr:last-child td { border-bottom: none; }
.sp-table tbody td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--dark);
  width: 130px;
  max-width: 130px;
  white-space: normal;
}
.sp-table tbody td:nth-child(2) {
  color: var(--muted);
  font-size: var(--fs-xs);
}

/* прилипшая первая колонка */
.sp-table tbody td:first-child {
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 1;
}
.sp-table thead th:first-child { background: #F4F1EA; }
.sp-table tbody td:first-child { background: #fff; }
.sp-table tbody tr:nth-child(even) td:first-child { background: #faf9f6; }
.sp-table tbody tr:nth-child(even) td { background: #faf9f6; }

/* прочерк */
.sp-table .sp-dash { color: #c8cdd6; }

/* строки скрытые при поиске */
.sp-table tr.sp-hidden { display: none; }

/* ── Нет результатов ─────────────────────────────────────────── */
.sp-no-results {
  display: none;
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: var(--fs-sm);
}
.sp-no-results.is-visible { display: block; }

/* ── Вводный абзац ───────────────────────────────────────────── */
.sp-intro {
  margin: 0 0 0;
  font-size: var(--fs-base);
  color: var(--muted);
  line-height: 1.6;
  max-width: none;
}

/* ── Источники ──────────────────────────────────────────────── */
.sp-sources {
  padding: 0 0 40px;
}
.sp-sources__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin: 0 0 20px;
}
.sp-sources__block {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.sp-sources__block:last-child { border-bottom: 1px solid var(--border); }
.sp-sources__doc-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}
.sp-sources__doc-text {
  font-size: var(--fs-base);
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 10px;
}
.sp-sources__link {
  font-size: var(--fs-base);
  color: var(--blue);
  text-decoration: none;
}
.sp-sources__link:hover { text-decoration: underline; }


/* ── Адаптив ─────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .sp-hero { padding: 64px 0 56px; }
  .sp-table thead th { padding: 12px 16px; }
  .sp-table tbody td { padding: 12px 16px; }
}

/* ── Телефон: таблица нормативов без горизонтальной прокрутки ──
   min-width 520px не влезал в 360px. Ужимаем отступы и шрифт,
   первой колонке разрешаем перенос — матрица сравнения стран
   остаётся матрицей, но помещается целиком. */
@media (max-width: 639px) {
  .sp-table { min-width: 0; font-size: 12px; }
  .sp-table thead th { padding: 8px 3px; font-size: 9px; letter-spacing: .01em; }
  .sp-table tbody td { padding: 8px 3px; }
  .sp-table thead th:first-child,
  .sp-table tbody td:first-child {
    white-space: normal;
    padding-left: 6px;
    width: 33%;           /* уже колонка — больше места цифрам */
  }
  .sp-table tbody td:nth-child(2) { font-size: 10px; }
}
