/* ============================================
   BLOG ページ共通スタイル
   ※ .layout-container > .main-content > main 内に配置される想定
   ※ デザイン: 記事一覧ページの Figma 値に準拠
   ============================================ */

/* ----- 全体の中央寄せコンテナ ----- */
/* Figmaの白カード内コンテンツ幅 547px に合わせる */
.blog-page__inner {
  max-width: 547px;
  margin: 0 auto;
  padding: 60px 24px;
  box-sizing: content-box;
}

/* ----- ページタイトル（BLOG / ブログ） ----- */
.blog-title {
  text-align: center;
  margin-bottom: 30px;
}

.blog-title__main {
  font-family: 'Noto Sans', sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.6; /* 160% */
  color: #D10000;
  letter-spacing: 0.02em;
  margin: 0;
}

.blog-title__sub {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #D10000; /* メインと同じ赤 */
  letter-spacing: 0.02em;
  margin: 0;
}

/* ============================================
   記事一覧（カードリスト）
   ============================================ */

.blog-item {
  border-top: 1px solid #EBF2FE;
}

.blog-item__link {
  display: flex;
  gap: 16px;
  padding: 25px 0;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
  transition: opacity 0.2s ease;
}

.blog-item__link:hover {
  opacity: 0.7;
}

.blog-item__content {
  flex: 1 1 263px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ----- メタ情報（カテゴリ + 日付の2連タグ） ----- */
.blog-item__meta {
  display: flex;
  align-items: stretch;
  gap: 0; /* タグ同士をぴったり接続 */
  margin: 0;
  height: 32px;
}

.blog-item__category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #EBF2FE; /* BLUE/100 */
  border-radius: 6px;
  padding: 8px 12px 10px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2; /* 120% */
  color: #232E52; /* BLACK/500 */
  text-transform: uppercase;
  white-space: nowrap;
}

.blog-item__date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px 10px;
  font-family: 'Graphik', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: #232E52;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

/* ----- タイトル（最大3行） ----- */
.blog-item__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6; /* 160% */
  color: #232E52;
  letter-spacing: 0.03em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  text-wrap: auto;
}

/* ----- 本文抜粋（最大2行） ----- */
.blog-item__excerpt {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5; /* 150% */
  color: #757575;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

/* ----- サムネイル ----- */
.blog-item__thumbnail {
  flex: 0 1 268px;
  min-width: 0;
  height: auto;
  aspect-ratio: 268 / 175;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

.blog-item__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-list__empty {
  padding: 40px 0;
  text-align: center;
  color: #757575;
}

/* ============================================
   ページネーション
   ============================================ */

.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ページ番号（共通） */
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 4px 11px;
  border-radius: 5px;
  background-color: #F6F6F6;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: #000000;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.15s ease;
  box-sizing: border-box;
}

/* 現在ページ */
.blog-pagination .page-numbers.current {
  background-color: #D10000;
  color: #FFFFFF;
}

.blog-pagination a.page-numbers:hover {
  opacity: 0.7;
}

/* 「...」省略表示 */
.blog-pagination .page-numbers.dots {
  background-color: transparent;
  cursor: default;
  color: #737373;
  letter-spacing: 0.15em;
  padding: 4px 4px 7px; /* 下寄せ気味（Figma: align-items: flex-end） */
  align-items: flex-end;
}

/* 矢印ボタン（前 / 次） */
.blog-pagination .page-numbers.prev,
.blog-pagination .page-numbers.next {
  background-color: transparent;
  padding: 0;
  min-width: 24px;
  width: 24px;
  height: 24px;
}

.blog-pagination .page-numbers.prev {
  transform: rotateZ(-180deg);
  margin-right: 8px;
}
.blog-pagination .page-numbers.next {
  margin-left: 8px;
}

.blog-pagination__arrow {
  display: inline-block;
}

/* ============================================
   レスポンシブ（スマホ対応）
   ============================================ */

@media (max-width: 640px) {
  .blog-page__inner {
    max-width: 100%;
    padding: 100px 16px 60px;
    box-sizing: border-box;
  }

  .blog-title__main { font-size: 26px; }

  .blog-item__link {
    gap: 12px;
    padding: 20px 0;
  }

  .blog-item__thumbnail {
    flex: 0 1 210px;
  }

  .blog-item__meta {
    height: 24px;
  }

  .blog-item__excerpt {
    display: none;
  }

  .blog-item__category {
    padding: 4px 8px;
    font-size: 10px;
    letter-spacing: 0px;
  }

  .blog-item__date {
    padding: 0 12px;
    font-size: 10px;
  }
  .blog-item__title {
    font-size: 15px;
  }
}

/* ============================================
   記事詳細ページ
   ============================================ */

.blog-detail {
  padding-bottom: 120px;
  border-bottom: 1px solid #EBF2FE;
}

.blog-detail__meta {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 20px;
  height: 32px;
}

.blog-detail__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: #232E52;
  margin: 0 0 32px;
  text-wrap: auto;
}

