/* The news list and articles. Loaded on those pages only. Sizes and positions of photos
   are classes, because the security policy forbids style="" attributes: the editor saves
   words such as "medium" and "left", and app/news.php turns them into these classes. */

/* ---------- The list ---------- */
.news-index { padding-top: 0; }
.news-list { display: grid; gap: 18px; max-width: 1040px; }
.news-item { position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.news-item:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.news-item-img { min-height: 220px; background: var(--bg-2); }
.news-item-img img { width: 100%; height: 100%; object-fit: cover; }
.news-item-body { display: flex; flex-direction: column; padding: clamp(20px, 3vw, 32px); }
.news-item h2 { font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.15; }
.news-item h2 a { color: inherit; }
.news-item h2 a::after { content: ""; position: absolute; inset: 0; }
.news-item h2 a:hover { text-decoration: none; }
.news-item-text { margin: 12px 0 0; color: var(--ink-2); }
.news-item:hover .card-link .arrow { transform: translateX(3px); }
.news-empty { color: var(--ink-2); }
.news-pager { display: flex; align-items: center; gap: 16px; margin-top: 32px; color: var(--muted); font-size: .94rem; }
/* Stands in on an article with no photo at all. */
.news-noimg { display: grid; place-items: center; width: 100%; height: 100%; min-height: 120px; background: var(--signal-soft); }
.news-noimg .mark { width: 45px; height: 36px; }
@media (max-width: 800px) {
  .news-item { grid-template-columns: 1fr; }
  .news-item-img { aspect-ratio: 16 / 9; min-height: 0; }
}

/* ---------- An article ---------- */
.news-article { --news-col: 820px; padding-block: clamp(24px, 4vw, 48px) var(--section); }
.news-preview { max-width: var(--news-col); margin-bottom: 24px; padding-block: 10px; color: var(--warn); font-weight: 550; }
.news-head { max-width: var(--news-col); }
.news-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
.news-head .lead { margin: 20px 0 0; }
.news-hero { max-width: 1280px; margin: clamp(28px, 4vw, 48px) auto 0; }
.news-hero img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius); }
.news-body { display: flow-root; max-width: var(--news-col); margin-top: clamp(28px, 4vw, 48px); font-size: 1.08rem; line-height: 1.65; }
.news-body > p, .news-body li { color: var(--ink-2); }
.news-body > p { margin: 0 0 1.15em; }
.news-body > h2 { margin: 1.7em 0 .55em; font-size: clamp(1.5rem, 2.4vw, 2.05rem); }
.news-body > h3 { margin: 1.5em 0 .5em; }
.news-body > :first-child { margin-top: 0; }
.news-body ul, .news-body ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.news-body ul { list-style: disc; }
.news-body ol { list-style: decimal; }
.news-body li { margin-bottom: .4em; }
.news-body a { text-decoration: underline; text-underline-offset: 2px; }
.news-body hr { clear: both; margin: 2.2em 0; border: 0; border-top: 1px solid var(--line-2); }
.news-body blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--signal); }
.news-body blockquote p { margin: 0; font-size: 1.18em; line-height: 1.45; color: var(--ink); }
.news-body blockquote footer { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.news-back { max-width: var(--news-col); clear: both; margin-top: 36px; }

/* ---------- Photos in an article ---------- */
.news-fig { margin: 1.5em 0; }
.news-fig img, .news-gallery img { width: 100%; border-radius: var(--radius-sm); }
.news-body figcaption { margin-top: 8px; font-size: .88rem; line-height: 1.4; color: var(--muted); }
.news-fig--small { width: 33%; }
.news-fig--medium { width: 50%; }
.news-fig--large { clear: both; width: 100%; }
.news-fig--center { margin-inline: auto; clear: both; }
.news-fig--left { float: left; margin: .35em 28px 14px 0; }
.news-fig--right { float: right; margin: .35em 0 14px 28px; }
/* Wider than the text, up to the page's own width, and centred on the column. */
.news-fig--full { clear: both; position: relative; left: 50%; width: min(1200px, calc(100vw - 2 * var(--gutter))); transform: translateX(-50%); }
.news-gallery { clear: both; display: grid; gap: 10px; margin: 1.5em 0; }
.news-gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.news-gallery figure { margin: 0; }
.news-gallery img { aspect-ratio: 4 / 3; object-fit: cover; }
/* On a phone there is no room beside the text. */
@media (max-width: 640px) {
  .news-fig--small, .news-fig--medium { float: none; width: 100%; margin: 1.5em 0; }
  .news-gallery--3, .news-gallery--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- The latest four ---------- */
.news-latest-title { margin-bottom: 28px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.news-latest .card h3 { font-size: 1.05rem; line-height: 1.25; }
