/* ============================================================
   blog.css — Blog / Articles pages
   Used alongside Bootstrap 5 (loaded via $page_styles) + style.css.
   Loaded AFTER style.css so these rules win on shared classes.
   ============================================================ */

/* --- Bootstrap isolation: keep site header/footer intact --- */
#siteHeader ul, footer ul { padding-left: 0; margin-bottom: 0; }
#siteHeader .btn { font-size: 14.5px; }
footer h4 { margin-top: 0; }
main section { padding: 0; }
main section.blog-section { padding: 80px 0; }

/* ---------- Blog list hero ---------- */
.blog-hero{
  position:relative; overflow:hidden; text-align:center; color:#fff;
  background:linear-gradient(135deg,#0D2748 0%,#123761 55%,#184680 100%);
  padding:170px 0 90px;
}
.blog-hero::before{
  content:""; position:absolute; top:-90px; right:-90px;
  width:420px; height:420px; border-radius:50%;
  border:60px solid rgba(255,255,255,.05); pointer-events:none;
}
.blog-hero::after{
  content:""; position:absolute; bottom:-130px; left:-130px;
  width:520px; height:520px; border-radius:50%;
  border:80px solid rgba(255,255,255,.05); pointer-events:none;
}
.blog-hero .inner{ position:relative; z-index:2; }
.blog-hero-eyebrow{
  font-style:italic; font-size:15px; color:rgba(255,255,255,.9);
  display:block; margin-bottom:14px;
}
.blog-hero h1{
  color:#fff; font-size:clamp(34px,4.6vw,54px); font-weight:700;
  margin:0 0 18px;
}
.blog-hero p{
  color:rgba(255,255,255,.85); font-size:clamp(16px,2vw,20px);
  max-width:760px; margin:0 auto;
}

/* ---------- Category filter pills ---------- */
.blog-filter{
  display:flex; flex-wrap:wrap; gap:12px; justify-content:center;
  padding-bottom:56px;
}
.blog-filter a{
  min-width:80px; text-align:center;
  border:1px solid #d1d5db; border-radius:999px;
  padding:9px 22px; font-size:15.5px; font-weight:500;
  color:var(--ink); background:transparent;
  transition:all .25s ease;
}
.blog-filter a:hover{ border-color:var(--ink); }
.blog-filter a.active{
  background:var(--ink); border-color:var(--ink); color:#fff;
}

/* ---------- Blog cards ---------- */
.blog-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:22px;
}
@media (max-width:991px){ .blog-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:640px){ .blog-grid{grid-template-columns:1fr;} }

