/* ==========================================================================
   Blog article page (blog-detail.html) — Figma 117:1974, mobile 141:6433
   Depends on: variables.css, base.css, header.css, footer.css, style.css
   The article body is plain HTML (h2, p, ul, figure, blockquote), so a CMS
   can fill .post__body without extra classes.
   ========================================================================== */

/* sections sit 60px apart here (the site default is 100px) */
.post-page {
  gap: 60px;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* ---- Header: date + title ---- */

.post__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: 60px;
}

.post__date {
  padding: 6px 20px;
  border-radius: var(--radius-sm);
  background: var(--color-main-light);
  font-size: var(--fs-xl);
  line-height: var(--lh-xl);
  font-weight: var(--fw-medium);
  color: var(--color-zinc-600);
}

.post__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--fw-bold);
  color: var(--color-zinc-900);
}

/* ---- Body ---- */

.post__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: var(--fs-lg);
  line-height: var(--lh-lg);
  color: var(--color-zinc-600);
}

.post__body h2 {
  font-size: 24px;
  line-height: 36px;
  font-weight: var(--fw-medium);
  color: var(--color-zinc-900);
}

.post__body ul {
  padding-left: 27px;
  list-style: disc;
}

/* Figma: the list follows its paragraph after one blank line (28px) */
.post__body p + ul {
  margin-top: 12px;
}

.post__figure {
  margin: 0;
  padding-block: 24px;
}

.post__figure img,
.post__gallery img {
  width: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.post__figure img {
  height: 500px;
}

.post__callout {
  padding: 20px 40px;
  border-radius: var(--radius-lg);
  background: var(--color-main-darker);
  color: var(--color-white);
}

.post__quote {
  margin: 0;
  padding-left: 18px;
  border-left: 2px solid var(--color-main-darker);
}

.post__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-block: 24px;
}

.post__gallery img {
  height: 300px;
}

/* ---- Previous / next article ---- */

.post-nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

/* top and bottom lines, inside the page gutter like the Figma frame */
.post-nav::after {
  content: "";
  position: absolute;
  inset: 0 var(--gutter);
  border-block: 1px solid var(--color-zinc-300);
  pointer-events: none;
}

.post-nav__link {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 12px;
  transition: color 0.2s ease;
}

.post-nav__link img {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: transform 0.25s ease;
}

.post-nav__link--prev:hover img {
  transform: translateX(-4px);
}

.post-nav__link--next:hover img {
  transform: translateX(4px);
}

.post-nav__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.post-nav__label {
  color: var(--color-zinc-600);
}

.post-nav__name {
  font-weight: var(--fw-medium);
  color: var(--color-zinc-800);
  transition: color 0.2s ease;
}

.post-nav__link:hover .post-nav__name {
  color: var(--color-secondary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .post-page,
  .post {
    gap: 20px;
  }

  .post__header {
    gap: 12px;
    padding-top: 20px;
  }

  .post__title {
    font-size: 24px;
    line-height: 36px;
  }

  .post__body {
    font-size: var(--fs-sm);
    line-height: var(--lh-sm);
  }

  .post__body h2 {
    font-size: var(--fs-md);
    line-height: var(--lh-md);
  }

  .post__body ul {
    padding-left: 21px;
  }

  .post__body p + ul {
    margin-top: 4px;
  }

  /* the callout keeps its desktop size in Figma mobile */
  .post__callout {
    font-size: var(--fs-lg);
    line-height: var(--lh-lg);
  }

  .post__figure {
    padding-block: 0;
  }

  .post__gallery {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-block: 0;
  }

  /* not in the Figma mobile frame; kept, stacked, so phones can move on */
  .post-nav {
    flex-direction: column;
    gap: 0;
  }

  .post-nav__link {
    gap: 12px;
    padding-inline: 0;
    font-size: var(--fs-sm);
    line-height: var(--lh-sm);
  }

  .post-nav__link--next {
    justify-content: flex-end;
    text-align: right;
    border-top: 1px solid var(--color-zinc-300);
  }

  .post-nav__text {
    gap: 2px;
  }
}
