/* ==========================================================================
   CSB Blog — listing (home.php) + single post (single.php)
   Brand: bright blue #0A6FD6 + red-orange #EF3310 on white.
   Reference layout: nurulalamjewel.com/blogs (listing) + single article body.
   LAYOUT reference only — all text, titles and images here are CSB's own.
   Loaded by home.php / single.php via wp_enqueue_style (see BLOG-BUILD-NOTE.md).
   Depends on csb.css variables (:root) — enqueue after 'csb-child'.
   ========================================================================== */

/* ---------- Listing header ---------- */
.csb-blog-head{ padding:44px 0 6px; }
.csb-blog-eyebrow{ display:inline-flex; align-items:center; gap:7px; border:1.5px solid #f6c9bf; background:#fff; color:var(--csb-accent); font-size:12px; font-weight:800; letter-spacing:2.5px; text-transform:uppercase; border-radius:999px; padding:7px 16px; }
.csb-blog-eyebrow svg{ width:13px; height:13px; display:block; }
.csb-blog-title{ font-size:40px; line-height:1.18; font-weight:800; color:var(--csb-navy); margin:18px 0 26px; }

/* ---------- Search + categories filter card ---------- */
.csb-blog-filter{ background:var(--csb-soft-blue); border-radius:20px; padding:30px 32px; display:grid; grid-template-columns:minmax(280px, 5fr) 7fr; gap:36px; }
.csb-blog-filter h2{ font-size:22px; color:var(--csb-navy); margin:0 0 14px; font-weight:800; }
.csb-blog-filter h2 .csb-hl-accent{ color:var(--csb-accent); }
.csb-blog-search{ display:flex; position:relative; }
.csb-blog-search input{ flex:1; min-width:0; border:1px solid var(--csb-line); border-radius:999px 0 0 999px; padding:13px 16px 13px 42px; font-size:15px; background:#fff; color:var(--csb-ink); }
.csb-blog-search input:focus{ outline:none; border-color:var(--csb-blue); box-shadow:0 0 0 3px rgba(10,111,214,.15); }
.csb-blog-search .csb-blog-search-ic{ position:absolute; left:15px; top:50%; transform:translateY(-50%); color:var(--csb-muted); display:flex; pointer-events:none; }
.csb-blog-search .csb-blog-search-ic svg{ width:17px; height:17px; display:block; }
.csb-blog-search button{ border:0; border-radius:0 999px 999px 0; background:linear-gradient(135deg, var(--csb-blue), var(--csb-accent)); color:#fff; font-weight:700; font-size:15px; padding:13px 24px; cursor:pointer; white-space:nowrap; }
.csb-blog-search button:hover{ filter:brightness(1.08); }
.csb-blog-cats h3{ font-size:15px; color:var(--csb-navy); margin:2px 0 12px; font-weight:800; }
.csb-blog-pills{ display:flex; flex-wrap:wrap; gap:10px; }
.csb-blog-pill{ display:inline-flex; align-items:center; gap:6px; background:#fff; border:1px solid var(--csb-line); color:var(--csb-navy); border-radius:999px; padding:9px 18px; font-size:14px; font-weight:600; text-decoration:none; transition:border-color .2s ease, color .2s ease, background .2s ease; }
.csb-blog-pill:hover{ border-color:var(--csb-blue); color:var(--csb-blue); }
.csb-blog-pill.is-active{ background:linear-gradient(135deg, var(--csb-blue), var(--csb-accent)); color:#fff; border-color:transparent; box-shadow:0 6px 16px rgba(10,111,214,.28); }
.csb-blog-pill-see{ cursor:pointer; }
.csb-blog-pill-see svg{ width:12px; height:12px; transition:transform .2s ease; }
.csb-blog-pill-see.open svg{ transform:rotate(180deg); }
.csb-blog-cats-more{ display:none; flex-wrap:wrap; gap:10px; margin-top:10px; }
.csb-blog-cats-more.open{ display:flex; }

/* ---------- Result note / empty state ---------- */
.csb-blog-note{ font-size:14px; color:var(--csb-muted); margin:24px 0 0; }
.csb-blog-note a{ font-weight:700; }
.csb-blog-empty{ text-align:center; padding:60px 20px; color:var(--csb-muted); }
.csb-blog-empty h3{ color:var(--csb-navy); font-size:21px; margin:0 0 8px; }

/* ---------- Blog cards (3 columns) ---------- */
.csb-blog-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; margin:34px 0 8px; }
.csb-blog-card{ background:#fff; border:1px solid var(--csb-line); border-radius:16px; overflow:hidden; box-shadow:0 4px 16px rgba(11,61,110,.06); display:flex; flex-direction:column; transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.csb-blog-card:hover{ transform:translateY(-4px); border-color:var(--csb-blue); box-shadow:0 16px 36px rgba(10,111,214,.16); }
.csb-blog-card-img{ aspect-ratio:16/10; overflow:hidden; background:var(--csb-soft-blue); }
.csb-blog-card-img img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .4s ease; }
.csb-blog-card:hover .csb-blog-card-img img{ transform:scale(1.05); }
.csb-blog-ph{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg, var(--csb-blue), var(--csb-blue-deep)); color:#fff; font-size:44px; font-weight:800; letter-spacing:2px; }
.csb-blog-card-body{ padding:18px 20px 20px; display:flex; flex-direction:column; flex:1; }
.csb-blog-date{ font-size:12px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase; color:var(--csb-accent); margin:0 0 8px; }
.csb-blog-card h2{ font-size:18px; line-height:1.35; font-weight:800; color:var(--csb-navy); margin:0 0 8px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.csb-blog-card h2 a{ color:var(--csb-navy); text-decoration:none; }
.csb-blog-card h2 a:hover{ color:var(--csb-blue); }
.csb-blog-ex{ font-size:14px; line-height:1.6; color:var(--csb-muted); margin:0 0 16px; flex:1; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.csb-blog-read{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; text-decoration:none; }
.csb-blog-read span{ font-size:14px; font-weight:700; color:#42546a; }
.csb-blog-arrow{ width:36px; height:36px; border-radius:50%; background:var(--csb-navy); color:#fff; display:inline-flex; align-items:center; justify-content:center; transition:background .2s ease, transform .2s ease; flex:none; }
.csb-blog-arrow svg{ width:15px; height:15px; display:block; }
.csb-blog-card:hover .csb-blog-arrow{ background:var(--csb-blue); transform:translate(2px, -2px); }

/* ---------- Pagination ---------- */
.csb-blog-pagination{ margin:30px 0 48px; text-align:center; }
.csb-blog-pagination .page-numbers{ display:inline-flex; align-items:center; justify-content:center; min-width:42px; height:42px; padding:0 12px; margin:0 4px; border:1px solid var(--csb-line); border-radius:999px; color:var(--csb-navy); font-weight:700; font-size:15px; text-decoration:none; background:#fff; }
.csb-blog-pagination a.page-numbers:hover{ border-color:var(--csb-blue); color:var(--csb-blue); }
.csb-blog-pagination .page-numbers.current{ background:var(--csb-blue); border-color:var(--csb-blue); color:#fff; }
.csb-blog-pagination .page-numbers.dots{ border-color:transparent; }

/* ==========================================================================
   Single post
   ========================================================================== */
.csb-post{ padding:36px 0 8px; }
.csb-post-crumbs{ font-size:13px; color:var(--csb-muted); margin:0 0 22px; text-align:center; }
.csb-post-crumbs a{ color:var(--csb-muted); text-decoration:none; }
.csb-post-crumbs a:hover{ color:var(--csb-blue); }
.csb-post-head{ max-width:820px; margin:0 auto; text-align:center; padding:0 20px; }
.csb-post-cat{ display:inline-block; background:var(--csb-soft-orange); color:var(--csb-accent); font-size:12px; font-weight:800; letter-spacing:1.5px; text-transform:uppercase; border-radius:999px; padding:6px 14px; text-decoration:none; }
.csb-post-cat:hover{ background:var(--csb-accent); color:#fff; }
.csb-post-head h1{ font-size:36px; line-height:1.25; font-weight:800; color:var(--csb-navy); margin:16px 0 14px; }
.csb-post-meta{ display:flex; flex-wrap:wrap; gap:6px 18px; justify-content:center; font-size:14px; color:var(--csb-muted); margin:0 0 28px; }
.csb-post-meta b{ color:var(--csb-navy); font-weight:700; }
.csb-post-hero{ max-width:860px; margin:0 auto; border-radius:16px; overflow:hidden; }
.csb-post-hero img{ width:100%; height:auto; display:block; }
.csb-post-hero .csb-blog-ph{ aspect-ratio:16/9; font-size:64px; }
.csb-post-body{ max-width:760px; margin:0 auto; padding:30px 20px 0; font-size:17px; line-height:1.8; color:#33475b; }
.csb-post-body > *:first-child{ margin-top:0; }
.csb-post-body h2{ font-size:27px; line-height:1.35; color:var(--csb-navy); font-weight:800; margin:38px 0 14px; }
.csb-post-body h3{ font-size:21px; line-height:1.4; color:var(--csb-navy); font-weight:800; margin:30px 0 10px; }
.csb-post-body h4{ font-size:18px; color:var(--csb-navy); font-weight:800; margin:26px 0 8px; }
.csb-post-body p{ margin:0 0 18px; }
.csb-post-body ul, .csb-post-body ol{ margin:0 0 20px; padding-left:26px; }
.csb-post-body li{ margin:0 0 9px; }
.csb-post-body li::marker{ color:var(--csb-blue); font-weight:700; }
.csb-post-body a{ color:var(--csb-blue); }
.csb-post-body img{ border-radius:12px; height:auto; max-width:100%; }
.csb-post-body figure{ margin:24px 0; }
.csb-post-body figcaption{ font-size:13px; color:var(--csb-muted); text-align:center; margin-top:8px; }
.csb-post-body blockquote{ border-left:4px solid var(--csb-blue); background:var(--csb-soft-blue); border-radius:0 12px 12px 0; padding:16px 22px; margin:24px 0; }
.csb-post-body blockquote p:last-child{ margin-bottom:0; }
.csb-post-body hr{ border:0; border-top:1px solid var(--csb-line); margin:32px 0; }
/* Checklist style: <ul class="csb-checklist"> gets green check circles. */
.csb-post-body ul.csb-checklist{ list-style:none; padding-left:0; }
.csb-post-body ul.csb-checklist li{ position:relative; padding-left:34px; }
.csb-post-body ul.csb-checklist li::before{ content:"\2713"; position:absolute; left:0; top:2px; width:22px; height:22px; border-radius:50%; background:var(--csb-green); color:#fff; font-size:13px; font-weight:800; line-height:22px; text-align:center; }

/* ---------- Author / CTA box ---------- */
.csb-post-author{ max-width:760px; margin:44px auto 0; background:var(--csb-soft-blue); border-radius:16px; padding:26px 28px; display:flex; gap:20px; align-items:flex-start; }
.csb-post-author-ava{ flex:0 0 64px; width:64px; height:64px; border-radius:50%; background:linear-gradient(135deg, var(--csb-blue), var(--csb-blue-deep)); color:#fff; display:flex; align-items:center; justify-content:center; font-size:21px; font-weight:800; }
.csb-post-author h3{ margin:0 0 6px; font-size:19px; color:var(--csb-navy); }
.csb-post-author p{ margin:0 0 14px; font-size:15px; line-height:1.65; color:var(--csb-muted); }
.csb-post-author p:last-child{ margin-bottom:0; }

/* ---------- Related posts ---------- */
.csb-post-related{ padding:24px 0 48px; }
.csb-post-related h2{ font-size:26px; color:var(--csb-navy); font-weight:800; margin:0 0 20px; }
.csb-post-related .csb-blog-grid{ margin-top:0; }

/* ---------- Prev / next ---------- */
.csb-post-nav{ max-width:760px; margin:0 auto 48px; display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:0 20px; }
.csb-post-nav a{ display:block; border:1px solid var(--csb-line); border-radius:14px; padding:16px 18px; text-decoration:none; }
.csb-post-nav a:hover{ border-color:var(--csb-blue); }
.csb-post-nav small{ display:block; font-size:12px; font-weight:800; letter-spacing:1.5px; text-transform:uppercase; color:var(--csb-muted); margin-bottom:6px; }
.csb-post-nav span{ font-size:15px; font-weight:700; color:var(--csb-navy); line-height:1.45; display:block; }
.csb-post-nav .csb-next{ text-align:right; }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .csb-blog-filter{ grid-template-columns:1fr; gap:24px; padding:24px; }
  .csb-blog-grid{ grid-template-columns:repeat(2, 1fr); }
  .csb-blog-title{ font-size:34px; }
  .csb-post-head h1{ font-size:30px; }
}
@media (max-width: 600px){
  .csb-blog-head{ padding-top:30px; }
  .csb-blog-title{ font-size:29px; }
  .csb-blog-filter{ padding:20px; }
  .csb-blog-grid{ grid-template-columns:1fr; }
  .csb-post-head h1{ font-size:26px; }
  .csb-post-body{ font-size:16px; }
  .csb-post-body h2{ font-size:23px; }
  .csb-post-author{ flex-direction:column; padding:22px; }
  .csb-post-nav{ grid-template-columns:1fr; }
  .csb-blog-search button{ padding:13px 18px; }
}
