/* Blog: modern article template + article card grid (Articles, categories, "More articles"). */
.blog { --ink: #2a1214; --ink-soft: #5c4a4b; --line: #eadfdf; --soft: #faf6f4; --radius: 14px; }
.blog .content-wrap { padding: 48px 56px 64px; }
.blog .main { min-width: 0; }

/* ---------- Shared bits ---------- */
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.chip {
  display: inline-block; padding: 4px 10px; border-radius: 999px; background: #fff3cd; color: #8a1520;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.4;
}
.chip:hover, .chip:focus { background: var(--gold); color: #6d0f18; }
.btn-gold, .btn-gold:visited { background: var(--gold); color: #5b0d14; font-weight: 700; padding: 12px 24px; }
.btn-gold:hover, .btn-gold:focus { background: #fff; color: var(--red); }
.btn-ghost, .btn-ghost:visited { background: transparent; color: #fff; font-weight: 700; padding: 10px 22px; border: 2px solid rgba(255, 255, 255, .7); }
.btn-ghost:hover, .btn-ghost:focus { background: #fff; color: var(--red); border-color: #fff; }

/* ---------- Article list header ---------- */
.blog-head { max-width: 760px; margin: 0 0 40px; }
.blog-head h1 { margin: 0 0 12px; font-size: 46px; line-height: 1.1; color: var(--ink); }
.blog-intro { margin: 0 0 24px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-filter a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font-size: 14px; font-weight: 500; background: #fff; transition: border-color .15s, background-color .15s, color .15s;
}
.cat-filter a span { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--ink-soft); font-size: 12px; text-align: center; line-height: 20px; }
.cat-filter a:hover, .cat-filter a:focus { border-color: var(--red); color: var(--red); }
.cat-filter a.active { background: var(--red); border-color: var(--red); color: #fff; }
.cat-filter a.active span { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Card grid ---------- */
.card-grid { display: grid; gap: 28px; }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-bento .card-featured { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(54, 1, 5, .04), 0 8px 24px -12px rgba(54, 1, 5, .18);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(54, 1, 5, .06), 0 18px 36px -14px rgba(54, 1, 5, .3); }
.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 13px; color: var(--ink-soft); }
.read-time { display: inline-flex; align-items: center; gap: 5px; }
.read-time svg { opacity: .7; }
.card-title { margin: 0 0 10px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.card-title a { color: var(--ink); }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole card is clickable */
.card-title a:hover, .card-title a:focus { color: var(--red); }
.card-meta .chip { position: relative; z-index: 2; }
.card-excerpt { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.card-more { margin: auto 0 0; font-size: 14px; font-weight: 700; }
.card-more a { color: var(--red); }
.card:hover .card-more a { color: #000; }
.card:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.card-title a:focus-visible { outline: none; }

.card-featured .card-media { aspect-ratio: auto; flex: 1 1 auto; min-height: 280px; }
.card-featured .card-media img { object-position: center 30%; }
.card-featured .card-body { flex: 0 0 auto; padding: 26px 30px 28px; }
.card-featured .card-title { font-size: 30px; line-height: 1.2; }
.card-featured .card-excerpt { font-size: 16px; }

/* ---------- Single post ---------- */
.post { max-width: 960px; margin: 0 auto; }
.post-head { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.crumbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.crumbs a { color: var(--red); }
.crumbs a:hover { color: #000; }
.crumbs span { color: #c9b9b9; }
.post-title { margin: 0 0 18px; font-size: 46px; line-height: 1.12; color: var(--ink); text-wrap: balance; }
.post-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: 15px; color: var(--ink-soft); }
.post-author { font-weight: 700; color: var(--ink); }
.post-meta .dot { color: #c9b9b9; }
.post-cover { margin: 0 0 44px; }
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .45); }

.post-body { max-width: 720px; margin: 0 auto; font-size: 18px; line-height: 1.75; color: var(--ink); overflow-wrap: break-word; }
.post-body > * { margin-top: 0; margin-bottom: 1.25em; }
.post-body h2, .post-body h3 { margin: 1.8em 0 .6em; line-height: 1.25; color: var(--ink); }
.post-body h2 { font-size: 30px; }
.post-body h3 { font-size: 24px; }
.post-body > h3:first-child, .post-body > h2:first-child { margin-top: 0; }
.post-body a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:hover { color: #000; }
.post-body ul, .post-body ol { margin-left: 0; padding-left: 1.3em; }
.post-body li { margin-bottom: .6em; padding-left: .2em; }
.post-body li::marker { color: var(--red); }
.post-body strong { color: #1a0a0b; }
.post-body blockquote {
  margin: 0 0 1.5em; padding: 4px 0 4px 26px; border-left: 4px solid var(--red);
  font-size: 1.12em; line-height: 1.65; font-style: italic; color: var(--ink);
}
.post-body blockquote.lead { padding: 26px 30px; border: 0; border-radius: var(--radius); background: var(--soft); font-style: normal; font-size: 21px; line-height: 1.6; position: relative; }
.post-body blockquote.lead::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0; background: var(--red); }
.post-body blockquote p { margin: 0; }
.post-figure { margin: 2em 0; }
.post-figure img { display: block; width: 100%; height: auto; border-radius: 12px; }
.post-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 2em 0; }
.post-pair .post-figure { margin: 0; }
.post-pair img { aspect-ratio: 3 / 2; object-fit: cover; }
.post-body .btn-row { margin: 2em 0; }
.post-body .btn, .post-body .btn:visited { text-decoration: none; color: #fff; padding: 14px 28px; font-weight: 700; }
.post-body .btn:hover { color: var(--gold); }

.post-cta {
  max-width: 820px; margin: 56px auto 0; padding: 34px 38px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 24px 32px; flex-wrap: wrap;
  background: linear-gradient(135deg, #ba1c29 0%, #8e111c 100%); color: #fff;
  box-shadow: 0 20px 40px -24px rgba(142, 17, 28, .8);
}
.post-cta-text { flex: 1 1 320px; }
.post-cta h2 { margin: 0 0 6px; font-size: 26px; color: #fff; }
.post-cta p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 16px; }
.post-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.post-subscribe { max-width: 820px; margin: 28px auto 0; padding: 32px 38px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); text-align: center; }
.post-subscribe h2 { margin: 0 0 8px; font-size: 22px; color: var(--ink); }
.post-subscribe .lead { margin: 0 0 18px; font-size: 15px; color: var(--ink-soft); }
.post-subscribe .subscribe-form { margin: 0; }
.post-subscribe .subscribe-post .sub-input { border-radius: 999px; border-color: #dcc9c9; background: #fff; padding: 14px 22px; }
.post-subscribe .subscribe-post .sub-input.invalid { border-color: #e04562; }
.post-subscribe .subscribe-post button { margin: 0; border-radius: 999px; padding: 14px 26px; background: var(--red); font-weight: 700; }
.post-subscribe .subscribe-post button:hover, .post-subscribe .subscribe-post button:focus { background: #8e111c; color: var(--gold); }

.post-nav { max-width: 820px; margin: 28px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pn { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); transition: border-color .15s, transform .15s; }
.pn:hover, .pn:focus { border-color: var(--red); color: var(--ink); transform: translateY(-2px); }
.pn-next { text-align: right; grid-column: 2; }
.pn-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.pn-title { font-size: 16px; font-weight: 700; line-height: 1.35; }

.more-articles { margin: 72px 0 0; padding-top: 48px; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: 30px; color: var(--ink); }
.section-head a { font-weight: 700; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .blog .content-wrap { padding: 40px 32px 56px; }
  .card-grid-3, .card-grid-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid-bento .card-featured { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: 1.25fr 1fr; }
  .card-grid-bento .card-featured .card-media { min-height: 0; height: 100%; }
  .card-grid-bento .card-featured .card-body { justify-content: center; }
  .more-articles .card-grid-3 > :nth-child(3) { display: none; }
}
@media (max-width: 767px) {
  .blog .content-wrap { padding: 28px 16px 44px; }
  .blog-head { margin-bottom: 28px; }
  .blog-head h1 { font-size: 34px; }
  .blog-intro { font-size: 16px; }
  .cat-filter { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .cat-filter a { flex: 0 0 auto; }
  .card-grid { gap: 20px; }
  .card-grid-3, .card-grid-bento { grid-template-columns: minmax(0, 1fr); }
  .card-grid-bento .card-featured { display: flex; }
  .card-featured .card-media { aspect-ratio: 16 / 9; min-height: 0; }
  .card-featured .card-body { padding: 20px 22px 22px; }
  .card-featured .card-title { font-size: 24px; }
  .more-articles .card-grid-3 > :nth-child(3) { display: flex; }
  .post-head { margin-bottom: 22px; text-align: left; }
  .crumbs, .post-meta { justify-content: flex-start; }
  .post-title { font-size: 30px; }
  .post-meta { font-size: 14px; }
  .post-cover { margin: 0 -16px 28px; }
  .post-cover img { border-radius: 0; box-shadow: none; }
  .post-body { font-size: 17px; line-height: 1.7; }
  .post-body h2 { font-size: 24px; }
  .post-body h3 { font-size: 21px; }
  .post-body blockquote.lead { padding: 20px 20px 20px 24px; font-size: 18px; }
  .post-pair { grid-template-columns: 1fr; }
  .post-cta { margin-top: 40px; padding: 26px 22px; }
  .post-cta h2 { font-size: 22px; }
  .post-cta-actions { width: 100%; }
  .post-cta-actions .btn { flex: 1 1 auto; text-align: center; }
  .post-subscribe { padding: 26px 20px; }
  .post-subscribe .subscribe-post .sub-row { gap: 10px; }
  .post-subscribe .subscribe-post .sub-input, .post-subscribe .subscribe-post button { width: 100%; flex: 0 0 auto; }
  .post-nav { grid-template-columns: 1fr; }
  .pn-next { grid-column: auto; }
  .more-articles { margin-top: 48px; padding-top: 36px; }
  .section-head h2 { font-size: 24px; }
}
