/* ==========================================================================
   JOYBEAN — Blog archive and article pages
   Loop-friendly post grid plus long-form article typography.
   Loaded by archive-post.html and single-post.html.
   ========================================================================== */

.blog-page {
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   Post grid
   -------------------------------------------------------------------------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.post-card:hover {
  border-color: #f0cdc9;
  box-shadow: var(--shadow-sm);
  transform: translateY(-4px);
}

.post-media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #f5f0eb;
}

.post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.post-card:hover .post-media img {
  transform: scale(1.05);
}

.post-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.post-date {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-body h2,
.post-body h3 {
  display: -webkit-box;
  margin: 10px 0 18px;
  overflow: hidden;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: -0.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 800;
}

.post-more span {
  transition: transform 0.25s ease;
}

.post-card:hover .post-more span {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

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

  .post-body {
    padding: 20px;
  }

  .post-body h2,
  .post-body h3 {
    font-size: 16px;
  }
}

/* ==========================================================================
   Single post / article
   A centered white reading card over the warm page background.
   ========================================================================== */

.article-page {
  padding: clamp(22px, 3vw, 34px) 0 clamp(64px, 8vw, 96px);
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 46%);
}

.article-shell {
  max-width: 920px;
  margin-inline: auto;
}

.article-page .breadcrumb {
  margin-bottom: 22px;
}

.article-card {
  padding: clamp(28px, 5vw, 56px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.article-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-header h1 {
  margin: 18px 0 0;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.article-header h1 .accent {
  color: var(--primary);
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 20px;
  padding-bottom: 24px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
}

.article-byline .article-tag {
  margin-right: 4px;
}

.article-lead {
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   Article body
   -------------------------------------------------------------------------- */

.article-body {
  margin-top: 26px;
}

.article-body h2 {
  margin: 44px 0 14px;
  padding-left: 16px;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  border-left: 4px solid var(--primary);
}

.section-num {
  display: inline-flex;
  justify-content: center;
  min-width: 34px;
  margin-right: 8px;
  padding: 3px 9px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  vertical-align: 2px;
}

.article-body p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.82;
}

.article-body strong {
  color: var(--ink);
  font-weight: 700;
}

.article-body p a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body p a:hover {
  color: #b91914;
}

.article-figure {
  margin: 28px 0 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f5f0eb;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.article-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body .article-caption {
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}

.article-divider {
  width: 62px;
  height: 3px;
  margin: 40px auto 0;
  background: var(--primary-soft);
  border-radius: 2px;
}

/* In-article CTA */

.article-cta {
  margin: 34px 0 8px;
  padding: clamp(26px, 4vw, 38px);
  text-align: center;
  background: linear-gradient(145deg, #fff6f5, #fbe5e3);
  border: 1px solid #f3cdc9;
  border-radius: 20px;
}

.article-cta h3 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article-cta p {
  max-width: 540px;
  margin: 0 auto 22px;
}

/* Article FAQ (static Q&A cards) */

.article-faq {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.article-faq-item {
  padding: 20px 24px;
  background: #faf7f4;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.article-faq-item h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.45;
}

.article-faq-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   Related reading
   -------------------------------------------------------------------------- */

.article-related {
  padding-top: clamp(56px, 7vw, 84px);
}

.article-related .section-head {
  margin-bottom: clamp(30px, 4vw, 42px);
}

/* --------------------------------------------------------------------------
   Article responsive
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .article-card {
    padding: 26px 22px;
    border-radius: 18px;
  }

  .article-header h1 {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }

  .article-lead {
    font-size: 16px;
  }

  .article-body h2 {
    margin-top: 36px;
    padding-left: 13px;
  }

  .article-faq-item {
    padding: 16px 18px;
  }
}
