/* =====================================================
   hs-components.css — Химстрой UI-компоненты
   ===================================================== */

/* ── Cards / grid (archive) ── */
.hs-grid          { display: grid; gap: var(--hs-gap); }
.hs-grid--3       { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .hs-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .hs-grid--3 { grid-template-columns: 1fr; } }

.hs-card {
  background: var(--hs-bg-white, #fff);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: var(--hs-radius, 8px);
  padding: 16px;
  box-shadow: 0 15px 15px -10px rgba(0,0,0,0.05);
}
.hs-card__title       { margin: 0 0 8px; font-size: 18px; line-height: 1.35; }
.hs-card__title a     { color: inherit; text-decoration: none; }
.hs-card__title a:hover { color: var(--hs-green-primary, #047148); }
.hs-card__excerpt     { margin: 0; color: var(--hs-graphite, #5A656D); }
.hs-card__meta        { margin: 10px 0 0; font-size: 13px; color: var(--hs-steel, #889491); display: flex; gap: 10px; flex-wrap: wrap; }
.hs-card__actions     { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.hs-card__link        { text-decoration: none; color: inherit; }
.hs-card__link:hover  { text-decoration: underline; }
.hs-card__footer      { margin-top: 14px; }

/* ── Inputs / selects ── */
.hs-filters select,
.hs-filters input[type="text"],
.hs-filters input[type="search"] {
  width: 100%; background: #fff;
  border: 1px solid rgba(0,0,0,.16);
  padding: 10px 12px; font-size: 14px; line-height: 1.2;
  color: var(--hs-graphite, #5A656D);
}
.hs-filters select:focus,
.hs-filters input:focus { outline: none; box-shadow: 0 0 0 2px rgba(0,0,0,.08); border-color: rgba(0,0,0,.28); }
.hs-filters input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }

/* ── Buttons ── */
.hs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 5px 20px;
  border: 1px solid var(--hs-green-primary, #047148);
  background: var(--hs-green-primary, #047148); color: #fff;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  font-size: inherit;
  transition: background-color .2s, box-shadow .2s;
}
.hs-btn:hover { background: var(--hs-green-light, #349C72); border-color: var(--hs-green-light, #349C72); color: #fff; box-shadow: 0 8px 20px -6px rgba(4,113,72,.25); }
.hs-btn:active { transform: translateY(1px); }

.hs-btn--ghost { background: transparent; color: var(--hs-green-primary, #047148); border: 1px solid var(--hs-green-primary, #047148); }
.hs-btn--ghost:hover { background: var(--hs-green-tint, #BFD0C5); color: var(--hs-green-primary, #047148); box-shadow: none; }

.hs-btn--sm { padding: 6px 14px; font-size: 13px; }

/* =====================================================
   SINGLE — обёртка, блоки, заголовки
   ===================================================== */

.hs-single    { display: grid; gap: 28px; }
.hs-block     { padding-top: 6px; }

.hs-h2 {
  margin: 0 0 12px;
  font-size: 20px; line-height: 1.35;
  color: var(--hs-bg-dark, #2D3436);
  border-bottom: 2px solid var(--hs-green-primary, #047148);
  padding-bottom: 8px;
}

/* ── Wysiwyg ── */
.hs-wysiwyg p       { margin-top: 0; }
.hs-wysiwyg ul,
.hs-wysiwyg ol      { padding-left: 1.5em; }
.hs-wysiwyg img     { max-width: 100%; height: auto; border-radius: var(--hs-radius, 8px); }

/* ── Back link ── */
.hs-back-wrap { margin-bottom: 4px; }
.hs-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--hs-steel, #889491); text-decoration: none;
  transition: color .2s;
}
.hs-back:hover { color: var(--hs-green-primary, #047148); }

/* ── Note ── */
.hs-note {
  display: inline-block; padding: 10px 14px;
  border-radius: var(--hs-radius, 8px);
  background: var(--hs-bg-offwhite, #F1F0EB);
  border: 1px solid var(--hs-steel-light, #A9B5AE);
  color: var(--hs-steel, #889491); font-size: 14px; line-height: 1.4;
}

/* =====================================================
   МЕТА-ПОЛОСКА (Объект + Сроки, Номер + Дата + …)
   ===================================================== */

.hs-meta-strip {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid var(--hs-steel-light, #A9B5AE);
  border-radius: var(--hs-radius, 8px);
  overflow: hidden;
  background: var(--hs-bg-white, #fff);
}

.hs-meta-strip__item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 20px;
  border-right: 1px solid var(--hs-steel-light, #A9B5AE);
  flex: 1 1 auto;
  min-width: 140px;
}
.hs-meta-strip__item:last-child { border-right: none; }

.hs-meta-strip__key {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--hs-green-primary, #047148);
}

.hs-meta-strip__val {
  font-size: 15px; font-weight: 500;
  color: var(--hs-bg-dark, #2D3436);
}

.hs-meta-strip__item--accent {
  background: #FFF8F0;
}
.hs-meta-strip__item--accent .hs-meta-strip__key { color: #B45309; }

@media (max-width: 640px) {
  .hs-meta-strip { flex-direction: column; }
  .hs-meta-strip__item { border-right: none; border-bottom: 1px solid var(--hs-steel-light, #A9B5AE); }
  .hs-meta-strip__item:last-child { border-bottom: none; }
}

/* =====================================================
   BLOCK WARNING (Где НЕ применять)
   ===================================================== */

.hs-block--warning {
  padding: 16px 20px;
  background: #FFF8F0;
  border: 1px solid #F0C8A0;
  border-radius: var(--hs-radius, 8px);
}
.hs-block--warning .hs-h2 { color: #B45309; border-bottom-color: #F0C8A0; }

/* =====================================================
   CHECK-LIST (Преимущества)
   ===================================================== */

.hs-check-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0;
}
.hs-check-list li {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 15px; line-height: 1.5;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.hs-check-list li:last-child { border-bottom: none; }
.hs-check-list li::before {
  content: '✓';
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0;
  font-size: 12px; font-weight: 700;
  color: #fff;
  background: var(--hs-green-primary, #047148);
  border-radius: 50%;
}

/* =====================================================
   LINK LIST (Документы, Решения, Продукты)
   ===================================================== */

.hs-link-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0;
}
.hs-link-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.hs-link-list li:last-child { border-bottom: none; }
.hs-link-list a {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--hs-green-primary, #047148);
  font-weight: 500; transition: color .2s;
}
.hs-link-list a:hover { color: var(--hs-green-light, #349C72); }
.hs-link-list a::before {
  content: '→';
  font-size: 12px; color: var(--hs-steel, #889491);
}

/* =====================================================
   ТАБЛИЦА (Ключевые свойства, Состав поставки)
   ===================================================== */

.hs-table-wrap { overflow-x: auto; }

.hs-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.hs-table th, .hs-table td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--hs-steel-light, #A9B5AE);
}
.hs-table thead th {
  background: var(--hs-bg-offwhite, #F1F0EB);
  font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--hs-graphite, #5A656D);
}
.hs-table tbody tr:hover { background: rgba(4,113,72,.03); }

/* Значение — зелёный акцент */
.hs-table--props td strong { color: var(--hs-green-primary, #047148); }

/* Бейджи в таблице */
.hs-table__badges { display: flex; gap: 6px; align-items: center; }

.hs-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; text-decoration: none;
  transition: transform .15s;
}
.hs-badge:hover { transform: scale(1.15); }

.hs-badge--ok  { background: var(--hs-green-tint, #BFD0C5); color: var(--hs-green-primary, #047148); }
.hs-badge--doc { background: var(--hs-bg-offwhite, #F1F0EB); color: var(--hs-graphite, #5A656D); }

@media (max-width: 768px) {
  .hs-table, .hs-table thead, .hs-table tbody,
  .hs-table th, .hs-table td, .hs-table tr { display: block; }
  .hs-table thead { display: none; }
  .hs-table tr { margin-bottom: 12px; border: 1px solid var(--hs-steel-light, #A9B5AE); border-radius: var(--hs-radius, 8px); padding: 8px; }
  .hs-table td { border: none; padding: 4px 8px; }
}

/* =====================================================
   SCHEME IMAGE (Решения — Схема/узел)
   ===================================================== */

.hs-scheme-img {
  border: 1px solid var(--hs-steel-light, #A9B5AE);
  border-radius: var(--hs-radius, 8px);
  overflow: hidden; background: var(--hs-bg-offwhite, #F1F0EB);
}
.hs-scheme-img img { display: block; width: 100%; height: auto; }

/* =====================================================
   RESULTS GRID (Кейсы — Измеримые результаты)
   ===================================================== */

.hs-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--hs-gap, 16px);
}
.hs-result-card {
  padding: 18px 16px; text-align: center;
  background: var(--hs-bg-offwhite, #F1F0EB);
  border-radius: var(--hs-radius, 8px);
  border: 1px solid rgba(0,0,0,.06);
}
.hs-result-card__value {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700; color: var(--hs-green-primary, #047148);
  line-height: 1.2; margin-bottom: 4px;
}
.hs-result-card__label { font-size: 13px; color: var(--hs-steel, #889491); }

/* =====================================================
   GALLERY (Кейсы — Фото)
   ===================================================== */

.hs-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.hs-gallery__item {
  display: block;
  border-radius: var(--hs-radius, 8px);
  overflow: hidden;
  border: 1px solid var(--hs-steel-light, #A9B5AE);
  transition: box-shadow .2s, transform .2s;
}
.hs-gallery__item:hover {
  box-shadow: 0 8px 20px -6px rgba(0,0,0,.15);
  transform: translateY(-2px);
}
.hs-gallery__item img { display: block; width: 100%; height: 180px; object-fit: cover; }

/* =====================================================
   DOC ACTIONS (Документы — скачивание)
   ===================================================== */

.hs-doc-actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.hs-doc-actions__size {
  font-size: 13px; color: var(--hs-steel, #889491);
}

/* =====================================================
   CTA BLOCK (тёмный, на всех single)
   ===================================================== */

.hs-cta { margin-top: 8px; }

.hs-cta__box {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 32px;
  background: var(--hs-bg-dark, #2D3436);
  color: #fff;
}
@media (max-width: 768px) {
  .hs-cta__box { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
}

.hs-cta__body { flex: 1; }
.hs-cta__title { font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.hs-cta__desc  { font-size: 14px; line-height: 1.5; color: var(--hs-steel-light, #A9B5AE); margin: 0; }

.hs-cta__actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

.hs-cta__box .hs-btn       { background: var(--hs-green-primary, #047148); border-color: var(--hs-green-primary, #047148); color: #fff; }
.hs-cta__box .hs-btn:hover { background: var(--hs-green-light, #349C72); border-color: var(--hs-green-light, #349C72); }
.hs-cta__box .hs-btn--ghost       { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.hs-cta__box .hs-btn--ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
