/* ---- Filter bar ---- */
.news-filter-bar{
  background:#fff;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:82px;
  z-index:90;
}
@media (max-width:900px){ .news-filter-bar{ top:0; } }

.filter-scroll{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:14px 0;
  scrollbar-width:none;
}
.filter-scroll::-webkit-scrollbar{ display:none; }

.filter-btn{
  flex-shrink:0;
  padding:9px 18px;
  border-radius:999px;
  background:var(--bg-soft);
  color:var(--ink-2);
  text-decoration:none;
  font-size:13.5px;
  font-weight:500;
  white-space:nowrap;
  transition:all .2s ease;
}
.filter-btn:hover{ background:#e2f0e6; }
.filter-btn.active{
  background:linear-gradient(135deg,var(--green-600),var(--green-500));
  color:#fff;
}

/* ---- Trending ---- */
.trending-section{ padding:50px 0 20px; }

.trending-scroll{
  display:flex;
  gap:18px;
  overflow-x:auto;
  padding-bottom:8px;
  scrollbar-width:none;
}
.trending-scroll::-webkit-scrollbar{ display:none; }

.trend-card{
  flex-shrink:0;
  width:260px;
  background:#fff;
  border-radius:var(--radius-md);
  overflow:hidden;
  text-decoration:none;
  color:var(--ink-1);
  box-shadow:var(--shadow-sm);
  border:1px solid var(--border);
  transition:transform .3s ease, box-shadow .3s ease;
}
.trend-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow-md); }

.trend-img-wrap{ height:150px; overflow:hidden; background:var(--bg-soft); }
.trend-img-wrap img{ width:100%; height:100%; object-fit:cover; }
.trend-img-fallback{
  height:150px;
  display:flex; align-items:center; justify-content:center;
  font-size:38px;
  background:var(--bg-soft);
}

.trend-card-body{ padding:16px; }
.trend-card-body h3{ font-size:14.5px; margin:8px 0; line-height:1.5; }

.trend-meta{ display:flex; justify-content:space-between; align-items:center; margin-top:10px; }
.trend-read{ color:var(--green-600); font-size:12.5px; font-weight:600; }

.news-category{
  display:inline-block;
  font-size:11.5px;
  font-weight:600;
  color:var(--green-600);
  background:var(--bg-soft);
  padding:4px 10px;
  border-radius:999px;
}

.news-date{ font-size:12px; color:var(--ink-3); }

/* ---- Main news grid ---- */
.news-section{ padding:50px 0 30px; }

.news-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:24px;
}

.news-card{
  background:#fff;
  border-radius:var(--radius-md);
  overflow:hidden;
  box-shadow:var(--shadow-sm);
  border:1px solid var(--border);
  transition:transform .3s ease, box-shadow .3s ease;
}
.news-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow-md); }

.news-img-link{ display:block; height:180px; background:var(--bg-soft); overflow:hidden; }
.news-img-link img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.news-card:hover .news-img-link img{ transform:scale(1.06); }

.news-img-fallback{
  height:180px;
  display:flex; align-items:center; justify-content:center;
  font-size:42px;
  background:var(--bg-soft);
}

.news-card-body{ padding:20px; }
.news-card-body h3{ font-size:16px; margin:10px 0; line-height:1.5; }

.news-card-body p{ font-size:13.5px; color:var(--ink-3); margin-bottom:14px; }

.news-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-top:14px;
  border-top:1px solid var(--border);
}

.news-read{
  color:var(--green-600);
  font-weight:600;
  font-size:13px;
  text-decoration:none;
}
.news-read:hover{ text-decoration:underline; }

.news-empty{
  grid-column:1/-1;
  text-align:center;
  padding:70px 20px;
  color:var(--ink-3);
}

/* ---- Refresh info strip ---- */
.news-refresh-strip{
  background:var(--bg-soft);
  padding:16px 0;
  margin-top:40px;
  text-align:center;
  font-size:12.5px;
  color:var(--ink-3);
}
.news-refresh-strip .sep{ margin:0 10px; opacity:0.5; }

@media (max-width:560px){
  .news-grid{ grid-template-columns:1fr; }
  .news-refresh-strip .sep{ display:block; margin:6px 0; }
}
