/* /news and the homepage news teaser. Uses the belgrade theme's tokens
   (--g, --ink, --line, --radius, --shadow-*, --bg-tint). */

.news-list { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 2rem; }
.news-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Photos: the rotator on the left, thumbnails on the right (js/news.js). */
.news-gallery { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 6px; background: var(--bg-tint, #f3f5f4); }
.news-gallery--multi { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.news-rotator {
  position: relative; overflow: hidden; border-radius: calc(var(--radius-lg) - 6px);
  aspect-ratio: 4 / 3; background: #0d1a14; cursor: zoom-in;
}
.news-gallery:not(.news-gallery--multi) .news-rotator { aspect-ratio: 16 / 9; }
.news-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; filter: brightness(.55); transform: scale(1.06);
  transition: opacity 1.4s ease, filter 1.4s ease;
}
.news-slide.is-active { opacity: 1; filter: brightness(1); animation: news-kenburns 7s ease-out forwards; }
@keyframes news-kenburns { from { transform: scale(1.06) rotate(-.6deg); } to { transform: scale(1.16) rotate(.6deg); } }
.news-rotator::after { /* a soft dim at the bottom for the dots */
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(transparent, oklch(0.15 0.02 160 / .45)); pointer-events: none;
}
.news-rotator:focus-visible { outline: 3px solid var(--g); outline-offset: 2px; }
.news-zoom {
  position: absolute; top: .75rem; right: .75rem; z-index: 2;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center;
  background: oklch(0.15 0.02 160 / .5); color: #fff; opacity: 0; transition: opacity .2s;
}
.news-rotator:hover .news-zoom, .news-rotator:focus-visible .news-zoom { opacity: 1; }
.news-dots { position: absolute; left: 0; right: 0; bottom: .8rem; z-index: 2; display: flex; justify-content: center; gap: .4rem; }
.news-dots span { width: .5rem; height: .5rem; border-radius: 999px; background: #fff; opacity: .5; transition: width .3s, opacity .3s; }
.news-dots span.is-active { width: 1.4rem; opacity: 1; }

.news-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; }
.news-thumb {
  position: relative; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 10px; overflow: hidden; aspect-ratio: 1 / 1;
  outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .3s, transform .2s;
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85) brightness(.9); transition: filter .3s, transform .4s; }
.news-thumb:hover img, .news-thumb.is-active img { filter: none; transform: scale(1.05); }
.news-thumb.is-active { outline-color: var(--g); }
.news-thumb:focus-visible { outline-color: var(--g-700); }
.news-more-count {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: oklch(0.2 0.03 200 / .55); color: #fff; font-size: 1.6rem; font-weight: 800;
}

/* Full-screen photo viewer. */
.news-lightbox {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center;
  background: oklch(0.12 0.015 160 / .94); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.news-lightbox.is-open { opacity: 1; visibility: visible; }
.news-lightbox img {
  max-width: min(94vw, 1600px); max-height: 86vh; object-fit: contain; border-radius: 6px;
  box-shadow: 0 20px 60px rgb(0 0 0 / .5); transition: opacity .2s;
}
.news-lightbox img.is-loading { opacity: .3; }
.news-lb-btn {
  position: absolute; border: 0; color: #fff; background: rgb(255 255 255 / .12);
  width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem;
  cursor: pointer; transition: background .2s;
}
.news-lb-btn:hover, .news-lb-btn:focus-visible { background: rgb(255 255 255 / .25); }
.news-lb-close { top: 1rem; right: 1rem; }
.news-lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.news-lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.news-lb-count { position: absolute; bottom: 1.1rem; left: 0; right: 0; text-align: center; color: #fff; opacity: .8; font-weight: 700; font-size: .9rem; }
body.news-lb-open { overflow: hidden; }

@media (max-width: 767px) {
  .news-gallery--multi { grid-template-columns: 1fr; }
  .news-thumbs { grid-template-columns: repeat(4, 1fr); }
  .news-lb-prev, .news-lb-next { display: none; } /* swipe instead */
}
@media (prefers-reduced-motion: reduce) {
  .news-slide { transition: opacity .6s ease; filter: none; transform: none; }
  .news-slide.is-active { animation: none; }
}

.news-body { padding: 1.25rem 1.5rem 1.4rem; }
.news-date { font-size: .82rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: .4rem; margin-bottom: .6rem; }
.news-text { color: var(--ink); line-height: 1.6; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.news-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; }
.news-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--g-700); text-decoration: none; }
.news-link:hover { text-decoration: underline; }

/* Homepage teaser */
.nt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.nt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.nt-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.nt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.nt-thumb { aspect-ratio: 16 / 10; background: var(--bg-tint); display: grid; place-items: center; overflow: hidden; }
.nt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nt-noimg { color: var(--muted); font-size: 2rem; }
.nt-text { padding: 1rem 1.1rem 1.2rem; }
.nt-date { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: .35rem; }
.nt-text p { margin: 0; color: var(--ink); line-height: 1.5; }

@media (max-width: 767px) {
  .nt-grid { grid-template-columns: 1fr; }
}
