/* =========================================================
   NEWS — Forza Horizon-inspired card grid
   Dark editorial broadcast aesthetic.
   ========================================================= */

.news-page { padding-bottom: 80px; }

/* ---- filter pills ---- */
.news-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
}
.news-pill {
  font-family: var(--font-display);
  font-weight: 700; font-size: 11px; letter-spacing: 0.14em;
  padding: 8px 14px; border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s, color .18s, border-color .18s;
}
.news-pill:hover {
  color: var(--ink-0);
  border-color: color-mix(in oklab, var(--pill, var(--red)), transparent 40%);
  transform: translateY(-1px);
}
.news-pill.active {
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--pill), transparent 60%),
              0 10px 28px -18px color-mix(in oklab, var(--pill), transparent 30%);
}

/* ---- featured row (two large cards) ---- */
.news-featured-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

/* ---- card grid ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 18px;
}

/* ---- card base ---- */
.news-card {
  --accent: var(--red);
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .2s;
  will-change: transform;
  isolation: isolate;
}
.news-card::after {
  /* corner glint on hover */
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, color-mix(in oklab, var(--accent), transparent 78%), transparent 55%);
  opacity: 0;
  transition: opacity .28s var(--ease);
}
.news-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in oklab, var(--accent), transparent 55%);
  box-shadow:
    0 18px 36px -20px color-mix(in oklab, var(--accent), transparent 55%),
    0 2px 0 color-mix(in oklab, var(--accent), transparent 80%);
}
.news-card:hover::after { opacity: 1; }
.news-card:hover .news-card-bar { transform: scaleX(1); }
.news-card:hover .news-hero-art .hero-center { transform: translate(-50%, -50%) scale(1.08); }
.news-card:hover .news-card-arrow { transform: translateX(4px); color: var(--accent); }

/* ---- card hero area (gradient placeholder) ---- */
.news-hero-art {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.news-card.featured .news-hero-art { aspect-ratio: 16/8; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.04) 0px,
      rgba(255,255,255,0.04) 1px,
      transparent 1px,
      transparent 10px);
  mix-blend-mode: overlay;
}
.news-hero-art::before {
  /* dark vignette */
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 50% 100%, rgba(0,0,0,0.55), transparent 70%),
    linear-gradient(to top, rgba(0,0,0,0.45), transparent 40%);
}
.hero-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5));
  transition: transform .32s var(--ease);
}
.hero-tag {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-display);
  font-weight: 800; font-size: 10px; letter-spacing: 0.18em;
  color: #fff;
  padding: 4px 8px;
  border-radius: 3px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
}

/* ---- body ---- */
.news-card-body {
  padding: 16px 18px 14px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.news-card.featured .news-card-body { padding: 20px 22px 18px; gap: 12px; }

.news-cat-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.news-cat {
  font-family: var(--font-display);
  font-weight: 800; font-size: 10px; letter-spacing: 0.16em;
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--red);
}
.news-meta {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.news-meta-dot { color: var(--ink-4); font-size: 11px; }

.news-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0.002em;
  color: var(--ink-0);
  margin: 0;
  text-wrap: pretty;
}
.news-card.featured .news-card-title { font-size: 26px; }
.news-card-title.sm { font-size: 17px; }

.news-card-bajada {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}
.news-card-bajada.sm {
  font-size: 13px;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 6px;
}
.news-card-arrow {
  font-family: var(--font-display);
  font-weight: 700; font-size: 16px;
  color: var(--ink-3);
  transition: transform .2s var(--ease), color .2s;
}

/* ---- bottom accent bar (Forza signature) ---- */
.news-card-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, color-mix(in oklab, var(--accent), #fff 30%) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

/* Home: news row reuses card styles with tighter grid */
.home-news-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 840px) { .home-news-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .home-news-row { grid-template-columns: 1fr; } }

.news-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-3);
  font-size: 15px;
}

/* =========================================================
   ARTICLE PAGE
   ========================================================= */
.news-article-page {
  --accent: var(--red);
  padding-bottom: 80px;
}
.article-hero {
  position: relative;
  min-height: 420px;
  max-height: 62vh;
  overflow: hidden;
  border-bottom: 3px solid var(--accent);
}
.article-hero .news-hero-art {
  position: absolute; inset: 0;
  aspect-ratio: auto;
}
/* hide the decorative hero tag on article hero — the article has its own header */
.article-hero .hero-tag { display: none; }

.article-hero-overlay {
  position: relative;
  z-index: 2;
  padding: 28px clamp(20px, 5vw, 56px) 36px;
  min-height: 420px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.45) 45%, transparent 80%);
}
.article-back {
  font-family: var(--font-display);
  font-weight: 700; font-size: 12px; letter-spacing: 0.14em;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s;
}
.article-back:hover { background: rgba(0,0,0,0.7); border-color: var(--accent); }
.article-hero-text { max-width: 820px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: auto; }
.article-hero-text > .news-cat { align-self: flex-start; }
.article-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.12;
  color: #fff;
  margin: 4px 0 0;
  letter-spacing: -0.005em;
  max-width: 14ch;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
@media (min-width: 700px)  { .article-title { max-width: 20ch; } }
@media (min-width: 1100px) { .article-title { max-width: 24ch; } }
.article-bajada {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.45;
  color: rgba(255,255,255,0.86);
  margin: 0;
  text-wrap: pretty;
}
.article-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
}

.article-body {
  max-width: 740px;
  margin: 48px auto 0;
  padding: 0 clamp(20px, 5vw, 40px);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-1);
}
.article-body p {
  margin: 0 0 22px;
  text-wrap: pretty;
}
.article-body p:first-child::first-letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.2em;
  line-height: 0.9;
  float: left;
  padding: 6px 12px 0 0;
  color: var(--accent);
}

.article-related {
  max-width: 1280px;
  margin: 64px auto 0;
  padding: 0 clamp(20px, 5vw, 40px);
}
.article-related .eyebrow { margin-bottom: 16px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 840px) {
  .news-featured-row { grid-template-columns: 1fr; }
  .news-card.featured .news-card-title { font-size: 22px; }
  .article-hero { min-height: 340px; }
  .article-hero-overlay { min-height: 340px; padding: 20px; }
}
@media (max-width: 520px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-card-title { font-size: 19px; }
  .news-card.featured .news-card-title { font-size: 20px; }
  .news-filter { gap: 6px; }
  .news-pill { font-size: 10px; padding: 6px 10px; }
}

/* Light theme adjustments */
[data-theme="light"] .news-card { background: var(--bg-1); }
[data-theme="light"] .hero-grid { mix-blend-mode: multiply; }
[data-theme="light"] .hero-tag { color: #fff; background: rgba(0,0,0,0.55); }
