/* ============================================================
   ARTICLE DESIGN V2 (MINIMAL) — A Normal Guy 2026
   Inspired by hanbigyo.pages.dev cleanliness
   3 tweaks: Breadcrumb + Related Articles + Section Numbers
   + hide sidebar on mobile + author card
   ============================================================ */

/* ===== 1. BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0 0 16px;
  padding: 0;
}
.breadcrumb a {
  color: var(--text-soft);
  text-decoration: none;
  transition: color .15s;
  padding: 2px 4px;
  border-radius: 4px;
}
.breadcrumb a:hover { color: var(--primary); background: var(--primary-soft); }
.breadcrumb .sep {
  color: var(--text-faint);
  font-size: .7rem;
  margin: 0 1px;
}
.breadcrumb .current {
  color: var(--text);
  font-weight: 500;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .breadcrumb { font-size: .76rem; }
  .breadcrumb .current { max-width: 180px; }
}

/* ===== 2. SECTION NUMBERS (auto via CSS counter) ===== */
.article-main {
  counter-reset: section-num;
}
.article-main section:not(#faq) > h2 {
  counter-increment: section-num;
}
.article-main section:not(#faq) > h2::before {
  content: counter(section-num);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--accent-dark));
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  border-radius: 50%;
  margin-right: 12px;
  vertical-align: -3px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
  letter-spacing: 0;
}
section#faq > h2::before {
  content: '?';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 50%;
  margin-right: 12px;
  vertical-align: -3px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

/* ===== 3. RELATED ARTICLES (bottom of article) ===== */
.related-articles {
  margin: 48px 0 24px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.related-articles h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
}
.related-articles h2::before { content: '🔗'; font-size: 1.1em; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.related-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all .25s var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}
.related-card-img {
  aspect-ratio: 16/9;
  background: var(--bg-soft) center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.related-card-img::before,
.related-card-img::after { content: none !important; display: none !important; }
.related-card-cat {
  position: absolute !important;
  top: 8px !important; left: 8px !important;
  width: auto !important; height: auto !important; max-width: 75%;
  aspect-ratio: auto !important;
  background: rgba(234, 88, 12, 0.95) !important;
  color: #fff !important;
  font-size: .68rem !important;
  font-weight: 800 !important;
  padding: 3px 10px !important;
  border-radius: 50px !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-block !important;
  line-height: 1.4 !important;
}
.related-card-cat::before,
.related-card-cat::after { content: none !important; display: none !important; }
.related-card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.related-card-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-meta {
  font-size: .76rem;
  color: var(--text-muted);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== 4. SIDEBAR HIDE ON MOBILE ===== */
@media (max-width: 1024px) {
  .article-sidebar { display: none !important; }
  .article-layout {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 16px 0 56px !important;
  }
  .article-main { max-width: 100%; padding: 0 16px; }
}

/* ===== 5. AUTHOR CARD UNDER BREADCRUMB ===== */
.author-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: 12px;
  margin: 12px 0 24px;
}
.author-card-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-dark));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.author-card-info { flex: 1; min-width: 0; }
.author-card-name { font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: 1px; }
.author-card-meta { font-size: .77rem; color: var(--text-muted); }
.author-card-meta span { color: var(--text-soft); font-weight: 600; }
.author-card-badge {
  font-size: .7rem;
  background: var(--green-soft);
  color: #047857;
  padding: 3px 9px;
  border-radius: 50px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid #bbf7d0;
}
@media (max-width: 600px) {
  .author-card-badge { display: none; }
}
