/* =====================================================================
   filteropt.ru — единые стили контента статей (/articles/)
   Подготовлено 09.10.2026, Алексей SEO (РеалПро)

   КУДА ВСТАВИТЬ
   В CSS шаблона master_default_copy (styles.css или template_styles.css
   шаблона), после существующих правил. После вставки — сбросить кэш.
   Все правила привязаны к контейнеру .b-news-detail__content
   (блок itemprop="articleBody" на детальной странице статьи), поэтому
   на остальные страницы сайта не влияют.

   ЧТО ПОКРЫВАЕТ (проверено на всех 58 статьях раздела)
   1. Базовая типографика: абзацы, заголовки H2–H4, списки, ссылки,
      выделение, разделитель, цитаты, изображения.
   2. Таблицы и обёртки таблиц (.table-wrap, .table-wrapper, .danger-table,
      div с overflow-x), прокрутка таблиц на телефоне.
   3. Обёртки, которые нейросеть ставила вокруг всей статьи
      (.article-card, .article, .content, .article-content,
      .article-container) — обнуляются, чтобы не было «карточки в карточке».
   4. Вводные блоки (.hero, .article-header), плашки (.info-note, .note,
      .info-block, .info-banner, .warning-note, .checklist, .case-block),
      контакты (.contact-row, .contact), блоки ссылок (.related-links,
      .useful-links), аккордеон (details/summary, .region-accordion).
   5. Карточки и сетки: .param-card, .two-columns/.col, .comparison-grid,
      .method-grid/.method-card, .problem-grid, .solution-grid,
      .map-block/.stats-mini.
   6. Метки и кнопки: .badge, .badge-danger, .badge-warning, .impact-badge,
      .good-badge, .btn, .btn-yellow, .button-link.
   7. Классы для изображений: .img-left, .img-right, .img-center,
      .img-caption, .image-gallery.

   ВАЖНО
   • Стили не перебивают атрибуты style="…" в самом HTML. Инлайн-стили
     из статей нужно убрать, иначе оформление будет разным.
   • Блоки <style> внутри статей нужно удалить: в них правила для body,
     *, h1, table, a — они действуют на всю страницу, а не только на статью.
   • H1 внутри текста статьи быть не должно (у страницы уже есть H1).
     Вводный абзац, который нейросеть оформила как <h1>, заменить на
     <p class="lead">. Ниже есть временное правило, чтобы такие H1
     выглядели как вводный абзац до правки.
   ===================================================================== */


/* ---------- 0. Палитра (как на страницах услуг сайта) ---------- */
.b-news-detail__content {
  --art-navy: #0b3b5f;        /* заголовки, акценты */
  --art-blue: #1e5a7a;        /* H2, ссылки при наведении */
  --art-link: #1a6fb5;        /* ссылки */
  --art-text: #2d3e50;        /* основной текст */
  --art-muted: #6c86a3;       /* подписи */
  --art-line: #e2e8f0;        /* линии и границы */
  --art-bg-soft: #f8fafc;     /* светлый фон блоков */
  --art-bg-info: #eef4ff;     /* информационная плашка */
  --art-bg-warn: #fff6e5;     /* предупреждение */
  --art-warn: #e67e22;
  --art-bg-danger: #fdecea;
  --art-danger: #c0392b;
  --art-bg-good: #e8f6ee;
  --art-good: #2e7d52;
  --art-yellow: #ffcd5c;      /* кнопки-акценты */
  --art-radius: 14px;
}


/* ---------- 1. Базовая типографика ---------- */
.b-news-detail__content {
  font-size: 17px;
  line-height: 1.65;
  color: var(--art-text);
  overflow-wrap: break-word;
}
.b-news-detail__content > :first-child { margin-top: 0; }

.b-news-detail__content p { margin: 0 0 16px; }

.b-news-detail__content .lead,
.b-news-detail__content h1 {              /* временно: H1 внутри статьи = вводный абзац */
  font-size: 19px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--art-navy);
  margin: 0 0 24px;
  padding: 16px 22px;
  background: var(--art-bg-info);
  border-left: 4px solid var(--art-navy);
  border-radius: 0 var(--art-radius) var(--art-radius) 0;
}
.b-news-detail__content h1 span { font-size: inherit !important; }

