/* News cards: one look per layout, shared by the homepage, news list and program pages.
   Colors come from Bootstrap's theme variables so light/dark mode work without overrides. */

.nc {
  --nc-ink: var(--bs-body-color);
  --nc-muted: var(--bs-secondary-color);
  --nc-rule: var(--bs-border-color);
  --nc-surface: var(--bs-body-bg);
  --nc-tint: var(--bs-tertiary-bg);
  --nc-accent: var(--aimblue, #578bbf);
  color: var(--nc-ink);
  position: relative;
  min-width: 0;
}

.nc-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nc-accent);
  margin: 0 0 0.35rem;
}

.nc-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.4rem;
  text-wrap: balance;
}

.nc-link {
  color: inherit;
  text-decoration: none;
}

.nc-link:hover {
  color: var(--nc-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Long text is clamped visually instead of being cut off in the database. */
.nc-summary {
  color: var(--nc-muted);
  font-size: 0.93rem;
  line-height: 1.5;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.nc-when {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.nc-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.9rem;
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0 0;
  border-top: 1px solid var(--nc-rule);
}

.nc-facts dt {
  font-weight: 600;
  color: var(--nc-muted);
  white-space: nowrap;
}

.nc-facts dd {
  margin: 0;
}

.nc-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.nc-date {
  font-size: 0.8rem;
  color: var(--nc-muted);
}

.nc-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--nc-accent);
  text-decoration: none;
}

.nc-media {
  overflow: hidden;
  border-radius: 8px;
  background: var(--nc-tint);
  aspect-ratio: 16 / 9;
}

.nc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nc-media-blank {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--nc-tint), color-mix(in srgb, var(--nc-accent) 25%, var(--nc-tint)));
}

/* ── Lead ─────────────────────────────────────────── */
.nc--lead {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.75rem;
  align-items: center;
}

.nc--lead .nc-media {
  aspect-ratio: 3 / 2;
}

.nc--lead .nc-title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.15;
}

.nc--lead .nc-summary {
  font-size: 1.02rem;
  -webkit-line-clamp: 5;
  line-clamp: 5;
}

/* ── Image beside text ────────────────────────────── */
.nc--image-left {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 1.25rem;
  align-items: start;
}

.nc--image-left .nc-title {
  font-size: 1.25rem;
}

.nc--image-left .nc-summary {
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

/* ── Standard ─────────────────────────────────────── */
.nc--standard {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
}

/* ── Headline only ────────────────────────────────── */
.nc--headline {
  padding: 0.7rem 0;
  border-top: 1px solid var(--nc-rule);
}

.nc--headline .nc-title {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.nc--headline .nc-kicker {
  margin-bottom: 0.15rem;
}

/* ── Video ────────────────────────────────────────── */
.nc--video {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nc--video .video-facade {
  border-radius: 8px;
  overflow: hidden;
}

/* ── Quote ────────────────────────────────────────── */
.nc--quote {
  margin: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  border-left: 4px solid var(--nc-accent);
  background: var(--nc-tint);
  border-radius: 0 8px 8px 0;
  align-self: start;
}

.nc-quote {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.5;
  font-style: italic;
  margin: 0 0 0.75rem;
}

.nc-quote-by {
  font-size: 0.85rem;
  color: var(--nc-muted);
  margin-bottom: 0.5rem;
}

/* ── Number / milestone ───────────────────────────── */
.nc--stat {
  padding: 1.5rem;
  border: 1px solid var(--nc-rule);
  border-radius: 8px;
}

.nc-stat-value {
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--nc-accent);
  margin: 0 0 0.5rem;
  font-variant-numeric: tabular-nums;
}

/* ── Notice (announcements strip) ─────────────────── */
.nc--notice {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0;
}

.nc-notice-tag {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--nc-accent) 18%, transparent);
  color: var(--nc-accent);
}

.nc-notice-text {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.nc--notice .nc-title {
  display: inline;
  font-size: 0.95rem;
  margin: 0 0.4rem 0 0;
}

.nc--notice .nc-summary {
  display: inline;
  font-size: 0.88rem;
}

.nc-notice-date {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nc-muted);
  font-variant-numeric: tabular-nums;
}

/* Links staff put in a summary */
.nc-summary a {
  color: var(--nc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Homepage sections (templates/home.html) ──────── */
.home-strip-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.25rem 2rem;
}

/* Keep the strip's warm look and large type from the old announcements. */
.home-strip .nc--notice {
  --nc-accent: #7a4f00;
  --nc-ink: #3d2a00;
  --nc-muted: #5c4a1f;
  padding: 0.35rem 0;
}

.home-strip .nc-notice-tag {
  background: #fbe3a8;
  font-size: 0.8rem;
}

.home-strip .nc--notice .nc-title {
  font-size: 1.15rem;
}

.home-strip .nc--notice .nc-summary {
  font-size: 1rem;
}

[data-bs-theme="dark"] .home-strip .nc--notice {
  --nc-accent: #f5c46b;
  --nc-ink: #fbe9c4;
  --nc-muted: #e3cf9f;
}

[data-bs-theme="dark"] .home-strip .nc-notice-tag {
  background: rgba(245, 196, 107, 0.18);
}

.home-hero {
  padding: 2rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.home-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1.5rem;
}

.home-main > .nc-slot--lead,
.home-main > .nc-slot--image_left,
.home-main > .nc-slot--headline,
.home-main > .nc-slot--notice {
  grid-column: 1 / -1;
}

.home-main > .nc-slot--headline + .nc-slot--headline {
  margin-top: -1.75rem;
}

.home-more {
  background: var(--bs-tertiary-bg);
  padding: 2.5rem 0;
  margin-top: 1rem;
}

.home-more-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 991.98px) {
  .home-more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .home-main,
  .home-more-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Review labels (prototype ?labels=1) ──────────── */
.nc-slot--labelled {
  outline: 1px dashed color-mix(in srgb, var(--aimblue, #578bbf) 70%, transparent);
  outline-offset: 6px;
  border-radius: 4px;
  position: relative;
}

.nc-label {
  display: inline-block;
  font: 600 0.68rem/1.4 ui-monospace, Menlo, monospace;
  color: #fff;
  background: var(--aimblue, #578bbf);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

@media (max-width: 767.98px) {
  .nc--lead,
  .nc--image-left {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .nc--notice {
    flex-wrap: wrap;
  }
}
