/* =====================================================
   hs-base.css — Химстрой: переменные, базовые стили
   ===================================================== */

:root {
  --hs-green-primary: #047148;
  --hs-green-light: #349C72;
  --hs-green-tint: #BFD0C5;
  
  --hs-graphite: #5A656D;
  --hs-steel: #889491;
  --hs-steel-light: #A9B5AE;
  
  --hs-bg-offwhite: #F1F0EB;
  --hs-bg-white: #FFFFFF;
  --hs-bg-dark: #2D3436;
  
  --hs-radius: var(--global-border-radius, 8px);
  --hs-border: var(--hs-steel-light);
  --hs-muted: var(--hs-steel);
  --hs-gap: 16px;
}

/* =====================================================
   ARCHIVE HERO — тёмный блок на всю ширину
   ===================================================== */

.hs-archive-hero {
  background: var(--hs-bg-dark);
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,.015) 0,
      rgba(255,255,255,.015) 1px,
      transparent 1px,
      transparent 6px
    );
  color: #fff;
  padding: 48px 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .hs-archive-hero {
    padding: 32px 20px;
    margin: -12px -12px 20px -12px;
  }
}

.hs-archive-hero__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hs-green-light);
  margin-bottom: 16px;
}

.hs-archive-hero__label::before,
.hs-archive-hero__label::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--hs-green-primary);
}

.hs-archive-hero__title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--hs-green-light);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.hs-archive-hero__title::first-line {
  color: #fff;
}

.hs-archive-hero__lead {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255,255,255,.55);
  margin: 0;
  max-width: 640px;
}

/* =====================================================
   BACK-НАВИГАЦИЯ (single)
   ===================================================== */

.hs-back-wrap {
  margin-bottom: 6px;
}

.hs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--hs-steel);
  text-decoration: none;
  transition: color 0.2s;
}

.hs-back:hover {
  color: var(--hs-green-primary);
}

/* =====================================================
   SECTION-LABEL (лейбл над заголовком)
   ===================================================== */

.hs-section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hs-green-primary);
  margin-bottom: 4px;
}

/* =====================================================
   CTA-БЛОК (тёмный)
   ===================================================== */

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

.hs-cta__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: var(--hs-bg-dark);
  color: #fff;
}

@media (max-width: 768px) {
  .hs-cta__box {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
  }
}

.hs-cta__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hs-green-tint);
  margin-bottom: 6px;
}

.hs-cta__title {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}

.hs-cta__title em {
  font-style: normal;
  color: var(--hs-green-light);
}

.hs-cta__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--hs-steel-light);
  margin: 0;
  max-width: 480px;
}

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

.hs-cta__box .hs-btn {
  background-color: var(--hs-green-primary);
  border-color: var(--hs-green-primary);
  color: #fff;
  white-space: nowrap;
}

.hs-cta__box .hs-btn:hover {
  background-color: var(--hs-green-light);
  border-color: var(--hs-green-light);
}

.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);
}

/* =====================================================
   ФИЛЬТРЫ
   ===================================================== */

.hs-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hs-gap);
  align-items: end;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .hs-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hs-filters { grid-template-columns: 1fr; }
}

.hs-filter-label {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  color: var(--hs-muted);
  margin: 0 0 6px;
}

.hs-filter-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 18px;
}

@media (max-width: 640px) {
  .hs-filter-actions {
    justify-content: flex-start;
    padding-top: 6px;
  }
}

.hs-filters select,
.hs-select {
  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);
}

.hs-filters select:focus,
.hs-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.28);
}

/* =====================================================
   НУМЕРОВАННАЯ СЕТКА КАРТОЧЕК
   ===================================================== */

.hs-numbered-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

@media (max-width: 1024px) {
  .hs-numbered-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hs-numbered-grid { grid-template-columns: 1fr; }
}

.hs-ncard {
  position: relative;
  padding: 24px;
  border: 1px solid var(--hs-steel-light);
  margin-top: -1px;
  margin-left: -1px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--hs-bg-white);
  transition: box-shadow 0.25s;
}

.hs-ncard:hover {
  z-index: 1;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,.1);
}

/* Номер в фоне */
.hs-ncard__num {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  color: rgba(0,0,0,.04);
  pointer-events: none;
  user-select: none;
}

/* Бейдж */
.hs-ncard__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-dark);
  border: 1px solid rgba(4,113,72,0.25);
  padding: 4px 10px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.hs-ncard__badge i {
  font-size: 10px;
}

/* Заголовок */
.hs-ncard__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
  text-transform: uppercase;
  color: var(--hs-bg-dark);
}

.hs-ncard__title a {
  color: inherit;
  text-decoration: none;
}

.hs-ncard__title a:hover {
  color: var(--hs-green-primary);
}

/* Excerpt */
.hs-ncard__excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: var(--hs-graphite);
  margin: 0 0 12px;
  flex-grow: 1;
}

/* Meta */
.hs-ncard__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.06);
  margin-bottom: 14px;
}

.hs-ncard__meta-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.4;
}

.hs-ncard__meta-key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--hs-green-primary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 85px;
}

.hs-ncard__meta-key i {
  font-size: 11px;
}

.hs-ncard__meta-val {
  color: var(--hs-graphite);
}

/* Link */
.hs-ncard__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hs-bg-dark);
  text-decoration: none;
  margin-top: auto;
  transition: color 0.2s;
}

.hs-ncard__link:hover {
  color: var(--hs-green-primary);
}

.hs-ncard__link i {
  font-size: 11px;
  transition: transform 0.2s;
}

.hs-ncard__link:hover i {
  transform: translateX(3px);
}

/* =====================================================
   ПАГИНАЦИЯ
   ===================================================== */

.hs-pagination {
  margin-top: 24px;
}
.hs-pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* =====================================================
   ТАБЛИЦА
   ===================================================== */

.hs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.hs-table th,
.hs-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--hs-steel-light);
}

.hs-table thead th {
  background: var(--hs-bg-offwhite);
  font-weight: 600;
  color: var(--hs-graphite);
  font-size: 13px;
  white-space: nowrap;
}

.hs-table tbody tr:hover {
  background: rgba(4, 113, 72, 0.03);
}

@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);
    border-radius: var(--hs-radius);
    padding: 8px;
  }
  .hs-table td { border: none; padding: 4px 8px; }
}
