/* ═══════════════════════════════════════════════════════
   Article Module — MockImg UI
   Uses main site variables (--accent, --radius, etc.)
   ═══════════════════════════════════════════════════════ */

/* ── Layout ── */
.blog-wrap{
  max-width:var(--max-w);margin:0 auto;
  padding:7rem var(--pad-x) 4rem;
}
.blog-layout{display:flex;gap:2.5rem}
.blog-main{flex:1;min-width:0}
.blog-sidebar{width:280px;flex-shrink:0}

/* ── Blog Hero ── */
.blog-hero{
  background:#fff;border:1px solid rgba(229,231,235,.6);
  border-radius:var(--radius);padding:2rem 2.25rem;
  margin-bottom:1.5rem;position:relative;overflow:hidden;
}
.blog-hero::before{
  content:'';position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,var(--accent),var(--purple));
  opacity:.6;
}
.blog-hero-badge{
  display:inline-block;font-size:.7rem;font-weight:700;
  padding:.25rem .75rem;border-radius:99px;
  background:var(--accent-soft);color:var(--accent);
  margin-bottom:.75rem;letter-spacing:.04em;text-transform:uppercase;
}
.blog-hero h1{
  font-size:1.75rem;font-weight:800;color:#18181b;
  margin:0 0 .375rem;letter-spacing:-.03em;font-family:var(--font);
}
.blog-hero p{font-size:.9rem;color:#71717a;margin:0;line-height:1.6}

/* ── Breadcrumb ── */
.breadcrumb{
  display:flex;align-items:center;gap:.375rem;
  margin-bottom:1.5rem;font-size:.8rem;color:#a1a1aa;flex-wrap:wrap;
}
.breadcrumb a{color:#a1a1aa;text-decoration:none;transition:color .2s}
.breadcrumb a:hover{color:var(--accent)}
.breadcrumb svg{flex-shrink:0;color:#d4d4d8}
.breadcrumb-current{color:#71717a;font-weight:500}

/* ── Search ── */
.blog-search{margin-bottom:1.5rem}
.blog-search form{display:flex;gap:.5rem}
.blog-search-input{
  flex:1;height:42px;border:1.5px solid rgba(229,231,235,.8);
  border-radius:var(--radius-sm);padding:0 1rem;font-size:.875rem;
  font-family:var(--font);outline:none;transition:all .25s ease;
  background:#fff;color:#18181b;
}
.blog-search-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-glow)}
.blog-search-btn{
  display:inline-flex;align-items:center;gap:.35rem;
  height:42px;padding:0 1.25rem;border:none;border-radius:var(--radius-sm);
  background:var(--accent);color:#fff;font-size:.85rem;font-weight:600;
  font-family:var(--font);cursor:pointer;transition:all .25s ease;
}
.blog-search-btn:hover{background:var(--accent-hover);transform:translateY(-1px);box-shadow:0 4px 12px rgba(99,102,241,.3)}
.blog-search-btn svg{flex-shrink:0}

/* ── Article Card ── */
.article-card{
  display:flex;gap:1.25rem;
  background:#fff;border:1px solid rgba(229,231,235,.6);
  border-radius:var(--radius);padding:1.25rem;
  margin-bottom:1rem;text-decoration:none;color:inherit;
  transition:all .3s cubic-bezier(.16,1,.3,1);
}
.article-card:hover{
  border-color:rgba(99,102,241,.3);
  box-shadow:0 8px 28px rgba(99,102,241,.08);
  transform:translateY(-2px);
}
.article-card-cover{
  width:200px;height:140px;border-radius:var(--radius-sm);
  overflow:hidden;flex-shrink:0;background:#f4f4f5;
}
.article-card-cover img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.article-card:hover .article-card-cover img{transform:scale(1.04)}
.article-card.no-cover{display:block}
.article-card-body{flex:1;min-width:0;display:flex;flex-direction:column}
.article-card-title{
  font-size:1.05rem;font-weight:700;color:#18181b;
  margin:0 0 .5rem;line-height:1.45;font-family:var(--font);
}
.article-card-title a{color:inherit;text-decoration:none;transition:color .2s}
.article-card:hover .article-card-title a{color:var(--accent)}
.article-card-cover{text-decoration:none;display:block}
.article-card-summary{
  font-size:.85rem;color:#71717a;line-height:1.65;
  margin:0 0 .75rem;flex:1;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
.article-card-meta{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;font-size:.8rem}
.article-card-date{color:#a1a1aa;font-size:.75rem}

/* ── Tags ── */
.article-tag{
  display:inline-block;padding:.15rem .6rem;border-radius:6px;
  font-size:.7rem;font-weight:600;background:var(--accent-soft);
  color:var(--accent);transition:all .2s;text-decoration:none;
}
.article-tag:hover{background:var(--accent);color:#fff}
.article-tag-outline{
  background:transparent;border:1px solid rgba(99,102,241,.25);color:var(--accent);
}
.article-tag-outline:hover{background:var(--accent-soft);border-color:var(--accent)}

.article-detail-tags{
  margin-top:2rem;padding-top:1.5rem;
  border-top:1px solid rgba(229,231,235,.6);
  display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;
}
.tags-label{font-size:.85rem;font-weight:600;color:#71717a}

/* ── Pagination ── */
.pagination{display:flex;align-items:center;justify-content:center;gap:.375rem;margin-top:2.5rem}
.page-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:36px;height:36px;padding:0 .75rem;border-radius:8px;
  font-size:.85rem;font-weight:500;border:1px solid rgba(229,231,235,.8);
  background:#fff;color:#71717a;text-decoration:none;
  transition:all .25s ease;
}
.page-btn:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-1px)}
.page-btn.active{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:0 2px 8px rgba(99,102,241,.25)}

/* ── Sidebar ── */
.sidebar-card{
  background:#fff;border:1px solid rgba(229,231,235,.6);
  border-radius:var(--radius);padding:1.25rem;margin-bottom:1rem;
}
.sidebar-title{
  font-size:.85rem;font-weight:700;color:#18181b;
  margin:0 0 .75rem;padding-bottom:.625rem;
  border-bottom:1px solid rgba(229,231,235,.5);
  font-family:var(--font);
}
.sidebar-list{list-style:none;padding:0;margin:0}
.sidebar-list li{margin-bottom:.25rem}
.sidebar-list li:last-child{margin-bottom:0}
.sidebar-list a{
  display:flex;align-items:center;justify-content:space-between;
  padding:.45rem .625rem;border-radius:8px;font-size:.85rem;
  color:#71717a;text-decoration:none;transition:all .2s;
}
.sidebar-list a:hover{background:var(--accent-soft);color:var(--accent)}
.sidebar-count{font-size:.75rem;color:#a1a1aa}

/* ── Tag Cloud ── */
.tag-cloud{display:flex;flex-wrap:wrap;gap:.5rem}
.tag-cloud a{
  display:inline-block;padding:.3rem .875rem;border-radius:8px;
  font-size:.8rem;color:#71717a;background:#f4f4f5;
  text-decoration:none;transition:all .2s;
}
.tag-cloud a:hover{color:var(--accent);background:var(--accent-soft)}
.tag-cloud-page{margin-top:1rem}
.tag-cloud-page a{padding:.45rem 1.1rem;font-size:.9rem}

/* ── Category Grid ── */
.ct-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1.25rem}
.ct-card{
  background:#fff;border:1px solid rgba(229,231,235,.6);
  border-radius:var(--radius);padding:1.5rem;
  text-decoration:none;color:inherit;display:block;
  transition:all .3s cubic-bezier(.16,1,.3,1);
}
.ct-card:hover{
  border-color:rgba(99,102,241,.3);
  box-shadow:0 8px 28px rgba(99,102,241,.1);
  transform:translateY(-3px);
}
.ct-card-name{font-size:1rem;font-weight:700;color:#18181b;margin-bottom:.5rem;font-family:var(--font)}
.ct-card-desc{font-size:.8rem;color:#71717a;line-height:1.55;margin-bottom:.75rem}
.ct-card-count{font-size:.8rem;color:var(--accent);font-weight:600}

/* ── Empty State ── */
.empty-state{text-align:center;padding:3.5rem 1.25rem;color:#a1a1aa}
.empty-icon{
  width:60px;height:60px;border-radius:14px;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--accent-soft);color:var(--accent);
  margin-bottom:1rem;
}
.empty-state p{font-size:.95rem;margin:0;color:#71717a}

/* ── Article Detail ── */
.article-detail{max-width:860px;margin:0 auto}
.article-detail-header{margin-bottom:2rem;padding-bottom:1.5rem;border-bottom:1px solid rgba(229,231,235,.6)}
.article-detail-title{
  font-size:1.85rem;font-weight:800;color:#18181b;
  line-height:1.3;margin:0 0 .75rem;letter-spacing:-.03em;font-family:var(--font);
}
.article-detail-meta{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;font-size:.85rem;color:#a1a1aa}
.article-detail-meta .meta-item{display:inline-flex;align-items:center;gap:.3rem}
.article-detail-meta .meta-item svg{flex-shrink:0;color:#d4d4d8}

.article-detail-content{line-height:1.85;font-size:1rem;color:#3f3f46}
.article-detail-content h1,.article-detail-content h2,.article-detail-content h3,.article-detail-content h4{margin-top:1.5em;margin-bottom:.5em;font-weight:700;line-height:1.35;color:#18181b}
.article-detail-content h1{font-size:1.6rem}
.article-detail-content h2{font-size:1.4rem;padding-bottom:.375rem;border-bottom:1px solid rgba(229,231,235,.6)}
.article-detail-content h3{font-size:1.2rem}
.article-detail-content h4{font-size:1.05rem}
.article-detail-content p{margin:0 0 1em}
.article-detail-content ul,.article-detail-content ol{padding-left:2em;margin:0 0 1em}
.article-detail-content li{margin-bottom:.3em}
.article-detail-content a{color:var(--accent);text-decoration:none;border-bottom:1px solid rgba(99,102,241,.3);transition:all .2s}
.article-detail-content a:hover{color:var(--accent-hover);border-bottom-color:var(--accent)}
.article-detail-content blockquote{border-left:3px solid var(--accent);padding:.75rem 1.25rem;margin:1em 0;background:var(--accent-soft);border-radius:0 var(--radius-sm) var(--radius-sm) 0;color:#71717a}
.article-detail-content pre{background:#18181b;border:1px solid rgba(63,63,70,.3);border-radius:var(--radius-sm);padding:1rem;overflow-x:auto;font-size:.85rem;margin:1em 0;color:#e4e4e7}
.article-detail-content code{background:#f4f4f5;padding:.125rem .4rem;border-radius:4px;font-size:.85em}
.article-detail-content pre code{background:none;padding:0;color:inherit}
.article-detail-content img{max-width:100%;border-radius:var(--radius-sm);margin:1em 0;box-shadow:0 4px 16px rgba(0,0,0,.06)}
.article-detail-content table{width:100%;border-collapse:collapse;margin:1em 0;font-size:.9rem}
.article-detail-content th,.article-detail-content td{border:1px solid rgba(229,231,235,.6);padding:.625rem .875rem;text-align:left}
.article-detail-content th{background:#f4f4f5;font-weight:600;color:#18181b}

/* ── Dark Theme ── */
[data-bs-theme="dark"] .blog-hero{background:rgba(24,24,27,.6);border-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .blog-hero h1{color:#fafafa}
[data-bs-theme="dark"] .blog-hero p{color:#a1a1aa}
[data-bs-theme="dark"] .blog-hero-badge{background:rgba(99,102,241,.12);color:#a5b4fc}
[data-bs-theme="dark"] .breadcrumb a{color:#71717a}
[data-bs-theme="dark"] .breadcrumb a:hover{color:#a5b4fc}
[data-bs-theme="dark"] .breadcrumb svg{color:#52525b}
[data-bs-theme="dark"] .breadcrumb-current{color:#a1a1aa}
[data-bs-theme="dark"] .blog-search-input{background:rgba(24,24,27,.6);border-color:rgba(63,63,70,.5);color:#e4e4e7}
[data-bs-theme="dark"] .blog-search-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-glow)}
[data-bs-theme="dark"] .article-card{background:rgba(24,24,27,.5);border-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .article-card:hover{border-color:rgba(99,102,241,.4);box-shadow:0 12px 36px rgba(0,0,0,.3)}
[data-bs-theme="dark"] .article-card-cover{background:rgba(39,39,42,.5)}
[data-bs-theme="dark"] .article-card-title{color:#fafafa}
[data-bs-theme="dark"] .article-card:hover .article-card-title a{color:#a5b4fc}
[data-bs-theme="dark"] .article-card-summary{color:#a1a1aa}
[data-bs-theme="dark"] .article-card-date{color:#71717a}
[data-bs-theme="dark"] .article-tag{background:rgba(99,102,241,.12);color:#a5b4fc}
[data-bs-theme="dark"] .article-tag:hover{background:var(--accent);color:#fff}
[data-bs-theme="dark"] .article-tag-outline{background:transparent;border-color:rgba(99,102,241,.4);color:#a5b4fc}
[data-bs-theme="dark"] .article-tag-outline:hover{background:rgba(99,102,241,.12)}
[data-bs-theme="dark"] .page-btn{background:rgba(24,24,27,.5);border-color:rgba(63,63,70,.4);color:#a1a1aa}
[data-bs-theme="dark"] .page-btn:hover{border-color:var(--accent);color:#a5b4fc}
[data-bs-theme="dark"] .page-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}
[data-bs-theme="dark"] .sidebar-card{background:rgba(24,24,27,.5);border-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .sidebar-title{color:#fafafa;border-bottom-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .sidebar-list a{color:#a1a1aa}
[data-bs-theme="dark"] .sidebar-list a:hover{background:rgba(99,102,241,.1);color:#a5b4fc}
[data-bs-theme="dark"] .sidebar-count{color:#71717a}
[data-bs-theme="dark"] .tag-cloud a{background:rgba(39,39,42,.6);color:#a1a1aa}
[data-bs-theme="dark"] .tag-cloud a:hover{color:#a5b4fc;background:rgba(99,102,241,.12)}
[data-bs-theme="dark"] .ct-card{background:rgba(24,24,27,.5);border-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .ct-card:hover{border-color:rgba(99,102,241,.4);box-shadow:0 16px 48px rgba(0,0,0,.4)}
[data-bs-theme="dark"] .ct-card-name{color:#fafafa}
[data-bs-theme="dark"] .ct-card-desc{color:#a1a1aa}
[data-bs-theme="dark"] .empty-icon{background:rgba(99,102,241,.12);color:#a5b4fc}
[data-bs-theme="dark"] .empty-state p{color:#a1a1aa}
[data-bs-theme="dark"] .article-detail-header{border-bottom-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .article-detail-title{color:#fafafa}
[data-bs-theme="dark"] .article-detail-meta{color:#71717a}
[data-bs-theme="dark"] .article-detail-meta .meta-item svg{color:#52525b}
[data-bs-theme="dark"] .article-detail-content{color:#d4d4d8}
[data-bs-theme="dark"] .article-detail-content h1,[data-bs-theme="dark"] .article-detail-content h2,[data-bs-theme="dark"] .article-detail-content h3,[data-bs-theme="dark"] .article-detail-content h4{color:#fafafa}
[data-bs-theme="dark"] .article-detail-content h2{border-bottom-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .article-detail-content blockquote{background:rgba(99,102,241,.08);border-left-color:var(--accent);color:#a1a1aa}
[data-bs-theme="dark"] .article-detail-content code{background:rgba(39,39,42,.6)}
[data-bs-theme="dark"] .article-detail-content pre{background:#0f0f11;border-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .article-detail-content img{box-shadow:0 4px 16px rgba(0,0,0,.3)}
[data-bs-theme="dark"] .article-detail-content th{background:rgba(24,24,27,.6);color:#fafafa;border-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .article-detail-content td{border-color:rgba(63,63,70,.4);color:#d4d4d8}
[data-bs-theme="dark"] .article-detail-tags{border-top-color:rgba(63,63,70,.4)}
[data-bs-theme="dark"] .tags-label{color:#a1a1aa}

/* ── Responsive ── */
@media(max-width:1024px){
  .blog-layout{flex-direction:column;gap:1.5rem}
  .blog-sidebar{width:100%}
  .article-card-cover{width:100%;height:200px}
  .article-detail-title{font-size:1.5rem}
}
@media(max-width:768px){
  .blog-wrap{padding:6rem 1.25rem 3rem}
  .blog-hero{padding:1.5rem}
  .blog-hero h1{font-size:1.35rem}
  .article-card{flex-direction:column;gap:.75rem}
  .article-card-cover{width:100%;height:180px}
  .article-detail-title{font-size:1.4rem}
  .ct-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
}
@media(max-width:480px){
  .blog-wrap{padding:5.5rem 1rem 2rem}
  .blog-hero h1{font-size:1.2rem}
  .blog-hero p{font-size:.8rem}
  .article-detail-title{font-size:1.2rem}
  .article-detail-meta{flex-direction:column;align-items:flex-start;gap:.375rem}
  .ct-grid{grid-template-columns:1fr}
  .tag-cloud-page a{padding:.35rem .8rem;font-size:.8rem}
}

/* ── RTL ── */
[dir="rtl"] .blog-layout{direction:rtl}
[dir="rtl"] .sidebar-list a{direction:rtl}
[dir="rtl"] .article-detail-content blockquote{border-left:none;border-right:3px solid var(--accent);border-radius:var(--radius-sm) 0 0 var(--radius-sm)}
[dir="rtl"] .article-detail-content ul,[dir="rtl"] .article-detail-content ol{padding-left:0;padding-right:2em}
[dir="rtl"] .breadcrumb{direction:rtl}
