/* ===========================================
   MY CARIBBEAN JOURNEY — Blog Styles
   Warm & editorial — literary magazine feel
   Shared design tokens live in /shared/shared.css
   =========================================== */

/* ==========================================
   BLOG INDEX — Listing Page
   ========================================== */

/* --- Hero --- */

.blog-hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, #0a2e15 40%, #132e1a 70%, #1a3520 100%);
  padding: 9rem 0 13rem;
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

/* Decorative radial accents — mirrors the guide hero style */
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(26, 74, 46, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(212, 160, 48, 0.08) 0%, transparent 50%);
  pointer-events: none;
}


.blog-hero .container {
  position: relative;
  z-index: 2;
  padding-top: 3rem;
}

.blog-hero-word {
  position: absolute;
  font-family: 'Courier New', Courier, monospace;
  color: var(--cream);
  letter-spacing: 0.08em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0;
  white-space: nowrap;
}

.blog-hero .section-label {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.blog-hero .section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.blog-intro {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 50ch;
  opacity: 0.8;
  font-style: italic;
  font-family: var(--font-display);
  text-wrap: balance;
}

/* --- Post Grid --- */

/* Cream surface — no overlap tricks, starts clean after the hero. */
.blog-posts {
  background: transparent;
  padding: 0 0 var(--space-xl);
  position: relative;
}

/* Transparent floating layer — pulls both the filter chips and the card
   grid up over the hero boundary. The cream section stays put; this
   container simply floats in front of it at whatever height is needed. */
.blog-posts .container {
  margin-top: -9rem;
  position: relative;
  z-index: 10;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  container-type: inline-size;
}

@container (max-width: 360px) {
  .post-card { padding: 1.5rem; gap: 0.4rem; }
  .post-card-title { font-size: 1.2rem; }
}

/* --- Post Cards --- */

.post-card {
  background: var(--warm-white);
  border: 1px solid rgba(212, 160, 48, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(26, 74, 46, 0.15);

    .post-card-image img { transform: scale(1.04); }
  }
}

/* Image area — always rendered; green gradient is the no-image fallback */
.post-card-image {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, var(--green-deep) 0%, #0a2e15 60%, #1a3520 100%);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.post-card-image img.img-loaded {
  opacity: 1;
}

/* Dark gradient — lifts overlay text off the image */
.post-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.04) 0%,
    rgba(0, 0, 0, 0.1) 25%,
    rgba(13, 31, 18, 0.72) 55%,
    rgba(13, 31, 18, 0.96) 100%
  );
  pointer-events: none;
}

/* Featured card gets a deeper fade to carry the overlay foot */
.post-card.is-featured .post-card-image::after {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.04) 0%,
    rgba(0, 0, 0, 0.1) 20%,
    rgba(13, 31, 18, 0.82) 50%,
    rgba(13, 31, 18, 1) 100%
  );
}

/* NEW badge — top right of image */
.post-new-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: var(--green-deep);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55), 0 3px 10px rgba(0, 0, 0, 0.25);
}

/* Text overlay — title + excerpt sit above the gradient */
.post-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1.1rem 1rem;
  z-index: 2;
}

.post-card-overlay .post-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cream);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 0.3rem;
  text-wrap: balance;
}

.post-card-overlay .post-excerpt {
  font-size: 0.8rem;
  color: rgba(232, 228, 220, 0.78);
  line-height: 1.5;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Footer row inside the featured card overlay — category + date + dive in on the image */
.post-card-overlay-foot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(232, 228, 220, 0.18);
}

.post-card-overlay-foot .post-category-badge {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(232, 228, 220, 0.72);
  flex-shrink: 0;
}

.post-card-overlay-foot .post-date {
  flex: 1;
  text-align: center;
  color: rgba(232, 228, 220, 0.6);
  transition: color var(--transition);
}

/* "Dive in" as a <span> inside the featured overlay (parent <a> wraps the whole card) */
.post-link.post-link--light {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(232, 228, 220, 0.65);
  white-space: nowrap;
  flex-shrink: 0;
  transition: gap var(--transition), color var(--transition);

  svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
}

/* Card hover — date and dive in both go gold */
.post-card-image:hover .post-card-overlay-foot .post-date,
.post-card-image:hover .post-link--light {
  color: var(--gold);
}

