/* =====================================================================
 *  blog.css — Styles for the public blog pages
 *  Layered on top of styles.css + pages.css (uses the same variables).
 * ===================================================================== */

/* ---------- Blog listing grid ---------- */
.blog-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

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

/* ---------- Post card ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1.5px solid rgba(5, 42, 90, 0.12);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(5, 42, 90, 0.4);
  border-color: var(--accent-yellow);
}

.post-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(5, 42, 90, 0.06);
}
.post-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-media img { transform: scale(1.05); }

.post-card-media.no-img {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ink), var(--ink-soft));
  color: var(--accent-yellow);
}
.post-card-media.no-img svg { width: 56px; height: 56px; opacity: .8; }

.post-card-body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  font-family: 'Manrope', sans-serif;
  font-size: 12.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .75;
  margin-bottom: 10px;
  display: flex; gap: 10px; align-items: center;
}
.post-card-meta span.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.post-card-body h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.32rem;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--ink);
}

.post-card-body p {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.post-card-more {
  margin-top: auto;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--accent-red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card-more svg { width: 16px; height: 16px; transition: transform .2s ease; }
.post-card:hover .post-card-more svg { transform: translateX(4px); }

/* ---------- Empty state ---------- */
.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-soft);
}
.blog-empty h2 { font-family: 'Fraunces', serif; margin-bottom: 8px; color: var(--ink); }

/* ---------- Single post ---------- */
.post-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.post-article-cover {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 36px;
}
.post-article h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 16px;
}
.post-article-meta {
  font-family: 'Manrope', sans-serif;
  font-size: 13.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .8;
  margin-bottom: 36px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.post-article-meta span.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.post-content {
  font-size: 1.06rem;
  line-height: 1.78;
  color: var(--ink-soft);
}
.post-content p { margin: 0 0 1.25em; }
.post-content h2,
.post-content h3 {
  font-family: 'Fraunces', serif;
  color: var(--ink);
  margin: 1.6em 0 .6em;
  line-height: 1.3;
}
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }
.post-content ul,
.post-content ol { margin: 0 0 1.25em 1.4em; }
.post-content li { margin-bottom: .5em; }
.post-content a { color: var(--accent-red); }
.post-content img { max-width: 100%; border-radius: 12px; margin: 1em 0; }
.post-content blockquote {
  border-left: 3px solid var(--accent-yellow);
  margin: 1.5em 0;
  padding: .4em 0 .4em 1.2em;
  font-style: italic;
  color: var(--ink);
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.post-back:hover { color: var(--accent-red); }
.post-back svg { width: 16px; height: 16px; }

/* ---------- Post footer CTA ---------- */
.post-cta {
  margin-top: 48px;
  padding: 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ink), var(--ink-soft));
  color: var(--paper);
  text-align: center;
}
.post-cta h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  margin: 0 0 8px;
  color: var(--paper);
}
.post-cta p { margin: 0 0 18px; opacity: .9; }
