/* ==========================================
   Article Detail Page
========================================== */

:root {
  --orange-primary: #E67635;
  --orange-light: #F5A66A;
  --text-dark: #1a1a1a;
  --text-body: #4a4a4a;
  --off-white: #FAF8F5;
}

.article-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
}

.article-info {
  text-align: center;
  margin-bottom: 3rem;
}

.article-category {
  display: inline-block;
  margin-bottom: 1.5rem;
  background: var(--orange-primary);
  color: white;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.article-title {
  text-align: center;
  margin-bottom: 1rem;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-dark);
}

.article-date {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

.article-thumbnail {
  width: 100%;
  margin-bottom: 3rem;
  border-radius: 4px;
  overflow: hidden;
}

.article-thumbnail img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.article-content {
  font-size: 1rem;
  line-height: 2;
  color: #333;
}

.article-content h2 {
  font-family: "Noto Serif JP", serif;
  font-size: 1.4rem;
  font-weight: 500;
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange-primary);
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 2rem 0 1rem;
}

.article-content h4 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 1.5rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 4px;
}

.article-content blockquote {
  border-left: 4px solid var(--orange-primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #f9f9f9;
  font-style: italic;
}

.article-content a {
  color: var(--orange-primary);
  text-decoration: underline;
}

.article-content a:hover {
  text-decoration: none;
}

.article-content pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.article-content code {
  font-family: monospace;
  background: #f0f0f0;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 4rem;
  padding: 1rem 2rem;
  border: 1px solid #ddd;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}

.article-back:hover {
  background: var(--orange-primary);
  border-color: var(--orange-primary);
  color: white;
}

.article-back svg {
  transition: transform 0.3s ease;
}

.article-back:hover svg {
  transform: translateX(-4px);
}

.loading-message,
.error-message {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.error-message {
  color: #c00;
}

.error-message p {
  margin-bottom: 2rem;
}

.error-message .article-back {
  margin-top: 0;
}

@media (max-width: 768px) {
  .article-page {
    padding: 6rem 1.5rem 4rem;
  }

  .article-content h2 {
    font-size: 1.2rem;
  }

  .article-back {
    width: 100%;
    justify-content: center;
  }
}
