/* =========================================
   シングルページ（記事詳細）のデザイン
   ========================================= */

.container-narrow {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 25px;
}
/* --- シングルページ専用：ヘッダー背景画像 --- */
.single-post-header-bg {
  /* シングルページ用の画像パスを指定 */
  background-image: url("../images/single-header.webp");

  background-size: cover;
  background-position: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.single-post-header-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 青空グラデーションを適用 */
  background: linear-gradient(to bottom, rgba(30, 144, 255, 0.7) 0%, rgba(135, 206, 235, 0.4) 60%, rgba(135, 206, 235, 0.2) 100%);
  z-index: 1;
}
/* --- 記事ヘッダー --- */
.entry-header {
  margin-bottom: 40px;
  text-align: center;
}

.entry-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.entry-date {
  font-family: "Oswald", sans-serif;
  color: #999;
  font-size: 1rem;
}

.entry-title {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.4;
  color: #111;
}

/* --- 1. アイキャッチ画像のサイズ固定 --- */
.entry-eye-catch {
  margin-bottom: 60px;
  width: 100%;
}

.entry-eye-catch .img-frame {
  width: 100%;
  height: 480px; /* 枠の高さは固定 */
  background-color: #f9f9f9; /* ★画像がない部分（余白）の色を薄いグレーに設定 */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
}

.entry-eye-catch .img-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;

  /* 背景色との馴染みを良くする */
  background-color: #f9f9f9;
}
.related-posts {
  position: relative;
  background-color: #f7f9f7;
  padding-top: 150px !important;
  padding-bottom: 100px;
  z-index: 1;
}

/* 関連記事内のウェーブ固有の設定 */
.related-posts .section-wave-top {
  position: absolute;
  top: -1px; /* セクションの最上端にピタリと合わせる */
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 2;
  pointer-events: none;
}

.related-posts .section-wave-top svg {
  width: 100%;
  height: 100px;
  display: block;
}

.entry-title {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0;
}
.entry-eye-catch .img-clipper {
  width: 100%;
  height: 450px;
  border-radius: 60% 40% 70% 30% / 55% 65% 35% 45%;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}
.entry-eye-catch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 記事本文（Gutenberg対応） --- */
.entry-content {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.1rem;
  line-height: 2.1;
  color: #333;
}

/* ブロック要素の余白調整 */
.entry-content > * {
  margin-bottom: 40px;
}

.entry-content h2 {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 80px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--color-main);
  color: #111;
}

.entry-content h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 60px;
  padding-left: 15px;
  border-left: 5px solid var(--color-accent);
}

/* 画像ブロック */
.wp-block-image {
  margin-top: 50px;
}
.wp-block-image img {
  border-radius: 12px;
}
.wp-block-image figcaption {
  font-size: 0.9rem;
  color: #888;
  text-align: center;
  margin-top: 10px;
}

/* 引用ブロック */
.entry-content blockquote {
  background: #f7f9f7;
  padding: 40px;
  border-radius: 20px;
  border-left: 0;
  position: relative;
  font-style: italic;
}
.entry-content blockquote::before {
  content: "“";
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 4rem;
  color: var(--color-main);
  opacity: 0.2;
  line-height: 1;
}

/* --- フッターエリア --- */
.entry-footer {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid #eee;
  text-align: center;
}

.post-tags {
  margin-bottom: 40px;
}
.post-tags a {
  display: inline-block;
  color: var(--color-main);
  text-decoration: none;
  font-size: 0.9rem;
  margin: 0 8px;
  padding: 5px 15px;
  background: #f0f7f0;
  border-radius: 50px;
}

.btn-back {
  display: inline-block;
  padding: 12px 50px;
  background-color: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  transition: background 0.3s;
}
.btn-back:hover {
  background-color: var(--color-main);
}
/* --- ページヘッダー内のコンテンツ階層修正 --- */

/* 1. タイトルを包むコンテナを最前面へ */
.page-header .container {
  position: relative;
  z-index: 10; /* 背景画像(0)やマスク(1)より高い数値を指定 */
}

/* 2. 英語サブタイトル（一括指定・上書き） */
.page-sub-title,
.page-title .en {
  position: relative;
  z-index: 10;

  display: block;
  color: var(--color-accent) !important; /* 確実に色を塗る */
  opacity: 1 !important; /* 不透明度を最大に */
  -webkit-text-stroke: 0 !important; /* 縁取り設定を解除 */
}

