/*
 * News page styles — /{lang}/news and /{lang}/news/{uuid}.
 *
 * Sits on top of css/landing.css (which is loaded for both pages already).
 * Uses the same design tokens — Bricolage Grotesque headers, IBM Plex Mono
 * accents, the .wrap container. Visual polish lives in M5; M2 ships a
 * functional, readable, accessible baseline.
 */

/* ───────── Hero ───────── */

.news-page { padding-bottom: clamp(48px, 6vw, 96px); }

.news-hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}
.news-hero__title {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.news-hero__subtitle {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  max-width: 620px;
  opacity: 0.78;
  margin: 0;
}

/* ───────── Filters ───────── */

.news-controls { padding: 8px 0 16px; }
.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: flex-start;
}
.news-filters__group {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.news-filters__label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
  margin-right: 6px;
}

.news-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease, transform 80ms ease;
  cursor: pointer;
}
.news-chip:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.06); }
.news-chip:focus-visible {
  outline: 2px solid #6aa9ff;
  outline-offset: 2px;
}
.news-chip:active { transform: translateY(0.5px); }
.news-chip.is-pressed,
.news-chip[aria-pressed="true"] {
  background: rgba(106,169,255,0.16);
  border-color: rgba(106,169,255,0.55);
  color: #cfe1ff;
}
.news-chip--submit { background: rgba(106,169,255,0.16); }

/* ───────── Empty / error states ───────── */

.news-state {
  padding: clamp(40px, 6vw, 80px) 0;
  text-align: center;
}
.news-state__title {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: clamp(20px, 2vw, 26px);
  margin: 0 0 8px;
}
.news-state__body {
  opacity: 0.72;
  max-width: 520px;
  margin: 0 auto;
}

/* ───────── Feed + cards ───────── */

.news-feed { padding: 24px 0 0; }
.news-feed__hint {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 160, 0, 0.08);
  border: 1px solid rgba(255, 160, 0, 0.25);
  margin-bottom: 16px;
}
.news-feed__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px) {
  .news-feed__list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1080px) {
  .news-feed__list { grid-template-columns: 1fr 1fr 1fr; }
}
.news-feed__footer {
  display: flex;
  justify-content: center;
  padding: 24px 0;
}
.news-feed__load-more {
  min-width: 160px;
}

.news-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 120ms ease, transform 120ms ease;
}
.news-card:hover {
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}
.news-card__media img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.news-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.news-card__title {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
  font-weight: 600;
}
.news-card__link {
  color: inherit;
  text-decoration: none;
}
.news-card__link:hover { color: #cfe1ff; }
.news-card__summary {
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.82;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  opacity: 0.86;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  align-items: center;
}
.news-card__source { font-weight: 500; }
.news-card__time {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  opacity: 0.72;
}
.news-card__chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.12);
}
.news-card__chip--positive {
  background: rgba(80, 200, 120, 0.16);
  border-color: rgba(80, 200, 120, 0.35);
  color: #b6f0c5;
}
.news-card__chip--negative {
  background: rgba(255, 90, 90, 0.16);
  border-color: rgba(255, 90, 90, 0.35);
  color: #ffc6c6;
}
.news-card__chip--neutral {
  background: rgba(180, 180, 180, 0.10);
  border-color: rgba(180, 180, 180, 0.22);
}
.news-card__chip--importance { opacity: 0.86; }
.news-card__chip--coin {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
}

/* RTL — Arabic. The hreflang dir attribute on <html> already exists; just
   nudge the chip rows to flow right-to-left. */
[dir="rtl"] .news-card__meta,
[dir="rtl"] .news-filters {
  direction: rtl;
}