.post-card-image:hover .post-link.post-link--light {
  gap: 0.65rem;
}

/* Below-image strip — category, then date + read more */
.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid rgba(212, 160, 48, 0.1);
}

.post-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 0.55rem;
}

.post-category-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(212, 160, 48, 0.1);
  border: 1px solid rgba(212, 160, 48, 0.22);
  color: var(--text-muted);
}

.post-card .post-date {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.post-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-mid);
  white-space: nowrap;
  transition: gap var(--transition), color var(--transition);

  &:hover {
    gap: 0.65rem;
    color: var(--gold);
  }

  svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
}

/* Featured card collapses to a regular square when a filter is active */
.post-card.is-featured.filter-active {
  grid-column: auto;

  .post-card-image { aspect-ratio: 1 / 1; }
  .post-card-overlay { padding: 1.25rem 1.1rem 1rem; }
  .post-card-overlay .post-card-title { font-size: 1.2rem; }
  .post-card-overlay .post-excerpt { font-size: 0.8rem; -webkit-line-clamp: 2; }
  .post-card-overlay-foot { display: none; }
}

/* Featured card — latest post spans full width with a landscape ratio */
.post-card.is-featured {
  grid-column: 1 / -1;

  .post-card-image {
    aspect-ratio: 2 / 1;
  }

  .post-card-overlay {
    padding: 1.75rem 1.75rem 1.5rem;
  }

  .post-card-overlay .post-card-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    margin-bottom: 0.5rem;
  }

  .post-card-overlay .post-excerpt {
    font-size: 0.88rem;
    -webkit-line-clamp: 3;
  }
}

.no-posts {
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem 0;
}

/* --- Filter Pill (above grid) --- */

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.9rem;
  margin-bottom: 1.25rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cream);
  border: 1px solid rgba(212, 160, 48, 0.4);
  background: rgba(255, 255, 255, 0.06);
  transition: all var(--transition);

  &:hover {
    border-color: var(--gold);
    background: rgba(212, 160, 48, 0.12);
    color: var(--gold-light);
  }
}

/* --- Filter Bar (below grid) --- */

.filter-anchor {
  display: block;
  scroll-margin-top: 5rem;
}

@keyframes filter-flash {
  0%                { box-shadow: none; background: transparent; }
  12%, 38%          { box-shadow: 0 0 0 8px rgba(212, 160, 48, 0.14); background: rgba(212, 160, 48, 0.07); }
  25%, 50%          { box-shadow: none; background: transparent; }
  62%, 88%          { box-shadow: 0 0 0 8px rgba(212, 160, 48, 0.14); background: rgba(212, 160, 48, 0.07); }
  75%, 100%         { box-shadow: none; background: transparent; }
}

.post-filters {
  margin-top: 3rem;
  padding: 1.5rem 1rem 0.5rem;
  border-top: 1px solid rgba(212, 160, 48, 0.15);
  border-radius: 12px;
}

.post-filters.is-highlighted {
  animation: filter-flash 2.1s ease forwards;
}

.filter-chips {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.filter-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.filter-divider {
  width: 100%;
  height: 1px;
  background: rgba(212, 160, 48, 0.15);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(45, 107, 69, 0.2);
  background: rgba(45, 107, 69, 0.07);
  color: var(--green-mid);
  transition: all var(--transition);

  &:hover {
    border-color: var(--gold);
    background: rgba(212, 160, 48, 0.1);
    color: var(--green-deep);
  }

  &.is-active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--green-deep);
  }
}

/* --- Tag Pills (post page) --- */

.post-tags {
  max-width: 68ch;
  margin: 2rem auto 0;
  font-size: 1.075rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.post-tags-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.post-tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(212, 160, 48, 0.1);
  color: var(--green-mid);
  border: 1px solid rgba(212, 160, 48, 0.25);
}

/* ==========================================
   INDIVIDUAL BLOG POST
   ========================================== */

/* --- Post Header (dark hero) --- */

.post-header-inner {
  max-width: 68ch;
  margin: 0 auto;
  font-size: 1.075rem; /* matches .prose so ch unit resolves to the same width */
  position: relative;
  z-index: 2;
}