.b-news-detail__content h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--art-navy);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--art-line);
}
.b-news-detail__content h3 {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--art-blue);
  margin: 28px 0 12px;
}
.b-news-detail__content h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--art-navy);
  margin: 22px 0 10px;
}
.b-news-detail__content h2 br:first-child,
.b-news-detail__content h3 br:first-child { display: none; }   /* пустые переносы от удалённых значков */

.b-news-detail__content strong,
.b-news-detail__content b { font-weight: 700; color: #1e2a3e; }

.b-news-detail__content a {
  color: var(--art-link);
  text-decoration: underline;
  text-decoration-color: rgba(26, 111, 181, .35);
  text-underline-offset: 3px;
  transition: color .15s, text-decoration-color .15s;
}
.b-news-detail__content a:hover {
  color: var(--art-blue);
  text-decoration-color: currentColor;
}

.b-news-detail__content hr {
  border: 0;
  border-top: 1px solid var(--art-line);
  margin: 32px 0;
}

.b-news-detail__content blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  border-left: 4px solid var(--art-blue);
  background: var(--art-bg-soft);
  border-radius: 0 var(--art-radius) var(--art-radius) 0;
  font-style: italic;
}

/* Списки */
.b-news-detail__content ul,
.b-news-detail__content ol {
  margin: 0 0 20px;
  padding-left: 0;
}
.b-news-detail__content ul { list-style: none; }
.b-news-detail__content ul > li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
}
.b-news-detail__content ul > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--art-blue);
}
.b-news-detail__content ol {
  list-style: none;
  counter-reset: art-ol;
}
.b-news-detail__content ol > li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 10px;
  counter-increment: art-ol;
}
.b-news-detail__content ol > li::before {
  content: counter(art-ol);
  position: absolute;
  left: 0;
  top: .1em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--art-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
.b-news-detail__content li > ul,
.b-news-detail__content li > ol { margin: 8px 0 0; }


/* ---------- 2. Изображения ---------- */
.b-news-detail__content img {
  max-width: 100%;
  height: auto !important;              /* перебивает width/height из редактора */
  border-radius: 10px;
}
.b-news-detail__content figure { margin: 24px 0; }
.b-news-detail__content figcaption,
.b-news-detail__content .img-caption {
  font-size: 14px;
  color: var(--art-muted);
  text-align: center;
  margin-top: 8px;
}
.b-news-detail__content .img-center { display: block; margin: 24px auto; }
.b-news-detail__content .img-left,
.b-news-detail__content img[align="left"] { float: left; margin: 4px 24px 16px 0; max-width: 45%; }
.b-news-detail__content .img-right,
.b-news-detail__content img[align="right"] { float: right; margin: 4px 0 16px 24px; max-width: 45%; }
.b-news-detail__content .image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.b-news-detail__content::after { content: ""; display: table; clear: both; }


/* ---------- 3. Таблицы ---------- */
.b-news-detail__content .table-wrap,
.b-news-detail__content .table-wrapper,
.b-news-detail__content .danger-table,
.b-news-detail__content div[style*="overflow"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border: 1px solid var(--art-line);
  border-radius: var(--art-radius);
}
.b-news-detail__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.5;
  background: #fff;
}
.b-news-detail__content .table-wrap > table,
.b-news-detail__content .table-wrapper > table,
.b-news-detail__content .danger-table > table,
.b-news-detail__content div[style*="overflow"] > table { margin: 0; }
.b-news-detail__content th {
  background: var(--art-navy);
  color: #fff;
  font-weight: 600;
  text-align: left;
  vertical-align: bottom;
  padding: 12px 14px;
  border: 0;
}
.b-news-detail__content td {
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--art-line);
  vertical-align: top;
}
.b-news-detail__content tbody tr:nth-child(even) td { background: var(--art-bg-soft); }
.b-news-detail__content tbody tr:last-child td { border-bottom: 0; }
.b-news-detail__content table[border] { border: 0; }


