/* blog/assets/css/blog.css — Fast-loading, pure CSS blog styles */
/* Uses the same design tokens as the main site */

:root {
  --bg-app: #0D0D1A; --bg-nav: rgba(13,13,26,0.97);
  --bg-card: #12121F; --bg-card-2: #1A1A30;
  --primary: #FF6B6B; --secondary: #6C63FF; --accent: #FFE66D;
  --success: #10b981; --warning: #f59e0b;
  --text: #E0E0FF; --text-muted: #7070A0; --text-dim: #5050A0;
  --border: rgba(255,255,255,0.07); --border-strong: rgba(255,255,255,0.13);
  --radius: 14px; --radius-lg: 20px; --radius-sm: 8px;
  --container: 1140px; --container-sm: 800px;
  --article-width: 740px;
  --transition: 0.2s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg-app); color: var(--text); line-height: 1.7; padding-top: 68px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Container ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: var(--container-sm); margin: 0 auto; padding: 0 20px; }
.container-article { max-width: var(--article-width); margin: 0 auto; padding: 0 20px; }

/* ── Blog layout: article + sidebar ── */
.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.blog-layout-single { display: grid; grid-template-columns: 1fr 280px; gap: 48px; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ── Blog hero (index) ── */
.blog-hero {
  padding: 60px 0 50px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.blog-hero h1 { font-family: 'Nunito', sans-serif; font-size: clamp(2rem,5vw,3rem); font-weight: 900; margin-bottom: 12px; }
.blog-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 540px; margin: 0 auto; }

/* ── Post cards grid ── */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin: 40px 0; }

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); border-color: var(--border-strong); }
.post-card-img { width: 100%; height: 180px; object-fit: cover; background: var(--bg-card-2); }
.post-card-img-placeholder { height: 180px; background: linear-gradient(135deg, var(--bg-card-2), #1e1e3a); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.post-card-cat { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 3px 10px; border-radius: 99px; background: rgba(255,107,107,0.12); color: var(--primary); margin-bottom: 10px; }
.post-card-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.1rem; line-height: 1.35; margin-bottom: 10px; }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; flex: 1; margin-bottom: 16px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.post-card-meta { display: flex; align-items: center; gap: 12px; font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 14px; margin-top: auto; }
.post-card-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--primary), var(--secondary)); flex-shrink: 0; }
.post-card-read-more { margin-left: auto; color: var(--primary); font-weight: 600; font-size: 0.82rem; }

/* ── Featured post card ── */
.featured-post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 40px;
  transition: all var(--transition);
}
.featured-post:hover { border-color: var(--border-strong); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.featured-post-img { width: 100%; height: 320px; object-fit: cover; }
.featured-post-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.featured-badge { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 12px; }
.featured-post-title { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 1.6rem; line-height: 1.25; margin-bottom: 14px; }
.featured-post-title a:hover { color: var(--primary); }
.featured-post-excerpt { color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }
.featured-post-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; padding: 12px 22px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9rem; transition: all var(--transition); }
.featured-post-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,107,0.35); }

/* ── Blog sidebar ── */
.blog-sidebar { padding-top: 0; }
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 24px; }
.sidebar-widget-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sidebar-cat-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.sidebar-cat-item:last-child { border-bottom: none; }
.sidebar-cat-item a:hover { color: var(--primary); }
.sidebar-cat-count { background: var(--bg-card-2); padding: 2px 8px; border-radius: 99px; font-size: 0.75rem; color: var(--text-muted); }
.sidebar-recent-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.sidebar-recent-item:last-child { border-bottom: none; }
.sidebar-recent-thumb { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg-card-2); flex-shrink: 0; }
.sidebar-recent-title { font-size: 0.85rem; font-weight: 600; line-height: 1.35; }
.sidebar-recent-title a:hover { color: var(--primary); }
.sidebar-recent-date { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ── Single post header ── */
.post-header { padding: 48px 0 32px; }
.post-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 20px; flex-wrap: wrap; }
.post-breadcrumb a:hover { color: var(--primary); }
.post-category-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 4px 12px; border-radius: 99px; margin-bottom: 14px; }
.post-title { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.2; margin-bottom: 16px; }
.post-meta-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 0.85rem; color: var(--text-muted); padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 16px 0; }
.post-author-mini { display: flex; align-items: center; gap: 10px; }
.post-author-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.post-author-name { font-weight: 600; color: var(--text); }
.post-divider { color: var(--border-strong); }

/* ── Featured image ── */
.post-featured-image { margin: 0 0 32px; }
.post-featured-image img { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius-lg); }
.post-featured-image figcaption { font-size: 0.82rem; color: var(--text-muted); text-align: center; margin-top: 10px; font-style: italic; }

/* ── Table of Contents ── */
.toc-wrap { background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 32px; }
.toc-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.toc-list { list-style: none; }
.toc-list li { padding: 4px 0; }
.toc-list a { color: var(--text-muted); font-size: 0.88rem; transition: color var(--transition); }
.toc-list a:hover { color: var(--primary); }
.toc-list .toc-h3 { padding-left: 16px; font-size: 0.82rem; }

/* ── Sticky TOC sidebar ── */
.toc-sticky { position: sticky; top: 90px; }

