/* Blog styles — reuses css/site.css tokens (--bg,--ink,--muted,--indigo,--line,--radius,--gutter,--max,--display,--body). No new palette, no new fonts. */

.blog-hero{padding:64px 0 32px}
.blog-hero h1{font-size:clamp(32px,4.6vw,54px);font-weight:600;letter-spacing:-.02em}
.blog-hero p{color:var(--muted);font-size:17px;max-width:560px;margin-top:14px}

.blog-filters{display:flex;flex-wrap:wrap;gap:10px;padding:8px 0 40px}
.blog-filters a{padding:10px 18px;border-radius:999px;border:1px solid var(--line);font-size:14px;font-weight:600;color:var(--ink);background:var(--white);transition:background .2s ease,color .2s ease,border-color .2s ease}
.blog-filters a:hover,.blog-filters a.active{background:var(--ink);color:#fff;border-color:var(--ink)}

.blog-featured{display:grid;grid-template-columns:1.1fr .9fr;gap:32px;align-items:center;padding:32px;border:1px solid var(--line);border-radius:var(--radius);background:var(--soft);margin-bottom:56px}
.blog-featured img{width:100%;height:auto;border-radius:calc(var(--radius) - 10px);aspect-ratio:1200/630;object-fit:cover;background:var(--line)}
.blog-featured .tag{display:inline-block;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--indigo);font-weight:700;margin-bottom:10px}
.blog-featured h2{font-size:clamp(24px,3vw,34px);font-weight:600;line-height:1.15}
.blog-featured p{color:var(--muted);margin-top:12px}
.blog-featured .meta{color:var(--muted);font-size:13px;margin-top:14px}

.blog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:28px;margin-bottom:48px}
.blog-card{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--white);display:flex;flex-direction:column;transition:transform .2s ease,box-shadow .2s ease}
.blog-card:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(20,19,31,.08)}
.blog-card img{width:100%;aspect-ratio:1200/630;object-fit:cover;background:var(--line)}
.blog-card .body{padding:18px 20px 22px;display:flex;flex-direction:column;gap:8px;flex:1}
.blog-card .tag{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--indigo);font-weight:700}
.blog-card h3{font-size:19px;font-weight:600;line-height:1.25}
.blog-card p{color:var(--muted);font-size:14px;flex:1}
.blog-card .meta{color:#9591a3;font-size:12.5px}

.blog-pagination{display:flex;gap:10px;justify-content:center;margin-bottom:64px}
.blog-pagination a,.blog-pagination span{width:38px;height:38px;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--line);font-size:14px;font-weight:600}
.blog-pagination a.active{background:var(--ink);color:#fff;border-color:var(--ink)}

.blog-cta{background:var(--ink);color:#fff;border-radius:var(--radius);padding:48px var(--gutter);text-align:center;margin:56px 0}
.blog-cta h2{font-size:clamp(24px,3.4vw,36px);font-weight:600;color:#fff}
.blog-cta p{color:#c9c7d6;margin-top:10px}
.blog-cta .btn{margin-top:22px}

/* Post page */
.post-breadcrumb{padding:22px 0 0;font-size:13px;color:var(--muted)}
.post-breadcrumb a{color:var(--muted)}
.post-breadcrumb a:hover{color:var(--indigo)}
.post-head{padding:20px 0 28px;max-width:760px}
.post-head .tag{display:inline-block;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--indigo);font-weight:700;margin-bottom:14px}
.post-head h1{font-size:clamp(28px,4.4vw,46px);font-weight:600;line-height:1.15;letter-spacing:-.02em}
.post-byline{display:flex;align-items:center;gap:12px;margin-top:22px;color:var(--muted);font-size:14px}
.post-byline strong{color:var(--ink)}
.post-cover{margin-bottom:8px}
.post-cover img{width:100%;border-radius:var(--radius);aspect-ratio:1200/630;object-fit:cover;background:var(--line)}

.post-body{max-width:760px;margin:0 auto;padding:8px 0 40px;font-size:17px;line-height:1.75;color:var(--ink)}
.post-body h2{font-size:26px;font-weight:600;margin-top:42px;margin-bottom:14px;letter-spacing:-.01em}
.post-body h3{font-size:20px;font-weight:600;margin-top:30px;margin-bottom:10px}
.post-body p{margin-bottom:18px;color:#2c2a3c}
.post-body ul,.post-body ol{margin:0 0 18px;padding-left:22px;color:#2c2a3c}
.post-body li{margin-bottom:8px}
.post-body a{color:var(--indigo);text-decoration:underline}
.post-body table{width:100%;border-collapse:collapse;margin:8px 0 26px;font-size:15px}
.post-body th,.post-body td{border:1px solid var(--line);padding:12px 14px;text-align:left}
.post-body th{background:var(--soft);font-weight:600}
.post-body img{width:100%;border-radius:16px;margin:20px 0;background:var(--line)}
.post-body blockquote{border-left:3px solid var(--indigo);padding-left:18px;color:var(--muted);font-style:italic;margin:24px 0}

.post-faq{max-width:760px;margin:0 auto 40px;border-top:1px solid var(--line);padding-top:32px}
.post-faq h2{font-size:24px;font-weight:600;margin-bottom:18px}
.post-faq details{border:1px solid var(--line);border-radius:16px;padding:16px 20px;margin-bottom:12px}
.post-faq summary{font-weight:600;cursor:pointer;list-style:none}
.post-faq summary::-webkit-details-marker{display:none}
.post-faq p{color:var(--muted);margin-top:10px;font-size:15px}

.post-cta{max-width:760px;margin:0 auto 40px;background:var(--soft);border-radius:var(--radius);padding:32px;text-align:center}
.post-cta h3{font-size:22px;font-weight:600;margin-bottom:8px}
.post-cta p{color:var(--muted);margin-bottom:18px}

.related-posts{max-width:900px;margin:0 auto 64px}
.related-posts h2{font-size:22px;font-weight:600;margin-bottom:20px}
.related-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px}

@media (max-width:820px){
  .blog-featured{grid-template-columns:1fr}
}


/* FINAL — blog media fit: every cover/card image fills its visual container cleanly. */
.blog-featured,
.blog-card,
.post-cover{
  overflow:hidden;
}
.blog-featured img,
.blog-card img,
.post-cover img{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  aspect-ratio:1200 / 630;
  object-fit:cover;
  object-position:center center;
  background:var(--line);
}
.blog-featured img{height:auto;}
.blog-card img{height:auto;}
.post-cover{width:100%;}
.post-cover img{height:auto;}

@media (max-width:820px){
  .blog-featured img,
  .blog-card img,
  .post-cover img{
    width:100%;
    max-width:100%;
  }
}

/* FINAL HARDENING — all blog cover images, including related/category cards. */
.blog-featured > img,
.blog-card > img,
.post-cover > img,
img[alt^="Cover image for"]{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0;
  height:auto !important;
  aspect-ratio:1200 / 630 !important;
  object-fit:cover !important;
  object-position:center center !important;
  margin:0;
  box-sizing:border-box;
}

.post-cover > img{border-radius:var(--radius);}
.blog-featured > img{border-radius:calc(var(--radius) - 10px);}
.blog-card > img{border-radius:0;}

/* Content images are contained at their natural ratio; only cover/card media is cropped. */
.post-body img:not([alt^="Cover image for"]){
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  object-fit:contain;
}