/* ---------- 4. Обёртки статьи из нейросетевой вёрстки — обнулить ---------- */
.b-news-detail__content .article-card,
.b-news-detail__content .article,
.b-news-detail__content .content,
.b-news-detail__content .article-content,
.b-news-detail__content .article-container {
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

/* Вводный блок в начале статьи */
.b-news-detail__content .hero,
.b-news-detail__content .article-header {
  margin: 0 0 28px;
  padding: 24px 28px;
  border-radius: var(--art-radius);
  background: linear-gradient(120deg, var(--art-navy) 0%, var(--art-blue) 100%);
  color: #fff;
}
.b-news-detail__content .hero h2,
.b-news-detail__content .article-header h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  color: #fff;
}
.b-news-detail__content .hero p,
.b-news-detail__content .article-header p { margin: 0; color: rgba(255,255,255,.9); }
.b-news-detail__content .hero a,
.b-news-detail__content .article-header a { color: var(--art-yellow); }

/* Подпись «© filteropt.ru…» внутри статьи (лучше удалить из текста) */
.b-news-detail__content footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--art-line);
  font-size: 13px;
  color: var(--art-muted);
}


/* ---------- 5. Плашки ---------- */
.b-news-detail__content .info-note,
.b-news-detail__content .note,
.b-news-detail__content .info-block,
.b-news-detail__content .info-banner {
  margin: 24px 0;
  padding: 16px 22px;
  background: var(--art-bg-info);
  border-left: 4px solid var(--art-navy);
  border-radius: 0 var(--art-radius) var(--art-radius) 0;
  font-size: 16px;
  color: var(--art-text);
}
.b-news-detail__content .warning-note {
  margin: 24px 0;
  padding: 16px 22px;
  background: var(--art-bg-warn);
  border-left: 4px solid var(--art-warn);
  border-radius: 0 var(--art-radius) var(--art-radius) 0;
  font-size: 16px;
}
.b-news-detail__content .info-note > :last-child,
.b-news-detail__content .note > :last-child,
.b-news-detail__content .info-block > :last-child,
.b-news-detail__content .info-banner > :last-child,
.b-news-detail__content .warning-note > :last-child { margin-bottom: 0; }

.b-news-detail__content .checklist {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--art-bg-soft);
  border: 1px solid var(--art-line);
  border-radius: var(--art-radius);
}
.b-news-detail__content .checklist ul > li::before {      /* галочки вместо точек */
  content: "✓";
  width: auto;
  height: auto;
  top: 0;
  left: 2px;
  background: none;
  color: var(--art-good);
  font-weight: 700;
}
.b-news-detail__content .checklist ul { margin-bottom: 0; }

.b-news-detail__content .case-block {
  margin: 20px 0 28px;
  padding: 20px 24px;
  background: var(--art-bg-good);
  border-left: 4px solid var(--art-good);
  border-radius: 0 var(--art-radius) var(--art-radius) 0;
}
.b-news-detail__content .case-block > :last-child { margin-bottom: 0; }

/* Контакты внутри статьи */
.b-news-detail__content .contact-row,
.b-news-detail__content .contact {
  margin: 32px 0 8px;
  padding: 22px 26px;
  border-radius: var(--art-radius);
  background: linear-gradient(120deg, var(--art-navy) 0%, var(--art-blue) 100%);
  color: #fff;
}
.b-news-detail__content .contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.b-news-detail__content .contact-row p { margin: 0 0 10px; }
.b-news-detail__content .contact-row p:last-child { margin-bottom: 0; }
.b-news-detail__content .contact-row a,
.b-news-detail__content .contact a:not(.btn) { color: var(--art-yellow); }
.b-news-detail__content .contact-row strong,
.b-news-detail__content .contact strong { color: #fff; }

/* Блоки «Связанные статьи», «Полезные ссылки» */
.b-news-detail__content .related-links,
.b-news-detail__content .useful-links {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--art-bg-soft);
  border: 1px solid var(--art-line);
  border-radius: var(--art-radius);
}
.b-news-detail__content .related-links ul,
.b-news-detail__content .useful-links ul { margin: 10px 0 0; }

