/* =============================================================
   Nyhetskarusell på startsidan, "Aktuella uppdrag" (261023)
   Kort ur de senaste nyheterna — se nyhetsgalleri.js och _build/build_news_slides.py
   ============================================================= */
.ng-section { background: var(--white); }
.ng-section[hidden] { display: none; }
.ng-section .home-section-header { margin-bottom: 32px; }
.ng { position: relative; }
.ng img { margin: 0; }

.ng-nav { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: -16px 0 16px; }
.ng.ng-static .ng-nav { display: none; }
.ng-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--white); color: var(--ink); font-size: 1.3rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.ng-btn:hover { border-color: var(--accent); color: var(--accent); }
.ng-btn:focus-visible, .ng a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ng-btn.ng-small { width: 34px; height: 34px; font-size: .8rem; }

.ng-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 20px;
  scrollbar-width: none;
}
.ng-track::-webkit-scrollbar { display: none; }
.ng-card { scroll-snap-align: start; }
.ng-card a {
  position: relative; display: flex; flex-direction: column; height: 100%; background: var(--white); color: var(--ink);
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: transform .3s, box-shadow .3s;
}
.ng-card a:hover { transform: translateY(-4px); box-shadow: 0 12px 32px var(--shadow); color: var(--ink); }
.ng-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #E8E6E3; }
.ng-card-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ng-date { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ng-card h3 {
  font-family: 'Playfair Display', serif; font-size: 1.08rem; line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ng-more { margin-top: auto; padding-top: 6px; color: var(--accent); font-weight: 600; font-size: .9rem; }

/* utställningar från PersonMuseum (inblandade efter varannan nyhet) */
.ng-badge {
  position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 11px; border-radius: 999px;
  background: rgba(61, 50, 42, .9); color: var(--white); font-size: .72rem; font-weight: 600; letter-spacing: .04em;
}
.ng-card--pm .ng-date { color: #66745A; }   /* mörkare salvia: kontrast 5:1 mot vitt */

@media (max-width: 1000px) {
  .ng-track { grid-auto-columns: calc((100% - 24px) / 2); }
}
@media (max-width: 768px) {
  .ng-prev, .ng-next { display: none; }
  .ng-nav { margin: -20px 0 12px; }
  .ng-track { grid-auto-columns: 82%; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ng-track { scroll-behavior: auto; }
  .ng-card a { transition: none; }
}
