/* ─────────────────────────────────────────────
   Realcore Blog — Add-on Styles
   ─────────────────────────────────────────────
   Loads AFTER main.css. It does NOT replace the theme:
   the header and footer render entirely from main.css,
   exactly as they do on leadership.html, nls.html, etc.

   All blog content sits inside <div class="blog-scope">, so
   nothing here can reach the header, the footer, or any
   other page on the site.

   Things in main.css this has to work around:
     • h1-h4 and p are set to  margin: 0  site-wide
     • bare  a  is 'Poppins Bold' and #0d6efd
     • body colour is #68718b, line-height 1.5
     • fonts are chosen by FAMILY NAME, not weight:
       'Poppins Regular' / 'Poppins Medium' / 'Poppins Bold'
       (font-weight: 700 does nothing — switch the family)
     • .container is display:flex in this theme — never use it
       for stacked content
   ───────────────────────────────────────────── */

/* === Theme palette (taken from main.css) === */
:root {
  --rc-blue-mid:  #1b45b4;   /* header gradient start */
  --rc-navy:      #1c2792;   /* header gradient end   */
  --rc-blue:      #007bff;   /* btn--primary          */
  --rc-blue-dark: #0062cc;
  --rc-lime:      #d2eb3c;   /* theme hover accent    */
  --rc-ink:       #03133d;
  --rc-muted:     #68718b;   /* theme body colour     */
  --rc-white:     #ffffff;
  --rc-bg:        #f6f7fb;
  --rc-border:    #e5e7eb;

  --rc-shadow:       0 2px 16px rgba(3, 19, 61, 0.08);
  --rc-shadow-hover: 0 10px 28px rgba(3, 19, 61, 0.14);
  --rc-radius-lg: 16px;
  --rc-radius-md: 12px;
  --rc-t: 0.2s ease;

  --tag-agent:       #0284c7;
  --tag-agent-light: #e0f1fa;
  --tag-admin:       #b8722c;
  --tag-admin-light: #f6ebdd;

  --font-body: 'Poppins Regular', 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-med:  'Poppins Medium', 'Poppins Regular', system-ui, sans-serif;
  --font-bold: 'Poppins Bold', 'Poppins Regular', system-ui, sans-serif;
}

/* ─────────────────────────────────────────────
   BASE — scoped to .blog-scope
   ───────────────────────────────────────────── */
.blog-scope {
  background: var(--rc-bg);
  color: var(--rc-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0;
  padding-bottom: 10px;
}
.blog-scope h1, .blog-scope h2, .blog-scope h3,
.blog-scope h4, .blog-scope h5, .blog-scope h6 {
  font-family: var(--font-bold);
  color: var(--rc-ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
}
.blog-scope p { margin: 0; }
.blog-scope ul, .blog-scope ol { margin: 0; padding: 0; list-style: none; }
.blog-scope img { max-width: 100%; display: block; height: auto; }
.blog-scope a { color: var(--rc-blue); text-decoration: none; font-family: var(--font-med); transition: color var(--rc-t); }
.blog-scope a:hover { color: var(--rc-blue-dark); }

/* Page wrappers — deliberately NOT .container (that is flex in this theme) */
.blog-scope .page-wrapper { max-width: 1200px; margin: 0 auto; padding: 8px 24px 80px; }
.blog-scope .page-wrapper--narrow { max-width: 900px; }

/* ─────────────────────────────────────────────
   PAGE TITLE BLOCK
   The theme header carries its own dark background, so this
   sits on the light page — no colour band, no seam.
   ───────────────────────────────────────────── */
.blog-title-block { padding: 56px 24px 40px; text-align: center; max-width: 820px; margin: 0 auto; }
.blog-scope .blog-title-block h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 14px; }
.blog-scope .blog-title-block p { font-size: 1.05rem; color: var(--rc-muted); max-width: 640px; margin: 0 auto; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-bold);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rc-navy);
  background: #e8ecfb;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* Post page title block — left aligned */
.blog-title-block--post { text-align: left; max-width: 852px; padding: 44px 0 30px; }
.blog-scope .blog-title-block--post h1 { font-size: 2.25rem; max-width: 26ch; }
.blog-scope .blog-title-block--post .post-kicker {
  font-family: var(--font-med); font-size: 1.1rem; color: var(--rc-navy);
  margin: 0 0 12px; max-width: 60ch;
}
.blog-scope .blog-title-block--post .post-dek { font-size: 1.02rem; color: var(--rc-muted); max-width: 68ch; margin: 0; }
.blog-crumbs { font-size: 0.85rem; color: var(--rc-muted); margin-bottom: 18px; }
.blog-scope .blog-crumbs a { color: var(--rc-muted); }
.blog-scope .blog-crumbs a:hover { color: var(--rc-blue); }
.post-meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* === Section heading === */
.blog-scope .section-heading { margin-bottom: 24px; }
.blog-scope .section-heading h2 { font-size: 1.5rem; }

