/* blog.css — main の /blog 系ページ */

.blog-list-page,
.blog-detail-page {
  max-width: 1100px;
  min-height: calc(100vh - 212px);
  margin: 0 auto;
  padding: 96px 24px 80px 24px;
}

/* 一覧ヒーロー */
.blog-hero {
  text-align: center;
  margin-bottom: 48px;
  padding: 32px 0;
}

.blog-hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #0b0f1a;
  letter-spacing: 0.05em;
}

.blog-hero h1::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: #00c8e0;
  margin: 16px auto 0;
}

.blog-hero p {
  color: #64748b;
  margin: 0;
  font-size: 14px;
}

/* グリッド */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(11, 15, 26, 0.12);
  border-color: rgba(0, 200, 224, 0.4);
}

.blog-card-thumb {
  aspect-ratio: 16 / 9;
  background: #0b0f1a;
  overflow: hidden;
  position: relative;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-thumb img {
  transform: scale(1.05);
}

.blog-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00c8e0;
  font-family: 'Noto Serif JP', serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #0b0f1a 0%, #141928 100%);
}

.blog-card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  line-height: 1.55;
  color: #0b0f1a;
  letter-spacing: 0.01em;
}

.blog-card-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-card-meta::before {
  content: '';
  width: 12px;
  height: 1px;
  background: #cbd5e1;
}

.blog-empty {
  text-align: center;
  padding: 60px 0;
  color: #64748b;
}

/* ページネーション */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 64px;
}

.blog-page-link {
  padding: 10px 22px;
  border: 1px solid #e2e8f0;
  border-radius: 100px;
  text-decoration: none;
  color: #0b0f1a;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.blog-page-link:hover {
  background: #0b0f1a;
  border-color: #0b0f1a;
  color: #fff;
}

.blog-page-current {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

/* ============================================
   詳細記事 — リファインデザイン
   ============================================ */

.blog-detail-page {
  max-width: 880px;
}

.blog-article {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

/* アイキャッチ：もっと印象的に */
.blog-article-eyecatch {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 8px 32px rgba(11, 15, 26, 0.12);
}

.blog-article-eyecatch img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* 記事ヘッダー：タイトル中心の構成 */
.blog-article-header {
  padding: 0 8px 32px;
  text-align: center;
  margin-bottom: 8px;
}

.blog-article-header h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 20px;
  line-height: 1.5;
  color: #0b0f1a;
  letter-spacing: 0.02em;
}

.blog-article-meta {
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.blog-article-meta time::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: #cbd5e1;
  vertical-align: middle;
  margin-right: 8px;
}

.blog-article-meta time::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: #cbd5e1;
  vertical-align: middle;
  margin-left: 8px;
}

/* ============================================
   記事本文 — タイポグラフィ最適化
   ============================================ */

.blog-article-body {
  padding: 24px 8px 48px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 2;
  color: #2d3748;
  letter-spacing: 0.04em;
}

/* 最初の段落（リード）を強調 */
.blog-article-body > p:first-of-type {
  font-size: 17px;
  line-height: 1.95;
  color: #1e293b;
  font-weight: 500;
  padding: 0 0 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.blog-article-body > p:first-of-type::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 60px;
  height: 3px;
  background: #00c8e0;
}

/* 通常段落 */
.blog-article-body p {
  margin: 0 0 1.6em;
}

.blog-article-body p:last-child {
  margin-bottom: 0;
}

/* 空段落の非表示 */
.blog-article-body p:empty,
.blog-article-body p > br:only-child {
  display: none;
}

/* ============================================
   見出し — リズムを作る
   ============================================ */

.blog-article-body h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  color: #0b0f1a;
  margin: 3em 0 1em;
  padding: 24px 28px;
  background: linear-gradient(to right, rgba(0, 200, 224, 0.08), transparent);
  border-left: 4px solid #00c8e0;
  border-radius: 0 8px 8px 0;
  position: relative;
}

/* H2に「セクション」感を出す装飾 */
.blog-article-body h2::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #00c8e0, rgba(0, 200, 224, 0.3));
}

.blog-article-body h3 {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  color: #0b0f1a;
  margin: 2.4em 0 1em;
  padding: 14px 20px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #c49a3c;
  position: relative;
}

/* H3 が「解決策」だった場合の特別装飾 */
.blog-article-body h3::before {
  content: '✓';
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background: #c49a3c;
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  margin-right: 10px;
  vertical-align: middle;
}

.blog-article-body h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 2.4em 0 0.8em;
  color: #0b0f1a;
}

/* 最初の見出しの上余白を調整 */
.blog-article-body > h1:first-child,
.blog-article-body > h2:first-child,
.blog-article-body > h3:first-child {
  margin-top: 0;
}

/* リード段落の直後の見出しも余白を詰める */
.blog-article-body > p:first-of-type + h2 {
  margin-top: 1.5em;
}

/* ============================================
   救済策：見出し直後の連続段落を「リスト風」に
   ============================================ */

/* H3の直後の連続する短い段落をリスト風に見せる */
.blog-article-body h2 + p + p,
.blog-article-body h3 + p + p {
  /* 2つ目以降は連続項目とみなす */
}

