/* Church news on the church website: /news (lead story, category filter, card grid, pages) and /news/{slug} (article,
   share bar, previous / next, "keep reading"). modules/website/news.php + views/news/public_*.php.
   Built only on the site's tokens (--ws-*, set per theme in site.css and by every premium skin), so Classic, Modern,
   Minimal and the skins restyle it, light or dark. Text colours inside the page header inherit, because some themes and
   skins draw that header dark. */

/* ── Page header ──────────────────────────────────────────────────────────── */
.nw-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.nw-head-text { min-width: 0; max-width: 760px; }
.ws .nw-rss { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid color-mix(in srgb, currentColor 24%, transparent); border-radius: 999px; color: inherit; font: 600 14px/1 var(--ws-font-b); text-decoration: none; opacity: .86; transition: opacity var(--ws-t) var(--ws-ease), background-color var(--ws-t) var(--ws-ease); }
.ws .nw-rss:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.ws .nw-rss:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.ws-theme-classic .nw-head-row { flex-direction: column; align-items: center; }
.ws-theme-classic .nw-head-text { margin-inline: auto; }

/* ── Category filter ─────────────────────────────────────────────────────── */
.nw-sec { padding-top: clamp(28px, 4vw, 52px); }
.nw-cats ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(28px, 4vw, 44px); padding: 0; list-style: none; }
.ws .nw-cats a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--ws-line-strong); border-radius: 999px; background: var(--ws-surface); color: var(--ws-ink-2); font: 600 14.5px/1 var(--ws-font-b); text-decoration: none; white-space: nowrap; transition: border-color var(--ws-t) var(--ws-ease), background-color var(--ws-t) var(--ws-ease), color var(--ws-t) var(--ws-ease); }
.ws .nw-cats a:hover { border-color: var(--ws-ink); color: var(--ws-ink); }
.ws .nw-cats a[aria-current="page"] { border-color: var(--ws-ink); background: var(--ws-ink); color: var(--ws-bg); }
.nw-count { font-size: 12.5px; font-weight: 700; opacity: .62; font-variant-numeric: tabular-nums; }

/* ── Lead story (page 1) ─────────────────────────────────────────────────── */
.nw-lead { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: center; margin-bottom: clamp(48px, 7vw, 88px); }
.nw-lead-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--ws-img-radius); background: var(--ws-surface-3); box-shadow: var(--ws-shadow); }
.nw-lead-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ws-ease); }
.nw-lead:hover .nw-lead-media img { transform: scale(1.03); }
.nw-lead-title { margin: 12px 0 16px; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.08; text-wrap: balance; }
.ws .nw-lead-title a { color: var(--ws-ink); text-decoration: none; }
.ws .nw-lead:hover .nw-lead-title a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.nw-lead-text { margin: 0 0 18px; max-width: 54ch; color: var(--ws-muted); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; text-wrap: pretty; }
.nw-readmore { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--ws-primary-ink); font-weight: 700; }
.nw-readmore span { transition: transform var(--ws-t2) var(--ws-ease); }
.nw-lead:hover .nw-readmore span { transform: translateX(4px); }
.nw-flag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; background: var(--ws-primary); color: var(--ws-on-primary); letter-spacing: .08em; }
.nw-lead .nw-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nw-section-title { margin: 0 0 clamp(20px, 3vw, 28px); padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--ws-line); font-size: clamp(22px, 2.4vw, 28px); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.nw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 32px); }
.nw-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-surface); box-shadow: var(--ws-shadow); transition: transform var(--ws-t2) var(--ws-ease), box-shadow var(--ws-t2) var(--ws-ease); }
.nw-card:hover { transform: translateY(-3px); box-shadow: var(--ws-shadow-hover); }
.nw-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ws-surface-3); }
.nw-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ws-ease); }
.nw-card:hover .nw-card-media img { transform: scale(1.04); }
.nw-card-body { display: flex; flex: 1; flex-direction: column; padding: clamp(18px, 2vw, 22px) clamp(18px, 2vw, 24px) clamp(20px, 2.2vw, 24px); }
.nw-kicker { margin: 0 0 8px; color: var(--ws-primary-ink); font: 700 12px/1.3 var(--ws-font-b); letter-spacing: .1em; text-transform: uppercase; }
.ws-theme-minimal .nw-kicker { color: var(--ws-muted); }
.nw-card-title { margin: 0 0 10px; font-size: clamp(19px, 1.5vw, 22px); line-height: 1.24; letter-spacing: -.01em; text-wrap: balance; }
.ws .nw-card-title a { color: var(--ws-ink); text-decoration: none; }
.ws .nw-card:hover .nw-card-title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.nw-card-text { display: -webkit-box; margin: 0 0 18px; overflow: hidden; color: var(--ws-muted); font-size: 15.5px; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.nw-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: auto 0 0; color: var(--ws-muted); font-size: 14px; }
.nw-lead .nw-meta { margin: 0; }
/* The whole card (or lead story) is the title's link. */
.nw-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ws .nw-card-link:focus { outline: none; }
.ws .nw-card-link:focus-visible::after { outline: 3px solid var(--ws-primary); outline-offset: 3px; border-radius: var(--ws-radius); }
/* No photo: the brand colour with the category. */
.nw-ph { display: grid; place-items: center; width: 100%; height: 100%; padding: 24px; background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--ws-primary) 78%, #fff) 0%, var(--ws-primary) 46%, color-mix(in srgb, var(--ws-primary) 58%, #000) 100%); color: var(--ws-on-primary); }
.nw-ph span { max-width: 14ch; font: var(--ws-h-weight, 700) clamp(18px, 1.8vw, 24px)/1.1 var(--ws-font-h); letter-spacing: -.01em; text-align: center; opacity: .95; }
.nw-ph-lg span { font-size: clamp(26px, 3vw, 40px); }