/* === Audience tags === */
.blog-tag {
  display: inline-block;
  font-family: var(--font-bold);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.6;
}
.blog-tag.agents { background: var(--tag-agent-light); color: var(--tag-agent); }
.blog-tag.admins { background: var(--tag-admin-light); color: var(--tag-admin); }
.blog-date { font-family: var(--font-body); font-size: 0.82rem; color: var(--rc-muted); }

/* === Filter buttons === */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 42px; }
.blog-scope .filter-pill {
  background: var(--rc-white);
  border: 1px solid var(--rc-border);
  border-radius: 999px;
  padding: 10px 24px;
  font-family: var(--font-bold);
  font-size: 0.85rem;
  color: var(--rc-muted);
  transition: all var(--rc-t);
}
.blog-scope .filter-pill:hover { color: var(--rc-ink); border-color: var(--rc-muted); }
.blog-scope .filter-pill.active {
  background: linear-gradient(84deg, var(--rc-blue-mid), var(--rc-navy));
  border-color: transparent;
  color: var(--rc-white);
}

/* === Featured post === */
.featured-post {
  background: var(--rc-white);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-lg);
  box-shadow: var(--rc-shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  margin-bottom: 52px;
  transition: box-shadow var(--rc-t);
}
.featured-post:hover { box-shadow: var(--rc-shadow-hover); }
.featured-post__media { background: var(--rc-bg); overflow: hidden; }
.featured-post__media img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.featured-post__body { padding: 36px 40px; display: flex; flex-direction: column; gap: 12px; }
.featured-post__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.blog-scope .featured-post__body h2 { font-size: 1.6rem; }
.blog-scope .featured-post__body h2 a { color: var(--rc-ink); font-family: var(--font-bold); }
.blog-scope .featured-post__body h2 a:hover { color: var(--rc-blue); }
.blog-scope .featured-post__kicker { font-family: var(--font-med); font-size: 0.95rem; color: var(--rc-navy); }
.blog-scope .featured-post__body p { color: var(--rc-muted); font-size: 0.95rem; }
.blog-scope .read-more {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-bold); font-size: 0.9rem; color: var(--rc-blue);
  margin-top: 4px; transition: gap var(--rc-t), color var(--rc-t);
}
.blog-scope .read-more:hover { gap: 12px; color: var(--rc-blue-dark); }

/* === Post grid === */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  background: var(--rc-white);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--rc-t), transform var(--rc-t);
}
.post-card:hover { box-shadow: var(--rc-shadow-hover); transform: translateY(-3px); }
.post-card__media { background: var(--rc-bg); aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.blog-scope .post-card__body h3 { font-size: 1.05rem; line-height: 1.4; }
.blog-scope .post-card__body h3 a { color: var(--rc-ink); font-family: var(--font-bold); }
.blog-scope .post-card__body h3 a:hover { color: var(--rc-blue); }
.blog-scope .post-card__kicker { font-family: var(--font-med); font-size: 0.85rem; color: var(--rc-navy); margin-top: -4px; flex: 0 0 auto; }
.blog-scope .post-card__body p { font-size: 0.87rem; color: var(--rc-muted); }
.blog-scope .post-card__body p:last-of-type { flex: 1 1 auto; }
.blog-scope .post-card__body .read-more { margin-top: auto; }

/* === Archive strip === */
.archive-strip {
  background: var(--rc-white);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-md);
  padding: 24px 30px;
  margin-top: 52px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.blog-scope .archive-strip h4 { font-size: 0.95rem; white-space: nowrap; }
.archive-links { display: flex; gap: 10px; flex-wrap: wrap; }
.blog-scope .archive-links a {
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: 999px;
  padding: 7px 16px;
  font-family: var(--font-bold);
  font-size: 0.83rem;
  color: var(--rc-ink);
  transition: all var(--rc-t);
}
.blog-scope .archive-links a:hover { border-color: var(--rc-blue); color: var(--rc-blue); }

/* === Support CTA band === */
.cta-band {
  background: linear-gradient(84deg, var(--rc-blue-mid), var(--rc-navy));
  border-radius: var(--rc-radius-lg);
  padding: 42px 40px;
  margin-top: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.blog-scope .cta-band h3 { font-size: 1.35rem; color: var(--rc-white); margin: 0 0 6px; }
.blog-scope .cta-band p { color: rgba(255,255,255,0.85); font-size: 0.95rem; max-width: 560px; }
.blog-scope .blog-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rc-white);
  color: var(--rc-navy);
  font-family: var(--font-bold);
  font-size: 0.9rem;
  padding: 14px 30px;
  border-radius: 10px;
  white-space: nowrap;
}
.blog-scope .blog-btn:hover { background: var(--rc-lime); color: var(--rc-navy); }

