/* ---------- Blog hero ---------- */
.blog-hero {
  padding-top: calc(var(--nav-height) + var(--space-6));
  padding-bottom: var(--space-3);
}

.blog-hero + .section {
  padding-top: var(--space-4);
}

.blog-hero__title {
  font-size: clamp(1.75rem, 6vw, var(--font-size-4xl));
  font-weight: 700;
  color: var(--color-green-dark);
}

@media (max-width: 640px) {
  .blog-hero__title {
    font-size: var(--font-size-2xl);
  }
}

.blog-hero__lede {
  margin-top: var(--space-2);
  color: var(--color-ink-92);
  max-width: 560px;
}

/* ---------- Blog grid / cards ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}

@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(26, 26, 26, 0.04);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-gold);
  box-shadow: 0 24px 52px rgba(26, 26, 26, 0.22);
}

.blog-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) var(--space-3);
  background: var(--color-border);
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0, 0.2, 1);
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.05);
}

.blog-card__date {
  display: block;
  color: var(--color-gold);
  font-family: var(--font-button);
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.blog-card__title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
  transition: color var(--transition-fast);
}

.blog-card:hover .blog-card__title {
  color: var(--color-gold);
}

.blog-card__excerpt {
  flex: 1;
  color: var(--color-ink-92);
  margin-bottom: var(--space-3);
}

/* ---------- Blog post hero ---------- */
.blog-post-hero {
  position: relative;
  min-height: 50vh;
  min-height: 50svh;
  display: flex;
  background: var(--color-green-dark);
  color: var(--color-white);
  overflow: hidden;
}

.blog-post-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: bottom center;
  background-repeat: no-repeat;
}

.blog-post-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.4) 55%, rgba(0, 0, 0, 0.3) 100%),
    linear-gradient(to top, rgba(20, 55, 6, 0.94) 0%, rgba(20, 55, 6, 0.8) 55%, rgba(20, 55, 6, 0.68) 100%);
}

.blog-post-hero__contours {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  pointer-events: none;
}

.blog-post-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--nav-height) + var(--space-4));
  padding-bottom: var(--space-6);
}

.blog-post-hero__back {
  display: inline-block;
  color: var(--color-white-80);
}

.blog-post-hero__back:hover {
  color: var(--color-gold-light);
}

/* The title/date block is the only sticky piece, and it's a direct child of the hero
   itself — not a separate section — so it rides on the hero's own photo, contours,
   and overlay the whole time. Its containing block is the hero (not the full page),
   so it only stays pinned while the hero is still scrolling through: it sticks once
   its natural position reaches nav-height from the top, and keeps riding there until
   the hero's own bottom edge catches up, then it scrolls away with the rest of the
   page — a brief "hangs back" effect confined to the hero, not a page-long header. */
.blog-post-hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: sticky;
  top: var(--nav-height);
  padding-bottom: var(--space-4);
}

/* ---------- Blog post ---------- */
.blog-post__container {
  max-width: 720px;
}

.blog-post__title {
  font-size: clamp(1.5rem, 5.5vw, var(--font-size-3xl));
  color: var(--color-white);
}

@media (max-width: 640px) {
  .blog-post__title {
    font-size: var(--font-size-xl);
  }
}

.blog-post__date {
  display: block;
  color: var(--color-white-80);
  font-size: var(--font-size-sm);
  margin-top: var(--space-2);
}

/* ---------- Blog post related ---------- */
.blog-post-related__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-green-dark);
  margin-bottom: var(--space-5);
}

.blog-post__body p {
  margin-bottom: var(--space-4);
}

.blog-post__body h2 {
  font-size: var(--font-size-xl);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.blog-post__body h3 {
  font-size: var(--font-size-md);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.blog-post__body ul,
.blog-post__body ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-4);
}

.blog-post__body ul li {
  list-style: disc;
}

.blog-post__body ol li {
  list-style: decimal;
}

.blog-post__body li {
  margin-bottom: var(--space-1);
}

.blog-post__body img {
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
}

.blog-post__body a {
  color: var(--color-gold);
  text-decoration: underline;
}
