/* =====================================================================
   Blog listing (views/blog.php) + blog post (views/blog-post.php)
   Header / footer styles live in site-chrome.css
   ===================================================================== */
:root{
  --b-orange:#ff7f00;
  --b-orange-dark:#e86e00;
  --b-orange-soft:#fff1e2;
  --b-orange-text:#b35300; /* AA contrast for small orange text */
  --b-ink:#14161a;
  --b-text:#3a3f47;
  --b-gray:#667085;
  --b-border:#eef0f3;
  --b-bg:#fbfbfa;
  --b-navy:#12182b;
}
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; font-family:'Inter', 'Inter Fallback', sans-serif; color:var(--b-ink); background:var(--b-bg);
  -webkit-font-smoothing:antialiased; line-height:1.6;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
.b-container{ width:100%; max-width:1240px; margin:0 auto; padding:0 32px; }
.b-narrow{ max-width:860px; }
h1,h2,h3,h4{ font-family:'Plus Jakarta Sans', 'Plus Jakarta Sans Fallback', sans-serif; color:var(--b-ink); margin:0; line-height:1.25; }

/* ---------- Breadcrumb ---------- */
.b-crumbs{ display:flex; flex-wrap:wrap; gap:8px; font-size:13px; color:var(--b-gray); margin:0 0 18px; padding:0; list-style:none; }
.b-crumbs li + li::before{ content:'/'; margin-right:8px; color:#c4c8d0; }
.b-crumbs a:hover{ color:var(--b-orange-text); }
.b-crumbs [aria-current]{ color:var(--b-ink); font-weight:600; }

/* ---------- Hero ---------- */
.b-hero{ background:linear-gradient(180deg,#fff7ef 0%, var(--b-bg) 100%); padding:56px 0 40px; }
.b-hero h1{ font-size:44px; font-weight:800; letter-spacing:-.5px; max-width:820px; }
.b-hero h1 span{ color:var(--b-orange); }
.b-hero .b-lead{ font-size:17px; color:var(--b-gray); max-width:680px; margin:16px 0 0; }

.b-tag{
  display:inline-flex; align-items:center; gap:6px; background:var(--b-orange-soft); color:var(--b-orange-text);
  font-size:12px; font-weight:700; letter-spacing:.3px; text-transform:uppercase;
  padding:6px 12px; border-radius:30px;
}

/* ---------- Category filter ---------- */
.b-filters{ display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; }
.b-filter{
  border:1px solid var(--b-border); background:#fff; color:var(--b-text); font:600 13.5px 'Inter', 'Inter Fallback', sans-serif;
  padding:9px 16px; border-radius:30px; cursor:pointer; transition:.2s;
}
.b-filter:hover{ border-color:var(--b-orange); color:var(--b-orange-text); }
.b-filter.active{ background:var(--b-orange-text); border-color:var(--b-orange-text); color:#fff; }

/* ---------- Cards ---------- */
.b-section{ padding:40px 0 70px; }
.b-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
.b-card{
  background:#fff; border:1px solid var(--b-border); border-radius:16px; overflow:hidden;
  display:flex; flex-direction:column; transition:transform .25s ease, box-shadow .25s ease;
}
.b-card:hover{ transform:translateY(-4px); box-shadow:0 18px 40px rgba(20,22,26,.08); }
.b-card-img{ aspect-ratio:16/10; overflow:hidden; background:#f2f3f5; }
.b-card-img img{ width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }
.b-card:hover .b-card-img img{ transform:scale(1.04); }
.b-card-body{ padding:22px 22px 24px; display:flex; flex-direction:column; flex:1; }
.b-card h2, .b-card h3{ font-size:19px; font-weight:700; margin:12px 0 10px; }
.b-card h2 a:hover, .b-card h3 a:hover{ color:var(--b-orange-text); }
.b-card p{ font-size:14.5px; color:var(--b-gray); margin:0 0 18px; flex:1; }
.b-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:14px; font-size:13px; color:var(--b-gray); }
.b-meta i{ color:var(--b-orange); margin-right:5px; }
.b-more{ font-weight:700; font-size:14px; color:var(--b-orange-text); margin-top:14px; display:inline-flex; gap:6px; align-items:center; }

/* featured (first) post */
.b-featured{ display:grid; grid-template-columns:1.15fr 1fr; margin-bottom:34px; }
.b-featured .b-card-img{ aspect-ratio:auto; min-height:340px; }
.b-featured .b-card-body{ padding:40px; justify-content:center; }
.b-featured h2{ font-size:30px; font-weight:800; }
.b-featured p{ font-size:16px; flex:0; }

/* ---------- CTA banner ---------- */
.b-cta{
  background:linear-gradient(120deg,#ff8a00 0%, #f2610d 100%); color:#fff; border-radius:20px;
  padding:40px 44px; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap;
}
.b-cta h2{ color:#fff; font-size:26px; font-weight:800; }
.b-cta p{ margin:8px 0 0; opacity:.92; }
.b-btn{
  display:inline-block; background:var(--b-orange); color:#fff; font-weight:700; font-size:14px;
  padding:14px 26px; border-radius:10px; box-shadow:0 8px 20px rgba(255,127,0,.28); white-space:nowrap;
}
.b-btn:hover{ background:var(--b-orange-dark); color:#fff; }
.b-btn-light{ background:#fff; color:var(--b-orange-text); box-shadow:none; }
.b-btn-light:hover{ background:var(--b-navy); color:#fff; }

/* ---------- Single post ---------- */
.b-post-hero{ padding:48px 0 32px; }
.b-post-hero h1{ font-size:40px; font-weight:800; letter-spacing:-.4px; margin:16px 0 18px; max-width:900px; }
.b-author{ display:flex; align-items:center; gap:10px; font-weight:600; color:var(--b-ink); }
.b-author img{ width:36px; height:36px; border-radius:50%; object-fit:contain; background:#fff; border:1px solid var(--b-border); padding:3px; }
.b-cover{ border-radius:20px; overflow:hidden; margin:30px 0 0; aspect-ratio:21/9; background:#f2f3f5; }
.b-cover img{ width:100%; height:100%; object-fit:cover; }

.b-layout{ display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:56px; padding:20px 0 60px; align-items:start; }

.b-article{ font-size:17px; color:var(--b-text); line-height:1.8; }
.b-article > *:first-child{ margin-top:0; }
.b-article p{ margin:0 0 20px; }
.b-article h2{ font-size:28px; font-weight:800; margin:44px 0 16px; scroll-margin-top:100px; }
.b-article h3{ font-size:21px; font-weight:700; margin:30px 0 12px; }
.b-article ul, .b-article ol{ margin:0 0 22px; padding-left:24px; }
.b-article li{ margin-bottom:8px; }
.b-article li::marker{ color:var(--b-orange); font-weight:700; }
.b-article a{ color:var(--b-orange-text); font-weight:600; border-bottom:1px solid rgba(255,127,0,.35); }
.b-article a:hover{ border-bottom-color:var(--b-orange); }
.b-article strong{ color:var(--b-ink); }
.b-article blockquote{
  margin:28px 0; padding:18px 24px; border-left:4px solid var(--b-orange); background:var(--b-orange-soft);
  border-radius:0 12px 12px 0; color:var(--b-ink); font-weight:500;
}
.b-article blockquote p:last-child{ margin:0; }
.b-article .b-callout{
  background:#fff; border:1px solid var(--b-border); border-radius:14px; padding:20px 24px; margin:28px 0;
  box-shadow:0 8px 24px rgba(20,22,26,.04);
}
.b-article .b-callout strong:first-child{ display:block; margin-bottom:6px; color:var(--b-orange-text); }
.b-table-wrap{ overflow-x:auto; margin:0 0 24px; border:1px solid var(--b-border); border-radius:12px; }
.b-article table{ width:100%; border-collapse:collapse; font-size:15px; background:#fff; }
.b-article th, .b-article td{ text-align:left; padding:12px 16px; border-bottom:1px solid var(--b-border); vertical-align:top; }
.b-article th{ background:#fafbfc; color:var(--b-ink); font-weight:700; }
.b-article tr:last-child td{ border-bottom:0; }

/* sidebar */
.b-sidebar{ position:sticky; top:104px; display:flex; flex-direction:column; gap:22px; }
.b-box{ background:#fff; border:1px solid var(--b-border); border-radius:16px; padding:22px; }
.b-box h3{ font-size:15px; font-weight:800; margin-bottom:14px; text-transform:uppercase; letter-spacing:.4px; }
.b-toc{ list-style:none; margin:0; padding:0; counter-reset:toc; }
.b-toc li{ counter-increment:toc; margin:0 0 4px; }
.b-toc a{ display:flex; gap:10px; font-size:14px; color:var(--b-text); padding:6px 8px; border-radius:8px; line-height:1.45; }
.b-toc a::before{ content:counter(toc); color:var(--b-orange-text); font-weight:700; min-width:14px; }
.b-toc a:hover, .b-toc a.active{ background:var(--b-orange-soft); color:var(--b-ink); }
.b-box-cta{ background:var(--b-navy); border:0; color:#c7cbe0; }
.b-box-cta h3{ color:#fff; text-transform:none; letter-spacing:0; font-size:19px; }
.b-box-cta p{ font-size:14px; margin:0 0 18px; }
.b-box-cta .b-btn{ display:block; text-align:center; }

/* mobile TOC */
.b-toc-mobile{ display:none; background:#fff; border:1px solid var(--b-border); border-radius:14px; margin-bottom:28px; }
.b-toc-mobile summary{ cursor:pointer; padding:16px 20px; font-weight:700; list-style:none; display:flex; justify-content:space-between; }
.b-toc-mobile summary::-webkit-details-marker{ display:none; }
.b-toc-mobile .b-toc{ padding:0 12px 14px; }

/* share */
.b-share{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:40px 0 0; padding-top:26px; border-top:1px solid var(--b-border); }
.b-share span{ font-weight:700; margin-right:4px; }
.b-share a{
  width:40px; height:40px; border-radius:10px; border:1px solid var(--b-border); background:#fff;
  display:inline-flex; align-items:center; justify-content:center; color:var(--b-text); transition:.2s;
}
.b-share a:hover{ background:var(--b-orange); border-color:var(--b-orange); color:#fff; }

/* FAQ */
.b-faq{ margin-top:48px; }
.b-faq h2{ font-size:28px; font-weight:800; margin-bottom:18px; }
.b-faq details{ background:#fff; border:1px solid var(--b-border); border-radius:12px; margin-bottom:12px; }
.b-faq summary{
  cursor:pointer; list-style:none; padding:18px 22px; font-weight:700; color:var(--b-ink);
  display:flex; justify-content:space-between; gap:16px; align-items:center;
}
.b-faq summary::-webkit-details-marker{ display:none; }
.b-faq summary i{ color:var(--b-orange); transition:transform .2s; }
.b-faq details[open] summary i{ transform:rotate(45deg); }
.b-faq details p{ margin:0; padding:0 22px 20px; color:var(--b-text); font-size:16px; }

.b-related{ padding:10px 0 70px; }
.b-related > .b-container > h2{ font-size:30px; font-weight:800; margin-bottom:26px; }

/* ---------- Responsive ---------- */
@media (max-width:1080px){
  .b-grid{ grid-template-columns:repeat(2,1fr); }
  .b-layout{ grid-template-columns:minmax(0,1fr); gap:0; } /* minmax(0,…) lets wide tables scroll inside .b-table-wrap */
  .b-sidebar{ display:none; }
  .b-toc-mobile{ display:block; }
}
@media (max-width:860px){
  .b-featured{ grid-template-columns:1fr; }
  .b-featured .b-card-img{ min-height:0; aspect-ratio:16/9; }
  .b-featured .b-card-body{ padding:26px; }
  .b-featured h2{ font-size:24px; }
  .b-hero h1{ font-size:34px; }
  .b-post-hero h1{ font-size:30px; }
  .b-cover{ aspect-ratio:16/9; }
}
@media (max-width:600px){
  .b-container{ padding:0 20px; }
  .b-grid{ grid-template-columns:1fr; }
  .b-hero{ padding:36px 0 28px; }
  .b-hero h1{ font-size:28px; }
  .b-post-hero{ padding:32px 0 20px; }
  .b-post-hero h1{ font-size:26px; }
  .b-article{ font-size:16px; }
  .b-article h2{ font-size:23px; }
  .b-article h3{ font-size:19px; }
  .b-cta{ padding:28px 24px; }
  .b-cta h2{ font-size:22px; }
  .b-cta .b-btn{ width:100%; text-align:center; }
}

/* =====================================================================
   Blog listing refresh (Phase F): hero, featured label, topic filters,
   card tags, results line and "show more" paging. Dates are not shown.
   ===================================================================== */
.b-hero-x{
  position:relative; overflow:hidden; padding:60px 0 48px;
  background:
    radial-gradient(560px 300px at 90% 10%, rgba(109,74,255,.10), transparent 70%),
    radial-gradient(520px 280px at 6% 0%, rgba(255,127,0,.12), transparent 70%),
    linear-gradient(180deg,#fff7ef 0%, var(--b-bg) 100%);
}
.b-hero-x h1{ font-size:48px; letter-spacing:-1px; line-height:1.12; }
.b-hero-x h1 span{
  display:block; background:linear-gradient(90deg,var(--b-orange),#ff4f1f 55%,#6d4aff);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.b-hero-topics{ display:flex; flex-wrap:wrap; gap:8px 26px; margin:26px 0 0; padding:0; list-style:none; color:var(--b-gray); font-size:14.5px; }
.b-hero-topics strong{ color:var(--b-ink); }

.b-section-x{ padding-top:34px; }
.b-featured-label{ display:inline-flex; align-items:center; gap:8px; margin:0 0 14px; font-weight:700; font-size:13px; letter-spacing:.5px; text-transform:uppercase; color:var(--b-orange-text); }
.b-featured{ box-shadow:0 30px 60px -38px rgba(20,22,26,.45); }
.b-featured .b-card-body h2{ font-size:32px; line-height:1.2; letter-spacing:-.5px; }

.b-section-x .b-filters{ margin:46px 0 0; }
.b-filter{ display:inline-flex; align-items:center; gap:8px; min-height:42px; }
.b-filter span{ font-size:12px; font-weight:700; color:var(--b-gray); }
.b-filter span:empty{ display:none; }
.b-filter.active span{ color:#ffe3c4; }
.b-filter:focus-visible, .b-more:focus-visible, .b-card a:focus-visible, .b-btn:focus-visible{ outline:3px solid var(--b-orange); outline-offset:3px; border-radius:8px; }
.b-results{ min-height:22px; margin:16px 0 10px; font-size:14px; color:var(--b-gray); }
.b-empty{ padding:24px; border:1px dashed var(--b-border); border-radius:14px; color:var(--b-gray); text-align:center; }

.b-card[hidden], .b-empty[hidden], .b-btn[hidden]{ display:none !important; }
.b-card{ border-radius:20px; transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.b-card:hover{ transform:translateY(-6px); border-color:#ffe0bd; box-shadow:0 26px 44px -26px rgba(255,127,0,.35); }
.b-card-tags{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; }
.b-read{ font-size:12.5px; color:var(--b-gray); }
.b-read i{ color:var(--b-orange); margin-right:4px; }
.b-more{ align-self:flex-start; padding:10px 0 0; }
.b-more i{ transition:transform .2s; }
.b-card:hover .b-more i{ transform:translateX(4px); }
.b-sr{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.b-pager{ display:flex; justify-content:center; margin-top:36px; }
.b-btn-ghost{ background:#fff; color:var(--b-ink); border:1.5px solid var(--b-border); box-shadow:none; cursor:pointer; font:700 14px 'Inter','Inter Fallback',sans-serif; }
.b-btn-ghost:hover{ background:#fff; color:var(--b-orange-text); border-color:#ffd2a6; }

@media (max-width:860px){
  .b-hero-x h1{ font-size:36px; }
  .b-featured .b-card-body h2{ font-size:24px; }
}
@media (max-width:600px){
  .b-hero-x{ padding:36px 0 30px; }
  .b-hero-x h1{ font-size:30px; }
  .b-section-x .b-filters{ flex-wrap:nowrap; overflow-x:auto; margin-top:34px; padding-bottom:6px; scrollbar-width:thin; }
  .b-filter{ flex-shrink:0; }
}
@media (prefers-reduced-motion: reduce){
  .b-card, .b-card-img img, .b-more i{ transition:none; }
  .b-card:hover{ transform:none; }
}
