/* ========================================
   Blog Page Styles - 블로그 상세 페이지 전용
   ======================================== */

/* Article Container */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* Article Header */
.article-header {
  margin-bottom: 40px;
}

.article-category {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.article-title {
  font-size: 40px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  line-height: 1.2;
}

.article-meta {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Article Content */
article {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.content h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 48px 0 20px;
  color: #0f172a;
  line-height: 1.3;
}

.content h2:first-child {
  margin-top: 0;
}

.content h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 16px;
  color: #1e293b;
}

.content h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: #334155;
}

.content p {
  margin-bottom: 20px;
  color: #334155;
  line-height: 1.8;
}

.content strong {
  color: #0f172a;
  font-weight: 600;
}

.content em {
  font-style: italic;
  color: #475569;
}

.content a {
  color: var(--accent);
  text-decoration: underline;
}

.content a:hover {
  color: #4f46e5;
}

/* Lists */
.content ul,
.content ol {
  margin: 20px 0;
  padding-left: 28px;
}

.content li {
  margin-bottom: 12px;
  color: #334155;
  line-height: 1.7;
}

.content ul li::marker {
  color: var(--accent);
}

.content ol li::marker {
  color: var(--accent);
  font-weight: 600;
}

/* Blockquote */
.content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: #f8fafc;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.content blockquote p {
  margin: 0;
  color: #475569;
  font-style: italic;
}

/* Code */
.content code {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #e11d48;
}

.content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
}

.content pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 14px;
}

/* Images */
.content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.content figure {
  margin: 32px 0;
}

.content figcaption {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
  font-style: italic;
}

/* Table */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
}

.content th,
.content td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.content th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}

.content tr:hover {
  background: #f8fafc;
}

/* Horizontal Rule */
.content hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 40px 0;
}

/* Author Box */
.author-box {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 40px;
  display: flex;
  gap: 24px;
  align-items: center;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  flex-shrink: 0;
}

.author-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #0f172a;
}

.author-info p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* Related Posts */
.related-posts {
  margin-top: 60px;
}

.related-posts h2 {
  font-size: 28px;
  margin-bottom: 32px;
  color: #0f172a;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.related-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.related-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #0f172a;
}

.related-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Share Buttons */
.share-section {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 40px;
  text-align: center;
}

.share-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #0f172a;
}

.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  padding: 12px 24px;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: white;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 999;
}

.back-to-top.show {
  display: flex;
}

.back-to-top:hover {
  background: #4f46e5;
  transform: translateY(-4px);
}

/* Table of Contents */
.toc {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 24px;
  margin: 32px 0;
  border-left: 4px solid var(--accent);
}

.toc h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #0f172a;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 8px;
}

.toc a {
  color: #475569;
  text-decoration: none;
  transition: var(--transition);
}

.toc a:hover {
  color: var(--accent);
  padding-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .article-container {
    padding: 32px 16px;
  }

  .article-title {
    font-size: 28px;
  }

  article {
    padding: 24px;
  }

  .content h2 {
    font-size: 24px;
  }

  .content h3 {
    font-size: 20px;
  }

  .author-box {
    flex-direction: column;
    text-align: center;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .content table {
    font-size: 14px;
  }

  .content th,
  .content td {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 24px;
  }

  article {
    padding: 20px;
  }

  .content h2 {
    font-size: 22px;
  }
}