.blog-post .post-header {
  background: linear-gradient(135deg, var(--green-deep) 0%, #0a2e15 40%, #132e1a 70%, #1a3520 100%);
  padding: 12rem 0 10rem;
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.blog-post .post-header.has-hero-image {
  background:
    linear-gradient(135deg,
      rgba(13, 31, 18, 0.92) 0%,
      rgba(10, 46, 21, 0.93) 40%,
      rgba(19, 46, 26, 0.93) 70%,
      rgba(26, 53, 32, 0.92) 100%
    ),
    radial-gradient(ellipse at 40% 55%, transparent 15%, rgba(0, 0, 0, 0.88) 75%),
    var(--post-hero-img) var(--hero-pos, center center) / auto 150% no-repeat;
}

/* Decorative radial accents — mirrors the guide hero style */
.blog-post .post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(26, 74, 46, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(212, 160, 48, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 2.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity var(--transition), gap var(--transition);

  &:hover {
    opacity: 1;
    gap: 0.65rem;
  }

  svg { flex-shrink: 0; }
}

/* Post meta row: category · date · author */
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.post-meta .post-category-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold);
  border: 1px solid rgba(212, 160, 48, 0.35);
  margin-right: 1rem;
}

.post-header .post-date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 228, 220, 0.6);
}

.post-author {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(232, 228, 220, 0.5);
  padding-left: 1.1rem;
  margin-left: 1rem;
  border-left: 1px solid rgba(232, 228, 220, 0.2);
}

/* Title */
.post-header .post-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cream);
  max-width: 20ch;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

/* Excerpt / standfirst */
.post-excerpt-lead {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(232, 228, 220, 0.75);
  max-width: 56ch;
  line-height: 1.65;
  margin-top: 0.5rem;
  margin-bottom: 0;
  text-wrap: pretty;
}

/* --- Featured Image --- */

.post-featured-image {
  aspect-ratio: 16 / 9;
  max-height: 520px;
  overflow: hidden;
  max-width: 68ch;
  font-size: 1.075rem; /* ch resolves at same size as .prose */
  margin: 0 auto 3rem;
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 2;
  box-shadow: 0 12px 56px rgba(0, 0, 0, 0.45);
  /* Green fallback while image loads — no collapsed-height CLS */
  background: linear-gradient(145deg, var(--green-deep) 0%, #0a2e15 60%, #1a3520 100%);
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.post-featured-image img.img-loaded {
  opacity: 1;
}

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

.post-body {
  background: var(--warm-white);
  padding: var(--space-xl) 0 calc(var(--space-xl) * 1.5);
}

.post-body.has-featured-image {
  margin-top: -7rem;
  padding-top: 0;
}

/* Two-column layout: prose + sidebar */
.post-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.post-layout.has-sidebar {
  grid-template-columns: 1fr 260px;
}

/* Main column: top-aligned, sidebar: stretches full row height (required for sticky) */
.post-main {
  align-self: start;
}

.post-sidebar-sticky {
  position: sticky;
  top: 8rem;
}

.sidebar-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--gold);
}

.rabbit-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(212, 160, 48, 0.12);
  text-decoration: none;
  transition: opacity var(--transition);

  &:last-child { border-bottom: none; }
  &:hover { opacity: 0.7; }
}

.rabbit-card-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rabbit-card-thumb.img-loaded {
  opacity: 1;
}

.rabbit-card-thumb--fallback {
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
}

.rabbit-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.rabbit-card-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-deep);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rabbit-card-date {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Listen anchor (mobile header shortcut) ───────────── */

.post-listen-anchor {
  display: none; /* hidden on desktop — widget is visible in sidebar */
}

@media (max-width: 900px) {
  .post-listen-anchor {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.45rem 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(212, 160, 48, 0.45);
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
  }

  .post-listen-anchor:hover {
    background: rgba(212, 160, 48, 0.1);
    border-color: var(--gold);
  }
}

/* ── Post Media Widget (Listen / Watch) ───────────────── */

.post-media-widget {
  margin-bottom: 2rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(212, 160, 48, 0.22);
  scroll-margin-top: 7rem;
}

.media-tabs {
  display: flex;
  background: var(--green-deep);
}

.media-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.media-tab.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.media-tab:hover:not(.is-active) {
  color: rgba(255, 255, 255, 0.8);
}

.media-panel {
  background: #f5f2eb;
  padding: 1.25rem;
}

.media-panel--video {
  padding: 0;
}

.media-panel.is-hidden {
  display: none;
}

.media-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  color: var(--green-mid);
  text-align: center;
}

