/* ==========================================================================
   Страница полной статьи (Full Article View)
   ========================================================================== */

/* 1. Каркас блока статьи */
.region-content #block-pbn-universal-soderzhimoestranicy {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  margin-bottom: 30px;
}

/* 2. Заголовок статьи */
.region-content #block-pbn-universal-soderzhimoestranicy > h2 {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.3 !important;
  margin-top: 0 !important;
  margin-bottom: 20px !important;
  padding: 0 !important;
  border: none !important;
}

/* --- 4. Главное изображение (Cover Image) --- */
/* Работаем строго с обложкой, которая идет ПЕРЕД текстом статьи */
.region-content article > div:first-child:not(:has(p)) img {
  width: 100% !important;
  max-width: 100% !important;
  height: 380px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  margin: 0 0 24px 0 !important;
  display: block !important;
  float: none !important; /* Отменяем float, если вдруг он задан */
}

/* --- 5. Картинки внутри тела статьи (WYSIWYG / auto_poster.py) --- */
/* Для всех картинок, находящихся ВНУТРИ текста (где есть абзацы p) */
.region-content article p img,
.region-content article div:has(p) img {
  width: auto !important; /* Отменяем 100% ширину */
  max-width: 100% !important;
  height: auto !important; /* Сохраняем пропорции 250x250 */
  display: inline-block !important; /* Возвращаем обтекание */
  object-fit: contain !important;
  border-radius: 6px !important;
}

/* ==========================================================================
   5. ТИПОГРАФИКА И ОФОРМЛЕНИЕ ТЕКСТА СТАТЬИ
   ========================================================================== */
.region-content article > div:nth-child(2) {
  font-size: 16.5px;
  line-height: 1.7;
  color: #334155;
}

/* Абзацы */
.region-content article > div:nth-child(2) p {
  margin-top: 0;
  margin-bottom: 1.25em;
}

/* Подзаголовки H2 и H3 */
.region-content article > div:nth-child(2) h2 {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-top: 1.8em !important;
  margin-bottom: 0.6em !important;
  line-height: 1.35 !important;
}

.region-content article > div:nth-child(2) h3 {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.5em !important;
  line-height: 1.4 !important;
}

/* Ссылки в тексте */
.region-content article > div:nth-child(2) a {
  color: #2563eb !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.region-content article > div:nth-child(2) a:hover {
  color: #f97316 !important;
}

/* Списки */
.region-content article > div:nth-child(2) ul,
.region-content article > div:nth-child(2) ol {
  margin-top: 0;
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

.region-content article > div:nth-child(2) li {
  margin-bottom: 0.5em;
}

/* Цитаты */
.region-content article > div:nth-child(2) blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  background-color: #fff7ed;
  border-left: 4px solid #f97316;
  border-radius: 0 8px 8px 0;
  color: #475569;
  font-style: italic;
}



.region-content article > div:last-child a {
  display: inline-block;
  background-color: #fff7ed;
  color: #f97316 !important;
  font-weight: 600;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 6px;
  text-decoration: none !important;
  transition: background-color 0.2s ease;
}

.region-content article > div:last-child a:hover {
  background-color: #ffedd5;
}

/* 7. Блок "Читайте также" (компактный список с маркерами) */
#block-pbn-universal-views-block-related-articles-block-1 {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

#block-pbn-universal-views-block-related-articles-block-1 h2 {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 12px 0 !important;
  padding: 0 0 8px 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

/* Сжимаем контейнер Views */
#block-pbn-universal-views-block-related-articles-block-1 .view-content {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Небольшой отступ между пунктами */
}

/* Сбрасываем внутренние отступы у каждого элемента */
#block-pbn-universal-views-block-related-articles-block-1 .views-row,
#block-pbn-universal-views-block-related-articles-block-1 article {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Оформление ссылки с кастомным оранжевым кружочком */
#block-pbn-universal-views-block-related-articles-block-1 .views-row a {
  display: inline-flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 500;
  color: #1e293b !important;
  text-decoration: none !important;
  line-height: 1.4;
  transition: color 0.2s ease;
}

/* Сам оранжевый кружочек */
#block-pbn-universal-views-block-related-articles-block-1 .views-row a::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #f97316; /* Акцентный оранжевый */
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}

#block-pbn-universal-views-block-related-articles-block-1 .views-row a:hover {
  color: #f97316 !important;
  text-decoration: underline !important;
}

/* Ссылки */
#block-pbn-universal-views-block-related-articles-block-1 .views-row a {
  font-size: 14.5px;
  font-weight: 500;
  color: #1e293b !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

#block-pbn-universal-views-block-related-articles-block-1 .views-row a:hover {
  color: #f97316 !important;
  text-decoration: underline !important;
}