/* ── Pages ───────────────────────────────────────────────────────────────── */
.nw-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: clamp(40px, 6vw, 72px); }
.ws .nw-pager a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid var(--ws-line-strong); border-radius: var(--ws-btn-radius); background: var(--ws-surface); color: var(--ws-ink-2); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; transition: border-color var(--ws-t) var(--ws-ease), background-color var(--ws-t) var(--ws-ease); }
.ws .nw-pager a:hover { border-color: var(--ws-ink); color: var(--ws-ink); }
.ws .nw-pager a[aria-current="page"] { border-color: var(--ws-ink); background: var(--ws-ink); color: var(--ws-bg); }
.nw-pager-gap { padding: 0 4px; color: var(--ws-muted); }

/* ── Empty states ────────────────────────────────────────────────────────── */
.nw-empty { max-width: 600px; margin: clamp(8px, 3vw, 32px) auto; padding: clamp(36px, 6vw, 64px) clamp(20px, 4vw, 40px); border: 1px dashed var(--ws-line-strong); border-radius: var(--ws-radius-lg); background: var(--ws-surface); text-align: center; }
.nw-empty-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 18px; border-radius: 50%; background: var(--ws-primary-soft); color: var(--ws-primary-soft-ink); }
.nw-empty h2 { margin: 0 0 10px; font-size: clamp(24px, 2.6vw, 30px); }
.nw-empty p { margin: 0 auto 24px; max-width: 46ch; color: var(--ws-muted); }
.ws .nw-empty .nw-empty-staff { display: flex; gap: 8px; align-items: flex-start; justify-content: center; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--ws-line); font-size: 14.5px; text-align: left; }
.nw-empty-staff svg { flex: none; margin-top: 3px; }

