/* =========================================================
   GCC Insurance Daily — news section styles
   Layers on /assets/styles.css (uses the same design tokens)
   ========================================================= */

.news-hero { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.news-hero h1 { margin: .8rem 0 1rem; }

.news-body { padding-bottom: clamp(3rem, 8vw, 5rem); }

/* ---------- Category groups (edition + front page) ---------- */
/* .news-group is a <section>, so it inherits the global section padding-block —
   cancel it and use a small margin for separation between categories instead. */
/* Category groups (edition pages) become a card grid; the head spans all columns. */
.news-group {
  padding-block: 0; margin-top: 2rem;
  display: grid; gap: 1rem; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.news-group:first-of-type { margin-top: 1rem; }
.news-grouphead {
  grid-column: 1 / -1;
  font-size: 1.3rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--accent);
  display: flex; align-items: baseline; gap: .6rem;
}
.news-count {
  font-family: var(--sans); font-size: .8rem; font-weight: 600;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: .05rem .55rem;
}

/* ---------- Category accent colour (drives card borders) ---------- */
.news-item, .news-lead { --cat: var(--accent); }
[data-cat="regulation"]      { --cat: #1b3765; }
[data-cat="governance"]      { --cat: #6b4f9e; }
[data-cat="ai-in-insurance"] { --cat: #3f7a2a; }
[data-cat="people-moves"]    { --cat: #c0451c; }
[data-cat="rumour"]          { --cat: #9e3b3b; }
[data-cat="company"]         { --cat: #3a6b4f; }
[data-cat="market"]          { --cat: #4a5560; }

/* ---------- News item card ---------- */
.news-item {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cat);
  border-radius: 14px;
  padding: 1.05rem 1.2rem;
  scroll-margin-top: 80px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.news-item:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -24px rgba(0,0,0,.45); }
.news-item:target { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 45%, transparent); }
.news-item h3 { margin: .55rem 0 .4rem; font-size: 1.12rem; line-height: 1.3; }
.news-item p { color: var(--ink); margin: 0 0 .8rem; font-size: 1rem; }
.news-item .news-foot { margin-top: auto; }

/* Front-page grid (mixed categories, after the lead story) */
.news-grid {
  display: grid; gap: 1rem; margin-top: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ---------- Featured lead story (front page) ---------- */
.news-lead {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--cat);
  border-radius: 18px;
  padding: clamp(1.4rem, 4vw, 2.3rem);
  box-shadow: 0 22px 54px -36px rgba(0,0,0,.45);
  margin-top: 1.2rem;
  scroll-margin-top: 80px;
}
.news-leadlabel {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .14em;
  font-size: .72rem; font-weight: 700; color: var(--cat); margin: 0 0 .7rem;
  display: flex; align-items: center; gap: .45rem;
}
.news-leadlabel::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cat); }
.news-lead h2 { font-family: var(--serif); font-size: clamp(1.45rem, 3.5vw, 2.1rem); line-height: 1.15; margin: .5rem 0 .7rem; }
.news-lead p { font-size: 1.08rem; color: var(--ink); max-width: 72ch; margin: 0 0 1rem; }

.news-badges { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.news-foot { font-size: .88rem; }
.news-src { color: var(--muted); }
.news-src:hover { color: var(--accent); }

/* ---------- Badges ---------- */
.news-cat, .news-flag, .news-conf, .news-geo {
  font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px; line-height: 1.5; white-space: nowrap;
}
.news-cat { color: #fff; background: var(--accent); }
.news-cat[data-cat="regulation"]      { background: #1b3765; }
.news-cat[data-cat="governance"]      { background: #6b4f9e; }
.news-cat[data-cat="ai-in-insurance"] { background: #3f7a2a; }
.news-cat[data-cat="people-moves"]    { background: #c0451c; }
.news-cat[data-cat="rumour"]          { background: #9e3b3b; }
.news-cat[data-cat="company"]         { background: #3a6b4f; }
.news-cat[data-cat="market"]          { background: #4a5560; }

.news-geo { color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.news-flag { color: #9e3b3b; background: color-mix(in srgb, #9e3b3b 10%, var(--surface)); border: 1px solid color-mix(in srgb, #9e3b3b 35%, var(--line)); }

.news-conf { color: var(--muted); background: transparent; border: 1px solid var(--line); text-transform: none; letter-spacing: .02em; }
.news-conf[data-conf="confirmed"]    { color: #2f6b4f; border-color: color-mix(in srgb, #2f6b4f 40%, var(--line)); }
.news-conf[data-conf="corroborated"] { color: #8a6d1f; border-color: color-mix(in srgb, #8a6d1f 40%, var(--line)); }

.news-disclaimer { margin-top: 2.5rem; font-size: .85rem; color: var(--muted); max-width: 70ch; border-top: 1px solid var(--line); padding-top: 1.2rem; }

/* ---------- Front page latest headlines ---------- */
.news-latest { margin-top: 2.5rem; }
.news-headlines { margin-top: 1rem; border-top: 1px solid var(--line); }

/* ---------- Archive: search + filters ---------- */
.news-controls {
  position: sticky; top: 64px; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  padding: 1rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1rem;
}
.news-search {
  width: 100%; font-family: var(--sans); font-size: 1.05rem;
  padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink);
}
.news-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.news-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.news-chip {
  font-family: var(--sans); font-size: .82rem; font-weight: 600;
  padding: .3rem .8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: all .12s ease;
}
.news-chip:hover { border-color: var(--accent); color: var(--ink); }
.news-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.news-resultcount { font-size: .85rem; color: var(--muted); margin: .4rem 0 1rem; }

/* ---------- Archive: one-line rows grouped by day ---------- */
.news-dayhead {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600;
  margin: 1.8rem 0 .4rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line);
}
.news-dayhead a { color: var(--ink); }
.news-dayhead a:hover { color: var(--accent); }
.news-row {
  display: flex; gap: .8rem; align-items: baseline;
  padding: .55rem 0; border-bottom: 1px solid var(--line);
}
.news-row a.news-rowtitle { color: var(--ink); font-size: 1rem; }
.news-row a.news-rowtitle:hover { color: var(--accent); }
.news-row .news-rowmeta { display: flex; gap: .4rem; align-items: center; flex: 0 0 auto; }
.news-row .news-rowtitle { flex: 1 1 auto; min-width: 0; }
.news-empty { color: var(--muted); padding: 2rem 0; }

mark { background: color-mix(in srgb, var(--gold) 35%, transparent); color: inherit; padding: 0 .1em; border-radius: 2px; }

@media (max-width: 560px) {
  .news-row { flex-direction: column; gap: .3rem; }
  .news-controls { top: 56px; }
}