/* 3. 日本語メインタイトル（一括指定・上書き） */
.page-title-ja,
.page-title .ja {
  position: relative;
  z-index: 10;

  display: block;
  color: #ffffff !important; /* 白文字で塗りつぶし */
  opacity: 1 !important; /* 不透明度を最大に */
  -webkit-text-stroke: 0 !important; /* 縁取り設定を解除 */
}
/* スマホ対応 */
@media (max-width: 768px) {
  .entry-title {
    font-size: 1.6rem;
  }
  .entry-eye-catch .img-clipper {
    height: 250px;
    border-radius: 20px;
  }
  .entry-content {
    font-size: 1rem;
  }
  .entry-content h2 {
    font-size: 1.5rem;
  }
}

/* --- スマホ対応 --- */
@media (max-width: 768px) {
  .entry-eye-catch .img-frame {
    height: 280px; /* スマホでも枠の高さは固定 */
  }
  .related-posts {
    padding-top: 100px !important;
  }
  .related-posts .section-wave-top svg {
    height: 60px;
  }
}

/* --- 記事下のパーツ（共通） --- */
.post-info-bottom {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #eee;
}

/* タグのデザイン */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.post-tags a {
  text-decoration: none;
  background: #f4f8f4;
  color: var(--color-main);
  font-size: 0.85rem;
  padding: 6px 15px;
  border-radius: 4px; /* 他のテック系ページと合わせたシャープな角丸 */
  transition: all 0.3s;
}

.post-tags a:hover {
  background: var(--color-main);
  color: #fff;
}

/* 一覧に戻るボタン */
.btn-back {
  display: inline-block;
  padding: 12px 60px;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
}

/* --- スマホ専用の改良（ここがポイント） --- */
@media (max-width: 768px) {
  .post-info-bottom {
    margin-top: 40px;
    padding-top: 30px;
    text-align: left;
  }

  .post-tags {
    gap: 8px;
  }

  .post-tags a {
    font-size: 0.8rem;
    padding: 10px 14px;
  }

  .post-nav {
    margin-top: 20px;
  }

  .btn-back {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

/* =========================================
   シングルページ：背景色とウェーブの完全同期
   ========================================= */

/* 1. ページ全体の背景を白に固定 */
.single-page {
  background-color: #ffffff !important;
}

/* 2. 関連記事セクションの背景を白に変更し、段差を消す */
.related-posts.bg-gray {
  background-color: #ffffff !important; /* グレーを廃止して白に */
  padding-top: 100px !important; /* 余白の再調整 */
}

/* 関連記事の上部ウェーブも白にする（背景に溶け込ませる） */
.related-posts .section-wave-top svg path {
  fill: #ffffff !important;
}

/* 3. フッターとの接続部分の修正 */
/* 
   直前のセクション（関連記事や記事末尾）が白なので、
   フッター上部の隙間の色も白に合わせます 
*/
#footer .footer-top-deco {
  background-color: #ffffff !important;
}

/* 4. ヘッダーウェーブの色の確認 */
/* 
   ヘッダーの下端にあるウェーブも、白背景に溶け込むように 
   fill を白に指定します
*/
.single-page .page-header-wave svg path {
  fill: #ffffff !important;
}

/* 5. 境界線の微細な隙間（1pxの線）を埋める */
.single-page section,
.single-page .page-header,
.single-page .breadcrumb-area {
  margin-bottom: 0;
  margin-top: -1px; /* 1px重ねて隙間を物理的に消す */
}

/* =========================================
   シングルページ（詳細）ヘッダータイトルの修正
   ========================================= */

/* 1. 英語サブタイトル */
.single-page .page-sub-title {
  display: block;
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  font-weight: 700; /* 太くして視認性アップ */

  /* ★修正：透かし・中抜きを完全に解除 */
  color: var(--color-accent) !important; /* 稲穂ゴールドで塗りつぶし */
  -webkit-text-stroke: 0 !important; /* 縁取りを消す */
  opacity: 1 !important; /* 不透明度100% */

  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 2. 日本語メインタイトル */
.single-page .page-title-ja {
  display: block;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 2.8rem;
  font-weight: 800;

  /* ★修正：透かし・中抜きを完全に解除 */
  color: #ffffff !important; /* 白で塗りつぶし */
  -webkit-text-stroke: 0 !important; /* 縁取りを消す */
  opacity: 1 !important; /* 不透明度100% */

  line-height: 1.2;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* ページヘッダー自体の重なり順も確認 */
.single-page .page-title {
  position: relative;
  z-index: 10; /* グラデーションマスクより手前に */
}

/* --- スマホ表示の調整 --- */
@media (max-width: 768px) {
  .single-page .page-sub-title {
    font-size: 1rem;
    letter-spacing: 0.2em;
    margin-bottom: 5px;
  }

  .single-page .page-title-ja {
    font-size: 2rem; /* スマホでは画面幅に合わせて縮小 */
  }
}
