/* Blog listing + pagination + related-articles.
   Extracted from the <style> blocks that were duplicated inline in
   blogs/index.php and templates/category.php. One file, cached across the whole
   blog, instead of the same ~1.5 KB re-sent in the HTML of every listing page. */

.bl{max-width:1100px;margin:0 auto;padding:44px 20px 72px}
.bl h1{font-size:34px;margin:0 0 6px;color:#0f0f0f}
.bl .sub{color:#6B7280;margin:0 0 30px}

.bl-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.bl-card{display:flex;flex-direction:column;border:1px solid #f1e3ec;border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 4px 18px rgba(0,0,0,.06);transition:transform .2s,box-shadow .2s}
.bl-card:hover{transform:translateY(-3px);box-shadow:0 10px 28px rgba(0,0,0,.10)}
.bl-card img{width:100%;aspect-ratio:16/9;object-fit:cover;background:#fce7f3;display:block}
.bl-card .ph{width:100%;aspect-ratio:16/9;background:linear-gradient(135deg,#fce7f3,#fdf2f8)}
.bl-b{padding:16px 18px 20px;display:flex;flex-direction:column;flex:1}
.bl-cat{font-size:11px;font-weight:600;letter-spacing:.6px;text-transform:uppercase;color:#e00173;margin-bottom:6px}
.bl-t{font-size:16px;font-weight:600;color:#0f0f0f;margin-bottom:8px;line-height:1.4}
.bl-meta{margin-top:auto;font-size:12px;color:#9CA3AF}
.bl-back{display:inline-block;font-size:13px;color:#e00173;margin-bottom:18px;text-decoration:none}

/* Pagination */
.bl-pg{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;margin:44px 0 8px}
.bl-pg-a{font-size:14px;color:#e00173;text-decoration:none;padding:8px 14px;border:1px solid #f1e3ec;border-radius:8px;background:#fff;transition:background .15s,border-color .15s}
.bl-pg-a:hover{background:#fdf2f8;border-color:#fbcfe8}
.bl-pg-a.is-off{color:#c9ccd1;border-color:#f1f1f3;background:#fafafa;pointer-events:none}
.bl-pg-n{display:flex;align-items:center;gap:6px}
.bl-pg-i{min-width:36px;height:36px;display:flex;align-items:center;justify-content:center;font-size:14px;color:#4b5563;text-decoration:none;border-radius:8px;border:1px solid transparent;transition:background .15s}
.bl-pg-i:hover{background:#fdf2f8;color:#e00173}
.bl-pg-i.is-cur{background:#e00173;color:#fff;font-weight:600}
.bl-pg-gap{color:#9CA3AF;padding:0 2px}

/* Category nav under the listing — gives every archive an inbound link from
   the blog index, which they previously only had from the footer. */
.bl-cats{margin:38px 0 0;padding-top:24px;border-top:1px solid #f1e3ec;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.bl-cats-h{font-size:13px;color:#6B7280;margin-right:4px}
.bl-cats a{font-size:13px;color:#e00173;text-decoration:none;padding:6px 12px;border:1px solid #f1e3ec;border-radius:999px;transition:background .15s}
.bl-cats a:hover{background:#fdf2f8}

/* Related articles under a post */
.bp-rel{max-width:1100px;margin:0 auto 56px;padding:36px 20px 0;border-top:1px solid #f1e3ec}
.bp-rel-h{font-size:22px;font-weight:700;color:#0f0f0f;margin:0 0 18px}
.bp-rel-g{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.bp-rel-c{display:flex;flex-direction:column;text-decoration:none;border:1px solid #f1e3ec;border-radius:12px;overflow:hidden;background:#fff;transition:transform .2s,box-shadow .2s}
.bp-rel-c:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(0,0,0,.09)}
.bp-rel-c img{width:100%;aspect-ratio:16/9;object-fit:cover;background:#fce7f3;display:block}
.bp-rel-c .ph{width:100%;aspect-ratio:16/9;background:linear-gradient(135deg,#fce7f3,#fdf2f8)}
.bp-rel-t{padding:12px 14px 16px;font-size:14px;font-weight:600;line-height:1.4;color:#0f0f0f}

@media(max-width:900px){
  .bl-grid{grid-template-columns:repeat(2,1fr)}
  .bp-rel-g{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:560px){
  .bl-grid{grid-template-columns:1fr}
  .bl h1{font-size:26px}
  .bp-rel-g{grid-template-columns:1fr}
  .bl-pg{gap:8px}
  .bl-pg-a{padding:8px 10px;font-size:13px}
}
