/*
  article_page.css — Hero компактный вариант
*/

.pg { padding: 24px 32px 56px; }
@media (max-width: 768px) { .pg { padding: 16px 20px 40px; } }
@media (max-width: 480px) { .pg { padding: 12px 16px 32px; } }

/* ХЛЕБНЫЕ КРОШКИ */
.breadcrumb { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; padding-top: 1rem; }
.breadcrumb-link { font-size: var(--text-sm); color: var(--muted); text-decoration: none; transition: color .15s; }
.breadcrumb-link:hover { color: var(--sage-dk); }
.breadcrumb-sep { font-size: var(--text-sm); color: var(--muted); opacity: .4; }
.breadcrumb-current { font-size: var(--text-sm); color: var(--text); }

/* LAYOUT */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }

/* ═══════════════════════════════════════
   HERO БЛОК — компактный тёмный
═══════════════════════════════════════ */
.article-hero {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(168,210,160,0.7) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(200,225,170,0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(140,190,150,0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(210,230,185,0.6) 0%, transparent 50%),
    #deecd8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.hero-top {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
  min-height: 200px;
}

.hero-top-left {
  padding: 28px 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-cat {
  display: inline-block;
  font-size: var(--text-xs);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-dk);
  background: rgba(62, 94, 68, .1);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  align-self: flex-start;
  transition: background .15s;
}
.hero-cat:hover { background: rgba(62, 94, 68, .18); }

.article-title {
  font-family: var(--serif);
  font-size: var(--text-3xl);
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  line-height: 1.35;
  flex: 1;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 0.5px solid rgba(62, 94, 68, .15);
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-base);
  color: var(--muted);
}

.hero-top-right {
  overflow: hidden;
  border-radius: 0 var(--radius-lg) 0 0;
}

.hero-top-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-toc {
  padding: 20px 20px 20px;
}

.hero-toc-inner {
  background: rgba(255, 255, 255, .75);
  border-radius: 10px;
  padding: 16px 20px;
  backdrop-filter: blur(4px);
}

.hero-toc-label {
  font-size: var(--text-sm);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-dk);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid rgba(62, 94, 68, .15);
}

.hero-toc-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 0.5px solid rgba(62, 94, 68, .1);
  text-decoration: none;
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.45;
  transition: color .15s;
}

.hero-toc-link:last-child { border-bottom: none; }
.hero-toc-link:nth-last-child(2):nth-child(odd) { border-bottom: none; }

.hero-toc-link--right {
  padding-left: 16px;
  border-left: 0.5px solid rgba(62, 94, 68, .12);
}

.hero-toc-link:hover { color: var(--sage-dk); }
.hero-toc-link:hover .hero-toc-num { color: var(--sage-dk); }

.hero-toc-num {
  font-size: var(--text-xs);
  color: var(--sage);
  font-weight: 500;
  min-width: 20px;
  flex-shrink: 0;
  transition: color .15s;
}

.author-card-date {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 6px;
  opacity: .7;
}

/* ═══════════════════════════════════════
   ТЕКСТ СТАТЬИ
═══════════════════════════════════════ */
.article-body {
  background: var(--white);
  border: 0.5px solid rgba(107, 143, 113, .18);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  margin-bottom: 12px;
  font-size: var(--text-lg);
  line-height: 1.85;
  color: var(--text);
}

.article-body h2 {
  font-family: var(--serif);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--text);
  margin: 32px 0 14px;
  line-height: 1.3;
  padding-top: 8px;
  border-top: 0.5px solid rgba(107, 143, 113, .15);
}
.article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.article-body h3 { font-family: var(--serif); font-size: var(--text-xl); font-weight: 400; color: var(--text); margin: 24px 0 10px; line-height: 1.4; }
.article-body h4 { font-size: var(--text-lg); font-weight: 500; color: var(--text); margin: 20px 0 8px; }
.article-body p { margin: 0 0 16px; color: var(--text); }
.article-body p:last-child { margin-bottom: 0; }
.article-body ul, .article-body ol { margin: 0 0 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.article-body li { font-size: var(--text-lg); line-height: 1.7; color: var(--text); }
.article-body ul li::marker { color: var(--sage); }
.article-body ol li::marker { color: var(--sage-dk); font-weight: 500; }
.article-body strong { font-weight: 500; }
.article-body em { font-style: italic; color: var(--muted); }
.article-body a { color: var(--sage-dk); text-decoration: underline; text-underline-offset: 3px; transition: color .15s; }
.article-body a:hover { color: var(--sage); }
.article-body img { max-width: 100%; border-radius: var(--radius-md); margin: 16px 0; display: block; }
.article-body blockquote { margin: 20px 0; padding: 14px 20px; background: var(--ivory); border-left: 3px solid var(--sage); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: var(--muted); font-size: var(--text-md); line-height: 1.7; }
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: var(--text-base); }
.article-body th { background: var(--ivory); padding: 10px 14px; text-align: left; font-weight: 500; font-size: var(--text-sm); color: var(--sage-dk); border: 0.5px solid rgba(107, 143, 113, .2); }
.article-body td { padding: 10px 14px; border: 0.5px solid rgba(107, 143, 113, .15); vertical-align: top; line-height: 1.6; }
.article-body tr:nth-child(even) td { background: rgba(249, 245, 239, .5); }

.article-body-date {
  text-align: right;
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 24px;
  padding-top: 12px;
  border-top: 0.5px solid rgba(107, 143, 113, .15);
  opacity: .6;
}

