/* =============================================================================
 * Journal (blog) — CAMBIOS-27-5 P7
 * Loaded on is_home() (posts index), is_singular('post'), post archives.
 * ========================================================================== */

/* ─── Hero (index + archive) ─────────────────────────────────────────────── */
.journal-hero {
  background: var(--c-dark);
  color: var(--c-white);
  padding: calc(var(--nav-h) + clamp(2.5rem, 6vw, 5rem)) 0 clamp(2.5rem, 6vw, 4.5rem);
}
.journal-hero__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.journal-hero__title {
  font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5rem); line-height: .98;
  margin: .5rem 0 .8rem;
}
.journal-hero__lede {
  font-family: var(--ff-body); color: rgba(255,255,255,.72);
  font-size: 1.08rem; line-height: 1.55; max-width: 60ch;
}

/* ─── Grid + cards ───────────────────────────────────────────────────────── */
/* Light surface so the dark card text reads (site body is dark). */
.journal { background: var(--c-cream, #f4ede0); }
.journal-grid-wrap { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) clamp(4rem, 8vw, 7rem); }
.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.4rem, 2.5vw, 2.4rem);
}
.jcard { display: flex; flex-direction: column; }
.jcard__media {
  position: relative; display: block;
  aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px;
  background: var(--c-dark-2);
}
.jcard__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease-out; }
.jcard:hover .jcard__img { transform: scale(1.04); }
.jcard__placeholder { position: absolute; inset: 0; background: linear-gradient(135deg, #2c2c2c, #1a1a1a); }
.jcard__cat {
  position: absolute; top: .8rem; left: .8rem;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  background: var(--c-gold); color: var(--c-dark);
  padding: .28rem .6rem; border-radius: 2px;
}
.jcard__body { padding: 1rem .1rem 0; display: flex; flex-direction: column; gap: .45rem; }
.jcard__title {
  font-family: var(--ff-display); font-weight: 400; font-size: 1.6rem; line-height: 1.02;
}
.jcard__title a { color: var(--c-dark); text-decoration: none; transition: color .2s ease-out; }
.jcard__title a:hover { color: var(--c-gold-dark, #b88a18); }
.jcard__excerpt { font-family: var(--ff-body); font-size: .92rem; line-height: 1.5; color: rgba(41,41,41,.72); }
.jcard__meta { font-family: var(--ff-mono); font-size: 11px; color: rgba(41,41,41,.5); letter-spacing: .02em; display: inline-flex; gap: .4rem; align-items: center; }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.journal-pagination { margin-top: clamp(2.5rem, 5vw, 4rem); }
.journal-pagination .page-numbers {
  display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center;
  list-style: none; margin: 0; padding: 0;
}
.journal-pagination .page-numbers li a,
.journal-pagination .page-numbers li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 .6rem;
  font-family: var(--ff-body); font-size: .9rem; text-decoration: none;
  color: var(--c-dark); border: 1px solid var(--c-line, rgba(41,41,41,.15)); border-radius: var(--radius-pill);
  transition: background .2s ease-out, color .2s ease-out, border-color .2s ease-out;
}
.journal-pagination .page-numbers li a:hover { border-color: var(--c-gold); color: var(--c-gold-dark, #b88a18); }
.journal-pagination .page-numbers li .current { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-dark); }
.journal-empty { text-align: center; font-family: var(--ff-body); color: rgba(41,41,41,.6); padding: 3rem 0; }

/* ─── Single post ────────────────────────────────────────────────────────── */
/* Light surface for the article body (site body is dark → dark text needs it).
   The hero paints its own dark bg over this in its region. */
.single-post { background: var(--c-white); }
.post-hero { background: var(--c-dark); color: var(--c-white); padding: calc(var(--nav-h) + clamp(2.5rem, 5vw, 4rem)) 0 clamp(2.2rem, 4vw, 3.2rem); }
.post-hero__inner { max-width: 820px; margin: 0 auto; padding: 0 var(--gutter); }
.post-hero__back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--ff-body); font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s ease-out;
}
.post-hero__back:hover { color: var(--c-gold); }
.post-hero__cat {
  display: inline-block; margin-top: 1.2rem;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-gold); text-decoration: none;
}
.post-hero__title { font-family: var(--ff-display); font-weight: 400; font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 1; margin: .5rem 0 .7rem; }
.post-hero__meta { font-family: var(--ff-mono); font-size: 12px; color: rgba(255,255,255,.55); display: inline-flex; gap: .5rem; align-items: center; }

.post-feat { margin: 0; }
.post-feat__img { display: block; width: 100%; max-height: 70vh; object-fit: cover; }

/* Article body typography */
.entry-content { max-width: 720px; margin: clamp(2.5rem, 5vw, 4rem) auto; padding: 0 var(--gutter); font-family: var(--ff-body); color: var(--c-dark); font-size: 1.08rem; line-height: 1.7; }
.entry-content > * + * { margin-top: 1.3rem; }
.entry-content h2 { font-family: var(--ff-display); font-weight: 400; font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.05; margin-top: 2.6rem; }
.entry-content h3 { font-family: var(--ff-display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; margin-top: 2rem; }
.entry-content p { margin-top: 1.2rem; }
.entry-content a { color: var(--c-gold-dark, #b88a18); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { margin: 1.2rem 0 1.2rem 1.3rem; padding: 0; }
.entry-content li { margin-top: .5rem; }
.entry-content img { max-width: 100%; height: auto; border-radius: 10px; }
.entry-content blockquote {
  border-left: 3px solid var(--c-gold); margin: 1.8rem 0; padding: .4rem 0 .4rem 1.3rem;
  font-family: var(--ff-display); font-weight: 400; font-size: 1.5rem; line-height: 1.2; color: var(--c-dark);
}
.entry-content strong { font-weight: 700; }

.post-foot {
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center;
  max-width: 720px; margin: clamp(2rem, 4vw, 3rem) auto 0; padding: clamp(1.5rem,3vw,2.2rem) var(--gutter) 0;
  border-top: 1px solid var(--c-line, rgba(41,41,41,.12));
}

/* Related */
.journal-related { background: var(--c-cream, #f4ede0); margin-top: clamp(3rem, 6vw, 5rem); padding: clamp(3rem, 6vw, 5rem) 0; }
.journal-related__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.journal-related__head { font-family: var(--ff-display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.8rem; color: var(--c-dark); }

@media (prefers-reduced-motion: reduce) { .jcard__img { transition: none; } }
@media (max-width: 600px) {
  .journal-grid { grid-template-columns: 1fr; }
  .jcard__title { font-size: 1.4rem; }
}
