/* ============================================================
   NEXUS TOWERS — BLOG (index, category archives, single post)
   Loads after site-base.css (baseCss: true pages).
   ============================================================ */


/* ============================================================
   MINI-HERO BAND (bo-hero pattern, no skyline)
   ============================================================ */
.blog-hero{
  position:relative;overflow:hidden;color:var(--ice);
  padding:9.5rem 0 clamp(3rem,6vw,4.5rem);
  background:
    radial-gradient(1100px 540px at 75% 12%, rgba(50,176,166,.16), transparent 60%),
    radial-gradient(800px 460px at 12% 88%, rgba(229,185,78,.08), transparent 60%),
    linear-gradient(178deg,#051E2A 0%, var(--navy) 55%, #0C3850 100%);
}
.blog-hero .wrap{position:relative;z-index:2;text-align:center;max-width:920px}
.blog-kicker{
  display:inline-flex;align-items:center;gap:.7rem;
  font-size:.68rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;
  color:rgba(168,196,212,.75);margin-bottom:1.5rem;
}
.blog-kicker::before,.blog-kicker::after{content:"";width:2rem;height:1px;background:rgba(229,185,78,.5)}
a.blog-kicker{transition:color .2s}
a.blog-kicker:hover{color:var(--gold)}
.blog-hero h1{text-wrap:balance;font-size:clamp(2.2rem,4.4vw,3.4rem);color:#fff;margin-bottom:1.1rem}
.blog-hero h1 em{font-style:normal;background:linear-gradient(110deg,var(--gold) 20%, #FFE9AE 50%, var(--gold-deep) 80%);-webkit-background-clip:text;background-clip:text;color:transparent}
.blog-sub{max-width:58ch;margin:0 auto;color:var(--muted-ice);font-size:1.08rem}
.blog-hero [data-h]{opacity:0;transform:translateY(24px);animation:heroIn .9s cubic-bezier(.2,.65,.3,1) forwards}

/* single post variant — featured image behind the band */
.post-hero h1{font-size:clamp(1.9rem,3.6vw,2.9rem);max-width:26ch;margin-inline:auto}
.post-hero-meta{
  display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:.55rem;
  color:var(--muted-ice);font-size:.92rem;font-weight:600;
}
.post-hero-meta svg{width:1rem;height:1rem;color:var(--gold)}
.post-byline{display:inline-flex;align-items:center;gap:.45rem}
.post-byline svg{width:1rem;height:1rem;color:var(--gold)}
.post-hero-meta .meta-sep{color:rgba(168,196,212,.55);font-weight:400}
.post-hero.has-img{padding-top:10.5rem}
.post-hero.has-img::before{
  content:"";position:absolute;inset:0;z-index:0;
  background:var(--post-img) center/cover no-repeat;
  opacity:.20;filter:saturate(.85);
}
.post-hero.has-img::after{
  content:"";position:absolute;inset:0;z-index:1;
  background:linear-gradient(180deg,rgba(5,30,42,.5),rgba(10,50,70,.82));
}

/* ============================================================
   INDEX / CATEGORY — editorial layout (featured lead + list + sidebar)
   ============================================================ */
.blog-index{padding:clamp(3rem,6vw,4.5rem) 0 clamp(4rem,8vw,6rem);background:var(--paper)}
.cat-pills{display:flex;flex-wrap:wrap;justify-content:center;gap:.55rem;margin-bottom:clamp(2.2rem,4vw,3.2rem)}
.cat-pills .pill{
  display:inline-block;padding:.55rem 1.15rem;border-radius:999px;
  font-size:.82rem;font-weight:600;letter-spacing:.04em;
  background:#fff;border:1px solid var(--line);color:var(--muted);
  transition:color .2s, border-color .2s, background .2s, transform .2s;
}
.cat-pills .pill:hover{color:var(--teal-dark);border-color:var(--line-gold);transform:translateY(-2px)}
.cat-pills .pill.active{background:var(--navy);border-color:var(--navy);color:#fff}

.blog-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:clamp(2rem,4vw,3.5rem);align-items:start}

/* shared atoms */
.post-eyebrow{display:inline-block;font-size:.7rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--teal-dark);transition:color .2s}
a.post-eyebrow:hover{color:var(--gold-deep)}
.post-meta{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.9rem}
.post-meta time{font-size:.82rem;color:var(--muted)}
.read{display:inline-flex;align-items:center;gap:.35rem;font-weight:700;font-size:.85rem;color:var(--gold-deep)}
.read svg{width:.95rem;height:.95rem;transition:transform .2s}
.read:hover svg{transform:translateX(3px)}
.media-ph{display:grid;place-items:center;color:rgba(10,50,70,.28);background:linear-gradient(135deg,var(--ice),#d7e8f1)}
.media-ph svg{width:38%;max-width:84px}

/* featured lead */
.feature-lead{
  display:grid;grid-template-columns:1.08fr 1fr;
  background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;
  box-shadow:var(--shadow-sm);margin-bottom:2rem;
}
.fl-media{position:relative;display:block;min-height:300px;background:var(--ice);overflow:hidden}
.fl-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.feature-lead:hover .fl-img{transform:scale(1.04)}
.fl-body{padding:clamp(1.6rem,2.6vw,2.5rem);display:flex;flex-direction:column;justify-content:center}
.fl-body h2{font-family:var(--font-display);font-size:clamp(1.4rem,2.1vw,1.95rem);line-height:1.2;margin:.55rem 0 .6rem}
.fl-body h2 a{color:var(--ink);transition:color .2s}
.fl-body h2 a:hover{color:var(--teal-dark)}
.fl-body p{color:var(--muted);font-size:1rem}

/* editorial list rows */
.post-rows{display:flex;flex-direction:column}
.post-row{
  display:grid;grid-template-columns:210px 1fr;gap:1.6rem;align-items:center;
  padding:1.8rem 0;border-top:1px solid var(--line);
}
.pr-media{position:relative;display:block;aspect-ratio:4/3;border-radius:14px;overflow:hidden;background:var(--ice)}
.pr-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.post-row:hover .pr-img{transform:scale(1.05)}
.pr-body h3{font-family:var(--font-display);font-size:1.2rem;line-height:1.3;margin:.4rem 0 .5rem}
.pr-body h3 a{color:var(--ink);transition:color .2s}
.pr-body h3 a:hover{color:var(--teal-dark)}
.pr-body p{color:var(--muted);font-size:.95rem}

/* load more (blog index) */
.pr-wrap.is-hidden{display:none}
.load-more-wrap{display:flex;justify-content:center;margin-top:2.2rem}
.load-more-btn{cursor:pointer}
.load-more-btn svg{width:1rem;height:1rem;transition:transform .2s}
.load-more-btn:hover svg{transform:translateY(2px)}

/* sidebar */
.blog-aside{position:sticky;top:96px;display:flex;flex-direction:column;gap:1.4rem}
.aside-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:1.5rem}
.aside-title{font-family:var(--font-display);font-size:1.05rem;color:var(--ink);margin-bottom:1.1rem;padding-bottom:.7rem;border-bottom:2px solid var(--gold)}
.recent-list{display:flex;flex-direction:column;gap:1rem}
.recent-list li{padding-bottom:1rem;border-bottom:1px solid var(--line)}
.recent-list li:last-child{border-bottom:0;padding-bottom:0}
.rp-link{display:block;font-family:var(--font-display);font-weight:700;font-size:.95rem;line-height:1.32;color:var(--ink);margin-bottom:.45rem;transition:color .2s}
.rp-link:hover{color:var(--teal-dark)}
.rp-meta{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}
.rp-cat{font-size:.66rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--teal-dark)}
.rp-meta time{font-size:.78rem;color:var(--muted)}
.aside-cta{background:linear-gradient(160deg,var(--navy),#0C3850);color:var(--ice);border-radius:18px;padding:1.7rem}
.aside-cta h3{font-family:var(--font-display);color:#fff;font-size:1.25rem;margin-bottom:.5rem}
.aside-cta p{font-size:.92rem;color:var(--muted-ice);margin-bottom:1.2rem}
.aside-cta .btn-gold{width:100%;justify-content:center;margin-bottom:.85rem}
.aside-call{display:block;text-align:center;font-size:.85rem;color:var(--muted-ice)}
.aside-call a{color:var(--gold);font-weight:600}

/* ============================================================
   KEEP READING (related posts on single post)
   ============================================================ */
.post-related{background:var(--paper);padding:clamp(3rem,6vw,4.5rem) 0}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem;margin-top:1.8rem}
.mini-card{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;display:flex;flex-direction:column;transition:transform .25s, box-shadow .25s}
.mini-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-sm)}
.mc-media{position:relative;display:block;aspect-ratio:16/9;background:var(--ice);overflow:hidden}
.mc-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.mc-body{padding:1.2rem 1.3rem 1.4rem;display:flex;flex-direction:column;gap:.45rem}
.mc-body h3{font-family:var(--font-display);font-size:1.05rem;line-height:1.32;margin:.1rem 0}
.mc-body h3 a{color:var(--ink);transition:color .2s}
.mc-body h3 a:hover{color:var(--teal-dark)}
.mc-body time{font-size:.78rem;color:var(--muted)}

/* ============================================================
   SINGLE POST — two-column (article + sticky sidebar TOC/CTA)
   ============================================================ */
.post-article{padding:clamp(3rem,6vw,4.5rem) 0 clamp(3.5rem,7vw,5rem);background:#fff}
.post-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:clamp(2rem,4vw,3.5rem);align-items:start}
.post-main{min-width:0}
.post-prose{max-width:74ch;font-size:1.05rem;line-height:1.75;color:var(--text)}
.post-prose h2,.post-prose h3{scroll-margin-top:96px}

/* sticky sidebar */
.post-side{position:sticky;top:96px;display:flex;flex-direction:column;gap:1.4rem}
.post-toc{background:#fff;border:1px solid var(--line);border-radius:18px;padding:1.4rem 1.5rem}
.toc-title{font-family:var(--font-display);font-size:.74rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin-bottom:.9rem}
.post-toc ul{list-style:none;display:flex;flex-direction:column;border-left:2px solid var(--line)}
.post-toc a{display:block;padding:.42rem .9rem;margin-left:-2px;border-left:2px solid transparent;font-size:.88rem;line-height:1.35;color:var(--muted);transition:color .2s, border-color .2s}
.post-toc a:hover{color:var(--teal-dark)}
.post-toc a.active{color:var(--ink);font-weight:600;border-color:var(--gold)}
.post-prose h2,.post-prose h3,.post-prose h4{margin:2.2em 0 .7em;line-height:1.2}
.post-prose h2{font-size:1.65rem}
.post-prose h3{font-size:1.3rem}
.post-prose h4{font-size:1.12rem}
.post-prose p{margin-bottom:1.15em}
.post-prose ul,.post-prose ol{margin:0 0 1.3em;padding-left:1.4em}
.post-prose ul{list-style:disc}
.post-prose ol{list-style:decimal}
.post-prose li{margin-bottom:.45em}
.post-prose li::marker{color:var(--teal-dark)}
.post-prose a{color:var(--teal-dark);text-decoration:underline;text-decoration-color:rgba(30,138,130,.4);text-underline-offset:3px;transition:color .2s}
.post-prose a:hover{color:var(--gold-deep)}
.post-prose img{border-radius:14px;margin:1.8rem auto;height:auto;box-shadow:var(--shadow-sm)}
.post-prose figure{margin:1.8rem auto}
.post-prose figure img{margin:0 auto}
.post-prose figcaption{text-align:center;font-size:.85rem;color:var(--muted);margin-top:.7rem}
.post-prose .wp-block-image{margin:1.8rem 0}
.post-prose blockquote{
  margin:1.8rem 0;padding:1rem 1.5rem;border-left:3px solid var(--gold-deep);
  background:var(--ice);border-radius:0 14px 14px 0;
  font-weight:500;color:var(--navy);
}
.post-prose blockquote p:last-child{margin-bottom:0}
.post-prose hr{border:0;border-top:1px solid var(--line);margin:2.2rem 0}
.post-prose table{width:100%;border-collapse:collapse;margin:1.8rem 0;font-size:.95rem}
.post-prose th,.post-prose td{border:1px solid var(--line);padding:.6rem .8rem;text-align:left}
.post-prose th{background:var(--ice);font-weight:700}
.post-prose strong{color:var(--ink)}

/* in-content CTA banner (sits in the article flow, before the final CTA) */
.incontent-cta{
  margin:2.8rem 0 0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:1.4rem 2rem;padding:clamp(1.5rem,3vw,2rem) clamp(1.5rem,3vw,2.2rem);
  border-radius:18px;color:var(--ice);
  background:
    radial-gradient(700px 320px at 85% 0%, rgba(50,176,166,.18), transparent 62%),
    linear-gradient(160deg,var(--navy),#0C3850);
  box-shadow:var(--shadow-sm);
}
.incontent-cta .ic-text{flex:1 1 280px;min-width:0}
.incontent-cta h3{font-family:var(--font-display);color:#fff;font-size:clamp(1.15rem,1.8vw,1.4rem);line-height:1.25;margin:0 0 .4rem}
.incontent-cta p{color:var(--muted-ice);font-size:.95rem;margin:0}
.incontent-cta .ic-actions{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-start;gap:.6rem}
.incontent-cta .ic-actions .btn-gold svg{width:1rem;height:1rem}
.ic-call{font-size:.85rem;color:var(--muted-ice)}
.ic-call a{color:var(--gold);font-weight:600}

.post-backlinks{
  margin:2.6rem 0 0;display:flex;flex-wrap:wrap;justify-content:space-between;gap:1rem;
  border-top:1px solid var(--line);padding-top:1.6rem;
}
.back-link{display:inline-flex;align-items:center;gap:.5rem;font-weight:600;font-size:.95rem;color:var(--teal-dark);transition:color .2s}
.back-link:hover{color:var(--gold-deep)}
.back-link svg{width:1rem;height:1rem}

/* ============================================================
   RESPONSIVE (shared rules ported from the standalone pages)
   ============================================================ */
@media (max-width:980px){
  .blog-layout,.post-layout{grid-template-columns:1fr}
  .blog-aside{position:static;flex-direction:row;flex-wrap:wrap}
  .blog-aside > *{flex:1 1 280px}
  .post-side{position:static;flex-direction:row;flex-wrap:wrap}
  .post-side > *{flex:1 1 280px}
  .post-prose{max-width:none}
  .post-toc{order:-1}
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:620px){
  .post-toc{display:none}
}
@media (max-width:1080px){
  .related-grid{grid-template-columns:1fr 1fr}
}
/* mobile nav overlay (max-width:880px) now lives in site-base.css.
   Blog keeps its own 4-col footer until 980px (site-base collapses to
   2-col at 1080px), so re-assert the 4-col layout in the 981–1080 band. */
@media (min-width:981px) and (max-width:1080px){
  .footer-grid{grid-template-columns:1.4fr 1fr 1fr 1fr}
}
@media (max-width:680px){
  .feature-lead{grid-template-columns:1fr}
  .fl-media{min-height:200px;aspect-ratio:16/9}
  .post-row{grid-template-columns:1fr;gap:1rem}
  .pr-media{aspect-ratio:16/9}
  .related-grid{grid-template-columns:1fr}
}
@media (max-width:620px){
  .footer-grid{grid-template-columns:1fr}
  .footer-bottom{flex-direction:column;text-align:center}
  .post-prose{font-size:1rem}
  .post-backlinks{flex-direction:column;align-items:flex-start}
}