.media-coming-soon p {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-deep);
  margin: 0;
}

.media-soon-badge {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212, 160, 48, 0.1);
  border: 1px solid rgba(212, 160, 48, 0.3);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
}

.audio-playlist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.audio-track-btns {
  display: flex;
  gap: 0.5rem;
}

.audio-track-btn {
  flex: 1;
  padding: 0.45rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: rgba(26, 74, 46, 0.08);
  border: 1px solid rgba(26, 74, 46, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.audio-track-btn.is-active {
  background: var(--gold);
  color: var(--green-deep);
  border-color: var(--gold);
}

.audio-track-btn:hover:not(.is-active) {
  background: rgba(26, 74, 46, 0.14);
}

.media-audio-player {
  width: 100%;
  border-radius: 6px;
}

.post-media-widget .youtube-embed {
  border-radius: 0;
}

@media (max-width: 900px) {
  .post-layout.has-sidebar {
    grid-template-columns: 1fr;
  }

  .post-sidebar-sticky {
    position: static;
    border-top: 2px solid var(--gold);
    padding-top: 2rem;
  }
}

/* ==========================================
   PROSE — Typography for post body
   ========================================== */

.prose {
  max-width: 68ch;
  margin: 0 auto;
  font-size: 1.075rem;
  line-height: 1.85;
  color: #6b6560;
  text-wrap: pretty;
}

/* Opening paragraph — slightly larger */
.prose > p:first-of-type {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #2a2a22;
}

/* Drop cap on the very first letter */
.prose:not(.prose-references) > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 700;
  float: left;
  line-height: 0.82;
  padding-right: 0.1em;
  padding-top: 0.08em;
  color: var(--green-deep);
}

/* --- Headings --- */

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green-light);
  margin: 3.25rem 0 1rem;
  line-height: 1.2;
  padding-bottom: 0.7rem;
  /* Double line: subtle full-width + short gold accent */
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
}

.prose h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 2.75rem;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-mid);
  margin: 2.5rem 0 0.65rem;
  line-height: 1.3;
}

.prose h4 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-mid);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 2rem 0 0.5rem;
}

/* --- Paragraphs & inline --- */

.prose p {
  margin-bottom: 1.6rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  font-weight: 600;
  color: #4a4540;
}

.prose em {
  font-style: italic;
}

/* --- Lists --- */

.prose ul,
.prose ol {
  margin: 0 0 1.6rem 1.6rem;
}

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

/* --- Pull Quote (blockquote) --- */

.prose blockquote {
  border-left: none;
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid rgba(212, 160, 48, 0.25);
  border-radius: 0;
  background: transparent;
  margin: 3rem 0;
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.prose blockquote p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--green-deep);
  line-height: 1.55;
  margin: 0;
}

/* --- Links --- */

.prose a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;

  &:hover { color: var(--gold-light); }
}

/* --- HR --- */

.prose hr {
  border: none;
  text-align: center;
  margin: 3rem 0;
  overflow: visible;
}

.prose hr::after {
  content: '✦  ✦  ✦';
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.5em;
}

/* --- References Section --- */

.post-references {
  max-width: 68ch;
  margin: 4rem auto 0;
  padding-top: 2.5rem;
  border-top: 2px solid rgba(0, 0, 0, 0.07);
}

.post-references-body {
  position: relative;
  max-height: 10rem;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.post-references-body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5rem;
  background: linear-gradient(to bottom, rgba(250, 248, 244, 0), var(--warm-white));
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.post-references.is-expanded .post-references-body::after {
  opacity: 0;
}

.post-references-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  transition: opacity 0.2s;
}

.post-references-toggle:hover {
  opacity: 0.75;
}

.references-toggle-icon {
  transition: transform 0.35s ease;
  flex-shrink: 0;
}

.post-references.is-expanded .references-toggle-icon {
  transform: rotate(180deg);
}

.references-heading {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Prose inside references is smaller and muted */
.prose-references {
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-muted);
  opacity: 0.72;
  text-wrap: pretty;
}


.prose-references p:first-of-type {
  font-size: 0.82rem;
}

.prose-references a {
  color: var(--gold);
  overflow-wrap: anywhere;
}