/* ── Article body typography ── */
.article-body { font-size: 1.05rem; line-height: 1.85; color: #ccd0ee; }
.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
  font-family: 'Nunito', sans-serif; font-weight: 800; color: var(--text); margin: 36px 0 14px; line-height: 1.3;
}
.article-body h2 { font-size: 1.5rem; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.article-body h3 { font-size: 1.2rem; }
.article-body h4 { font-size: 1.05rem; }
.article-body p { margin-bottom: 20px; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: #ff8a8a; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body em { color: #b0b8e0; }
.article-body blockquote {
  border-left: 4px solid var(--primary); background: rgba(255,107,107,0.06);
  padding: 18px 22px; margin: 24px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: #b0b8e0; font-size: 1.05rem;
}
.article-body code {
  background: var(--bg-card-2); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 5px; font-size: 0.88em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace; color: var(--accent);
}
.article-body pre {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; overflow-x: auto; margin-bottom: 24px;
}
.article-body pre code { background: none; border: none; padding: 0; color: inherit; }
.article-body figure { margin: 28px 0; }
.article-body figure img { width: 100%; border-radius: var(--radius); }
.article-body figcaption { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; font-style: italic; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 0.92rem; }
.article-body th { background: var(--bg-card-2); padding: 10px 14px; text-align: left; font-weight: 700; border-bottom: 2px solid var(--border-strong); }
.article-body td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.article-body tr:hover td { background: rgba(255,255,255,0.02); }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }

/* ── Author box ── */
.author-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; display: flex; gap: 22px; align-items: flex-start; margin: 40px 0;
}
.author-box-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.author-box-name { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; }
.author-box-credentials { font-size: 0.8rem; color: var(--primary); margin-bottom: 8px; font-weight: 600; }
.author-box-bio { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* ── EEAT notice ── */
.eeat-notice {
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius); padding: 14px 18px; font-size: 0.82rem;
  color: #6ee7b7; margin: 24px 0; display: flex; align-items: flex-start; gap: 10px;
}

/* ── Sources ── */
.sources-section { margin: 32px 0; padding: 20px 22px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.sources-section h4 { font-weight: 700; margin-bottom: 12px; font-size: 0.9rem; }
.sources-section ol { padding-left: 20px; }
.sources-section li { margin-bottom: 6px; font-size: 0.85rem; color: var(--text-muted); }
.sources-section a { color: var(--primary); word-break: break-all; }

/* ── Share section ── */
.share-section { padding: 28px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; margin: 32px 0; }
.share-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.1rem; margin-bottom: 16px; }
.share-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px; font-size: 0.85rem; font-weight: 700; cursor: pointer; border: none; transition: all var(--transition); }
.share-btn.copy { background: rgba(255,255,255,0.06); color: var(--text); }
.share-btn.twitter { background: rgba(29,161,242,0.12); color: #1da1f2; }
.share-btn.facebook { background: rgba(24,119,242,0.12); color: #1877f2; }
.share-btn.whatsapp { background: rgba(37,211,102,0.12); color: #25d366; }
.share-btn.reddit { background: rgba(255,69,0,0.12); color: #ff4500; }
.share-btn:hover { transform: translateY(-2px); }

/* ── Comments ── */
.comments-section { margin: 40px 0; }
.comments-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.3rem; margin-bottom: 24px; }
.comment-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--secondary), var(--primary)); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; color: #fff; flex-shrink: 0; }
.comment-body-wrap { flex: 1; }
.comment-author-name { font-weight: 700; font-size: 0.95rem; }
.comment-date { font-size: 0.78rem; color: var(--text-muted); margin-left: 10px; }
.comment-text { font-size: 0.92rem; color: #b0b8e0; line-height: 1.7; margin-top: 6px; }
.comment-reply-btn { font-size: 0.78rem; color: var(--text-muted); cursor: pointer; margin-top: 8px; }
.comment-reply-btn:hover { color: var(--primary); }
.comment-reply { margin-left: 56px; border-left: 2px solid var(--border); padding-left: 20px; }

/* ── Comment form ── */
.comment-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin-top: 32px; }
.comment-form h3 { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.1rem; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%; background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 14px; color: var(--text);
  font-size: 0.92rem; font-family: 'Inter', sans-serif; outline: none; transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-comment { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; background: linear-gradient(135deg, var(--primary), #ff8e53); border: none; border-radius: var(--radius-sm); color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all var(--transition); }
.btn-comment:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,107,0.35); }

/* ── Related posts ── */
.related-posts { margin: 40px 0; }
.related-posts-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.2rem; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 32px 0; }
.page-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border); font-size: 0.9rem; font-weight: 600; transition: all var(--transition); }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Category badges ── */
.cat-tag { display: inline-block; padding: 6px 14px; border-radius: 99px; font-size: 0.78rem; font-weight: 700; background: var(--bg-card-2); border: 1px solid var(--border); color: var(--text-muted); transition: all var(--transition); }
.cat-tag:hover { border-color: var(--primary); color: var(--primary); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .blog-layout, .blog-layout-single { grid-template-columns: 1fr; }
  .blog-sidebar { display: none; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-img { height: 220px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
  .share-btns { gap: 8px; }
  .share-btn { padding: 8px 14px; font-size: 0.8rem; }
}