.blog-card{
  display:flex; flex-direction:column; height:100%;
  background:#f2f2f2; border-radius:16px; overflow:hidden;
  transition:box-shadow .25s ease, transform .25s ease;
}
.blog-card:hover{ box-shadow:var(--shadow); transform:translateY(-3px); }
.blog-card-img{
  position:relative; aspect-ratio:4/3; max-height:240px; overflow:hidden;
}
.blog-card-img img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .35s ease;
}
.blog-card:hover .blog-card-img img{ transform:scale(1.05); }
.blog-card-img::after{
  content:""; position:absolute; inset:0; z-index:1;
  background:linear-gradient(180deg,rgba(13,39,72,.28) 0%,rgba(13,39,72,0) 45%);
}
.blog-card-badges{
  position:absolute; z-index:2; top:20px; left:0; right:0;
  display:flex; flex-wrap:wrap; gap:10px; padding:0 20px;
}
.blog-pill{
  border:1px solid #fff; color:#fff; border-radius:999px;
  padding:6px 14px; font-size:12px; font-weight:500; line-height:1;
  white-space:nowrap;
}
.blog-card-body{ padding:20px 24px 40px; }
.blog-card-title{
  font-size:clamp(17px,1.6vw,20px); font-weight:500; color:#111827;
  line-height:1.35; margin:0; transition:color .25s ease;
  display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.blog-card:hover .blog-card-title{ color:var(--ink-3); }
.blog-card-meta{ font-size:13px; color:#6b7280; margin-top:10px; }
.blog-empty{
  text-align:center; color:#6b7280; padding:60px 0;
  font-size:17px;
}

/* ---------- Single post: hero (light) ---------- */
.post-hero{
  position:relative; overflow:hidden; padding:48px 0 0;
  background:
    radial-gradient(900px 420px at 92% -10%, rgba(111,201,72,.14), transparent 60%),
    linear-gradient(180deg,#FFFFFF 0%, var(--parchment-2) 100%);
}
.post-hero::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:180px; background:#fff; z-index:0;
}
.post-hero-inner{ position:relative; z-index:1; max-width:900px; text-align:center; }
.post-hero .crumbs{ justify-content:center; }
.post-hero-cat{
  display:inline-block; margin-bottom:18px; padding:6px 14px;
  background:var(--mint); color:var(--verified); border:1px solid rgba(57,165,54,.2); border-radius:999px;
  font-family:'IBM Plex Mono',monospace; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.08em;
  text-decoration:none; transition:background .2s, color .2s;
}
.post-hero-cat:hover{ background:var(--brass); color:#fff; }
.post-hero h1{
  color:var(--ink); font-size:clamp(30px,4.2vw,52px); font-weight:800; letter-spacing:-.025em; line-height:1.1;
  max-width:880px; margin:0 auto;
}
.post-hero-meta{ display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:12px 14px; margin-top:28px; }
.post-hero-author{ display:flex; align-items:center; gap:10px; text-align:left; padding-right:6px; }
.post-hero-author b{ display:block; font-size:15px; color:var(--ink); line-height:1.2; }
.post-hero-author small{ display:block; font-size:12.5px; color:var(--slate); }
.post-hero-avatar{
  width:44px; height:44px; border-radius:50%; overflow:hidden; flex-shrink:0;
  background:var(--mint); color:var(--verified); font-weight:800; display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 0 3px #fff, 0 0 0 4px var(--line-on-light);
}
.post-hero-avatar img{ width:100%; height:100%; object-fit:cover; }
.post-hero-chip{
  display:inline-flex; align-items:center; gap:7px; font-size:13.5px; font-weight:600; color:var(--text-2);
  background:#fff; border:1px solid var(--line-on-light); border-radius:999px; padding:7px 14px;
}
.post-hero-chip svg{ color:var(--brass); }
.post-hero-media{ position:relative; z-index:1; max-width:1150px; margin-top:40px; }
.post-hero-img{
  display:block; width:auto; max-width:100%; max-height:520px; margin:0 auto;
  object-fit:contain;
  border-radius:24px; box-shadow:var(--shadow-lg); background:var(--surface-3);
}
@media (max-width:640px){
  .post-hero{ padding-top:28px; }
  .post-hero-img{ max-height:320px; border-radius:16px; }
  .post-hero::after{ height:80px; }
}

/* ---------- Post layout ---------- */
.post-body{ position:relative; z-index:3; padding:56px 0 80px; }
.post-layout{
  display:flex; flex-direction:column; gap:40px;
}
@media (min-width:768px){
  .post-layout{ flex-direction:row; }
}
.post-main{ flex:1; min-width:0; }
.post-aside{ display:none; width:230px; flex-shrink:0; }
@media (min-width:768px){ .post-aside{ display:block; } }

/* Author card */
.author-card{
  background:#fff; border-radius:16px; padding:24px;
  box-shadow:0 6px 24px rgba(13,39,72,.10);
  position:sticky; top:112px;
}
.author-avatar{
  width:80px; height:80px; border-radius:50%;
  background:var(--ink); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:26px; font-weight:700; margin-bottom:16px;
  overflow:hidden;
}
.author-avatar img{ width:100%; height:100%; object-fit:cover; }
.author-name{ font-size:16px; font-weight:700; color:#111827; margin:0; }
.author-role{
  font-size:12px; text-transform:uppercase; letter-spacing:.08em;
  color:#9ca3af; margin:2px 0 12px;
}
.author-bio{ font-size:11px; line-height:1.65; color:#4b5563; margin:0; }
.author-card .author-link{
  display:inline-block; margin-top:14px; font-size:13px; font-weight:600;
  color:var(--ink-3);
}
.author-card .author-link:hover{ color:var(--brass); }

/* Mobile author strip (below content) */
.author-strip{ margin-top:48px; }
@media (min-width:768px){ .author-strip{ display:none; } }
.author-strip .author-card{ position:static; }

/* ---------- Meta + share row ---------- */
.post-meta-row{
  display:flex; flex-direction:column; gap:16px;
  padding-bottom:24px; margin-bottom:32px;
  border-bottom:1px solid #f3f4f6; font-size:14px; color:#4b5563;
}
@media (min-width:768px){
  .post-meta-row{ flex-direction:row; align-items:center; gap:40px; }
}
.post-meta-row b{ color:#111827; font-weight:700; }
.share-row{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.share-row span{ font-size:14px; color:#4b5563; }
.share-btn{
  width:36px; height:36px; border-radius:50%; border:0; cursor:pointer;
  background:#fff; color:var(--ink); box-shadow:0 0 0 1px var(--line-on-light);
  display:inline-flex; align-items:center; justify-content:center;
  transition:background .25s ease, color .25s ease;
}
.share-btn:hover{ background:var(--brass); color:#fff; box-shadow:none; }
.share-btn{ position:relative; }
.share-btn.copied{ background:var(--verified); color:#fff; box-shadow:none; }
.share-btn.copied::after{
  content:"Copied!"; position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%);
  background:var(--ink); color:#fff; font-size:12px; font-weight:600; white-space:nowrap;
  padding:5px 10px; border-radius:6px; pointer-events:none;
}
.share-btn svg{ width:16px; height:16px; }

/* ---------- Post content typography ---------- */
.post-excerpt{
  font-size:18px; line-height:1.7; color:#374151; margin-bottom:32px;
}
.blog-content{ font-size:16.5px; line-height:1.85; color:var(--ink-text); }
.blog-content > *:first-child{ margin-top:0; }
.blog-content h1, .blog-content h2, .blog-content h3, .blog-content h4{ color:var(--ink); line-height:1.3; }
.blog-content h1{ font-size:clamp(24px,3vw,32px); font-weight:700; margin:0 0 20px; }
.blog-content h2{ font-size:clamp(22px,2.5vw,28px); font-weight:700; margin:44px 0 16px; padding-top:8px; letter-spacing:-.015em; }
.blog-content h3{ font-size:clamp(18px,2.1vw,22px); font-weight:700; margin:32px 0 12px; }
.blog-content h4{ font-size:17px; font-weight:700; margin:24px 0 10px; }
.blog-content p{ margin-bottom:18px; }
.blog-content ul{ list-style:disc; }
.blog-content ol{ list-style:decimal; }
.blog-content ul, .blog-content ol{ margin:0 0 22px; padding-left:26px; }
.blog-content li{ margin-bottom:10px; padding-left:4px; }
.blog-content li::marker{ color:var(--brass); font-weight:600; }
.blog-content ul ul{ list-style:circle; margin:10px 0; }
.blog-content li p{ margin-bottom:6px; }
.blog-content a{ color:var(--brass); font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.blog-content a:hover{ color:var(--verified); }
.blog-content img{
  display:block; width:100%; max-width:100%; height:auto;
  border-radius:16px; margin:28px 0; box-shadow:var(--shadow-sm);
}
.blog-content strong, .blog-content b{ color:var(--ink); }
.blog-content blockquote{
  margin:28px 0; padding:22px 26px; background:var(--parchment-2); border-left:4px solid var(--brass);
  border-radius:0 12px 12px 0; color:var(--ink); font-size:17.5px; font-weight:500;
}
.blog-content hr{ border:none; border-top:1px solid var(--line-on-light); margin:36px 0; }

/* Editor content blocks (from the admin block editor) */
.blog-content .bc-section{ margin:0 0 30px; }
.blog-content .bc-eyebrow{
  display:inline-flex; align-items:center; gap:10px; margin-bottom:10px;
  font-family:'IBM Plex Mono',monospace; font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--brass);
}
.blog-content .bc-eyebrow::before{ content:""; width:26px; height:1px; background:var(--brass); }
.blog-content .bc-title{ margin-top:0; }
.blog-content .bc-intro{ font-size:17.5px; color:var(--slate); }
.blog-content .stat-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:16px; margin:28px 0; }
.blog-content .stat-box{ background:var(--ink); color:#fff; border-radius:var(--radius); padding:22px 20px; text-align:center; }
.blog-content .stat-label{ font-size:12.5px; letter-spacing:.06em; text-transform:uppercase; color:rgba(255,255,255,0.65); }
.blog-content .stat-num{ font-size:30px; font-weight:800; color:var(--brass-light); line-height:1.2; margin-top:6px; }
.blog-content .table-wrap{ overflow-x:auto; margin:28px 0; border:1px solid var(--line-on-light); border-radius:12px; }
.blog-content .data-table, .blog-content table{ width:100%; border-collapse:collapse; font-size:15px; }
.blog-content th{ background:var(--ink); color:#fff; text-align:left; font-weight:600; padding:14px 16px; }
.blog-content td{ padding:13px 16px; border-top:1px solid var(--line-on-light); }
.blog-content tbody tr:nth-child(even) td{ background:var(--parchment-2); }
.blog-content .rk{
  display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; margin-right:6px;
  border-radius:50%; background:var(--mint); color:var(--verified); font-size:12px; font-weight:700;
}
.blog-content .rk-1{ background:var(--brass); color:#fff; }
.blog-content .sources-bar{ font-size:13.5px; color:var(--slate); background:var(--parchment-2); padding:12px 16px; border-radius:10px; margin:-12px 0 28px; }
.blog-content .callout{ margin:28px 0; padding:24px 26px; background:var(--mint); border-left:4px solid var(--brass); border-radius:0 12px 12px 0; }
.blog-content .callout-title{ font-weight:700; color:var(--ink); font-size:17px; margin-bottom:6px; }
.blog-content .callout p:last-child{ margin-bottom:0; }
.blog-content .answer-grid, .blog-content .link-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin:28px 0; }
.blog-content .answer-card, .blog-content .link-card{
  border:1px solid var(--line-on-light); border-radius:var(--radius); padding:22px 20px; background:#fff;
  transition:border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.blog-content .answer-card:hover, .blog-content .link-card:hover{ border-color:var(--brass); transform:translateY(-4px); box-shadow:var(--shadow); }
.blog-content .answer-card h4, .blog-content .link-card h4{ margin:0 0 8px; }
.blog-content .answer-card p, .blog-content .link-card p{ font-size:14.5px; margin-bottom:12px; color:var(--slate); }
.blog-content .lc-link{ text-decoration:none; font-size:14px; }

/* ---------- FAQs ---------- */
.faq-section{ margin-top:48px; }
.faq-title{
  font-size:clamp(22px,2.6vw,28px); font-weight:800; color:var(--ink);
  margin-bottom:24px;
}
.faq-list details{
  border:1px solid #e5e7eb; border-radius:12px; background:#fff;
  margin-bottom:12px; overflow:hidden;
}
.faq-list summary{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  cursor:pointer; padding:16px 20px; list-style:none;
  font-size:16px; font-weight:600; color:#111827;
}
.faq-list summary::-webkit-details-marker{ display:none; }
.faq-list summary:hover{ background:#f9fafb; }
.faq-list summary svg{
  width:20px; height:20px; flex-shrink:0; color:#9ca3af;
  transition:transform .25s ease;
}
.faq-list details[open] summary svg{ transform:rotate(180deg); }
.faq-list details:not([open]) > *:not(summary){ display:none; }
.faq-list .faq-a{
  padding:0 20px 20px; font-size:14px; line-height:1.7; color:#4b5563;
}
.faq-list .faq-a a{ color:var(--brass); font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.faq-list .faq-a a:hover{ color:var(--verified); }

/* ---------- Conclusion (optional, after FAQs) ---------- */
.post-conclusion{
  margin-top:40px; padding:30px 32px;
  background:var(--parchment-2); border:1px solid var(--line-on-light); border-radius:var(--radius);
}
.post-conclusion-title{
  font-size:clamp(20px,2.4vw,26px); font-weight:800; color:var(--ink);
  margin:0 0 14px; letter-spacing:-.015em;
}
.post-conclusion-body > *:first-child{ margin-top:0; }
.post-conclusion-body > *:last-child{ margin-bottom:0; }

/* ---------- Bottom share / related ---------- */
.post-bottom-share{
  margin-top:48px; padding-top:32px; border-top:1px solid #e5e7eb;
}
.related-title{ font-size:clamp(22px,2.6vw,28px); font-weight:700; color:var(--ink); margin-bottom:24px; }
.related-section{ margin-top:56px; }

/* ---------- Archive hero variant ---------- */
.archive-hero{ padding:170px 0 80px; }
.archive-hero .crumb{
  display:inline-block; margin-bottom:14px; font-size:13px;
  color:rgba(255,255,255,.75);
}
.archive-hero .crumb:hover{ color:#fff; }

/* Light refresh — author card, related */
.author-card{ border:1px solid var(--line-on-light); box-shadow:var(--shadow-sm); border-radius:20px; }
.author-avatar{ background:var(--mint); color:var(--verified); }
.post-meta-row{ border-bottom-color:var(--line-on-light); }
.post-excerpt{ font-size:19px; color:var(--ink-text); font-weight:500; border-left:3px solid var(--brass); padding-left:20px; }
.faq-list details{ border-color:var(--line-on-light); border-radius:14px; }
.faq-list details[open]{ border-color:rgba(57,165,54,.45); }
.related-section{ background:var(--parchment-2); padding-top:80px !important; margin-top:0; }
.related-title{ font-weight:800; letter-spacing:-.02em; }
.blog-card{ background:#fff; border:1px solid var(--line-on-light); border-radius:20px; box-shadow:var(--shadow-sm); }
.blog-card:hover{ border-color:rgba(57,165,54,.45); }
.blog-card-img{ margin:10px 10px 0; border-radius:14px; }
.blog-card-img::after{ display:none; }
.blog-pill{ background:rgba(255,255,255,.94); color:var(--ink); border-color:transparent; font-weight:600; }
.blog-card-body{ padding:18px 20px 24px; }
.blog-card-title{ font-weight:700; color:var(--ink); }
.blog-card:hover .blog-card-title{ color:var(--verified); }
@media (max-width:640px){ .post-excerpt{ font-size:17px; } .post-body{ padding-top:36px; } }