/* Аккордеон */
.b-news-detail__content details {
  margin: 0 0 10px;
  border: 1px solid var(--art-line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.b-news-detail__content summary {
  cursor: pointer;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--art-navy);
  background: var(--art-bg-soft);
  list-style: none;
}
.b-news-detail__content summary::-webkit-details-marker { display: none; }
.b-news-detail__content summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  font-weight: 700;
  color: var(--art-blue);
}
.b-news-detail__content details[open] > summary::before { content: "−"; }
.b-news-detail__content details > :not(summary) { padding: 0 16px; }
.b-news-detail__content details > p:last-child { padding-bottom: 12px; }
.b-news-detail__content .region-accordion { margin: 24px 0; }


/* ---------- 6. Карточки и сетки ---------- */
/* Общий вид карточки */
.b-news-detail__content .param-card,
.b-news-detail__content .col,
.b-news-detail__content .comp-card,
.b-news-detail__content .method-card,
.b-news-detail__content .problem-card,
.b-news-detail__content .solution-card {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--art-line);
  border-radius: var(--art-radius);
  box-shadow: 0 2px 8px rgba(11, 59, 95, .05);
}
.b-news-detail__content .col > :last-child,
.b-news-detail__content .comp-card > :last-child,
.b-news-detail__content .method-card > :last-child,
.b-news-detail__content .problem-card > :last-child,
.b-news-detail__content .solution-card > :last-child { margin-bottom: 0; }

/* Сетки */
.b-news-detail__content .two-columns,
.b-news-detail__content .comparison-grid,
.b-news-detail__content .method-grid,
.b-news-detail__content .problem-grid,
.b-news-detail__content .solution-grid {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}
.b-news-detail__content .two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.b-news-detail__content .comparison-grid,
.b-news-detail__content .method-grid,
.b-news-detail__content .problem-grid,
.b-news-detail__content .solution-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.b-news-detail__content .two-columns h3,
.b-news-detail__content .comparison-grid h3,
.b-news-detail__content .method-grid h3,
.b-news-detail__content .problem-grid h3 { margin: 8px 0 8px; font-size: 18px; }

/* Карточка показателя: название + норма + описание */
.b-news-detail__content .param-card { margin: 0 0 12px; }
.b-news-detail__content .param-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.b-news-detail__content .param-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--art-navy);
}
.b-news-detail__content .param-norm {
  padding: 3px 12px;
  border-radius: 20px;
  background: var(--art-bg-good);
  color: var(--art-good);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.b-news-detail__content .param-desc { margin: 0; font-size: 16px; }

/* Методы очистки (крупные карточки с заголовком H2 внутри) */
.b-news-detail__content .method-card { margin: 0 0 16px; }
.b-news-detail__content .method-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 12px;
}
.b-news-detail__content .method-header > br { display: none; }
.b-news-detail__content .method-header h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 22px;
}
.b-news-detail__content .method-section {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
}
.b-news-detail__content .method-specs {
  padding: 14px 16px;
  background: var(--art-bg-soft);
  border-radius: 10px;
  font-size: 15px;
}
.b-news-detail__content .method-desc > :last-child,
.b-news-detail__content .method-specs > :last-child { margin-bottom: 0; }
.b-news-detail__content .method-icon,
.b-news-detail__content .problem-icon { display: none; }   /* значки удалены, остались пустые блоки */

/* Решения: цветная полоса слева */
.b-news-detail__content .solution-card { border-left: 4px solid var(--art-blue); }

