.nsrl-ne-detail {
  --ne-bg: #faf6ec;
  --ne-card: #ffffff;
  --ne-border: #e4ddcc;
  --ne-text: #0b2e1e;
  --ne-muted: #6b7a70;
  --ne-accent: #2f8f5b;
  --ne-news: #1e6b44;
  --ne-event: #7f1d33;

  width: 100%;
  /*background-color: var(--ne-bg);*/
  padding: 60px 5%;
  box-sizing: border-box;
  font-family: var(--nsrl-font, "DM Sans", sans-serif);
  color: var(--ne-text);
}

.nsrl-ne-detail * { box-sizing: border-box; }

.nsrl-ne-detail__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: start;
}

/* ---------- Main column ---------- */
.nsrl-ne-detail__main { min-width: 0; }

.nsrl-ne-detail__meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.nsrl-ne-detail__category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  color: #fff;
}

.nsrl-ne-detail__category--news  { background-color: var(--ne-news); }
.nsrl-ne-detail__category--event { background-color: var(--ne-event); }

.nsrl-ne-detail__date {
  font-size: 13px;
  color: var(--ne-muted);
}

.nsrl-ne-detail__title {
  font-family: var(--nsrl-font-heading, "DM Sans", sans-serif);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 20px 0;
}

/* Event-only date pill, shown under the title */
.nsrl-ne-detail__event-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ne-event);
  background-color: #f7e9ec;
  border: 1px solid #ecc9d1;
  padding: 8px 14px;
  border-radius: 4px;
  margin-bottom: 28px;
}

.nsrl-ne-detail__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background-color: #d8d8d8;
  margin-bottom: 36px;
}

.nsrl-ne-detail__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Content blocks (rendered from NEWS_EVENT_BLOCK, in sort_order) ---------- */
.nsrl-ne-detail__blocks {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 680px;
}

.nsrl-ne-detail__block {
  margin: 0;
}

.nsrl-ne-detail__block-heading {
  font-family: var(--nsrl-font-heading, "DM Sans", sans-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #0b2e1e;
  margin: 0 0 12px;
}

.nsrl-ne-detail__block-text {
  font-size: 16px;
  line-height: 1.75;
  color: #33413a;
  margin: 0;
  white-space: pre-line;
}

/* Media block: 1-3 columns of images/videos (block.media_columns) */
.nsrl-ne-detail__media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.nsrl-ne-detail__media-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nsrl-ne-detail__media-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.nsrl-ne-detail__media-item {
  margin: 0;
  border-radius: 5px;
  overflow: hidden;
  background-color: #eee;
}
.nsrl-ne-detail__media-item img,
.nsrl-ne-detail__media-item video {
  width: 100%;
  display: block;
}
/* side by side: same height tiles; one column keeps the natural shape */
.nsrl-ne-detail__media-grid--cols-2 .nsrl-ne-detail__media-item,
.nsrl-ne-detail__media-grid--cols-3 .nsrl-ne-detail__media-item { aspect-ratio: 4 / 3; }
.nsrl-ne-detail__media-grid--cols-2 .nsrl-ne-detail__media-item img,
.nsrl-ne-detail__media-grid--cols-2 .nsrl-ne-detail__media-item video,
.nsrl-ne-detail__media-grid--cols-3 .nsrl-ne-detail__media-item img,
.nsrl-ne-detail__media-grid--cols-3 .nsrl-ne-detail__media-item video {
  height: 100%;
  object-fit: cover;
}
.nsrl-ne-detail__media-item video { background: #000; }

.nsrl-ne-detail__block-caption {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #5b6b62;
  white-space: pre-line;
}

/* old single-image block class, kept for any cached page */
.nsrl-ne-detail__block-image {
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
  background-color: #eee;
}
.nsrl-ne-detail__block-image img {
  width: 100%;
  display: block;
}

@media (max-width: 600px) {
  .nsrl-ne-detail__media-grid--cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .nsrl-ne-detail__media-grid--cols-2,
  .nsrl-ne-detail__media-grid--cols-3 { grid-template-columns: 1fr; }
  .nsrl-ne-detail__media-grid--cols-2 .nsrl-ne-detail__media-item,
  .nsrl-ne-detail__media-grid--cols-3 .nsrl-ne-detail__media-item { aspect-ratio: auto; }
}

/* ---------- Sidebar: Latest (same category) ---------- */
.nsrl-ne-sidebar {
  --ne-bg: #faf6ec;
  --ne-border: #e4ddcc;
  --ne-text: #0b2e1e;
  --ne-muted: #6b7a70;
  --ne-accent: #2f8f5b;
  --ne-news: #1e6b44;
  --ne-event: #7f1d33;

  width: 100%;
  max-width: 360px;
  font-family: var(--nsrl-font, "DM Sans", sans-serif);
  color: var(--ne-text);
  box-sizing: border-box;
}

.nsrl-ne-sidebar * { box-sizing: border-box; }

.nsrl-ne-sidebar__heading {
  font-family: var(--nsrl-font-heading, "DM Sans", sans-serif);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ne-accent);
  display: inline-block;
}

.nsrl-ne-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.nsrl-ne-sidebar__item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ne-border);
}

.nsrl-ne-sidebar__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.nsrl-ne-sidebar__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  overflow: hidden;
  background-color: #d8d8d8;
  background-size: cover;
  background-position: center;
  margin-bottom: 14px;
}

.nsrl-ne-sidebar__thumb-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ne-text);
}

.nsrl-ne-sidebar__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

.nsrl-ne-sidebar__category {
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nsrl-ne-sidebar__category--news  { color: var(--ne-news); }
.nsrl-ne-sidebar__category--event { color: var(--ne-event); }

.nsrl-ne-sidebar__date { color: var(--ne-muted); }

.nsrl-ne-sidebar__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ne-text);
  transition: color 0.15s ease;
}

.nsrl-ne-sidebar__item:hover .nsrl-ne-sidebar__title {
  color: var(--ne-accent);
}

@media (max-width: 900px) {
  .nsrl-ne-detail__inner {
    grid-template-columns: 1fr;
  }
  .nsrl-ne-detail__sidebar {
    position: static;
  }
}

@media (max-width: 600px) {
  .nsrl-ne-detail { padding: 40px 20px; }
}