/*
 * Blog styles (index + post). Loaded after content-pages.css.
 * /static/ is cached for 30 days as immutable: when you change this file,
 * copy it to blog-v2.css (etc.) and update the {% static %} references.
 */
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 36px; }
.blog-cat {
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all .2s;
}
.blog-cat:hover, .blog-cat.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 26px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.post-card .post-cat { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--color-primary-lt); font-weight: 700; margin-bottom: 10px; }
.post-card h2 { font-size: 1.2rem; font-weight: 800; line-height: 1.35; margin: 0 0 10px; }
.post-card h2 a { color: var(--text-primary); text-decoration: none; }
.post-card h2 a:hover { color: var(--color-primary-lt); }
.post-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; flex: 1; }
.post-meta { font-size: 0.83rem; color: var(--text-muted); display: flex; gap: 14px; flex-wrap: wrap; }
.post-meta i { margin-inline-end: 4px; }
.blog-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }

.blog-pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.blog-pagination a, .blog-pagination span {
    border: 1px solid var(--border-color); border-radius: 10px; padding: 8px 16px;
    color: var(--text-secondary); text-decoration: none; font-size: 0.9rem;
}
.blog-pagination a:hover { border-color: var(--color-primary); color: #fff; }

.breadcrumbs { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary-lt); }
.breadcrumbs .sep { margin: 0 6px; opacity: .6; }
.content-hero .post-meta { justify-content: center; }

.post-body { max-width: 760px; margin: 0 auto; }
.post-body h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800; margin: 40px 0 14px; scroll-margin-top: 90px; }
.post-body h3 { font-size: 1.15rem; font-weight: 700; margin: 28px 0 10px; }
.post-body p, .post-body li { color: var(--text-secondary); line-height: 1.85; font-size: 1.04rem; }
.post-body a { color: var(--color-primary-lt); }
.post-body a:hover { color: #fff; }
.post-body strong { color: var(--text-primary); }
.post-body blockquote { border-inline-start: 3px solid var(--color-primary); padding: 4px 18px; margin: 20px 0; color: var(--text-secondary); }
.post-body table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.post-body th, .post-body td { border-bottom: 1px solid var(--border-color); padding: 10px; text-align: start; color: var(--text-secondary); }
.post-body th { color: var(--text-primary); }
.post-body img { max-width: 100%; height: auto; border-radius: 12px; }
.post-hero-img { display: block; max-width: 760px; width: 100%; height: auto; border-radius: 16px; margin: 0 auto 32px; }

.post-toc { border: 1px solid var(--border-color); border-radius: 14px; padding: 16px 20px; margin: 0 0 28px; background: var(--bg-card); }
.post-toc .toc-title { font-weight: 800; font-size: 0.95rem; margin-bottom: 8px; color: var(--text-primary); }
.post-toc ol { margin: 0; padding-inline-start: 20px; }
.post-toc li { font-size: 0.93rem; line-height: 1.7; }

.post-cta {
    border: 1px solid var(--border-color);
    background: rgba(123,94,167,0.10);
    border-radius: 16px;
    padding: 26px 24px;
    margin: 44px 0 0;
    text-align: center;
}
.post-cta h2 { margin-top: 0; }
.post-cta .hero-ctas a { color: #fff; text-decoration: none; }
.post-cta .hero-ctas a.btn-hero-secondary { color: var(--text-secondary); }

html[data-theme="light"] .post-card { background: var(--bg-card); border-color: rgba(100,150,180,0.3); }
html[data-theme="light"] .post-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
html[data-theme="light"] .post-body a:hover,
html[data-theme="light"] .blog-pagination a:hover { color: var(--color-primary); }
html[data-theme="light"] .post-toc { background: var(--bg-card); border-color: rgba(100,150,180,0.3); }
html[data-theme="light"] .post-cta .hero-ctas a.btn-hero-secondary { color: var(--text-secondary); }
