body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f0e8;
  color: #1a1a1a;
}

.news-main {
  margin: 0 5%;
  padding: 28px 0 80px;
}

.news-page-title {
  font-size: 1.7rem;
  color: #2d5016;
  margin: 0 0 24px;
  font-weight: 700;
}

.news-loading,
.news-empty {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 0.95rem;
}

/* ===== ПАНЕЛЬ ФИЛЬТРОВ ===== */
.nf-panel { margin: 0 0 22px; }

.nf-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.nf-field { position: relative; }

.nf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: #fff;
  border: 1.5px solid #ddd6c8;
  border-radius: 8px;
  color: #2d5016;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nf-btn:hover { border-color: #2d5016; }
.nf-btn.open {
  border-color: #2d5016;
  box-shadow: 0 0 0 3px rgba(45,80,22,0.12);
}
.nf-caret { font-size: 0.7rem; color: #8a8a7a; }

.nf-reset {
  padding: 9px 14px;
  background: none;
  border: none;
  color: #8a6a1a;
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
}
.nf-reset:hover { color: #2d5016; }

.nf-count {
  margin-left: auto;
  font-size: 0.86rem;
  color: #777;
}

/* ===== ВЫПАДАЮЩИЕ ПАНЕЛИ ===== */
.nf-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  background: #fff;
  border: 1.5px solid #ddd6c8;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.16);
  padding: 10px;
}
.nf-menu[hidden] { display: none; }

.nf-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1.5px solid #e3ddd0;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.86rem;
  outline: none;
}
.nf-search:focus { border-color: #2d5016; }

.nf-menu-list {
  width: 320px;
  max-width: calc(100vw - 60px);
  max-height: 300px;
  overflow-y: auto;
}
.nf-menu-empty { padding: 12px; color: #999; font-size: 0.86rem; }

.nf-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.88rem;
  color: #333;
}
.nf-opt:hover { background: #f2f5ee; }
.nf-opt.on { background: #eef3e7; color: #2d5016; font-weight: 600; }
.nf-opt input { accent-color: #2d5016; flex-shrink: 0; margin: 0; }
.nf-opt-name { flex: 1; min-width: 0; line-height: 1.3; }
.nf-opt-count {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: #8a8a7a;
  font-weight: 400;
}

/* ===== ПИЛЮЛИ ВЫБРАННОГО ===== */
.nf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nf-chips[hidden] { display: none; }

.nf-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  background: #eef3e7;
  border: 1.5px solid #cddbc0;
  border-radius: 999px;
  color: #2d5016;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.nf-chip:hover { background: #e2ebd7; border-color: #2d5016; }
.nf-chip-x { font-size: 0.72rem; color: #6a8a4a; }

/* ===== КАЛЕНДАРЬ ===== */
.nf-cal { padding: 14px; }

.nf-cal-top { display: flex; align-items: flex-start; gap: 6px; }

.nf-cal-nav {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  background: #fff;
  border: 1.5px solid #e3ddd0;
  border-radius: 7px;
  color: #2d5016;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.nf-cal-nav:hover { border-color: #2d5016; background: #f2f5ee; }

.nf-cal-months { display: flex; gap: 22px; }
.nf-cal-month { width: 224px; }

.nf-cal-title {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #2d5016;
  margin-bottom: 10px;
}

.nf-cal-wd,
.nf-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.nf-cal-wd {
  margin-bottom: 4px;
  font-size: 0.72rem;
  color: #9a9a8a;
  text-align: center;
}

.nf-day {
  height: 30px;
  background: none;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.82rem;
  color: #333;
  cursor: pointer;
  padding: 0;
}
.nf-day:hover { background: #e2ebd7; }
.nf-day-void { cursor: default; }
.nf-day-void:hover { background: none; }

.nf-today { box-shadow: inset 0 0 0 1.5px #c9a227; }

/* Диапазон: концы — залитые, середина — светлая полоса */
.nf-in-range { background: #eef3e7; border-radius: 0; }
.nf-range-start,
.nf-range-end {
  background: #2d5016;
  color: #fff;
  font-weight: 700;
}
.nf-range-start { border-radius: 7px 0 0 7px; }
.nf-range-end   { border-radius: 0 7px 7px 0; }
.nf-range-single { border-radius: 7px; }
.nf-range-start:hover,
.nf-range-end:hover { background: #3d6b1f; }

.nf-cal-ft {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1.5px solid #eee7d9;
}
.nf-cal-hint { flex: 1; font-size: 0.8rem; color: #8a8a7a; }

.nf-cal-clear,
.nf-cal-done {
  padding: 7px 14px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}
.nf-cal-clear {
  background: none;
  border: 1.5px solid #e3ddd0;
  color: #777;
}
.nf-cal-clear:hover { border-color: #b83232; color: #b83232; }
.nf-cal-done {
  background: #2d5016;
  border: 1.5px solid #2d5016;
  color: #fff;
  font-weight: 600;
}
.nf-cal-done:hover { background: #3d6b1f; }

/* ===== СПИСОК КАРТОЧЕК ===== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.news-card {
  display: flex;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.news-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  transform: translateY(-2px);
}

.news-card-cover {
  width: 180px;
  min-height: 120px;
  object-fit: cover;
  flex-shrink: 0;
}

.news-card-no-cover {
  background: #2d5016;
}

.news-card-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-card-date {
  font-size: 0.78rem;
  color: #888;
  margin: 0;
}

.news-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a3a0e;
  margin: 0;
  line-height: 1.35;
}

.news-card-preview {
  font-size: 0.88rem;
  color: #444;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== ПОЛНАЯ СТАТЬЯ ===== */
.news-back-btn {
  background: none;
  border: 2px solid #2d5016;
  color: #2d5016;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 24px;
  transition: background 0.15s, color 0.15s;
}

.news-back-btn:hover {
  background: #2d5016;
  color: #fff;
}

.article-cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
}

.article-title {
  font-size: 1.6rem;
  color: #1a3a0e;
  margin: 0 0 8px;
  line-height: 1.3;
}

.article-date {
  font-size: 0.82rem;
  color: #888;
  margin: 0 0 20px;
}

.article-body {
  font-size: 0.97rem;
  line-height: 1.7;
  color: #222;
}

.article-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 12px 0;
}

/* ── Адаптив: мобильный ─────────────────────────────── */
@media (max-width: 767px) {
  .news-main {
    margin: 0 3%;
    padding: 16px 0 60px;
  }
  .news-page-title { font-size: 1.3rem; }

  /* Фильтры: кнопки на всю ширину, календарь — один месяц */
  .nf-bar { gap: 8px; }
  .nf-btn { flex: 1; justify-content: space-between; }
  .nf-count { margin-left: 0; width: 100%; }
  .nf-menu { left: 0; right: 0; }
  .nf-cal-months { gap: 0; }
  .nf-cal-month { width: 100%; }
  .nf-cal-month:nth-child(2) { display: none; }
  .nf-cal-nav { margin-top: 0; }

  .news-card { flex-direction: column; }
  .news-card-cover {
    width: 100%;
    height: 160px;
  }
  .news-card-no-cover { height: 80px; }
}
