/* BuyInRio blog — scoped under .blog-article / .blog-index.
   Brand: forest green (#0d2b1e / #14402c) + gold (#c9a24b). No italics (portfolio rule). */

.blog-article,
.blog-index {
  --bg-green: #0d2b1e;
  --bg-green-2: #14402c;
  --gold: #c9a24b;
  --gold-soft: #e2c98a;
  --ink: #1b241f;
  --ink-soft: #46564d;
  --line: #e4e9e5;
  --paper: #ffffff;
  --paper-2: #f6f8f6;
}

/* ─────────────────────────  HERO  ───────────────────────── */
.blog-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: var(--bg-green);
}
.blog-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.blog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8,22,15,.15) 0%, rgba(8,22,15,.55) 55%, rgba(8,22,15,.92) 100%);
}
.blog-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 6vw 4.5rem;
}
.blog-hero__eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 700;
  margin-bottom: 1rem;
}
.blog-hero__title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  font-weight: 800;
  letter-spacing: -.01em;
  max-width: 20ch;
}
.blog-hero__dek {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.5;
  color: #e7efe9;
  margin: 0 0 1.5rem;
  max-width: 60ch;
  font-weight: 400;
}
.blog-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem 1.1rem;
  font-size: .92rem;
  color: #cdddd2;
}
.blog-hero__meta strong { color: #fff; font-weight: 600; }
.blog-hero__dot { opacity: .5; }

/* ─────────────────────────  BODY LAYOUT  ───────────────────────── */
.blog-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 3.5rem 1.4rem 1rem;
  color: var(--ink);
}
.blog-body p {
  font-size: 1.12rem;
  line-height: 1.75;
  margin: 0 0 1.35rem;
  color: #22302a;
}
.blog-body a { color: #14664a; text-decoration: underline; text-underline-offset: 2px; }
.blog-body a:hover { color: var(--gold); }
.blog-body h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.18;
  margin: 3rem 0 1.1rem;
  font-weight: 800;
  color: var(--bg-green);
  scroll-margin-top: 90px;
}
.blog-body h3 {
  font-size: 1.28rem;
  margin: 2rem 0 .75rem;
  font-weight: 700;
  color: #173524;
}
.blog-body ul, .blog-body ol { margin: 0 0 1.5rem; padding-left: 1.3rem; }
.blog-body li { font-size: 1.08rem; line-height: 1.7; margin-bottom: .55rem; color: #22302a; }
.blog-body strong { color: #142e20; }

/* Standfirst / takeaways box */
.blog-takeaways {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  margin: 0 0 2.5rem;
}
.blog-takeaways__title {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a6a1e;
  font-weight: 700;
  margin: 0 0 .8rem;
}
.blog-takeaways ul { margin: 0; padding-left: 1.15rem; }
.blog-takeaways li { font-size: 1.02rem; margin-bottom: .5rem; }

/* Table of contents */
.blog-toc {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  margin: 0 0 2.5rem;
  background: #fff;
}
.blog-toc__title { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; margin: 0 0 .7rem; }
.blog-toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.blog-toc li { font-size: .96rem; margin-bottom: .4rem; line-height: 1.4; break-inside: avoid; }
.blog-toc a { color: #2c3b33; text-decoration: none; }
.blog-toc a:hover { color: var(--gold); text-decoration: underline; }
@media (max-width: 620px){ .blog-toc ol { columns: 1; } }

/* Callout */
.blog-callout {
  background: #f0f5f1;
  border: 1px solid #d7e5db;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.8rem 0 2rem;
}
.blog-callout__title { font-weight: 700; color: var(--bg-green); margin: 0 0 .5rem; font-size: 1.05rem; }
.blog-callout p { font-size: 1.02rem; margin: 0 0 .6rem; }
.blog-callout p:last-child { margin-bottom: 0; }

/* Quote (no italics) */
.blog-quote {
  margin: 2.2rem 0;
  padding: .3rem 0 .3rem 1.6rem;
  border-left: 4px solid var(--gold);
}
.blog-quote p {
  font-size: 1.4rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--bg-green);
  margin: 0 0 .5rem;
}
.blog-quote cite {
  font-style: normal;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a6a1e;
  font-weight: 700;
}

/* Stat row */
.blog-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.blog-stat {
  background: var(--bg-green);
  color: #fff;
  border-radius: 12px;
  padding: 1.3rem 1rem;
  text-align: center;
}
.blog-stat__num { font-size: 1.9rem; font-weight: 800; color: var(--gold-soft); line-height: 1.1; }
.blog-stat__label { font-size: .82rem; color: #cdddd2; margin-top: .35rem; line-height: 1.3; }

/* Tables */
.blog-table-wrap { margin: 1.8rem 0 2.2rem; overflow-x: auto; }
.blog-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.blog-table caption { caption-side: top; text-align: left; font-size: .88rem; color: var(--ink-soft); margin-bottom: .6rem; }
.blog-table th, .blog-table td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.blog-table thead th { background: var(--bg-green); color: #fff; font-weight: 600; font-size: .92rem; }
.blog-table tbody tr:nth-child(even) { background: var(--paper-2); }

/* In-body figure (full-bleed within reading column, slightly wider) */
.blog-figure { margin: 2.2rem 0; }
.blog-figure img { width: 100%; height: auto; border-radius: 12px; display: block; }
.blog-figure figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .6rem; line-height: 1.4; }
.blog-figure figcaption a { color: var(--ink-soft); }
.blog-attr { opacity: .8; }

/* Author box */
.blog-author {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  margin: 3rem 0 0;
}
.blog-author__avatar {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-green), var(--bg-green-2));
  color: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem;
}
.blog-author__name { font-weight: 700; color: var(--bg-green); }
.blog-author__role { font-size: .82rem; color: #8a6a1e; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin: .1rem 0 .5rem; }
.blog-author__bio { font-size: .96rem; color: var(--ink-soft); line-height: 1.6; margin: 0; }

/* Disclaimer line */
.blog-disclaimer { font-size: .85rem; color: var(--ink-soft); margin: 2rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); line-height: 1.55; }

/* Related posts */
.blog-related { background: var(--paper-2); border-top: 1px solid var(--line); padding: 3.5rem 0; margin-top: 3.5rem; }
.blog-related__title { text-align: center; font-size: 1.5rem; color: var(--bg-green); margin: 0 0 1.8rem; font-weight: 800; }
.blog-related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; max-width: 1100px; margin: 0 auto; padding: 0 1.4rem; }
.blog-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(13,43,30,.14); }
.blog-card__img { aspect-ratio: 16/9; width: 100%; object-fit: cover; background: var(--bg-green); }
.blog-card__body { padding: 1.1rem 1.2rem 1.3rem; }
.blog-card__cat { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #8a6a1e; font-weight: 700; }
.blog-card__title { font-size: 1.08rem; font-weight: 700; color: var(--bg-green); margin: .4rem 0 0; line-height: 1.3; }

/* Inline CTA */
.blog-cta {
  background: linear-gradient(135deg, var(--bg-green), var(--bg-green-2));
  color: #fff; border-radius: 16px; padding: 2rem 2rem;
  margin: 2.8rem 0 1rem; text-align: center;
}
.blog-cta h3 { color: #fff; font-size: 1.4rem; margin: 0 0 .5rem; }
.blog-cta p { color: #cdddd2; margin: 0 0 1.2rem; font-size: 1.02rem; }

/* ───────────  STYLE VARIANTS (visual variety so posts don't look templated)  ─────────── */

/* editorial + narrative: drop cap on the first paragraph */
.blog-article--editorial .blog-section:first-of-type > p:first-of-type::first-letter,
.blog-article--narrative .blog-section:first-of-type > p:first-of-type::first-letter {
  font-size: 3.4rem; line-height: .8; font-weight: 800; float: left;
  margin: .35rem .6rem 0 0; color: var(--gold);
}
.blog-article--editorial .blog-body { max-width: 780px; }

/* listicle: numbered H2s */
.blog-article--listicle .blog-body { counter-reset: bir-item; }
.blog-article--listicle .blog-section > h2 { counter-increment: bir-item; }
.blog-article--listicle .blog-section > h2::before {
  content: counter(bir-item);
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7em; height: 1.7em; margin-right: .55rem;
  background: var(--gold); color: #1c2b0f; border-radius: 50%;
  font-size: .78em; vertical-align: middle;
}

/* qa: question-style H2s */
.blog-article--qa .blog-section > h2 { color: #14664a; }
.blog-article--qa .blog-section > h2::before { content: "Q "; color: var(--gold); font-weight: 800; }

/* data-deep-dive: accent the tables + stats a touch harder */
.blog-article--data-deep-dive .blog-table thead th { background: #14664a; }

/* comparison: zebra emphasis already via table; widen body */
.blog-article--comparison .blog-body { max-width: 880px; }

/* ─────────────────────────  BLOG INDEX  ───────────────────────── */
.blog-index__hero {
  background: linear-gradient(135deg, var(--bg-green), var(--bg-green-2));
  color: #fff; padding: 5rem 1.4rem 3.2rem; text-align: center;
}
.blog-index__hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 .8rem; font-weight: 800; }
.blog-index__hero p { color: #cdddd2; font-size: 1.15rem; max-width: 60ch; margin: 0 auto; line-height: 1.55; }
.blog-index__wrap { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.4rem 4rem; }
.blog-filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 0 0 2.5rem; }
.blog-filter { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .5rem 1.1rem; font-size: .9rem; color: #2c3b33; cursor: pointer; text-decoration: none; }
.blog-filter:hover, .blog-filter--active { background: var(--bg-green); color: #fff; border-color: var(--bg-green); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.6rem; }
.blog-grid .blog-card__img { aspect-ratio: 3/2; }
.blog-grid .blog-card__excerpt { font-size: .95rem; color: var(--ink-soft); margin: .5rem 0 0; line-height: 1.5; }
.blog-grid .blog-card__meta { font-size: .8rem; color: #8a9a90; margin-top: .8rem; }

/* Featured (first) post spans wider on large screens */
.blog-featured { margin: 0 0 2.4rem; }
.blog-featured .blog-card { flex-direction: row; }
.blog-featured .blog-card__img { aspect-ratio: auto; width: 46%; min-height: 280px; }
.blog-featured .blog-card__body { padding: 2rem 2.2rem; align-self: center; }
.blog-featured .blog-card__title { font-size: 1.7rem; }
@media (max-width: 720px){ .blog-featured .blog-card { flex-direction: column; } .blog-featured .blog-card__img { width: 100%; min-height: 0; aspect-ratio: 3/2; } }

@media (max-width: 640px){
  .blog-hero { min-height: 56vh; }
  .blog-hero__inner { padding: 0 6vw 3rem; }
  .blog-body { padding: 2.5rem 1.2rem 1rem; }
  .blog-body p, .blog-body li { font-size: 1.06rem; }
}
