/* ========================================
   Blog List (Blog/Index)
   ======================================== */
.blog-card-row { display: flex; gap: 24px; background: #fff; border-radius: 12px; border: 1px solid #e9ecef; overflow: hidden; text-decoration: none; color: inherit; transition: all .3s; }
.blog-card-row:hover { box-shadow: 0 8px 30px rgba(0,0,0,.08); transform: translateY(-2px); }
.blog-card-row-img { flex-shrink: 0; width: 280px; }
.blog-card-row-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-row-body { padding: 20px 20px 20px 0; display: flex; flex-direction: column; justify-content: center; }
.blog-card-row-title { font-size: 1.2rem; font-weight: 600; color: #0f172a; margin: 6px 0 8px; line-height: 1.4; }
.blog-card-cat { font-size: 11px; font-weight: 600; color: #556ee6; text-transform: uppercase; letter-spacing: .5px; }
.blog-card-excerpt { font-size: 0.875rem; color: #64748b; line-height: 1.6; margin-bottom: 12px; }
.blog-card-meta { font-size: 12px; color: #94a3b8; display: flex; gap: 16px; }
.blog-card-meta i { margin-right: 4px; }

.no-image-placeholder { width: 100%; height: 200px; background: linear-gradient(135deg, #f0f0f5 0%, #e0e0e8 100%); display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 2rem; }

/* Sidebar */
.blog-sidebar-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #0f172a; margin-bottom: 12px; }
.blog-cat-list { list-style: none; padding: 0; margin: 0; }
.blog-cat-list li { margin-bottom: 6px; }
.blog-cat-list a { font-size: 14px; color: #475569; text-decoration: none; display: flex; justify-content: space-between; padding: 4px 0; }
.blog-cat-list a:hover, .blog-cat-list a.active { color: #556ee6; font-weight: 500; }
.blog-cat-list .count { font-size: 12px; color: #94a3b8; }

/* Tags */
.blog-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.blog-tag { font-size: 12px; padding: 4px 10px; border-radius: 20px; background: #f0f0f0; color: #475569; text-decoration: none; transition: all .2s; }
.blog-tag:hover, .blog-tag.active { background: #556ee6; color: #fff; }

/* Pagination */
.blog-pagination .page-link { border-radius: 8px; margin: 0 3px; border: none; color: #475569; }
.blog-pagination .page-item.active .page-link { background: #556ee6; }

@media (max-width: 767.98px) {
    .blog-card-row { flex-direction: column; gap: 0; }
    .blog-card-row-img { width: 100%; height: 200px; }
    .blog-card-row-body { padding: 16px; }
}

/* ========================================
   Blog Post (Blog/Post)
   ======================================== */

/* Progress bar */
.blog-progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: #556ee6; z-index: 9999; transition: width .1s linear; width: 0; }

/* Layout */
.blog-post-wrapper { padding: 100px 0 60px; }

/* Meta badges */
.blog-meta-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; text-decoration: none; }
.blog-meta-cat { background: rgba(85,110,230,.1); color: #556ee6; }
.blog-meta-tag { background: #f0f0f0; color: #475569; }
.blog-meta-tag:hover { background: #556ee6; color: #fff; }

/* Title */
.blog-post-title { font-size: 2.2rem; font-weight: 700; color: #0f172a; line-height: 1.3; margin: 1rem 0; }
.blog-post-meta { font-size: 13px; color: #94a3b8; display: flex; gap: 20px; margin-bottom: 1.5rem; }
.blog-post-meta i { margin-right: 4px; }

/* Featured image */
.blog-featured-img { width: 100%; max-height: 500px; object-fit: cover; border-radius: 12px; margin-bottom: 2rem; }

/* Content typography */
.blog-content {
    font-size: 1.05rem; line-height: 1.8; color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    word-wrap: break-word; overflow-wrap: break-word;
}
.blog-content h2 { font-size: 1.6rem; font-weight: 700; margin: 2.5rem 0 1rem; color: #0f172a; scroll-margin-top: 80px; }
.blog-content h3 { font-size: 1.3rem; font-weight: 600; margin: 2rem 0 0.75rem; color: #0f172a; scroll-margin-top: 80px; }
.blog-content h4 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: #0f172a; }
.blog-content p { margin-bottom: 1.25rem; }
.blog-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5rem 0; display: block; }
.blog-content .ql-align-center { text-align: center; }
.blog-content .ql-align-right { text-align: right; }
.blog-content blockquote { border-left: 4px solid #556ee6; padding: 12px 20px; margin: 1.5rem 0; background: #f8f9ff; border-radius: 0 8px 8px 0; color: #475569; font-style: italic; }
/* Code blocks — only for actual code, not regular pre */
.blog-content pre.ql-syntax,
.blog-content .ql-code-block-container { background: #1e293b; color: #e2e8f0; padding: 20px; border-radius: 8px; overflow-x: auto; margin: 1.5rem 0; font-size: 0.875rem; font-family: 'JetBrains Mono', monospace; white-space: pre-wrap; word-wrap: break-word; }
.blog-content .ql-code-block { padding: 0; }
/* Regular pre (pasted as plain text) — render as normal text */
.blog-content pre:not(.ql-syntax):not([class]) {
    font-family: inherit; font-size: inherit; line-height: inherit;
    white-space: pre-wrap; word-wrap: break-word; background: none; color: inherit;
    padding: 0; margin: 0 0 1.25rem; border: none;
}
.blog-content code { font-family: 'JetBrains Mono', monospace; font-size: 0.9em; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }
.blog-content pre.ql-syntax code,
.blog-content .ql-code-block-container code { background: none; padding: 0; }
.blog-content ul, .blog-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.blog-content li { margin-bottom: 0.5rem; }
.blog-content a { color: #556ee6; text-decoration: underline; }

/* Tables */
.blog-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.blog-content thead th { background: #f8fafc; font-weight: 600; color: #0f172a; text-align: left; padding: 10px 14px; border-bottom: 2px solid #e2e8f0; }
.blog-content tbody td { padding: 10px 14px; border-bottom: 1px solid #e9ecef; color: #334155; vertical-align: top; }
.blog-content tbody tr:hover { background: #f8fafc; }
@media (max-width: 767.98px) {
    .blog-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Share sidebar */
.blog-share { position: sticky; top: 100px; }
.blog-share-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #e9ecef; display: flex; align-items: center; justify-content: center; color: #64748b; text-decoration: none; transition: all .2s; margin-bottom: 8px; background: #fff; cursor: pointer; }
.blog-share-btn:hover { background: #556ee6; color: #fff; border-color: #556ee6; }
.blog-share-btn.copied { background: #34c38f; color: #fff; border-color: #34c38f; }

/* TOC sidebar */
.blog-toc { position: sticky; top: 100px; font-size: 13px; }
.blog-toc-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #94a3b8; margin-bottom: 12px; }
.blog-toc-list { list-style: none; padding: 0; margin: 0; border-left: 2px solid #e9ecef; }
.blog-toc-list li { padding: 4px 0 4px 16px; }
.blog-toc-list a { color: #64748b; text-decoration: none; transition: color .2s; display: block; line-height: 1.4; }
.blog-toc-list a:hover { color: #556ee6; }
.blog-toc-list li.active { border-left: 2px solid #556ee6; margin-left: -2px; }
.blog-toc-list li.active a { color: #556ee6; font-weight: 600; }
.blog-toc-list li.toc-h3 { padding-left: 28px; font-size: 12px; }

/* Related */
.blog-related { padding: 3rem 0; border-top: 1px solid #e9ecef; margin-top: 3rem; }
.blog-related-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; color: #0f172a; }
.related-card { border: 1px solid #e9ecef; border-radius: 10px; overflow: hidden; transition: all .3s; height: 100%; }
.related-card:hover { box-shadow: 0 4px 15px rgba(0,0,0,.06); transform: translateY(-2px); }
.related-card-img { width: 100%; height: 160px; object-fit: cover; background: #f0f0f0; }
.related-card-body { padding: 16px; }
.related-card-title { font-size: 0.95rem; font-weight: 600; color: #0f172a; }
.related-card-title a { color: inherit; text-decoration: none; }
.related-card-title a:hover { color: #556ee6; }
.related-card-meta { font-size: 12px; color: #94a3b8; margin-top: 8px; }

/* Comments */
.blog-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #e9ecef; }
.blog-comments-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; color: #0f172a; }
.comment-item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e9ecef; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 14px; flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-author { font-weight: 600; font-size: 13px; color: #0f172a; }
.comment-date { font-size: 11px; color: #94a3b8; margin-left: 8px; }
.comment-text { font-size: 14px; color: #475569; margin-top: 4px; line-height: 1.6; }
.comment-replies { margin-left: 48px; }

.no-image-sm { width: 100%; height: 160px; background: linear-gradient(135deg, #f0f0f5 0%, #e0e0e8 100%); display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 1.5rem; }
