/* Блог: оформление текста детальной записи (/blog/<slug>/). 23.11.2026
   Область действия — только .blog-article (обёртка articleBody в news.detail/new/template.php);
   /about/ и остальные страницы тот же класс .about_item-text не затрагивает. Шрифт и цвета не меняются. */
.blog-article { --ba-gap: 1em; }
.blog-article .about_item-text,
.blog-article .about_item-text > * { hyphens: none; -webkit-hyphens: none; overflow-wrap: normal; word-break: normal; }

/* абзацы и списки */
.blog-article .about_item > p,
.blog-article .about_item-text > p { margin: 0 0 var(--ba-gap); text-align: justify; text-justify: inter-word; }
.blog-article .about_item-text > :last-child,
.blog-article .about_item > :last-child { margin-bottom: 0; }

/* заголовки: отступ сверху больше, чем снизу; h2 заметно крупнее h3 */
.blog-article .about_item > h2, .blog-article .about_item-text > h2,
.blog-article .about_item > h3, .blog-article .about_item-text > h3 {
  text-align: left; hyphens: none; -webkit-hyphens: none;
}
.blog-article .about_item > h2, .blog-article .about_item-text > h2 {
  font-size: 30px; line-height: 1.25; font-weight: 500; margin: 1.9em 0 .6em;
}
.blog-article .about_item > h3, .blog-article .about_item-text > h3 {
  font-size: 22px; line-height: 1.35; font-weight: 500; margin: 1.7em 0 .5em;
}
.blog-article .about_item > h2 + h3, .blog-article .about_item-text > h2 + h3 { margin-top: 1em; }
.blog-article .about_item-text > :is(h2, h3):first-child,
.blog-article .about_item > :is(h2, h3):first-child { margin-top: 0; }

/* списки */
.blog-article .about_item ul, .blog-article .about_item ol { margin: 0 0 var(--ba-gap); padding: 0 0 0 1.6em; }
.blog-article .about_item ul { list-style: disc outside; }
.blog-article .about_item ol { list-style: decimal outside; }
.blog-article .about_item li { display: list-item; margin: 0 0 .4em; padding: 0; text-align: justify; }
.blog-article .about_item li::marker { color: inherit; }
.blog-article .about_item li > ul, .blog-article .about_item li > ol { margin: .4em 0 0; }

/* картинки в тексте */
.blog-article .about_item-text p img, .blog-article .about_item-text figure img { max-width: 100%; height: auto; }
.blog-article .about_item-text p:has(> img:only-child), .blog-article .about_item-text p:has(> a:only-child > img:only-child) { text-align: center; }
.blog-article .about_item-text figure { margin: 1.6em 0; text-align: center; }
.blog-article .about_item-text figcaption { font-size: 14px; line-height: 1.5; margin-top: .5em; }
.blog-article .about_item-text img { max-width: 100%; }
.blog-article .about_item-text > .gallery { margin: 1.6em 0; }

@media (max-width: 1023.98px) {
  .blog-article .about_item > h2, .blog-article .about_item-text > h2 { font-size: 28px; }
}
@media (max-width: 767.98px) {
  /* по решению владельца на телефоне тоже по ширине: переносы (hyphens:auto, lang=ru) уменьшают пропуски между словами */
  .blog-article .about_item > p, .blog-article .about_item-text > p, .blog-article .about_item li { text-align: justify; text-justify: inter-word; hyphens: none; -webkit-hyphens: none; overflow-wrap: normal; word-break: normal; }
  .blog-article .about_item > :is(h2, h3), .blog-article .about_item-text > :is(h2, h3) { text-wrap: balance; }
  .blog-article { --ba-gap: .9em; }
  .blog-article .about_item > h2, .blog-article .about_item-text > h2 { font-size: 24px; line-height: 1.3; margin: 1.9em 0 .55em; }
  .blog-article .about_item > h3, .blog-article .about_item-text > h3 { font-size: 19px; line-height: 1.35; margin: 1.5em 0 .45em; }
  .blog-article .about_item ul, .blog-article .about_item ol { padding-left: 1.3em; }
}

/* Крошки записи блога — как на страницах документов на проде (body.daf-legal main .breadcrumbs): отступ 28px от шапки,
   шрифт 12px, межбуквенный 0.02em, левый край — по колонке контента. Правило только для nav.blog-breadcrumbs.
   Селектор усилен: редизайн (inline-CSS) задаёт margin-top крошек записи блога по ширинам. */
html main > div[itemtype$="NewsArticle"] > nav.blog-breadcrumbs.blog-breadcrumbs[aria-label="Breadcrumb"] { margin: 24px 0 0; box-sizing: border-box; }
html main nav.blog-breadcrumbs .breadcrumbs, html main nav.blog-breadcrumbs .breadcrumbs * { font-size: 12px; letter-spacing: .02em; }
/* крошки по центру (просьба владельца 23.11); длинное название переносится, а не обрезается */
html main nav.blog-breadcrumbs .breadcrumbs { justify-content: center; flex-wrap: wrap; text-align: center; overflow: visible; padding-left: 0; padding-right: 0; }
html main nav.blog-breadcrumbs .breadcrumbs li, html main nav.blog-breadcrumbs .breadcrumbs li * { white-space: normal; text-align: center; }
@media (max-width: 767.98px) { html main > div[itemtype$="NewsArticle"] > nav.blog-breadcrumbs.blog-breadcrumbs[aria-label="Breadcrumb"] { margin-top: 12px; } }

/* Блоки с товарами внутри записи (ручной .gallery, если остался): на телефоне — ровная сетка по ширине колонки текста, 2 в ряд,
   нечётная последняя по центру; фото по центру плитки, крупно (как карточка каталога) */
@media (max-width: 767.98px) {
  html .blog-article .gallery { margin: 24px 0 !important; padding: 0 !important; }
  html .blog-article .gallery .min_center { margin: 0 !important; padding: 0 !important; width: auto !important; max-width: none !important; }
  html .blog-article .gallery .gallery_row { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 !important; padding: 0 !important; }
  html .blog-article .gallery .gallery_row a { display: flex !important; align-items: center; justify-content: center; flex: 0 0 calc(50% - 4px) !important; width: calc(50% - 4px) !important; max-width: calc(50% - 4px) !important; aspect-ratio: 1; height: auto !important; margin: 0 !important; padding: 0 !important; background: #f7f7f7; overflow: hidden; }
  html .blog-article .gallery .gallery_row a img { display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; padding: 8% !important; box-sizing: border-box; object-fit: contain; object-position: center; }
  html .blog-article .gallery .gallery-description { display: block; margin-top: 12px; }
}
@media (min-width: 768px) {
  html .blog-article .gallery .gallery_row a { align-items: center; justify-content: center; }
  html .blog-article .gallery .gallery_row a img { margin: 0 auto !important; object-fit: contain; object-position: center; }
}

/* длинные ссылки не должны ломать вёрстку (обычный текст без переносов слов) */
.blog-article .about_item-text a { overflow-wrap: anywhere; }