/* МЕТА */
.meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-sm); color: var(--muted); opacity: .8; }

/* КАРТОЧКА АВТОРА */
.author-card { display: flex; align-items: center; gap: 16px; background: var(--white); border: 0.5px solid rgba(107, 143, 113, .2); border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 12px; }
.author-card-ava { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(107, 143, 113, .2); }
.author-card-ava--init { background: var(--sage); display: flex; align-items: center; justify-content: center; font-size: var(--text-2xl); font-weight: 500; color: var(--white); }
.author-card-info { flex: 1; min-width: 0; }
.author-card-label { font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.author-card-name { font-size: var(--text-lg); font-weight: 500; color: var(--text); margin-bottom: 2px; }
.author-card-pos { font-size: var(--text-sm); color: var(--muted); }
.author-card-exp { font-size: var(--text-sm); color: var(--sage-dk); margin-top: 4px; }
.author-card-link { flex-shrink: 0; font-size: var(--text-sm); letter-spacing: .08em; text-transform: uppercase; color: var(--sage-dk); text-decoration: none; border-bottom: 0.5px solid rgba(62, 94, 68, .4); padding-bottom: 1px; white-space: nowrap; transition: color .15s; }
.author-card-link:hover { color: var(--sage); }

/* НАВИГАЦИЯ */
.article-nav { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.article-nav-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--white); border: 0.5px solid rgba(107, 143, 113, .2); border-radius: var(--radius-md); text-decoration: none; color: inherit; flex: 1; max-width: 48%; transition: background .15s; }
.article-nav-item:hover { background: var(--ivory); }
.article-nav-item--next { justify-content: flex-end; text-align: right; }
.article-nav-arrow { font-size: var(--text-xl); color: var(--sage-dk); flex-shrink: 0; opacity: .6; }
.article-nav-label { font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.article-nav-title { font-family: var(--serif); font-size: var(--text-base); color: var(--text); line-height: 1.4; }

/* ПОХОЖИЕ СТАТЬИ */
.related { margin-bottom: 0; }
.related-title { font-size: var(--text-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-card { display: flex; flex-direction: column; background: var(--white); border: 0.5px solid rgba(107, 143, 113, .18); border-radius: var(--radius-md); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
.related-card:hover { box-shadow: 0 4px 16px rgba(42, 36, 32, .07); transform: translateY(-2px); }
.related-img { height: 110px; overflow: hidden; flex-shrink: 0; }
.related-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.related-card:hover .related-img img { transform: scale(1.04); }
.related-img-ph { width: 100%; height: 100%; background: var(--ivory); }
.related-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.related-cat { font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--sage-dk); margin-bottom: 5px; }
.related-card-title { font-family: var(--serif); font-size: var(--text-base); color: var(--text); line-height: 1.45; margin-bottom: 8px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.related-aname { font-size: var(--text-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* САЙДБАР */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.sb-block { background: var(--white); border: 0.5px solid rgba(107, 143, 113, .2); border-radius: var(--radius-md); padding: 18px; }
.sb-title { font-size: var(--text-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; margin-bottom: 12px; border-bottom: 0.5px solid rgba(107, 143, 113, .15); }
.sb-cats { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sb-cat { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: var(--text); transition: background .15s; }
.sb-cat:hover { background: var(--ivory); }
.sb-cat--active { background: rgba(62, 94, 68, .08); }
.sb-cat-name { font-size: var(--text-base); }
.sb-cat--active .sb-cat-name { color: var(--sage-dk); font-weight: 500; }
.sb-cat-count { font-size: var(--text-xs); color: var(--muted); background: var(--ivory); padding: 2px 8px; border-radius: var(--radius-pill); flex-shrink: 0; }
.sb-cat--active .sb-cat-count { background: rgba(62, 94, 68, .1); color: var(--sage-dk); }
.sb-popular { list-style: none; display: flex; flex-direction: column; }
.sb-pop-item { border-bottom: 0.5px solid rgba(107, 143, 113, .12); }
.sb-pop-item:last-child { border-bottom: none; }
.sb-pop-link { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; text-decoration: none; color: inherit; transition: opacity .15s; }
.sb-pop-link:hover { opacity: .72; }
.sb-pop-num { width: 22px; height: 22px; flex-shrink: 0; border-radius: 5px; background: var(--ivory); border: 0.5px solid rgba(107, 143, 113, .2); display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: 500; color: var(--muted); margin-top: 1px; }
.sb-pop-title { font-size: var(--text-sm); color: var(--text); line-height: 1.5; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-pop-meta { display: flex; align-items: center; gap: 8px; }

/* АДАПТИВ */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr) 220px; }
  .article-title { font-size: var(--text-2xl); }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-top { grid-template-columns: 1fr 180px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .hero-top { grid-template-columns: 1fr; }
  .hero-top-right { height: 200px; }
  .article-hero { border-radius: var(--radius-md); }
  .hero-top-left { padding: 20px 20px 16px; }
  .hero-toc { padding: 14px 20px; }
  .hero-toc-links { column-count: 1 !important; }
  .article-title { font-size: var(--text-xl); }
  .article-body { padding: 20px; font-size: var(--text-md); }
  .article-body h2 { font-size: var(--text-xl); }
  .article-nav { flex-direction: column; }
  .article-nav-item { max-width: 100%; }
  .related-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .author-card { flex-direction: column; text-align: center; }
  .author-card-link { align-self: center; }
}