/* article.css */

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f7fa;
  color: #1f2937;
  font-family: "Segoe UI", "Yu Gothic UI", sans-serif;
}

/* ヘッダー */
.site-header {
  background: #fff;
  border-bottom: 1px solid #d9dfe6;
  height: 56px;
  display: flex;
  align-items: center;
}

.site-header-inner {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
}

.site-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.site-header-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex: 0 0 auto;
}

.site-header-name {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

/* メインエリア */
.article-main {
  flex: 1;
  padding: 40px 0 60px;
}

.article-container {
  width: min(1060px, calc(100vw - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 32px;
  align-items: start;
}

.article-body {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 16px;
  padding: 40px 48px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

/* 記事ヘッダー */
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eef1f4;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.article-cat {
  background: #eff6ff;
  color: #2563eb;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
}

.article-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.5;
  font-weight: 700;
  color: #111827;
}

/* アイキャッチ */
.article-thumbnail {
  margin-bottom: 32px;
}

.article-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

/* 本文コンテンツ */
.entry-content {
  font-size: 16px;
  line-height: 1.9;
  color: #374151;
}

.entry-content p {
  margin: 0 0 1.5em;
}

.entry-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 2em 0 0.75em;
  padding: 0.5em 0 0.5em 0.75em;
  border-left: 4px solid #2563eb;
  line-height: 1.4;
}

.entry-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  margin: 1.75em 0 0.6em;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.4;
}

.entry-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  margin: 1.5em 0 0.5em;
}

.entry-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  color: #1d4ed8;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.5em;
  padding-left: 1.6em;
}

.entry-content li {
  margin-bottom: 0.4em;
}

.entry-content blockquote {
  margin: 1.5em 0;
  padding: 1em 1.25em;
  background: #f8fafc;
  border-left: 4px solid #cbd5e1;
  color: #4b5563;
  border-radius: 0 8px 8px 0;
}

.entry-content code {
  font-size: 14px;
  background: #f1f5f9;
  color: #d4163c;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: "Consolas", "Courier New", monospace;
}

.entry-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.25em 1.5em;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  margin: 1.5em 0;
}

.entry-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 1em 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 15px;
}

.entry-content th,
.entry-content td {
  border: 1px solid #e5e7eb;
  padding: 10px 14px;
  text-align: left;
}

.entry-content th {
  background: #f8fafc;
  font-weight: 700;
  color: #374151;
}

.entry-content tr:nth-child(even) td {
  background: #fafbfc;
}

/* 記事フッター */
.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eef1f4;
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.article-nav-prev,
.article-nav-next {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.article-nav-next {
  text-align: right;
}

.article-nav-prev:hover,
.article-nav-next:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.article-nav-label {
  font-size: 12px;
  color: #6b7280;
}

.article-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-back {
  display: inline-block;
  font-size: 14px;
  color: #2563eb;
  text-decoration: none;
}

.article-back:hover {
  text-decoration: underline;
}

/* フッター */
.site-footer {
  background: #fff;
  border-top: 1px solid #d9dfe6;
  padding: 20px 0;
  margin-top: auto;
}

.site-footer-inner {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer-nav a {
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
}

.site-footer-nav a:hover {
  color: #374151;
  text-decoration: underline;
}

.site-footer-copy {
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
}

/* アーカイブ */
.archive-container {
  width: min(1000px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 40px 0 60px;
}

.archive-header {
  margin-bottom: 28px;
}

.archive-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}

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

.archive-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.archive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}

.archive-card-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.archive-card-thumb--empty {
  height: 180px;
  background: #eef1f4;
}

.archive-card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #6b7280;
}

.archive-card-cat {
  background: #eff6ff;
  color: #2563eb;
  border-radius: 999px;
  padding: 2px 8px;
}

.archive-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.5;
}

.archive-card-excerpt {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.7;
}

.archive-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.archive-pagination .nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  background: #fff;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.archive-pagination .page-numbers:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.archive-pagination .page-numbers.current {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.archive-empty {
  color: #6b7280;
  font-size: 15px;
}

/* サイドバー */
.article-sidebar {
  position: sticky;
  top: 24px;
}

.sidebar-widget {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.sidebar-widget-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  color: #374151;
  transition: background 0.12s ease;
}

.sidebar-cat-link:hover {
  background: #eff6ff;
  color: #2563eb;
}

.sidebar-cat-count {
  font-size: 12px;
  color: #9ca3af;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 1px 7px;
}

/* レスポンシブ */
@media (max-width: 640px) {
  .article-body {
    padding: 24px 20px;
    border-radius: 12px;
  }

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

  .entry-content {
    font-size: 15px;
  }

  .entry-content h2 {
    font-size: 18px;
  }

  .article-container {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }
}
