/* ==========================================================================
   ARTICLE & EDITORIAL STYLES (ARTICLE.CSS) - HIGH RETENTION & CTR
   ========================================================================== */

/* Reading Progress Bar (화면 상단 스크롤 진행률) */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* Article Hero Header */
.article-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 36px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-breadcrumb a:hover {
  color: var(--accent-cyan);
}

.article-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.8px;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.article-meta-bar .post-badge,
.article-header .post-badge,
.article-body .badge,
.article-header .badge {
  position: static !important;
  top: auto !important;
  left: auto !important;
  display: inline-flex !important;
  align-items: center;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 !important;
}

.article-meta-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.article-featured-img-wrap {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 28px 0 36px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.article-featured-img-wrap img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* Table of Contents (TOC - 목차 스크롤스파이) */
.toc-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  margin: 32px 0;
}

.toc-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc-item {
  font-size: 0.92rem;
  line-height: 1.5;
}

.toc-item.level-2 {
  padding-left: 0;
  font-weight: 600;
}

.toc-item.level-3 {
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.toc-link {
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: inline-block;
}

.toc-link:hover, .toc-link.active {
  color: var(--accent-cyan);
  transform: translateX(4px);
}

/* Article Body Typography */
.article-content {
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 24px;
  word-break: keep-all;
}

.article-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 48px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  scroll-margin-top: 90px;
}

.article-content h2::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 24px;
  background: var(--gradient-primary);
  border-radius: 4px;
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 36px 0 16px;
  color: var(--accent-cyan);
  scroll-margin-top: 90px;
}

.article-content ul, .article-content ol {
  margin: 0 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-content li {
  line-height: 1.7;
}

/* Rich Callout Boxes */
.callout-box {
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  margin: 32px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  line-height: 1.65;
}

.callout-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.callout-tip {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-left: 4px solid var(--accent-cyan);
}

.callout-bullish {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-left: 4px solid var(--accent-emerald);
}

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 4px solid var(--accent-gold);
}

.callout-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

/* Stock Key Metrics Table */
.metrics-table-wrap {
  margin: 28px 0;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  background: var(--bg-secondary);
}

.metrics-table th {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.metrics-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.metrics-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.metric-up {
  color: var(--accent-red);
  font-weight: 700;
}

.metric-highlight {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Stock Checklist Card */
.stock-checklist {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 32px 0;
}

.checklist-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent-emerald);
}

.checklist-items {
  list-style: none;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.check-icon {
  color: var(--accent-emerald);
  font-weight: 800;
}

/* Social Share & Tag Section */
.article-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.article-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  margin: 28px 0;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  background: var(--accent-cyan);
  color: #070a13;
  border-color: var(--accent-cyan);
}

/* Post Navigation (이전글/다음글) */
.post-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0;
}

.post-nav-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.post-nav-card:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.post-nav-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .article-title {
    font-size: 1.85rem;
  }
  .post-nav-grid {
    grid-template-columns: 1fr;
  }
  .article-share-bar {
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }
  .share-buttons {
    justify-content: center;
  }
}