/* ----- 本文 ----- */
.blog-detail__body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: #232E52;
}

.blog-detail__body p {
  margin: 0 0 1.6em;
  font-weight: 400;
}

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

/* 本文中の画像 */
.blog-detail__body img {
  max-width: 100%;
  height: auto;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  display: block;
}

.blog-detail__body figure,
.blog-detail__body .wp-block-image {
  margin: 2.4em 0;
}

/* キャプション */
.blog-detail__body figcaption,
.blog-detail__body .wp-caption-text,
.blog-detail__body .wp-block-image figcaption,
.blog-detail__body .wp-element-caption {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #232E52;
  margin: 0;
  padding: 5px 20px;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;
  background-color: #EBF2FE;
}

/* 引用・ハイライトボックス */
.blog-detail__body blockquote,
.blog-detail__body .wp-block-quote {
  background-color: #EBF2FE;
  border-left: 4px solid #5d7eb0;
  border-radius: 0 6px 6px 0;
  padding: 28px 32px;
  margin: 2.4em 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.85;
  color: #232E52;
  text-align: center;
}

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

/* 見出し */
.blog-detail__body h2,
.blog-detail__body h3,
.blog-detail__body h4 {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  line-height: 1.5;
  color: #232E52;
  margin: 2em 0 1em;
}

.blog-detail__body h2 { font-size: 20px; }
.blog-detail__body h3 { font-size: 17px; }
.blog-detail__body h4 { font-size: 15px; }

/* リンク */
.blog-detail__body a {
  color: #D10000;
  text-decoration: underline;
}

/* リスト */
.blog-detail__body ul,
.blog-detail__body ol {
  margin: 0 0 1.6em;
  padding-left: 1.5em;
}

.blog-detail__body li {
  margin-bottom: 0.4em;
}

.blog-detail__body .wp-block-verse {
  margin: 0 0 1.6em;
  padding: 22px 25px 26px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0px;
  line-height: 1.8;
  color: #232E52;
  background-color: #EBF2FE;
  box-shadow: 0 -4px 0 0 #1D54C0;
}

/* ============================================
   関連記事セクション
   ※ リスト本体は記事一覧と同じ .blog-list / .blog-item を使用
   ============================================ */

.blog-related {
  margin-top: 60px;
}

.blog-related__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: #D10000;
  margin: 0 0 8px;
}

.blog-related .blog-item {
  border-top: initial;
}

.blog-related .blog-item .blog-item__link {
  padding: 24px 0 0;
}

/* ============================================
   一覧へもどるボタン
   ============================================ */

.blog-back {
  text-align: center;
  margin-top: 60px;
}

.blog-back__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-width: 240px;
  padding: 13.5px 40px;
  border: 1.5px solid #D10000;
  border-radius: 6px;
  background: #FFFFFF;
  color: #D10000;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all 0.2s ease;
}

.blog-back__link:hover {
  background-color: #D10000;
  color: #FFFFFF;
}

.blog-back__arrow {
  display: inline-block;
  width: 14px;
  transform: rotate(-180deg);
}
.blog-back__link:hover .blog-back__arrow {
  -webkit-filter: brightness(0) invert(1);
  filter: brightness(0) invert(1);
}

/* ============================================
   レスポンシブ（スマホ対応・記事詳細）
   ============================================ */

@media (max-width: 640px) {
  .blog-detail {
    margin-bottom: 0;
    padding-bottom: 60px;
  }

  .blog-detail__title {
    font-size: 19px;
    margin-bottom: 24px;
  }

  .blog-detail__body {
    font-size: 13px;
    line-height: 1.85;
  }

  .blog-detail__body blockquote,
  .blog-detail__body .wp-block-quote {
    padding: 20px 22px;
    font-size: 13px;
  }

  .blog-related {
    margin-top: 32px;
  }

  .blog-related__title {
    font-size: 16px;
  }

  .blog-back {
    margin-top: 50px;
  }

  .blog-back__link {
    min-width: 230px;
    width: auto;
    padding: 12px 28px;
  }

  .blog-detail__body .wp-block-verse {
    padding-inline: 21px;
    line-height: 1.6;
  }
}