/* 隣接段落セレクタで「箇条書き」っぽく見せる
   段落が3つ以上連続している場合、各段落の前にマーカーを表示 */
.blog-article-body p + p + p {
  position: relative;
}

/* ============================================
   リスト
   ============================================ */

.blog-article-body ul,
.blog-article-body ol {
  padding-left: 0;
  margin: 0 0 1.6em;
  list-style: none;
}

.blog-article-body ul li,
.blog-article-body ol li {
  margin-bottom: 0.8em;
  line-height: 1.85;
  padding-left: 28px;
  position: relative;
}

.blog-article-body ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 8px;
  height: 8px;
  background: #00c8e0;
  border-radius: 50%;
  transform: translateY(-50%);
}

.blog-article-body ol {
  counter-reset: list-counter;
}

.blog-article-body ol li {
  counter-increment: list-counter;
}

.blog-article-body ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  background: #00c8e0;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   強調・装飾
   ============================================ */

.blog-article-body strong {
  color: #0b0f1a;
  font-weight: 700;
  background: linear-gradient(transparent 60%, rgba(196, 154, 60, 0.25) 60%);
  padding: 0 3px;
}

.blog-article-body em {
  font-style: normal;
  color: #00c8e0;
  font-weight: 700;
  border-bottom: 2px solid rgba(0, 200, 224, 0.3);
  padding-bottom: 1px;
}

.blog-article-body a {
  color: #00c8e0;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 200, 224, 0.4);
  transition: all 0.2s ease;
}

.blog-article-body a:hover {
  color: #0b0f1a;
  border-bottom-color: #0b0f1a;
}

/* ============================================
   画像・引用
   ============================================ */

.blog-article-body img,
.blog-article-body video {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2em 0;
  display: block;
}

.blog-article-body blockquote {
  border-left: 4px solid #c49a3c;
  padding: 20px 28px;
  color: #475569;
  margin: 2em 0;
  background: #fffbf3;
  border-radius: 0 8px 8px 0;
  font-style: normal;
  position: relative;
}

.blog-article-body blockquote::before {
  content: '"';
  position: absolute;
  left: 12px;
  top: -8px;
  font-size: 48px;
  color: #c49a3c;
  font-family: 'Noto Serif JP', serif;
  line-height: 1;
}

.blog-article-body blockquote p {
  margin-left: 32px;
}

.blog-article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* ============================================
   コード
   ============================================ */

.blog-article-body pre,
.blog-article-body code {
  background: #f1f5f9;
  border-radius: 6px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 14px;
}

.blog-article-body pre {
  padding: 20px 24px;
  overflow-x: auto;
  line-height: 1.7;
  margin: 2em 0;
  border: 1px solid #e2e8f0;
}

.blog-article-body code {
  padding: 3px 8px;
  color: #c49a3c;
  font-weight: 500;
}

.blog-article-body pre code {
  color: inherit;
  padding: 0;
  background: none;
  font-weight: normal;
}

/* ============================================
   区切り線・テーブル
   ============================================ */

.blog-article-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #cbd5e1, transparent);
  margin: 3em 0;
}

.blog-article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2em 0;
  font-size: 14px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.blog-article-body th,
.blog-article-body td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.blog-article-body tr:last-child td {
  border-bottom: none;
}

.blog-article-body th {
  background: #0b0f1a;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ============================================
   前/次ナビ
   ============================================ */

.blog-article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 32px 0 0;
  margin-top: 48px;
  border-top: 1px solid #e2e8f0;
}

.blog-article-nav a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px;
  background: #f8fafc;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.blog-article-nav a:hover {
  background: #fff;
  border-color: #00c8e0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 200, 224, 0.12);
}

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

.blog-nav-label {
  font-size: 11px;
  color: #00c8e0;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.blog-nav-title {
  font-size: 14px;
  font-weight: 700;
  color: #0b0f1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.5;
}

.blog-article-back {
  text-align: center;
  padding: 32px 0 0;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  text-decoration: none;
  padding: 10px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 100px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.blog-back-link:hover {
  background: #0b0f1a;
  color: #fff;
  border-color: #0b0f1a;
}

/* ============================================
   レスポンシブ
   ============================================ */

@media (max-width: 720px) {
  .blog-list-page,
  .blog-detail-page {
    padding: 24px 16px 60px;
  }
  .blog-hero h1 { font-size: 32px; }

  .blog-detail-page {
    padding: 32px 16px 60px;
  }

  .blog-article-eyecatch {
    border-radius: 12px;
    margin-bottom: 28px;
  }

  .blog-article-header {
    padding: 0 4px 24px;
  }
  .blog-article-header h1 {
    font-size: 24px;
    line-height: 1.5;
  }

  .blog-article-body {
    padding: 20px 4px 40px;
    font-size: 15px;
    line-height: 1.95;
  }
  .blog-article-body > p:first-of-type {
    font-size: 16px;
  }
  .blog-article-body h1 { font-size: 22px; }
  .blog-article-body h2 {
    font-size: 19px;
    padding: 18px 20px;
  }
  .blog-article-body h3 {
    font-size: 16px;
    padding: 12px 16px;
  }

  .blog-article-nav {
    grid-template-columns: 1fr;
  }
  .blog-nav-next { text-align: left; }
}