/* =============================================
   ЛЕНТА СОБЫТИЙ — assets/news-list.css
   Подключается только в news-list.php
   ============================================= */

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

.news-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
}

/* ─── Шапка ленты ────────────────────────────── */
.news-page-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 10px;
}

.news-page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin: 0;
}

.news-filter-label {
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-filter-reset {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  transition: color .15s, border-color .15s;
}
.news-filter-reset:hover { color: var(--red); border-color: var(--red); }

.news-total {
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}

.news-empty {
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  padding: 40px 0;
}

/* ─── Карточка новости ───────────────────────── */
.ncard {
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.ncard:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,.11);
}
.ncard:last-of-type { margin-bottom: 0; }

/* Картинка: в своих пропорциях, без серых полей по бокам */
.ncard-img-wrap {
  display: flex;
  justify-content: center;
  background: var(--white);
  overflow: hidden;
}
.ncard-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 480px;
}

/* Тело карточки */
.ncard-body { padding: 19px 21px 0; }
/* Нижняя часть карточки (после картинки) */
.ncard-body-bottom { padding: 12px 21px 21px; }

.ncard-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text);
}
.ncard-title a { color: inherit; }
.ncard-title a:hover { color: var(--red); }

.ncard-preview {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 12px;
  padding-left: 14px; /* отступ текста относительно заголовка */
}

/* Нижняя строка карточки: читать → слева, дата + просмотры справа */
.ncard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-left: 14px; /* выравниваем по превью */
}

.ncard-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ncard-date { font-size: 12px; color: var(--muted); }
.ncard-hits { font-size: 12px; color: #aaa; white-space: nowrap; }

/* ─── Пагинация ──────────────────────────────── */
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding: 16px;
  flex-wrap: wrap;
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--white);
  transition: all .15s;
  cursor: pointer;
}
.pg-btn:hover { color: var(--red); border-color: var(--red); }
.pg-current {
  background: var(--red);
  color: var(--white) !important;
  border-color: var(--red);
}
.pg-disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}
.pg-prev, .pg-next { font-size: 20px; }
.pg-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 15px;
  color: var(--muted);
}

/* ─── Боковая колонка ────────────────────────── */
.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Топ-10: обычный блок, не sticky */
.sidebar-sticky-top {
  position: static;
}

/* Календарь: sticky, top считается через JS */
.sidebar-sticky-cal {
  position: sticky;
  top: 14px;
}

.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;
}

/* Топ-10 */
.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); }

/* ─── Календарь ──────────────────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-month-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 16px;
  color: var(--muted);
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.cal-nav-btn:hover { color: var(--red); background: #f5f5f5; }
.cal-nav-disabled { opacity: .3; cursor: default; pointer-events: none; }

.cal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cal-table th {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 0 6px;
  letter-spacing: .04em;
}
.cal-table td {
  text-align: center;
  padding: 2px 1px;
  vertical-align: middle;
}

.cal-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  color: var(--muted);
  cursor: default;
}

/* Дни с публикациями */
a.cal-day.cal-has-posts {
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
a.cal-day.cal-has-posts:hover {
  background: var(--navy);
  color: var(--white);
}

/* Выбранный день */
.cal-active .cal-day,
.cal-active a.cal-day {
  background: var(--red);
  color: var(--white) !important;
}

/* Сегодня */
.cal-today .cal-day:not(a) {
  background: #e8ecf2;
  color: var(--navy);
}

/* Выходные */
.cal-weekend .cal-day { color: #b04040; }
.cal-weekend a.cal-day.cal-has-posts { color: #c8141a; }
.cal-weekend .cal-day:hover { color: var(--white); }

.cal-all-link {
  text-align: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.cal-all-link a { color: var(--muted); }
.cal-all-link a:hover { color: var(--red); }

/* ─── Адаптив ────────────────────────────────── */
@media (max-width: 900px) {
  .news-layout { grid-template-columns: 1fr; }
  .news-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .sidebar-sticky-top,
  .sidebar-sticky-cal { position: static; }
}
@media (max-width: 600px) {
  .news-wrap { padding: 10px 14px 30px; }
  .news-sidebar { grid-template-columns: 1fr; }
  .ncard-title { font-size: 18px; }
  .ncard-img { max-height: 300px; }
  .ncard-footer { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ─── Кнопка «наверх» ────────────────────────── */
.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: 600px) {
  .scroll-top-btn { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}
