/* =========================================================
   post.css — News & Events article pages (public/news/*.html)
   Loaded after base.css, layout.css and components.css
   (sections.css is not needed on these pages).
   ========================================================= */

.post-page {
  --paper: #f7f8f1;          /* reading background */
  --ink: #26332a;            /* body text on paper */
  --ink-soft: #536257;       /* English paragraphs / captions (≥ 5:1 on --paper) */
  background: var(--paper);
  color: var(--ink);
}
/* the shared header/footer were designed for white text on green */
.post-page .site-header, .post-page .site-footer { color: var(--white); }

/* ----- Hero: cover photo + title ----- */
.post-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: clamp(340px, 54vh, 540px);
  background: var(--green-darker);
  color: var(--white);
}
.post-hero__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  animation: post-hero-zoom 1.8s var(--ease) both;
}
.post-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(15, 40, 22, .94) 0%, rgba(15, 40, 22, .6) 45%, rgba(15, 40, 22, .25) 100%);
}
@keyframes post-hero-zoom { from { transform: scale(1.08); } to { transform: none; } }

.post-hero__inner { max-width: 820px; padding-top: 48px; padding-bottom: 48px; }
.post-back {
  display: inline-flex; align-items: center; gap: .4em;
  margin-bottom: 28px; padding: 6px 14px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .2s;
}
.post-back:hover, .post-back:focus-visible { background: rgba(255, 255, 255, .26); }
.post-back span:first-child { transition: transform .2s var(--ease); }
.post-back:hover span:first-child { transform: translateX(-3px); }

.post-hero__eyebrow { margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); }
.post-hero__title { font-size: clamp(1.8rem, 4.6vw, 3rem); line-height: 1.3; margin-bottom: .35em; text-wrap: balance; }
.post-hero__sub { font-family: var(--font-display); font-style: italic; font-size: clamp(1.05rem, 2.2vw, 1.3rem); opacity: .9; margin-bottom: 18px; }
.post-hero time { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; letter-spacing: .04em; color: var(--gold-light); }
.post-hero time::before { content: ""; width: 28px; height: 2px; background: var(--gold); border-radius: 2px; }

/* ----- Article body ----- */
/* The posts are bilingual: each Chinese paragraph is followed by its English version (lang="en"),
   which is set smaller and softer with a thin green rule, so readers can follow either language. */
.post-body { max-width: 720px; margin: 0 auto; padding: 56px 20px 32px; font-size: 17.5px; line-height: 1.9; }
.post-body p { margin: 0 0 1.1em; }
.post-body p[lang="en"] {
  margin-bottom: 1.9em; padding-left: 16px;
  border-left: 2px solid rgba(53, 122, 70, .28);
  color: var(--ink-soft); font-size: .94em; line-height: 1.75;
}
.post-body .post-small { font-size: 14px; color: var(--ink-soft); }

/* photos */
.post-figure { margin: 2.2em 0 .9em; }
.post-figure img {
  width: 100%; height: auto;
  border-radius: var(--radius-lg);
  background: #e4e9dc;                 /* placeholder tint while loading */
  box-shadow: var(--shadow-sm);
}
.post-figure figcaption { margin-top: .6em; }
/* captions: centred lines from the original posts, plus image captions */
.post-body p.post-caption, .post-figure figcaption {
  margin-bottom: .25em; padding: 0; border: 0;
  text-align: center; font-size: 14px; line-height: 1.6; color: var(--ink-soft);
}
.post-body .post-caption + :not(.post-caption) { margin-top: 2em; }

/* several photos in a row: stacked, full width and uncropped — some are scanned pages
   with text (e.g. the Bimo culture post), which a cropped grid would cut off */
.post-gallery { display: grid; gap: 14px; margin: 2.2em 0 .9em; }
.post-gallery .post-figure { margin: 0; }

/* on wide screens photos are a little wider than the text column */
@media (min-width: 960px) {
  .post-body > .post-figure, .post-gallery { margin-left: -40px; margin-right: -40px; }
}

.post-cta { text-align: center; margin: 2.4em 0; }

/* ----- Previous / next ----- */
.post-pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  max-width: 820px; margin: 0 auto; padding: 32px 20px 80px;
  border-top: 1px solid rgba(53, 122, 70, .15);
}
.post-pager__link {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 22px;
  background: var(--white); color: var(--ink); text-decoration: none;
  border: 1px solid rgba(53, 122, 70, .12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.post-pager__link:hover, .post-pager__link:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.post-pager__link--next { grid-column: 2; text-align: right; }
.post-pager__label { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--green-dark); }
.post-pager__link--prev .post-pager__label::before { content: "← "; }
.post-pager__link--next .post-pager__label::after { content: " →"; }
.post-pager__title { font-family: var(--font-display); font-size: 17px; line-height: 1.45; }

/* reading progress bar under the header (main.js: initReadingProgress) */
.reading-progress {
  position: absolute; left: 0; bottom: -3px; height: 3px; width: 100%;
  background: var(--gold);
  transform: scaleX(var(--progress, 0)); transform-origin: left;
}

@media (max-width: 600px) {
  .post-body { padding-top: 40px; font-size: 16.5px; }
  .post-pager { grid-template-columns: 1fr; }
  .post-pager__link--next { grid-column: auto; }
}
