/* =========================================================
   NextyHost Blog — shared styles for /blogs listing,
   /blogs/category/* and /blogs/<post-slug>
   Matches site design tokens: #020617 bg, #0f172a header,
   #2563eb accent, system-ui stack.
   ========================================================= */

/* ---------- shared bits ---------- */
.blog-wrap{max-width:1160px;margin:0 auto;padding:2.2rem 1.5rem 4.5rem}
.blog-crumbs{font-size:.84rem;color:#94a3b8;margin:0 0 1.4rem;display:flex;flex-wrap:wrap;gap:.45rem;align-items:center}
.blog-crumbs a{color:#94a3b8;text-decoration:none;transition:color .18s}
.blog-crumbs a:hover{color:#60a5fa}
.blog-crumbs span[aria-hidden]{color:#475569}
.blog-crumbs .crumb-current{color:#e2e8f0}

.pill-row{display:flex;flex-wrap:wrap;gap:.6rem;margin:1.4rem 0 0}
.pill{display:inline-block;padding:.5rem 1rem;border:1px solid #1e293b;background:#0f172a;color:#cbd5e1;border-radius:999px;font-size:.85rem;font-weight:600;text-decoration:none;transition:.2s}
.pill:hover{border-color:#2563eb;color:#fff;background:#10203f}
.pill.is-active{background:#2563eb;border-color:#2563eb;color:#fff}

.btn-blue{display:inline-block;background:#2563eb;color:#fff;font-weight:700;font-size:.95rem;padding:.85rem 1.6rem;border-radius:10px;text-decoration:none;transition:.2s}
.btn-blue:hover{background:#1d4ed8;transform:translateY(-2px)}

/* ---------- listing hero ---------- */
.blog-hero{padding:2.6rem 0 .4rem}
.blog-hero h1{font-size:clamp(1.9rem,4vw,2.7rem);color:#fff;font-weight:800;line-height:1.2;margin:0 0 .7rem;letter-spacing:-.5px}
.blog-hero h1 .accent{color:#60a5fa}
.blog-hero p{color:#94a3b8;font-size:1.03rem;line-height:1.7;max-width:760px;margin:0}
.blog-hero .hero-stats{display:flex;flex-wrap:wrap;gap:1.4rem;margin-top:1.3rem;color:#94a3b8;font-size:.85rem}
.blog-hero .hero-stats strong{color:#e2e8f0;font-weight:700}

.cat-hero h1{font-size:clamp(1.7rem,3.4vw,2.3rem)}
.cat-hero .cat-count{display:inline-block;margin-left:.6rem;padding:.2rem .7rem;background:#10203f;border:1px solid #2563eb;color:#60a5fa;border-radius:999px;font-size:.8rem;vertical-align:middle;font-weight:600}

/* ---------- section heading ---------- */
.blog-sec-title{display:flex;align-items:center;gap:.9rem;margin:2.6rem 0 1.2rem;color:#fff;font-size:1.28rem;font-weight:800}
.blog-sec-title::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,#1e293b,transparent)}

/* ---------- post cards grid ---------- */
.post-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:1.5rem}
.post-card{display:flex;flex-direction:column;background:#0b132b;border:1px solid #1e293b;border-radius:16px;overflow:hidden;text-decoration:none;transition:transform .22s,border-color .22s,box-shadow .22s}
.post-card:hover{transform:translateY(-5px);border-color:#2563eb;box-shadow:0 14px 34px rgba(2,6,23,.7)}
.post-card .thumb{aspect-ratio:16/9;background:#0f172a;overflow:hidden}
.post-card .thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s}
.post-card:hover .thumb img{transform:scale(1.05)}
.post-card .card-in{padding:1.15rem 1.2rem 1.35rem;display:flex;flex-direction:column;gap:.6rem;flex:1}
.post-card .cat-tag{align-self:flex-start;font-size:.7rem;letter-spacing:.07em;text-transform:uppercase;font-weight:700;color:#60a5fa;background:rgba(37,99,235,.14);border:1px solid rgba(37,99,235,.4);padding:.24rem .6rem;border-radius:6px}
.post-card h2,.post-card h3{margin:0;font-size:1.06rem;line-height:1.45;color:#fff;font-weight:700}
.post-card:hover h2,.post-card:hover h3{color:#93c5fd}
.post-card .ex{margin:0;color:#94a3b8;font-size:.9rem;line-height:1.65;flex:1}
.post-card .cmeta{display:flex;gap:.7rem;align-items:center;color:#94a3b8;font-size:.78rem;border-top:1px dashed #1e293b;padding-top:.75rem;margin-top:.2rem}
.post-card .cmeta .dot{width:3px;height:3px;border-radius:50%;background:#475569}
.read-more{color:#60a5fa;font-weight:700;font-size:.85rem}

/* ---------- post page layout ---------- */
.bp-layout{display:flex;gap:1.9rem;align-items:flex-start}
.bp-main{flex:1;min-width:0;max-width:100%}
.bp-side{flex-shrink:0;width:268px;position:sticky;top:88px}

.bp-hero{background:linear-gradient(145deg,#0f172a 0%,#0b132b 60%,#0b1220 100%);border:1px solid #1e293b;border-radius:18px;padding:2rem 2rem 1.8rem;margin-bottom:1.6rem}
.bp-hero .cat-tag{display:inline-block;font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:#60a5fa;background:rgba(37,99,235,.16);border:1px solid rgba(37,99,235,.45);padding:.28rem .7rem;border-radius:6px;margin-bottom:.95rem}
.bp-hero h1{margin:0 0 .9rem;font-size:clamp(1.55rem,3.2vw,2.2rem);line-height:1.28;color:#fff;font-weight:800;letter-spacing:-.4px}
.bp-meta{display:flex;flex-wrap:wrap;gap:.5rem 1.1rem;align-items:center;color:#94a3b8;font-size:.85rem}
.bp-meta .who{display:flex;align-items:center;gap:.5rem;color:#e2e8f0;font-weight:600}
.bp-meta .avatar{width:28px;height:28px;border-radius:50%;background:#2563eb;color:#fff;display:grid;place-items:center;font-size:.75rem;font-weight:800}
.bp-meta .sep{width:4px;height:4px;border-radius:50%;background:#334155}

.bp-cover{border:1px solid #1e293b;border-radius:16px;overflow:hidden;margin:0 0 1.7rem;background:#0b132b}
.bp-cover img{width:100%;height:auto;display:block;aspect-ratio:16/9;object-fit:cover}

/* article typography */
.bp-article{background:#0b132b;border:1px solid #1e293b;border-radius:18px;padding:2rem 2.1rem 2.3rem;color:#cbd5e1;font-size:1.02rem;line-height:1.85}
.bp-article>*:first-child{margin-top:0}
.bp-article p{margin:0 0 1.15rem}
.bp-article h2{color:#fff;font-size:1.42rem;font-weight:800;margin:2.1rem 0 .85rem;line-height:1.35;scroll-margin-top:96px}
.bp-article h2::before{content:"";display:inline-block;width:4px;height:.95em;background:#2563eb;border-radius:3px;margin-right:.6rem;vertical-align:-.12em}
.bp-article h3{color:#e2e8f0;font-size:1.14rem;font-weight:700;margin:1.6rem 0 .6rem}
.bp-article a{color:#60a5fa;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.bp-article a:hover{color:#93c5fd}
.bp-article strong{color:#f1f5f9;font-weight:700}
.bp-article ul,.bp-article ol{margin:0 0 1.2rem;padding-left:1.35rem}
.bp-article li{margin-bottom:.5rem}
.bp-article li::marker{color:#60a5fa}
.bp-article blockquote{margin:1.4rem 0;padding:1rem 1.3rem;background:#0f172a;border-left:4px solid #2563eb;border-radius:0 10px 10px 0;color:#94a3b8;font-style:italic}
.bp-article hr{border:0;border-top:1px dashed #1e293b;margin:2rem 0}
.bp-article table{width:100%;border-collapse:collapse;margin:1.3rem 0 1.6rem;font-size:.94rem;display:block;overflow-x:auto}
.bp-article th{background:#0f172a;color:#fff;text-align:left;font-weight:700;padding:.7rem .85rem;border:1px solid #1e293b}
.bp-article td{padding:.68rem .85rem;border:1px solid #1e293b;color:#cbd5e1;vertical-align:top}
.bp-article tr:nth-child(even) td{background:rgba(15,23,42,.5)}
.bp-article code{background:#0f172a;border:1px solid #1e293b;color:#93c5fd;padding:.1rem .4rem;border-radius:5px;font-size:.9em}
.bp-article .lead{font-size:1.08rem;color:#e2e8f0}
.bp-article img{max-width:100%;height:auto;border-radius:12px}
.bp-article .kbd-note{background:rgba(37,99,235,.1);border:1px dashed rgba(37,99,235,.5);border-radius:10px;padding:.9rem 1.1rem;color:#bfdbfe;font-size:.94rem}

/* TOC sidebar */
.toc-box{background:#0b132b;border:1px solid #1e293b;border-radius:14px;padding:1.15rem 1.15rem 1.25rem;max-height:calc(100vh - 130px);overflow:auto}
.toc-box .toc-title{font-size:.74rem;letter-spacing:.1em;text-transform:uppercase;color:#94a3b8;font-weight:700;margin:0 0 .75rem}
.toc-box ol{margin:0;padding:0;list-style:none;counter-reset:toc}
.toc-box li{counter-increment:toc;border-bottom:1px dashed #1e293b}
.toc-box li:last-child{border-bottom:none}
.toc-box a{display:block;padding:.55rem .1rem .55rem 1.5rem;position:relative;color:#94a3b8;font-size:.86rem;line-height:1.45;text-decoration:none;transition:.18s}
.toc-box a::before{content:counter(toc);position:absolute;left:0;top:.55rem;width:19px;height:19px;border-radius:5px;background:#0f172a;border:1px solid #1e293b;color:#60a5fa;font-size:.68rem;font-weight:700;display:grid;place-items:center}
.toc-box a:hover{color:#fff}
.toc-box a:hover::before{background:#2563eb;border-color:#2563eb;color:#fff}

.side-cta{margin-top:1.1rem;background:linear-gradient(150deg,#1d4ed8,#1e3a8a);border:1px solid #3b82f6;border-radius:14px;padding:1.2rem 1.15rem;color:#fff}
.side-cta h4{margin:0 0 .45rem;font-size:1rem}
.side-cta p{margin:0 0 .9rem;font-size:.85rem;line-height:1.6;color:#dbeafe}
.side-cta a{display:block;text-align:center;background:#fff;color:#1d4ed8;font-weight:800;font-size:.9rem;padding:.7rem;border-radius:9px;text-decoration:none}
.side-cta a:hover{background:#e0eaff}

/* in-article CTA + FAQ + related */
.bp-cta{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;justify-content:space-between;background:linear-gradient(120deg,#0f172a,#101f3f);border:1px solid #2563eb;border-radius:16px;padding:1.4rem 1.6rem;margin:2rem 0 0}
.bp-cta .t{color:#fff;font-weight:800;font-size:1.1rem;margin:0 0 .3rem}
.bp-cta .s{color:#94a3b8;font-size:.9rem;margin:0}

.bp-faq{background:#0b132b;border:1px solid #1e293b;border-radius:18px;padding:1.7rem 2.1rem;margin-top:1.7rem}
.bp-faq h2{margin:0 0 1.1rem;color:#fff;font-size:1.32rem;font-weight:800}
.bp-faq .qa{border-top:1px dashed #1e293b;padding:1rem 0}
.bp-faq .qa:first-of-type{border-top:none;padding-top:.2rem}
.bp-faq h3{margin:0 0 .45rem;color:#e2e8f0;font-size:1.02rem;font-weight:700;line-height:1.5}
.bp-faq p{margin:0;color:#94a3b8;font-size:.95rem;line-height:1.75}

.post-nav{display:flex;justify-content:space-between;gap:1rem;margin-top:1.7rem;flex-wrap:wrap}
.post-nav a{flex:1;min-width:230px;background:#0b132b;border:1px solid #1e293b;border-radius:14px;padding:1rem 1.2rem;text-decoration:none;transition:.2s}
.post-nav a:hover{border-color:#2563eb;transform:translateY(-3px)}
.post-nav .lbl{display:block;color:#94a3b8;font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;font-weight:700;margin-bottom:.35rem}
.post-nav .ttl{color:#e2e8f0;font-size:.94rem;font-weight:700;line-height:1.45}
.post-nav .next{text-align:right}
.post-nav .empty{visibility:hidden}

/* share row */
.share-row{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;margin-top:1.4rem;color:#94a3b8;font-size:.82rem}
.share-row a{background:#0f172a;border:1px solid #1e293b;color:#cbd5e1;padding:.45rem .9rem;border-radius:8px;text-decoration:none;font-weight:600;transition:.2s}
.share-row a:hover{border-color:#2563eb;color:#fff}

/* category hub cards */
.cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:1.2rem}
.cat-card{background:#0b132b;border:1px solid #1e293b;border-radius:16px;padding:1.4rem 1.35rem;text-decoration:none;transition:.22s;display:block}
.cat-card:hover{border-color:#2563eb;transform:translateY(-4px)}
.cat-card h2,.cat-card h3{margin:.5rem 0 .45rem;color:#fff;font-size:1.05rem;font-weight:700}
.cat-card p{margin:0;color:#94a3b8;font-size:.87rem;line-height:1.6}
.cat-card .n{color:#60a5fa;font-size:.78rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase}

/* newsletter-free CTA band at end of listing */
.blog-band{margin-top:2.8rem;background:linear-gradient(120deg,#0f172a,#122453);border:1px solid #1e293b;border-radius:18px;padding:1.9rem 2rem;display:flex;flex-wrap:wrap;gap:1.2rem;align-items:center;justify-content:space-between}
.blog-band h2{margin:0 0 .4rem;color:#fff;font-size:1.3rem}
.blog-band p{margin:0;color:#94a3b8;font-size:.93rem;max-width:560px;line-height:1.65}

/* ---------- responsive ---------- */
@media(max-width:980px){
  .bp-layout{flex-direction:column}
  .bp-side{position:static;width:100%;order:-1}
  .toc-box{max-height:none}
  .side-cta{display:none}
  .bp-article{padding:1.5rem 1.2rem}
  .bp-hero{padding:1.5rem 1.3rem}
  .bp-faq{padding:1.4rem 1.2rem}
}
@media(max-width:640px){
  .blog-wrap{padding:1.5rem 1.05rem 3.5rem}
  .post-grid{grid-template-columns:1fr}
  .blog-band{padding:1.4rem 1.2rem}
  .post-nav a{min-width:100%}
  .bp-article{font-size:.98rem;border-radius:14px}
}
@media print{
  .bp-side,.share-row,.post-nav,.blog-band,.side-cta{display:none}
  body{background:#fff}
}