/* ─────────────────────────────────────────────
   ARTICLE BODY
   main.css zeroes h1-h4 and p margins site-wide, so the whole
   vertical rhythm is re-established here.
   ───────────────────────────────────────────── */
.article-hero {
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-lg);
  box-shadow: var(--rc-shadow);
  overflow: hidden;
  margin-bottom: 28px;
}
.article-hero img { width: 100%; }
.article-prose {
  background: var(--rc-white);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-lg);
  padding: 40px 46px;
}
.blog-scope .article-prose h2 { font-size: 1.3rem; margin: 34px 0 14px; }
.blog-scope .article-prose h2:first-child { margin-top: 0; }
.blog-scope .article-prose h3 { font-size: 1.05rem; margin: 24px 0 10px; }
.blog-scope .article-prose p { color: #374151; font-size: 1rem; margin: 0 0 14px; }
.blog-scope .article-prose p.post-lead { font-family: var(--font-med); font-size: 1.08rem; color: var(--rc-ink); }
.blog-scope .article-prose ul,
.blog-scope .article-prose ol { margin: 12px 0 18px 24px; padding: 0; color: #374151; font-size: 1rem; }
.blog-scope .article-prose ul { list-style: disc outside; }
.blog-scope .article-prose ol { list-style: decimal outside; }
.blog-scope .article-prose li { margin-bottom: 7px; }
.blog-scope .article-prose strong,
.blog-scope .article-prose b { font-family: var(--font-bold); color: var(--rc-ink); }
.blog-scope .article-prose a { font-family: var(--font-bold); color: var(--rc-blue); }
.blog-scope .article-prose a:hover { color: var(--rc-blue-dark); }
.blog-scope .article-prose table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 0.9rem; }
.blog-scope .article-prose th,
.blog-scope .article-prose td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--rc-border); vertical-align: top; }
.blog-scope .article-prose th { background: var(--rc-bg); font-family: var(--font-bold); color: var(--rc-ink); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.blog-scope .article-prose .callout {
  background: #eef2fd; border-left: 4px solid var(--rc-blue-mid); border-radius: 8px;
  padding: 16px 20px; margin: 20px 0; font-size: 0.95rem; color: var(--rc-navy);
}
.blog-scope .article-prose .callout strong { color: var(--rc-navy); }
.blog-scope .article-prose .screenshot {
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-md);
  box-shadow: var(--rc-shadow);
  margin: 22px 0;
  overflow: hidden;
}
.blog-scope .article-prose figure { margin: 22px 0; }
.blog-scope .article-prose figure .screenshot { margin: 0; }
.blog-scope .article-prose figcaption { font-size: 0.83rem; color: var(--rc-muted); margin-top: 8px; text-align: center; }
.blog-scope .article-prose blockquote {
  border-left: 4px solid var(--rc-blue);
  padding: 6px 0 6px 20px;
  margin: 22px 0;
  font-size: 1.05rem;
  color: var(--rc-ink);
  font-style: italic;
}

/* Links under an article */
.article-footer-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.blog-scope .back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-bold); font-size: 0.88rem; color: var(--rc-blue);
  transition: gap var(--rc-t);
}
.blog-scope .back-link:hover { gap: 12px; }

.related-posts { margin-top: 60px; }
.blog-scope .no-results { text-align: center; color: var(--rc-muted); padding: 44px 0; font-size: 0.95rem; }

/* ─────────────────────────────────────────────
   RESPONSIVE
   1020px is the theme's own hamburger breakpoint.
   ───────────────────────────────────────────── */
@media (max-width: 1019.98px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post__media img { min-height: 220px; }
  .featured-post__body { padding: 28px 26px; }
  .blog-scope .blog-title-block h1 { font-size: 2rem; }
  .blog-scope .blog-title-block--post h1 { font-size: 1.7rem; }
  .blog-scope .article-prose { padding: 26px 22px; }
}
@media (max-width: 620px) {
  .post-grid { grid-template-columns: 1fr; }
  .blog-scope .page-wrapper { padding: 4px 18px 56px; }
  .blog-title-block { padding: 36px 4px 30px; }
  .archive-strip { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cta-band { padding: 30px 24px; }
}