/* ── Article ─────────────────────────────────────────────────────────────── */
.nw-article-wrap { max-width: calc(860px + 2 * var(--ws-gutter)); }
.nw-article-head h1 { text-wrap: balance; }
.nw-dek { max-width: 60ch; }
.ws-theme-classic .nw-dek { margin-inline: auto; }
.nw-byline { display: flex; align-items: center; gap: 12px; margin-top: clamp(22px, 3vw, 32px); font-size: 15px; line-height: 1.35; }
.ws-theme-classic .nw-byline { justify-content: center; text-align: left; }
.nw-avatar { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ws-primary); color: var(--ws-on-primary); font: 700 15px/1 var(--ws-font-b); letter-spacing: .02em; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent); }
.nw-byline-name { display: block; font-weight: 700; }
.nw-byline-meta { display: block; margin-top: 2px; font-size: 14px; opacity: .78; }
/* The featured photo rides up over the bottom of the header. */
.nw-has-hero .nw-article-head { padding-bottom: calc(clamp(36px, 5vw, 56px) + clamp(56px, 9vw, 150px)); }
.nw-hero { position: relative; z-index: 1; max-width: calc(1100px + 2 * var(--ws-gutter)); margin: calc(-1 * clamp(56px, 9vw, 150px)) auto 0; padding-inline: var(--ws-gutter); }
.nw-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--ws-img-radius); background: var(--ws-surface-3); box-shadow: var(--ws-shadow-lg); }
.nw-article-body { max-width: calc(720px + 2 * var(--ws-gutter)); margin: 0 auto; padding: clamp(36px, 5vw, 64px) var(--ws-gutter) clamp(56px, 8vw, 96px); }
.ws-prose.nw-prose { font-size: clamp(17.5px, 1.4vw, 19px); line-height: 1.75; overflow-wrap: break-word; }
.nw-prose p { margin: 0 0 1.2em; }
.nw-prose h2 { margin: 1.6em 0 .55em; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; }
.nw-prose h2:first-child, .nw-prose h3:first-child { margin-top: 0; }
.nw-prose a { text-decoration: underline; }
.nw-prose .ta-center { text-align: center; } .nw-prose .ta-right { text-align: right; }
.nw-prose .rt-brand { color: var(--ws-primary-ink); } .nw-prose .rt-accent { color: var(--ws-accent); } .nw-prose .rt-muted { color: var(--ws-muted); }
.nw-prose mark { padding: 0 .15em; border-radius: 3px; background: color-mix(in srgb, var(--ws-accent) 30%, transparent); color: inherit; }
.nw-cta { margin: 36px 0 0; }
.nw-article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: clamp(36px, 5vw, 52px); padding-top: 24px; border-top: 1px solid var(--ws-line); }
.ws .nw-tag { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--ws-primary-soft); color: var(--ws-primary-soft-ink); font: 600 14px/1 var(--ws-font-b); text-decoration: none; }
.ws .nw-tag:hover { text-decoration: underline; }
.nw-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nw-share-label { margin-right: 4px; color: var(--ws-muted); font-size: 14px; font-weight: 600; }
.ws .nw-share-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--ws-line-strong); border-radius: 50%; background: var(--ws-surface); color: var(--ws-ink-2); cursor: pointer; transition: background-color var(--ws-t) var(--ws-ease), color var(--ws-t) var(--ws-ease), border-color var(--ws-t) var(--ws-ease); }
.ws .nw-share-btn:hover, .ws .nw-share-btn.is-done { border-color: var(--ws-primary); background: var(--ws-primary); color: var(--ws-on-primary); }
.ws .nw-share-btn:focus-visible { outline: 3px solid var(--ws-primary); outline-offset: 2px; }
.nw-share-btn[hidden] { display: none; }
.nw-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(32px, 4vw, 44px); }
.ws .nw-pn a { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-surface); color: var(--ws-ink); text-decoration: none; transition: border-color var(--ws-t) var(--ws-ease), box-shadow var(--ws-t) var(--ws-ease); }
.ws .nw-pn a:hover { border-color: var(--ws-line-strong); box-shadow: var(--ws-shadow-hover); }
.nw-pn-next { grid-column: 2; text-align: right; }
.nw-pn small { color: var(--ws-muted); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nw-pn strong { font: var(--ws-h-weight, 700) 17px/1.3 var(--ws-font-h); }
.nw-more { padding: clamp(52px, 7vw, 96px) 0; border-top: 1px solid var(--ws-line); background: var(--ws-surface-2); }
.nw-more-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: clamp(22px, 3vw, 32px); }
.nw-more-head h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); }
.ws .nw-more-all { font-weight: 700; text-decoration: none; }
.ws .nw-more-all:hover { text-decoration: underline; }

/* ── Phones and tablets ──────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .nw-lead { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 640px) {
  .nw-grid { grid-template-columns: 1fr; }
  /* Categories scroll sideways inside the page margin instead of wrapping into a tall block. */
  .nw-cats ul { flex-wrap: nowrap; margin-inline: calc(-1 * var(--ws-gutter)); padding-inline: var(--ws-gutter); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nw-cats ul::-webkit-scrollbar { display: none; }
  .nw-head-row { align-items: flex-start; }
  .nw-pn { grid-template-columns: 1fr; }
  .nw-pn-next { grid-column: auto; text-align: left; }
  .nw-article-foot { flex-direction: column; align-items: flex-start; }
  .nw-pager-step { flex-basis: 100%; }
  .ws .nw-pager .nw-pager-step { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .nw-card, .nw-card-media img, .nw-lead-media img, .nw-readmore span { transition: none; }
  .nw-card:hover, .nw-card:hover .nw-card-media img, .nw-lead:hover .nw-lead-media img { transform: none; }
}

@media print {
  .nw-share, .nw-pn, .nw-more, .nw-cats, .nw-pager, .nw-rss { display: none !important; }
  .nw-has-hero .nw-article-head { padding-bottom: 24px; }
  .nw-hero { margin-top: 0; }
  .nw-hero img { box-shadow: none; }
}

/* Long URLs or unbroken words in titles and summaries must wrap, never widen the page. */
.nw-lead > *, .nw-lead-body, .nw-card-body { min-width: 0; }
.nw-lead-title, .nw-lead-text, .nw-card-title, .nw-card-text, .nw-title, .nw-kicker, .nw-meta { overflow-wrap: anywhere; }