/* Карта анализов + цифры */
.b-news-detail__content .map-block {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin: 28px 0;
  padding: 24px 28px;
  border-radius: var(--art-radius);
  background: var(--art-bg-info);
}
.b-news-detail__content .map-block > div:first-child { flex: 2 1 280px; }
.b-news-detail__content .map-block h3 { margin-top: 0; }
.b-news-detail__content .stats-mini {
  flex: 1 1 200px;
  padding: 18px 20px;
  border-radius: var(--art-radius);
  background: var(--art-navy);
  color: #fff;
  text-align: center;
  line-height: 1.3;
}
.b-news-detail__content .stats-mini > div:first-child { display: none; }     /* пустой блок от удалённого значка */
.b-news-detail__content .stats-mini > div:nth-child(even) {                  /* цифры: 85%, 60%, 35% */
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 12px;
}
.b-news-detail__content .stats-mini > div:nth-child(2) { margin-top: 0; }

/* Заголовок блока «Реальный кейс» */
.b-news-detail__content .interactive-block { border-bottom-color: var(--art-good); }


/* ---------- 7. Метки ---------- */
.b-news-detail__content .badge,
.b-news-detail__content .impact-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--art-line);
  color: var(--art-blue);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
  vertical-align: middle;
}
.b-news-detail__content .impact-badge { background: var(--art-bg-warn); color: #9a5a00; }
.b-news-detail__content .good-badge { background: var(--art-bg-good); color: var(--art-good); }
.b-news-detail__content .badge-danger,
.b-news-detail__content .badge-warning {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.b-news-detail__content .badge-danger { background: var(--art-bg-danger); color: var(--art-danger); }
.b-news-detail__content .badge-warning { background: var(--art-bg-warn); color: #9a5a00; }


/* ---------- 8. Кнопки внутри статьи ---------- */
.b-news-detail__content .btn,
.b-news-detail__content .btn-yellow,
.b-news-detail__content .button-link {
  display: inline-block;
  padding: 12px 26px;
  border: 0;
  border-radius: 40px;
  background: var(--art-yellow);
  color: var(--art-navy);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  transition: background .15s, transform .15s;
}
.b-news-detail__content .btn:hover,
.b-news-detail__content .btn-yellow:hover,
.b-news-detail__content .button-link:hover {
  background: #ffe08c;
  color: var(--art-navy);
  transform: translateY(-1px);
}
.b-news-detail__content .button-link {        /* на светлом фоне — тёмная кнопка */
  background: var(--art-navy);
  color: #fff;
}
.b-news-detail__content .button-link:hover { background: var(--art-blue); color: #fff; }


/* ---------- 9. Телефоны и планшеты ---------- */
@media (max-width: 767px) {
  .b-news-detail__content { font-size: 16px; }
  .b-news-detail__content h2 { font-size: 22px; margin-top: 32px; }
  .b-news-detail__content h3 { font-size: 19px; }
  .b-news-detail__content .lead,
  .b-news-detail__content h1 { font-size: 17px; padding: 14px 16px; }

  .b-news-detail__content .two-columns,
  .b-news-detail__content .method-section { grid-template-columns: 1fr; }

  .b-news-detail__content .hero,
  .b-news-detail__content .article-header,
  .b-news-detail__content .contact-row,
  .b-news-detail__content .contact,
  .b-news-detail__content .map-block { padding: 18px; }
  .b-news-detail__content .contact { flex-direction: column; align-items: flex-start; }

  .b-news-detail__content .info-note,
  .b-news-detail__content .note,
  .b-news-detail__content .info-block,
  .b-news-detail__content .info-banner,
  .b-news-detail__content .warning-note,
  .b-news-detail__content .case-block { padding: 14px 16px; }

  .b-news-detail__content table { font-size: 14px; }
  .b-news-detail__content th,
  .b-news-detail__content td { padding: 9px 10px; }
  /* таблица без обёртки — прокрутка самой таблицы */
  .b-news-detail__content > table,
  .b-news-detail__content .article-card > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .b-news-detail__content .img-left,
  .b-news-detail__content .img-right,
  .b-news-detail__content img[align] { float: none; display: block; max-width: 100%; margin: 16px auto; }

  .b-news-detail__content .btn,
  .b-news-detail__content .btn-yellow,
  .b-news-detail__content .button-link { display: block; width: 100%; }
}
