/* ── Cover image ────────────────────────────────────────── */
.news-detail-cover {
  width: 100%;
  margin: 0 0 28px;
  border-radius: 10px;
  overflow: hidden;
}

.news-detail-cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Content area ───────────────────────────────────────── */
.news-detail-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.news-detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 16px;
}

.news-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.news-detail-meta {
  font-size: 0.95rem;
  color: rgb(var(--text-rgb) / 0.45);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

/* ── Article body (rendered Markdown) ──────────────────── */
.news-detail-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgb(var(--text-rgb) / 0.85);
}

.news-detail-body h2,
.news-detail-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 32px;
}

.news-detail-body p { margin: 0 0 16px; }
.news-detail-body img { max-width: 100%; border-radius: 6px; margin: 16px 0; }
.news-detail-body a { color: var(--red); font-weight: 500; }
.news-detail-body blockquote {
  border-left: 3px solid var(--red);
  padding-left: 16px;
  margin-left: 0;
  color: rgb(var(--text-rgb) / 0.6);
  font-style: italic;
}
.news-detail-body ul,
.news-detail-body ol {
  padding-left: 24px;
  margin: 0 0 16px;
}
.news-detail-body li { margin-bottom: 4px; }
.news-detail-body code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}
.news-detail-body pre {
  background: var(--surface);
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0 0 16px;
}
.news-detail-body pre code { background: none; padding: 0; }

/* ── Gallery thumbnails ─────────────────────────────────── */
.news-detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.news-gallery-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}

.news-gallery-thumb:hover { transform: scale(1.03); }
.news-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Back link ──────────────────────────────────────────── */
.news-back-link {
  display: inline-block;
  margin: 0 0 24px;
  color: var(--red);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.news-back-link:hover { text-decoration: underline; }

/* ── Lightbox overlay ───────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.active { display: flex; }

.lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 16px;
  z-index: 10;
}

.lightbox-close { top: 16px; right: 16px; font-size: 2.5rem; }
.lightbox-prev  { left: 16px;  top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-next  { right: 16px; top: 50%; transform: translateY(-50%); font-size: 3rem; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* ── Loading / Error states ─────────────────────────────── */
.news-loading,
.news-error {
  text-align: center;
  padding: 80px 24px;
  color: rgb(var(--text-rgb) / 0.5);
}

.news-error a { color: var(--red); }
