/**
 * Single news article.
 *
 * Proportions are the live Elementor template's, measured at 1440px: a 1200px
 * hero with 24px corners, then an 800px reading column with 20px between the
 * date, the title and each body section. The live text is TBC Contractica CAPS
 * in deep green at 16/24; the title is the one line set in a lowercase face.
 */

.deka-news-single {
  padding-block: var(--deka-space-md) var(--deka-space-3xl);
  color: var(--deka-text-article);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.deka-news-single__hero {
  width: min(100% - 2.5rem, 75rem); /* 1200 */
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: 1.5rem; /* 24 */
  overflow: hidden;
  background: var(--deka-surface-sunken);
}

.deka-news-single__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Reading column
   ========================================================================== */

.deka-news-single__column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* 20 */
  width: min(100% - 2.5rem, 50rem); /* 800 */
  margin: 1.875rem auto 0; /* 30 below the hero */
}

.deka-news-single__header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.deka-news-single__date {
  font-family: var(--deka-font-display);
  font-size: 0.9375rem; /* 15 */
  line-height: 1;
}

/* FiraGO rather than the display face: TBC Contractica CAPS sets Georgian in
   capitals, and the live title is lowercase. */
.deka-news-single__title {
  font-family: var(--deka-font-body);
  font-size: clamp(1.5625rem, 1.4583rem + 0.463vw, 1.875rem); /* 25 → 30 */
  font-weight: var(--deka-weight-bold);
  line-height: var(--deka-leading-snug);
  letter-spacing: var(--deka-tracking-normal);
}

/* --- Text blocks ----------------------------------------------------------- */

/* Own clamp rather than --deka-text-base, which only reaches 16px around
   1800px wide; the live article is 16px at 1440. */
.deka-news-single__text {
  font-family: var(--deka-font-display);
  font-size: clamp(0.875rem, 0.8333rem + 0.1852vw, 1rem); /* 14 → 16 */
  line-height: var(--deka-leading-normal);
}

/* The reset strips every margin, so editor paragraphs get theirs back here.
   0.9em is the live 14.4px at 16px. */
.deka-news-single__text > * + * {
  margin-top: 0.9em;
}

.deka-news-single__text :is(b, strong) {
  font-weight: var(--deka-weight-bold);
}

/* Base heading sizes are for page sections; inside an article a heading is a
   bold line a step above the text. */
.deka-news-single__text :is(h2, h3, h4, h5, h6) {
  font-size: var(--deka-text-md);
  line-height: var(--deka-leading-snug);
  letter-spacing: var(--deka-tracking-normal);
  text-transform: none;
}

.deka-news-single__text :is(ul, ol) {
  padding-left: 1.25em;
}

.deka-news-single__text li + li {
  margin-top: 0.35em;
}

.deka-news-single__text img {
  border-radius: 0.625rem; /* 10 */
}

/* --- Images and galleries -------------------------------------------------- */

.deka-news-single__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem; /* 20 — the live image pair */
}

.deka-news-single__media--gallery {
  gap: 0.625rem; /* 10 — the live gallery */
}

.deka-news-single__image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.625rem; /* 10 */
}

/* A lone image — the one-image option, or a pair with a side left empty —
   spans the column at its own proportions instead of a half-width square. */
.deka-news-single__image:only-child {
  grid-column: 1 / -1;
  aspect-ratio: auto;
}
