/* Blog cards, lists and sidebar. Uses the theme variables from premium.css (light + dark). */
.post-card { display:flex; flex-direction:column; height:100%; background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius-md); overflow:hidden; transition:transform .2s, box-shadow .2s; }
.post-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); }
.post-card-media { display:block; aspect-ratio:16/9; overflow:hidden; background:var(--bg-soft); }
.post-card-media img { width:100%; height:100%; object-fit:cover; }
.post-card-placeholder { display:flex; align-items:center; justify-content:center; height:100%; padding:12px; text-align:center; font-weight:700; color:#fff; background:linear-gradient(135deg, var(--primary), var(--accent)); }
.post-card-body { display:flex; flex-direction:column; gap:8px; padding:14px 16px 16px; flex:1; }
.post-card h3 { font-size:1.05rem; line-height:1.4; margin:0; }
.post-card h3 a { color:var(--text); text-decoration:none; }
.post-card h3 a:hover { color:var(--primary); }
.post-card p { color:var(--text-muted); font-size:.9rem; margin:0; flex:1; }
.post-chip { align-self:flex-start; font-size:.72rem; font-weight:700; padding:3px 10px; border-radius:999px; text-decoration:none; background:color-mix(in srgb, var(--primary) 14%, transparent); color:var(--primary); }
.post-meta-line { display:flex; flex-wrap:wrap; gap:12px; font-size:.76rem; color:var(--text-muted); }

.featured-post { display:grid; grid-template-columns:1.2fr 1fr; background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; margin-bottom:24px; }
.featured-post .post-card-media { aspect-ratio:auto; min-height:260px; }
.featured-post .featured-body { padding:28px; display:flex; flex-direction:column; justify-content:center; gap:12px; }
.featured-post h2 { font-size:1.6rem; margin:0; }
.featured-post h2 a { color:var(--text); text-decoration:none; }
.featured-post p { color:var(--text-muted); margin:0; }
@media (max-width:768px) { .featured-post { grid-template-columns:1fr; } .featured-post .post-card-media { min-height:180px; } }

.cat-bar { display:flex; gap:8px; overflow-x:auto; padding-bottom:8px; margin-bottom:20px; }
.cat-bar a { white-space:nowrap; padding:7px 14px; border-radius:999px; border:1px solid var(--border); background:var(--bg-elevated); color:var(--text); text-decoration:none; font-size:.86rem; font-weight:600; }
.cat-bar a.active, .cat-bar a:hover { background:var(--primary); border-color:var(--primary); color:#fff; }
.side-box { background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius-md); padding:18px; margin-bottom:20px; }
.popular-list { padding-left:20px; margin:0; }
.popular-list li { margin-bottom:14px; color:var(--text-muted); }
.popular-list a { display:block; color:var(--text); text-decoration:none; font-weight:600; font-size:.92rem; }
.popular-list a:hover { color:var(--primary); }

.share-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:28px 0 0; }
.share-bar a, .share-bar button { width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; border:1px solid var(--border); background:var(--bg-elevated); color:var(--text); text-decoration:none; }
.share-bar a:hover, .share-bar button:hover { border-color:var(--primary); color:var(--primary); }
.post-nav { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:28px; }
.post-nav a { display:block; padding:14px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-elevated); text-decoration:none; color:var(--text); }
.post-nav small { display:block; color:var(--text-muted); }
.post-nav a:hover { border-color:var(--primary); }
@media (max-width:576px) { .post-nav { grid-template-columns:1fr; } }

/* The article page has a fixed white body, so cards on it must stay light in dark mode too. */
.blog-detail-container { --bg-elevated:#ffffff; --bg-soft:#eef1f8; --text:#14213d; --text-muted:#5b6478; --border:#e3e7ef; --primary:#3457ea; }
.blog-detail-container .related-posts h3, .blog-detail-container .post-card h3, .blog-detail-container .widget-title { color:var(--text); }
.post-card p, .featured-post p, .side-box p, .popular-list { font-family:var(--font-sans); }

/* style.css forces `a { color: initial !important }`; restore colours for blog components only. */
.blog-detail-container { color-scheme:light; }
.post-card h3 a, .featured-post h2 a, .popular-list a, .post-nav a, .related-posts a, .share-bar a, .cat-bar a { color:var(--text) !important; }
.post-card h3 a:hover, .featured-post h2 a:hover, .popular-list a:hover, .share-bar a:hover { color:var(--primary) !important; }
a.post-chip { color:var(--primary) !important; }
.cat-bar a.active, .cat-bar a:hover { color:#fff !important; }
