/* ── Blog Styles ── */
.blog-hero { padding: 80px 0 40px; text-align: center; background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #fff; }
.blog-hero h1 { font-size: 42px; font-weight: 700; margin-bottom: 8px; }
.blog-hero p { color: rgba(255,255,255,0.7); font-size: 16px; max-width: 600px; margin: 0 auto; }

.blog-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Filters */
.blog-filters { display: flex; gap: 10px; padding: 24px 0; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.blog-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.blog-cat-btn { padding: 6px 16px; border-radius: 20px; border: 1px solid #e2e8f0; background: #fff; font-size: 13px; color: #64748b; cursor: pointer; transition: all 0.2s; text-decoration: none; font-family: inherit; }
.blog-cat-btn:hover, .blog-cat-btn.active { background: #6C5CE7; color: #fff; border-color: #6C5CE7; }
.blog-search { padding: 8px 16px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; width: 250px; font-family: inherit; }
.blog-search:focus { border-color: #6C5CE7; outline: none; }

/* Post Grid */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 40px; }

/* Featured Post */
.blog-featured { grid-column: span 3; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.06); margin-bottom: 8px; }
.blog-featured .bf-img { height: 100%; min-height: 320px; background-size: cover; background-position: center; position: relative; }
.blog-featured .bf-img::after { content: 'FEATURED'; position: absolute; top: 16px; left: 16px; background: #6C5CE7; color: #fff; padding: 4px 12px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 1px; }
.blog-featured .bf-content { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.blog-featured .bf-cat { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.blog-featured .bf-title { font-size: 28px; font-weight: 700; color: #0f172a; line-height: 1.3; margin-bottom: 12px; }
.blog-featured .bf-title a { color: inherit; text-decoration: none; }
.blog-featured .bf-title a:hover { color: #6C5CE7; }
.blog-featured .bf-excerpt { color: #64748b; font-size: 15px; line-height: 1.6; margin-bottom: 16px; }
.blog-featured .bf-meta { font-size: 13px; color: #94a3b8; display: flex; gap: 16px; }

/* Post Card */
.blog-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.04); transition: transform 0.3s, box-shadow 0.3s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.blog-card .bc-img { height: 200px; background-size: cover; background-position: center; position: relative; }
.blog-card .bc-img .bc-cat { position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; color: #fff; }
.blog-card .bc-body { padding: 20px; }
.blog-card .bc-title { font-size: 18px; font-weight: 700; color: #0f172a; line-height: 1.4; margin-bottom: 8px; }
.blog-card .bc-title a { color: inherit; text-decoration: none; }
.blog-card .bc-title a:hover { color: #6C5CE7; }
.blog-card .bc-excerpt { color: #64748b; font-size: 14px; line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card .bc-meta { font-size: 12px; color: #94a3b8; display: flex; justify-content: space-between; align-items: center; }
.blog-card .bc-read { color: #6C5CE7; font-weight: 600; font-size: 13px; text-decoration: none; }
.blog-card .bc-read:hover { text-decoration: underline; }

/* Pagination */
.blog-pagination { display: flex; justify-content: center; gap: 6px; padding: 32px 0 60px; }
.blog-pagination a, .blog-pagination span { padding: 8px 14px; border-radius: 8px; font-size: 14px; text-decoration: none; border: 1px solid #e2e8f0; color: #64748b; }
.blog-pagination a:hover { border-color: #6C5CE7; color: #6C5CE7; }
.blog-pagination .current { background: #6C5CE7; color: #fff; border-color: #6C5CE7; }

/* Empty */
.blog-empty { text-align: center; padding: 80px 20px; color: #94a3b8; grid-column: span 3; }
.blog-empty i { font-size: 48px; margin-bottom: 12px; display: block; }

/* ════════════════════════════ */
/* ── SINGLE POST PAGE ── */
/* ════════════════════════════ */
.post-header { padding: 80px 0 32px; background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #fff; }
.post-header .ph-cat { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; display: inline-block; padding: 4px 12px; border-radius: 4px; }
.post-header h1 { font-size: 36px; font-weight: 800; line-height: 1.3; max-width: 800px; margin-bottom: 16px; }
.post-header .ph-meta { font-size: 14px; color: rgba(255,255,255,0.6); display: flex; gap: 20px; flex-wrap: wrap; }

.post-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; max-width: 1200px; margin: 0 auto; padding: 40px 20px 60px; align-items: start; }

/* TOC Sidebar */
.post-toc { position: sticky; top: 80px; background: #f8fafc; border-radius: 12px; padding: 20px; border: 1px solid #e2e8f0; }
.post-toc h3 { font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 12px; }
.post-toc ul { list-style: none; padding: 0; margin: 0; }
.post-toc li { padding: 4px 0; }
.post-toc a { font-size: 13px; color: #64748b; text-decoration: none; display: block; padding: 4px 12px; border-left: 2px solid transparent; transition: all 0.2s; }
.post-toc a:hover, .post-toc a.active { color: #6C5CE7; border-left-color: #6C5CE7; background: rgba(108,92,231,0.05); }
.post-toc .toc-h3 { padding-left: 24px; font-size: 12px; }

/* Post Content */
.post-content { min-width: 0; }
.post-content .post-hero-img { width: 100%; border-radius: 14px; margin-bottom: 32px; max-height: 500px; object-fit: cover; }
.post-body { font-size: 17px; line-height: 1.9; color: #334155; }
.post-body h2 { font-size: 26px; font-weight: 700; color: #0f172a; margin: 40px 0 16px; scroll-margin-top: 80px; }
.post-body h3 { font-size: 21px; font-weight: 600; color: #1e293b; margin: 32px 0 12px; scroll-margin-top: 80px; }
.post-body p { margin-bottom: 18px; }
.post-body ul, .post-body ol { margin-bottom: 18px; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }
.post-body img { max-width: 100%; border-radius: 10px; margin: 20px 0; }
.post-body a { color: #6C5CE7; text-decoration: underline; }
.post-body blockquote { border-left: 4px solid #6C5CE7; padding: 16px 24px; background: #f8fafc; margin: 24px 0; border-radius: 0 8px 8px 0; font-style: italic; color: #475569; }
.post-body pre, .post-body code { background: #1e293b; color: #e2e8f0; padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.post-body pre { padding: 20px; border-radius: 10px; overflow-x: auto; margin: 20px 0; }
.post-body pre code { padding: 0; background: none; }
.post-body table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.post-body th, .post-body td { padding: 10px 14px; border: 1px solid #e2e8f0; text-align: left; }
.post-body th { background: #f8fafc; font-weight: 600; }

/* Share */
.post-share { display: flex; gap: 8px; padding: 24px 0; border-top: 1px solid #e2e8f0; margin-top: 32px; align-items: center; }
.post-share span { font-size: 14px; font-weight: 600; color: #475569; }
.post-share a { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; font-size: 14px; transition: transform 0.2s; }
.post-share a:hover { transform: scale(1.1); }

/* Tags */
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 16px 0; }
.post-tags a { padding: 4px 12px; border-radius: 6px; background: #f1f5f9; color: #64748b; font-size: 12px; text-decoration: none; }
.post-tags a:hover { background: #6C5CE7; color: #fff; }

/* Related Posts */
.related-posts { padding: 48px 0 60px; background: #f8fafc; }
.related-posts h2 { font-size: 28px; font-weight: 700; color: #0f172a; text-align: center; margin-bottom: 32px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

/* Responsive */
@media (max-width: 1024px) {
    .post-layout { grid-template-columns: 1fr; }
    .post-toc { position: static; order: -1; }
}
@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-featured { grid-column: span 1; grid-template-columns: 1fr; }
    .blog-featured .bf-img { min-height: 200px; }
    .blog-featured .bf-content { padding: 20px; }
    .blog-featured .bf-title { font-size: 22px; }
    .blog-hero h1 { font-size: 28px; }
    .post-header h1 { font-size: 26px; }
    .related-grid { grid-template-columns: 1fr; }
    .blog-filters { flex-direction: column; align-items: stretch; }
    .blog-search { width: 100%; }
    .blog-empty { grid-column: span 1; }
}
