/* =====================================================
   NEWS PAGE - attractive layout (scoped to .news-page)
   Uses existing theme variables, so dark mode works too.
   ===================================================== */
.news-page { padding-bottom: 20px; }

/* ---------- Hero header ---------- */
.news-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 22px;
  background: var(--grad-brand);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.news-hero::before, .news-hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.09); pointer-events: none;
}
.news-hero::before { width: 220px; height: 220px; right: -60px; top: -90px; }
.news-hero::after  { width: 140px; height: 140px; right: 120px; bottom: -80px; }
.news-hero > * { position: relative; z-index: 1; }
.news-hero h2 { margin: 0 0 4px; font-size: 26px; color: #fff; display: flex; align-items: center; gap: 10px; }
.news-hero p  { margin: 0; font-size: 14px; opacity: .9; }
.news-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.news-hero .btn-light { background: #fff; color: var(--color-primary-dark); font-weight: 700; }
.news-hero .btn-light:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.news-hero .btn-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1.5px solid rgba(255,255,255,.45); }
.news-hero .btn-ghost:hover { background: rgba(255,255,255,.28); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; display: inline-block; animation: nwPulse 1.4s infinite; }
@keyframes nwPulse { 0%{box-shadow:0 0 0 0 rgba(255,255,255,.7)} 100%{box-shadow:0 0 0 10px rgba(255,255,255,0)} }

/* ---------- Category chips (scrollable pill bar) ---------- */
.news-chips {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 14px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.news-chips::-webkit-scrollbar { display: none; }
.news-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-pill);
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  color: var(--color-ink); font-size: 13.5px; font-weight: 600; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.news-chip i { color: var(--color-primary); font-size: 13px; }
.news-chip em {
  font-style: normal; font-size: 11px; font-weight: 700;
  background: var(--color-primary-light); color: var(--color-primary);
  padding: 2px 8px; border-radius: var(--radius-pill);
}
.news-chip:hover { transform: translateY(-2px); border-color: var(--color-primary); box-shadow: var(--shadow-md); }
.news-chip.active { background: var(--grad-brand); border-color: transparent; color: #fff; }
.news-chip.active i { color: #fff; }
.news-chip.active em { background: rgba(255,255,255,.25); color: #fff; }

.news-result-line { font-size: 13px; color: var(--color-ink-soft); margin: 2px 2px 16px; }
.news-result-line b { color: var(--color-ink); }

/* ---------- Lead story ---------- */
.news-lead {
  display: grid; grid-template-columns: 1.25fr 1fr;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-surface); border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md); margin-bottom: 26px;
  text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
.news-lead:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.news-lead-img { position: relative; min-height: 300px; background: var(--color-primary-light); overflow: hidden; }
.news-lead-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; position: absolute; inset: 0; }
.news-lead:hover .news-lead-img img { transform: scale(1.05); }
.news-lead-body { padding: 28px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.news-lead-body h3 { font-size: 24px; line-height: 1.3; margin: 0; }
.news-lead-body .desc { color: var(--color-ink-soft); font-size: 14.5px; line-height: 1.6; margin: 0; }

/* ---------- Cards ---------- */
.news-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.news-card {
  position: relative; display: flex; flex-direction: column; cursor: pointer;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: nwUp .45s ease both;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(225,6,0,.35); }
@keyframes nwUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.news-grid .news-card:nth-child(2){animation-delay:.05s}.news-grid .news-card:nth-child(3){animation-delay:.1s}
.news-grid .news-card:nth-child(4){animation-delay:.15s}.news-grid .news-card:nth-child(5){animation-delay:.2s}
.news-grid .news-card:nth-child(6){animation-delay:.25s}

.news-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-primary-light); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.news-card:hover .news-thumb img { transform: scale(1.07); }
.news-thumb::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent); pointer-events: none;
}
.news-badge {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--color-primary); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.news-badge.featured { left: auto; right: 12px; background: #fff; color: var(--color-primary-dark); display: inline-flex; gap: 5px; align-items: center; }
.news-views {
  position: absolute; left: 12px; bottom: 10px; z-index: 2;
  color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center;
}

.news-card-body { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.news-card-body h3 {
  margin: 0; font-size: 16.5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .15s ease;
}
.news-card:hover h3 { color: var(--color-primary); }
.news-card-body .desc {
  margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--color-ink-soft); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 12px; margin-top: 4px; border-top: 1px dashed var(--color-border);
  font-size: 12px; color: var(--color-ink-soft);
}
.news-meta .time { display: inline-flex; gap: 6px; align-items: center; }
.news-meta .right { display: flex; align-items: center; gap: 12px; }
.news-more { color: var(--color-primary); font-weight: 700; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.news-more i { transition: transform .18s ease; }
.news-card:hover .news-more i, .news-lead:hover .news-more i { transform: translateX(4px); }
.news-share {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-ink-soft); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
  transition: all .15s ease;
}
.news-share:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; transform: scale(1.1); }

/* ---------- Pagination ---------- */
.news-pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 34px; flex-wrap: wrap; }
.news-pagination a, .news-pagination span.dots {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1.5px solid var(--color-border); background: var(--color-surface);
  font-size: 14px; font-weight: 700; color: var(--color-ink); text-decoration: none; gap: 6px;
  transition: all .15s ease;
}
.news-pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-2px); }
.news-pagination a.active { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: var(--shadow-md); }
.news-pagination span.dots { border: none; background: none; min-width: 20px; padding: 0; }

/* ---------- Empty ---------- */
.news-empty {
  text-align: center; padding: 60px 20px; border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg); color: var(--color-ink-soft); background: var(--color-surface);
}
.news-empty i { font-size: 52px; color: var(--color-primary); opacity: .55; margin-bottom: 14px; }
.news-empty h3 { color: var(--color-ink); margin: 0 0 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .news-lead { grid-template-columns: 1fr; }
  .news-lead-img { min-height: 220px; aspect-ratio: 16 / 9; }
  .news-lead-body { padding: 20px; }
  .news-lead-body h3 { font-size: 20px; }
}
@media (max-width: 560px) {
  .news-hero { padding: 20px 18px; border-radius: var(--radius-md); }
  .news-hero h2 { font-size: 21px; }
  .news-hero-actions { width: 100%; }
  .news-hero-actions .btn { flex: 1; justify-content: center; }
  .news-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-card, .live-dot { animation: none; }
  .news-card, .news-card *, .news-lead, .news-lead * { transition: none !important; }
}

/* ===== Side spacing — same left/right gap as the Home feed (16px mobile, --wide-pad on laptop/desktop) ===== */
.news-page { padding-left: 16px; padding-right: 16px; }
@media (min-width: 1024px) {
  .news-page { padding-left: var(--wide-pad, clamp(20px, 3vw, 56px)); padding-right: var(--wide-pad, clamp(20px, 3vw, 56px)); }
}
