/* =============================================
   СТРАНИЦА ПУБЛИКАЦИИ — assets/public.css
   Подключается только в public.php
   Структура — клон news.css: текст слева (широкая колонка),
   топ-10 публикаций справа (узкая колонка, как sidebar в news-list.css).
   ============================================= */

/* ─── Обёртка ────────────────────────────────── */
.pa-wrap {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 14px 30px 40px;
}

.pa-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

/* ══════════════════════════════════════════════
   ЛЕВАЯ КОЛОНКА — ТЕКСТ
   ══════════════════════════════════════════════ */

.pa-card {
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  overflow: hidden;
  margin-bottom: 20px;
}

.pa-hero-wrap {
  display: flex;
  justify-content: center;
  background: var(--white);
  overflow: hidden;
  padding: 20px 28px 0; /* сверху — та же логика, что снизу даёт .pa-body своим верхним padding'ом; слева/справа — чтобы широкие картинки не сливались с краями блока */
}
.pa-hero-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 520px;
}

.pa-body {
  padding: 22px 28px 28px;
}

.pa-breadcrumb {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 0 2px;
}
.pa-breadcrumb a { color: var(--muted); }
.pa-breadcrumb a:hover { color: var(--red); }
.pa-breadcrumb span { color: var(--muted); }

.pa-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 12px;
}

.pa-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.pa-hits { color: #aaa; }

.pa-text {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
}
.pa-text p { margin-bottom: 1.3em; }
.pa-text p:last-child { margin-bottom: 0; }
.pa-text img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  margin: 1.2em 0;
  display: block;
}
.pa-text h2 { font-size: 21px; font-weight: 700; margin: 1.4em 0 .5em; color: var(--navy); }
.pa-text h3 { font-size: 18px; font-weight: 700; margin: 1.2em 0 .4em; }
.pa-text a { color: var(--navy); text-decoration: underline; }
.pa-text a:hover { color: var(--red); }
.pa-text strong, .pa-text b { font-weight: 700; }
.pa-text ul, .pa-text ol { margin: 0 0 1.2em 1.5em; }
.pa-text li { margin-bottom: .5em; }
.pa-text blockquote {
  border-left: 3px solid var(--red);
  padding-left: 1.2em;
  color: var(--muted);
  font-style: italic;
  margin: 1.4em 0;
}

/* ─── «Читайте также» ────────────────────────── */
.pa-related {
  margin-top: 0;
}

.pa-related-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.pa-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pa-rel-card {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  display: block;
  transition: box-shadow .2s;
  color: inherit;
}
.pa-rel-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,.11);
  color: inherit;
}

.pa-rel-img-wrap { display: block; overflow: hidden; }
.pa-rel-img {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  background: #e8e8e8;
}

.pa-rel-body { padding: 9px 10px 11px; }
.pa-rel-title-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pa-rel-card:hover .pa-rel-title-text { color: var(--red); }
.pa-rel-date { font-size: 11px; color: var(--muted); }

/* ══════════════════════════════════════════════
   ПРАВАЯ КОЛОНКА — ТОП-10
   ══════════════════════════════════════════════ */

.pa-sidebar { }

.pa-sidebar-sticky {
  position: sticky;
  top: 14px;
}

/* Карточка сайдбара и список топ-10 — те же паттерны, что в news-list.css */
.sidebar-card {
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  padding: 14px;
}

.sidebar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.stop-item {
  display: flex;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.stop-item:last-child { border-bottom: none; }

.stop-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  min-width: 18px;
  flex-shrink: 0;
  padding-top: 2px;
}

.stop-body { display: flex; flex-direction: column; gap: 2px; }

.stop-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.stop-title:hover { color: var(--red); }

.stop-hits { font-size: 11px; color: var(--muted); }

/* ─── Кнопка «наверх» ────────────────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(13, 31, 60, 0.35);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--navy);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
  z-index: 100;
  text-decoration: none;
}
.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--navy);
  color: var(--navy);
}

/* ─── Адаптив ────────────────────────────────── */
@media (max-width: 1100px) {
  .pa-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .pa-layout { grid-template-columns: 1fr; }
  .pa-sidebar-sticky { position: static; }
  .pa-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .pa-wrap { padding: 10px 14px 30px; }
  .pa-hero-wrap { padding: 16px 16px 0; }
  .pa-body { padding: 16px 16px 20px; }
  .pa-title { font-size: 21px; }
  .pa-text { font-size: 16px; }
  .pa-related-grid { grid-template-columns: repeat(2, 1fr); }
  .scroll-top-btn { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}
@media (max-width: 420px) {
  .pa-related-grid { grid-template-columns: 1fr 1fr; }
}