/* ═══════════════════════════════════════════════════════════════════════
   /news — the posts staff publish in the app, mirrored on the landing.
   Scoped under `.s2e-home.subpage` like home-subpage.css; the post body
   is Quill output, so the ql-* classes it writes get their look here.
   ═══════════════════════════════════════════════════════════════════════ */

.s2e-home.subpage .news-feed,
.s2e-home.subpage .news-empty,
.s2e-home.subpage .news-pager {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.s2e-home.subpage .news-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.s2e-home.subpage .news-post {
  margin: 0;
  padding: 24px 28px 26px;
}

/* ─── Post header: category chip, date, title ──────────────────────── */
.s2e-home.subpage .news-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.s2e-home.subpage .news-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--navy-line);
  background: rgba(255, 255, 255, 0.06);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  color: var(--cream);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.s2e-home.subpage .page-wrap a.news-cat { color: var(--cream); }
.s2e-home.subpage .page-wrap a.news-cat:hover {
  color: var(--white);
  border-color: rgba(240, 167, 34, 0.45);
  background: rgba(15, 28, 60, 0.7);
  text-decoration: none;
}
.s2e-home.subpage .news-cat img {
  width: 20px;
  height: 20px;
  margin-left: -6px;
  border-radius: 5px;
  object-fit: cover;
  flex: none;
}
.s2e-home.subpage .news-post time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.s2e-home.subpage .news-post-title {
  font-size: 24px;
  line-height: 1.2;
  margin: 14px 0 16px;
  text-align: left;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* ─── Album: up to four tiles, the rest behind a "+N" ──────────────── */
.s2e-home.subpage .news-gallery {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
}
.s2e-home.subpage .news-gallery--2,
.s2e-home.subpage .news-gallery--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.s2e-home.subpage .news-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.s2e-home.subpage .news-gallery-cell {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 1px solid var(--navy-line);
  background: rgba(0, 0, 0, 0.3);
  cursor: zoom-in;
}
.s2e-home.subpage .news-gallery-cell[hidden] { display: none; }
.s2e-home.subpage .news-gallery-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* A lone image is shown whole, not cropped to a tile. */
.s2e-home.subpage .news-gallery--1 .news-gallery-cell {
  display: flex;
  justify-content: center;
  aspect-ratio: auto;
  max-height: 520px;
}
.s2e-home.subpage .news-gallery--1 .news-gallery-cell img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
}
.s2e-home.subpage .news-gallery-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 700 24px 'Ubuntu', sans-serif;
  pointer-events: none;
}

/* ─── Video: an uploaded clip or a YouTube embed ───────────────────── */
.s2e-home.subpage .news-video {
  display: block;
  width: 100%;
  max-height: 560px;
  margin: 0 0 16px;
  border-radius: 12px;
  background: #000;
}
.s2e-home.subpage .news-embed {
  aspect-ratio: 16 / 9;
  margin: 0 0 16px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.s2e-home.subpage .news-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── Body (Quill output) ───────────────────────────────────────────── */
.s2e-home.subpage .news-post-text {
  color: var(--cream);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.s2e-home.subpage .news-post-text p { margin: 0 0 10px; }
.s2e-home.subpage .news-post-text > :last-child { margin-bottom: 0; }
.s2e-home.subpage .news-post-text h1,
.s2e-home.subpage .news-post-text h2,
.s2e-home.subpage .news-post-text h3 { font-size: 20px; margin: 16px 0 8px; text-align: left; }
.s2e-home.subpage .news-post-text h4,
.s2e-home.subpage .news-post-text h5,
.s2e-home.subpage .news-post-text h6 { font-size: 16px; margin: 14px 0 6px; }
.s2e-home.subpage .news-post-text ul,
.s2e-home.subpage .news-post-text ol { margin: 0 0 10px; }
.s2e-home.subpage .news-post-text img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px 0;
  border-radius: 10px;
}
.s2e-home.subpage .news-post-text blockquote {
  margin: 10px 0;
  padding: 6px 16px;
  border-left: 3px solid var(--magenta);
  color: var(--muted);
}
.s2e-home.subpage .news-post-text pre {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--navy-line);
  background: rgba(0, 0, 0, 0.35);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #f1bdfa;
  white-space: pre-wrap;
  overflow-x: auto;
}
.s2e-home.subpage .news-post-text hr { margin: 16px 0; }
.s2e-home.subpage .news-post-text .ql-align-center { text-align: center; }
.s2e-home.subpage .news-post-text .ql-align-right { text-align: right; }
.s2e-home.subpage .news-post-text .ql-align-justify { text-align: justify; }
.s2e-home.subpage .news-post-text .ql-indent-1 { padding-left: 2em; }
.s2e-home.subpage .news-post-text .ql-indent-2 { padding-left: 4em; }
.s2e-home.subpage .news-post-text .ql-indent-3 { padding-left: 6em; }
.s2e-home.subpage .news-post-text .ql-size-small { font-size: 0.8em; }
.s2e-home.subpage .news-post-text .ql-size-large { font-size: 1.3em; }
.s2e-home.subpage .news-post-text .ql-size-huge { font-size: 1.8em; }

/* ─── Empty state and pager ────────────────────────────────────────── */
.s2e-home.subpage .news-empty {
  padding: 40px 24px;
  text-align: center;
}
.s2e-home.subpage .news-pager {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.s2e-home.subpage .news-pager .btn { font-size: 14px; }

/* ─── Lightbox ──────────────────────────────────────────────────────── */
.news-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  background: rgba(4, 8, 26, 0.92);
  cursor: zoom-out;
}
.news-lightbox[hidden] { display: none; }
body.news-lightbox-open { overflow: hidden; }
.news-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  cursor: default;
}
.news-lightbox button {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.news-lightbox button:hover { background: rgba(255, 255, 255, 0.24); }
.news-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50% !important;
  font-size: 22px !important;
}
.news-lightbox-nav {
  width: 40px;
  height: 64px;
  flex: none;
}
.news-lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

/* ─── Mobile ───────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .news-lightbox { padding: 12px; gap: 4px; }
  .news-lightbox-nav { width: 32px; height: 56px; }
}
@media (max-width: 480px) {
  .s2e-home.subpage .news-feed { gap: 12px; }
  .s2e-home.subpage .news-post { padding: 14px 16px 16px; }
  .s2e-home.subpage .news-post-title { font-size: 18px; margin: 10px 0 12px; }
  .s2e-home.subpage .news-cat { font-size: 11px; }
  .s2e-home.subpage .news-gallery { gap: 4px; margin-bottom: 12px; }
  .s2e-home.subpage .news-gallery--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s2e-home.subpage .news-gallery--1 .news-gallery-cell,
  .s2e-home.subpage .news-gallery--1 .news-gallery-cell img { max-height: 320px; }
  .s2e-home.subpage .news-post-text { font-size: 13px; line-height: 1.55; }
  .s2e-home.subpage .news-pager { flex-direction: column; margin-top: 20px; }
  .s2e-home.subpage .news-pager .btn { justify-content: center; }
}
