/* ─────────────────────────────────────────────────
   BLOG (magazine layout) — loaded only on /blog pages
───────────────────────────────────────────────── */
.bp-index { padding: 64px 0 80px; background: var(--bg); }
.bp-meta { font-size: 13px; color: var(--mid); margin: 0 0 10px; }
.bp-excerpt { color: var(--mid); font-size: 15px; line-height: 1.65; margin: 0 0 14px; }
.bp-placeholder {
  width: 100%; height: 100%; min-height: 160px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy), #16355c); color: rgba(255,255,255,.7);
  font-family: 'Outfit', sans-serif; font-weight: 800; letter-spacing: .08em; font-size: 20px;
}

.bp-featured {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.bp-featured-media { display: block; background: var(--bg); min-height: 320px; }
.bp-featured-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-featured-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.bp-featured-body h2 { font-family: 'Outfit', sans-serif; font-size: 30px; line-height: 1.2; font-weight: 800; margin: 10px 0 14px; }
.bp-featured-body h2 a { color: var(--text); text-decoration: none; }
.bp-featured-body h2 a:hover { color: #c24d0e; }

.bp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.bp-card {
  position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.bp-card:hover, .bp-card:focus-within { box-shadow: var(--shadow); transform: translateY(-3px); }
.bp-card-media { aspect-ratio: 16/9; overflow: hidden; background: var(--bg); }
.bp-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.bp-card:hover .bp-card-media img { transform: scale(1.04); }
.bp-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.bp-card-body h3 { font-family: 'Outfit', sans-serif; font-size: 19px; line-height: 1.3; font-weight: 700; margin: 0 0 10px; }
.bp-card-link { color: var(--text); text-decoration: none; }
.bp-card-link::after { content: ''; position: absolute; inset: 0; }
.bp-card:hover .bp-card-link { color: #c24d0e; }
.bp-more { margin-top: auto; font-weight: 700; font-size: 14px; color: #c24d0e; }

/* Article page */
.bp-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: transparent; }
.bp-progress span { display: block; height: 100%; width: 0; background: var(--orange); transition: width .1s linear; }
.bp-hero { padding: 72px 24px 56px; }
.bp-hero-inner { max-width: 1124px; }
.bp-hero h1, .bp-hero .bp-lede { max-width: 780px; }
.bp-hero h1 { font-size: clamp(30px, 4.2vw, 48px); margin-bottom: 16px; }
.bp-hero .bp-lede { color: rgba(255,255,255,.85); font-size: 18px; line-height: 1.65; max-width: 720px; margin: 0 0 26px; }
.bp-byline { display: flex; align-items: center; gap: 14px; color: #fff; }
.bp-byline strong { display: block; font-size: 15px; }
.bp-byline-meta { color: rgba(255,255,255,.8); font-size: 13px; }
.bp-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: #c24d0e; color: #fff; font-weight: 800;
  font-family: 'Outfit', sans-serif; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bp-avatar--lg { width: 56px; height: 56px; font-size: 22px; }

.bp-layout { display: grid; grid-template-columns: minmax(0, 720px) 300px; gap: 56px; justify-content: center; padding-top: 56px; padding-bottom: 56px; align-items: start; }
.bp-cover { margin: 0 0 36px; }
.bp-cover img { width: 100%; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }

.bp-prose { font-size: 17.5px; line-height: 1.6; color: var(--text); max-width: none; margin: 0; }
.bp-prose h2 { font-family: 'Outfit', sans-serif; font-size: 31px; font-weight: 800; margin: 34px 0 10px; scroll-margin-top: 90px; line-height: 1.25; }
.bp-prose h3 { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 700; margin: 24px 0 8px; line-height: 1.3; scroll-margin-top: 90px; }
.bp-prose p { margin: 0 0 14px; }
.bp-prose a { color: #b0420a; text-decoration: underline; text-underline-offset: 3px; }
/* main.css resets ul to list-style:none, so bullets must be restored here. */
.bp-prose ul, .bp-prose ol { margin: 0 0 14px; padding: 0 0 0 1.5em; }
.bp-prose ul { list-style: disc outside; }
.bp-prose ol { list-style: decimal outside; }
.bp-prose ul ul { list-style: circle outside; }
.bp-prose ul ul ul { list-style: square outside; }
.bp-prose li { margin: 0 0 3px; padding-left: .15em; }
.bp-prose li::marker { color: #b0420a; font-weight: 700; }
.bp-prose li:last-child { margin-bottom: 0; }
/* The editor wraps list text in <p>; without this each item gets a full paragraph gap. */
.bp-prose li > p { margin: 0 0 3px; }
.bp-prose li > p:last-child { margin-bottom: 0; }
.bp-prose li > ul, .bp-prose li > ol { margin: 3px 0 0; }
.bp-prose h2 + p, .bp-prose h3 + p { margin-top: 0; }
.bp-prose > :first-child { margin-top: 0; }
.bp-prose > :last-child { margin-bottom: 0; }
.bp-prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.bp-prose blockquote { border-left: 4px solid var(--orange); background: var(--bg); padding: 16px 22px; margin: 20px 0; border-radius: 0 10px 10px 0; font-style: italic; }
.bp-prose blockquote p:last-child { margin-bottom: 0; }
.bp-prose code { background: #eef2f8; padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.bp-prose pre { background: #0f1e36; color: #e8eef9; padding: 18px 20px; border-radius: var(--radius); overflow-x: auto; margin: 0 0 24px; line-height: 1.6; font-size: 14px; }
.bp-prose pre code { background: none; padding: 0; color: inherit; }
.bp-prose table { width: 100%; border-collapse: collapse; margin: 0 0 26px; font-size: 15px; display: block; overflow-x: auto; }
.bp-prose th, .bp-prose td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.bp-prose th { background: var(--bg); font-weight: 700; }
.bp-prose img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 8px 0; }
.bp-figure { margin: 22px 0; }
.bp-figure img { width: 100%; margin: 0; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.bp-figure figcaption { text-align: center; font-size: 14px; color: var(--mid); margin-top: 10px; line-height: 1.5; }

.bp-share { border-top: 1px solid var(--border); margin-top: 48px; padding-top: 28px; }
.bp-share h2 { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.bp-share-links { display: flex; flex-wrap: wrap; gap: 10px; }
.bp-share-btn {
  border: 1.5px solid var(--border); background: var(--white); color: var(--text); font: 600 14px 'Outfit', sans-serif;
  padding: 10px 20px; border-radius: 9px; cursor: pointer; text-decoration: none; transition: border-color .18s, color .18s;
}
.bp-share-btn:hover { border-color: var(--orange); color: #b0420a; }
.bp-author { display: flex; gap: 18px; align-items: center; background: var(--bg); border-radius: var(--radius); padding: 24px; margin-top: 32px; }
.bp-author p { margin: 4px 0 0; color: var(--mid); font-size: 14.5px; line-height: 1.6; }

.bp-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.bp-toc { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--white); }
.bp-toc h2 { font-family: 'Outfit', sans-serif; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--mid); margin: 0 0 12px; }
.bp-toc ol { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow-y: auto; }
.bp-toc li { margin: 0; }
.bp-toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--border); color: var(--mid); font-size: 14px; line-height: 1.4; text-decoration: none; }
.bp-toc a:hover { color: var(--text); border-left-color: var(--orange); }
.bp-toc a[aria-current="true"] { color: #b0420a; border-left-color: var(--orange); font-weight: 700; }
.bp-toc-sub a { padding-left: 26px; font-size: 13px; }
.bp-aside-cta { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px; }
.bp-aside-cta h2 { font-family: 'Outfit', sans-serif; font-size: 18px; margin: 0 0 6px; color: #fff; }
.bp-aside-cta p { color: rgba(255,255,255,.85); font-size: 14px; margin: 0 0 14px; line-height: 1.55; }

.bp-pager { max-width: 1124px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 56px; }
.bp-pager-link { display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; text-decoration: none; background: var(--white); transition: border-color .15s, box-shadow .15s; }
.bp-pager-link:hover { border-color: var(--orange); box-shadow: var(--shadow); }
.bp-pager-link span { display: block; font-size: 13px; color: var(--mid); margin-bottom: 4px; }
.bp-pager-link strong { color: var(--text); font-family: 'Outfit', sans-serif; font-size: 16px; line-height: 1.35; }
.bp-pager-link--next { text-align: right; grid-column: 2; }
.bp-related { background: var(--bg); padding: 56px 0 72px; }

@media (max-width: 1040px) {
  .bp-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .bp-aside { position: static; }
  .bp-grid { grid-template-columns: repeat(2, 1fr); }
  .bp-featured { grid-template-columns: 1fr; }
  .bp-featured-media { min-height: 0; aspect-ratio: 16/9; }
}
@media (max-width: 640px) {
  .bp-grid { grid-template-columns: 1fr; }
  .bp-featured-body { padding: 26px 22px; }
  .bp-featured-body h2 { font-size: 24px; }
  .bp-hero { padding: 48px 0 40px; }
  .bp-prose { font-size: 16.5px; }
  .bp-pager { grid-template-columns: 1fr; }
  .bp-pager-link--next { grid-column: auto; }
}

@media (max-width: 1040px) { .bp-toc ol { max-height: none; overflow: visible; } }