/* --- Post Footer --- */

.post-footer {
  max-width: 68ch;
  margin: 3.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==========================================
   SHARE BUTTONS
   ========================================== */

.post-share {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.post-share-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Header variant — sits on dark green */
.post-share--header {
  margin-top: 2rem;
}

.post-share--header .post-share-label {
  color: rgba(232, 228, 220, 0.45);
}

/* Footer variant — sits on warm white */
.post-share--footer {
  max-width: 68ch;
  margin: 2.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.post-share--footer .post-share-label {
  color: var(--text-muted);
}

/* Individual share buttons */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;

  &:hover {
    opacity: 0.85;
    transform: translateY(-1px);
  }

  svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }
}

/* Platform colours */
.share-x        { background: #000;     color: #fff; }
.share-facebook { background: #1877F2;  color: #fff; }
.share-whatsapp { background: #25D366;  color: #fff; }
.share-copy     { background: var(--green-mid); color: var(--cream); }

/* Instagram + Copy link grouped pair */
.share-group {
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  border-radius: 8px;
  overflow: hidden;
}

.share-group .share-btn {
  border-radius: 0;
}

/* Header variant: slightly translucent so they don't overpower the title */
.post-share--header .share-btn {
  opacity: 0.85;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
}

.post-share--header .share-btn:hover {
  opacity: 1;
}

@media (max-width: 900px) {
  .post-share--header {
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .post-share--header .share-label {
    display: none;
  }

  .post-share--header .share-btn {
    padding: 0.4rem 0.5rem;
  }

  .share-btn {
    min-height: 44px;
  }
}

/* Copied feedback */
.share-copy-feedback {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-mid);
}

.post-share--header .share-copy-feedback {
  color: var(--gold);
}


/* ==========================================
   PULL QUOTES
   ========================================== */

.prose .pull-quote {
  margin: 3.5rem 0;
  padding: 1.75rem 1.5rem;
  text-align: center;
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid rgba(212, 160, 48, 0.25);
  position: relative;
}

/* Large decorative opening quote mark */
.prose .pull-quote::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 7rem;
  line-height: 0;
  color: var(--gold);
  opacity: 0.15;
  position: absolute;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.prose .pull-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-style: italic;
  color: var(--green-deep);
  line-height: 1.55;
  margin: 0 0 0.75rem;
  position: relative; /* sits above ::before */
}

.prose .pull-quote cite {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.prose .pull-quote cite::before {
  content: '\2014\00A0'; /* em dash + non-breaking space */
}

/* ==========================================
   DEFINITION BOXES
   ========================================== */

.prose .definition-box {
  background: rgba(45, 107, 69, 0.13);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.prose .definition-term {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 0.2rem;
}

.prose .definition-lang {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9a7020;
  background: rgba(212, 160, 48, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.prose .definition-box p {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.7;
}

/* ==========================================
   IMAGE + CAPTION (figure)
   ========================================== */

/* flow-root contains floated images without a clearfix hack */
.prose {
  display: flow-root;
}

.prose .post-figure {
  margin: 2.5rem 0;
}

.prose .post-figure img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

/* --- Size variants --- */
.prose .post-figure--half {
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
}

.prose .post-figure--float-left {
  float: left;
  max-width: 45%;
  margin: 0.25rem 1.75rem 1rem 0;
}

.prose .post-figure--float-right {
  float: right;
  max-width: 45%;
  margin: 0.25rem 0 1rem 1.75rem;
}

/* --- Ratio variants --- */
.prose .post-figure--ratio-16-9 img { aspect-ratio: 16 / 9; object-fit: cover; }
.prose .post-figure--ratio-4-3 img  { aspect-ratio: 4 / 3;  object-fit: cover; }
.prose .post-figure--ratio-3-4 img  { aspect-ratio: 3 / 4;  object-fit: cover; }
.prose .post-figure--ratio-1-1 img  { aspect-ratio: 1 / 1;  object-fit: cover; }

/* --- Decoration variants --- */
.prose .post-figure--border img {
  border: 2px solid rgba(212, 160, 48, 0.45);
}

.prose .post-figure--shadow img {
  box-shadow: 0 8px 32px rgba(13, 31, 18, 0.18);
}

/* Mobile: floats collapse to full width, half becomes 75% */
@media (max-width: 640px) {
  .blog-hero-word {
    display: none;
  }

  .prose .post-figure--float-left,
  .prose .post-figure--float-right {
    float: none;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .prose .post-figure--half {
    max-width: 75%;
  }
}

.prose .post-figure figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.65rem;
  font-style: italic;
  line-height: 1.5;
}

/* ==========================================
   BUTTON / CTA
   ========================================== */

/* Centred wrapper paragraph inserted by the CTA component */
.prose .post-cta {
  text-align: center;
  margin: 2.5rem 0;
}

/* ==========================================
   CALLOUT BOXES
   ========================================== */

.prose .callout {
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  margin: 2rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.prose .callout p {
  margin: 0;
}

.prose .callout strong {
  display: block;
  margin-bottom: 0.4rem;
}

.prose .callout-tip {
  background: rgba(45, 107, 69, 0.14);
}

.prose .callout-tip strong {
  color: var(--green-mid);
}

.prose .callout-fact {
  background: rgba(212, 160, 48, 0.18);
}

.prose .callout-fact strong {
  color: #9a7020;
}

.prose .callout-note {
  background: rgba(212, 160, 48, 0.12);
}

.prose .callout-note strong {
  color: var(--text-muted);
}

.prose .callout-warning {
  background: rgba(232, 101, 42, 0.14);
}

.prose .callout-warning strong {
  color: var(--orange);
}

/* Contributor / author bio callout — all four label variants share this style */
.prose [class*="callout-contributor"] {
  background: var(--cream);
}

.prose [class*="callout-contributor"] strong {
  color: var(--green-deep);
}

/* ==========================================
   YOUTUBE EMBEDS
   ========================================== */

.prose .youtube-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 2.5rem 0;
  box-shadow: 0 4px 24px rgba(13, 31, 18, 0.12);
}

.prose .youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

/* ==========================================
   TABLES
   ========================================== */

/* Caption sits above the table wrapper */
.prose .table-caption {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 0.6rem !important;
}

/* Wrapper added by JS — handles rounding + horizontal scroll on mobile */
.table-wrapper {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(212, 160, 48, 0.25);
  box-shadow: 0 2px 16px rgba(13, 31, 18, 0.06);
  margin: 2.5rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0; /* wrapper handles margin */
}

/* Header row */
.prose thead {
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
}

.prose th {
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1.1rem;
  text-align: left;
  white-space: nowrap;
}

/* Body cells */
.prose td {
  padding: 0.7rem 1.1rem;
  color: var(--text-dark);
  border-bottom: 1px solid rgba(212, 160, 48, 0.12);
  vertical-align: top;
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

/* Alternating row tint */
.prose tbody tr:nth-child(even) {
  background: rgba(212, 160, 48, 0.04);
}

.prose tbody tr:hover {
  background: rgba(212, 160, 48, 0.09);
  transition: background 0.15s ease;
}

/* First column emphasis */
.prose td:first-child {
  font-weight: 600;
  color: var(--green-deep);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 640px) {
  .blog-hero {
    padding: calc(8rem + env(safe-area-inset-top)) 0 8rem;
  }

  .blog-post .post-header {
    padding-bottom: 7rem;
  }

  .blog-posts .container {
    margin-top: -5rem;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  /* Featured card loses the landscape ratio on mobile — square matches the rest */
  .post-card.is-featured .post-card-image {
    aspect-ratio: 1 / 1;
  }

  .post-card.is-featured .post-card-overlay {
    padding: 1.25rem 1.1rem 1rem;
  }

  .post-card.is-featured .post-card-overlay .post-card-title {
    font-size: 1.2rem;
  }

  /* Hide overlay foot on mobile — square card is too compact for it */
  .post-card.is-featured .post-card-overlay-foot {
    display: none;
  }

  .blog-post .post-header {
    padding-top: 12rem;
  }

  .post-header .post-title {
    font-size: 1.85rem;
    max-width: none;
  }

  .prose:not(.prose-references) > p:first-of-type::first-letter {
    font-size: 3.5rem;
  }

  .prose blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1rem;
  }

  .prose blockquote p {
    font-size: 1.1rem;
  }

  .prose h2 {
    font-size: 1.5rem;
  }

  .prose h3 {
    font-size: 1.25rem;
  }
}
