@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
** ターゲット：50代後半以降のシニア層向け
************************************/

/* ============================================
   基本フォント・文字サイズ・行間
   ============================================ */
body {
  font-family: 'Noto Sans JP', 'ヒラギノ角ゴ ProN', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
  font-size: 18px;
  line-height: 1.9;
  color: #1a1a1a;
  background-color: #faf8f3;
}

/* 記事本文エリア */
.entry-content,
.article-body,
.post-body {
  font-size: 18px;
  line-height: 1.9;
}

p {
  margin-bottom: 1.4em;
}

/* ============================================
   カラー：メイン＝深紺 / アクセント＝落ち着いた緑
   ============================================ */

/* リンク色 */
a {
  color: #003e7e;
  text-decoration: underline;
}

a:hover {
  color: #b87a00;
  text-decoration: underline;
}

/* ヘッダー背景 */
#header,
.header-container {
  background-color: #001f3f;
  color: #ffffff;
}

/* ヘッダー内リンク */
#header a,
.header-container a {
  color: #ffffff;
  text-decoration: none;
}

/* サイトタイトル */
.site-name-text,
#site-title {
  color: #ffffff !important;
  font-size: 1.4em;
  font-weight: 700;
}

/* グローバルナビ */
#navi .menu-item a,
.global-nav .menu-item a {
  color: #ffffff;
  font-size: 16px;
  padding: 10px 16px;
}

#navi .menu-item a:hover,
.global-nav .menu-item a:hover {
  background-color: #2e7d32;
  color: #ffffff;
}

/* ============================================
   H2見出し：塗りつぶし背景で「新しいセクション開始」を明示
   ============================================ */
.entry-content h2,
.article-body h2,
.post-body h2 {
  font-size: 1.4em;
  font-weight: 700;
  color: #ffffff;
  background-color: #001f3f;
  padding: 14px 20px;
  border-left: 6px solid #d4a017;
  border-radius: 4px;
  margin-top: 2.2em;
  margin-bottom: 1.2em;
  line-height: 1.5;
}

/* H3見出し：左ボーダーで視覚的階層を表現 */
.entry-content h3,
.article-body h3,
.post-body h3 {
  font-size: 1.2em;
  font-weight: 700;
  color: #001f3f;
  border-left: 5px solid #c8960c;
  padding: 6px 14px;
  margin-top: 1.8em;
  margin-bottom: 0.9em;
  background-color: #fef9e7;
  border-radius: 0 4px 4px 0;
  line-height: 1.5;
}

/* H4見出し */
.entry-content h4,
.article-body h4,
.post-body h4 {
  font-size: 1.05em;
  font-weight: 700;
  color: #001f3f;
  border-bottom: 2px solid #2e7d32;
  padding-bottom: 4px;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
}

/* ============================================
   ボタン：大きく・立体感あり・クリック感を演出
   ============================================ */

/* 汎用ボタン */
.btn,
.button,
a.btn,
a.button,
.wp-block-button__link,
.entry-content .btn,
.entry-content .button {
  display: inline-block;
  padding: 16px 36px;
  font-size: 1.1em;
  font-weight: 700;
  color: #ffffff !important;
  background-color: #2e7d32;
  border: none;
  border-radius: 6px;
  text-decoration: none !important;
  box-shadow: 0 5px 0 #1b5e20, 0 6px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.btn:hover,
.button:hover,
a.btn:hover,
a.button:hover,
.wp-block-button__link:hover {
  background-color: #388e3c;
  box-shadow: 0 3px 0 #1b5e20, 0 4px 6px rgba(0, 0, 0, 0.2);
  transform: translateY(2px);
  color: #ffffff !important;
}

.btn:active,
.button:active,
a.btn:active,
a.button:active,
.wp-block-button__link:active {
  box-shadow: 0 1px 0 #1b5e20;
  transform: translateY(4px);
}

/* 申し込み・CTA用の目立つボタン（.btn-cta を付与して使用） */
.btn-cta,
a.btn-cta {
  display: inline-block;
  padding: 20px 48px;
  font-size: 1.25em;
  font-weight: 700;
  color: #ffffff !important;
  background-color: #001f3f;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 6px 0 #00111f, 0 8px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.06em;
  text-align: center;
}

.btn-cta:hover,
a.btn-cta:hover {
  background-color: #003366;
  box-shadow: 0 4px 0 #00111f, 0 5px 8px rgba(0, 0, 0, 0.25);
  transform: translateY(2px);
  color: #ffffff !important;
}

.btn-cta:active,
a.btn-cta:active {
  box-shadow: 0 1px 0 #00111f;
  transform: translateY(5px);
}

/* ============================================
   その他の読みやすさ改善
   ============================================ */

/* リスト余白 */
.entry-content ul,
.entry-content ol {
  padding-left: 1.6em;
  margin-bottom: 1.4em;
}

.entry-content li {
  margin-bottom: 0.5em;
  line-height: 1.9;
}

/* 引用ブロック */
.entry-content blockquote {
  border-left: 4px solid #2e7d32;
  background: #f1f8e9;
  padding: 14px 20px;
  color: #333;
  font-size: 1em;
  margin: 1.5em 0;
}

/* テーブル */
.entry-content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 17px;
}

.entry-content th {
  background-color: #001f3f;
  color: #ffffff;
  padding: 10px 14px;
  text-align: left;
}

.entry-content td {
  padding: 10px 14px;
  border: 1px solid #ccc;
}

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

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/

/*1023px以下*/
@media screen and (max-width: 1023px) {
  body {
    font-size: 17px;
  }
}

/*834px以下（タブレット）*/
@media screen and (max-width: 834px) {
  body {
    font-size: 17px;
    line-height: 1.85;
  }

  .entry-content h2,
  .article-body h2,
  .post-body h2 {
    font-size: 1.25em;
    padding: 12px 16px;
  }

  .btn,
  .button,
  a.btn,
  a.button {
    padding: 14px 28px;
    font-size: 1.05em;
  }

  .btn-cta,
  a.btn-cta {
    padding: 18px 36px;
    font-size: 1.15em;
  }
}

/*480px以下（スマートフォン）*/
@media screen and (max-width: 480px) {
  body {
    font-size: 16px;
    line-height: 1.85;
  }

  .entry-content h2,
  .article-body h2,
  .post-body h2 {
    font-size: 1.15em;
    padding: 10px 14px;
  }

  .entry-content h3,
  .article-body h3,
  .post-body h3 {
    font-size: 1.1em;
  }

  .btn,
  .button,
  a.btn,
  a.button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 16px 20px;
    font-size: 1.05em;
    box-sizing: border-box;
  }

  .btn-cta,
  a.btn-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 18px 20px;
    font-size: 1.1em;
    box-sizing: border-box;
  }
}

/************************************
** 1カラムレイアウト補強
** サイドバーを非表示にしてコンテンツを全幅で表示
************************************/

/* サイドバーを完全に非表示 */
#sidebar,
.sidebar,
.nwa {
  display: none !important;
}

/* メインコンテンツを全幅に拡張 */
#main,
.main,
.content-in {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

/* 全体のラッパーを適切な最大幅に制限（読みやすい横幅） */
.wrap,
#wrap {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/************************************
** ヘッダー：最終版
** 背景 header-bg.png（PNG確認済み）
** Flexbox 縦並び・視覚的階層を厳守
************************************/

/* ===================================================
   1. 背景画像：5パターンのセレクタで完全強制適用
      ファイル: images/header-bg.png（実在確認済み）
   =================================================== */
#header-container,
body #header-container,
.header-container,
#container #header-container,
div.header-container {
  position: relative !important;
  background-image: url('images/header-bg.png') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
}

/* 背景を少し暗くしてテキストを読みやすく */
#header-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

/* ヘッダー内要素をオーバーレイの上に */
#header-container>* {
  position: relative;
  z-index: 1;
}

/* ===================================================
   2. #header：Flexbox 縦並び・全要素を重ならず並べる
   =================================================== */
#header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
  min-height: 320px;
  padding: 20px 24px;
  box-sizing: border-box;
  width: 100%;

  /* ▼ 親テーマが #header に設定する background-color:#001f3f を打ち消す
        これが背景画像を隠していた原因（DevTools style.css:57 で確認済み） */
  background-color: transparent !important;
  background-image: none !important;
}

/* ===================================================
   3. ロゴ＋サイトタイトル（上段・自幅左寄せ）
   =================================================== */
.child-header-logo {
  position: static;
  width: 100%;
  flex-shrink: 0;
}

.child-header-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: inherit;
}

.child-header-logo-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* 【最大】サイトタイトル外枠 */
.child-header-site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  line-height: 1.1;
}

/* 「給付金ポータル」メイン部分：最大フォント */
.child-header-site-title-main {
  font-size: clamp(28px, 5vw, 56px) !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* 「by 給付金ちゃんねる」：小さく添える */
.child-header-site-by {
  font-size: 0.48em !important;
  font-weight: 700;
  opacity: 0.92;
  letter-spacing: 0.03em;
  vertical-align: middle;
  white-space: nowrap;
}

/* YouTube SVG アイコン */
.child-yt-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.8));
}

/* ===================================================
   4. メインテロップ（中段・中央配置）
   =================================================== */
.child-header-text-overlay {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  width: 100%;
  max-width: 100%;
  padding: 0 16px;
}

/* 【2番目】h1：ゴールド・nowrap */
.child-header-main-title {
  margin: 0;
  padding: 0;
  white-space: nowrap !important;
  font-size: clamp(16px, 3.8vw, 42px) !important;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.2;

  background: linear-gradient(180deg,
      #ffe566 0%,
      #f9d871 40%,
      #f5b800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* 【3番目】h2：白・控えめ */
.child-header-sub-title {
  margin: 0;
  padding: 0;
  white-space: nowrap !important;
  font-size: clamp(10px, 1.8vw, 22px) !important;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

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

/* タブレット（834px以下） */
@media screen and (max-width: 834px) {
  #header {
    min-height: 280px;
    gap: 16px;
    padding: 16px 18px;
  }

  .child-header-logo-img {
    width: 48px;
    height: 48px;
  }

  .child-header-site-title-main {
    font-size: clamp(22px, 5.5vw, 44px) !important;
  }

  .child-header-main-title {
    font-size: clamp(14px, 4vw, 34px) !important;
  }

  .child-header-sub-title {
    font-size: clamp(10px, 2.2vw, 18px) !important;
  }
}

/* スマートフォン（480px以下）：height:auto で収まるように */
@media screen and (max-width: 480px) {
  #header {
    min-height: auto !important;
    /* 中身に合わせて自動伸縮 */
    height: auto !important;
    gap: 12px;
    padding: 14px 12px;
  }

  .child-header-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 6px;
  }

  .child-yt-icon {
    width: 22px;
    height: 15px;
  }

  /* 【最大】サイトタイトル：スマホでも他より大きく */
  .child-header-site-title-main {
    font-size: clamp(20px, 6vw, 36px) !important;
  }

  .child-header-site-by {
    font-size: 0.45em !important;
  }

  /* 【2番目】メインコピー */
  .child-header-main-title {
    font-size: clamp(12px, 4.5vw, 24px) !important;
    letter-spacing: 0.01em;
  }

  /* 【3番目】サブコピー */
  .child-header-sub-title {
    font-size: clamp(9px, 3vw, 14px) !important;
    letter-spacing: 0.01em;
  }
}

/* ===== 背景画像：複数セレクタで親テーマ上書きを完全防止 =====
   ファイル確認済み: images/header-bg.png（PNGのみ存在。.jpgは不在）
   ===== */
#header-container,
body #header-container,
.header-container,
#container #header-container {
  position: relative !important;
  background-image: url('images/header-bg.png') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: #001f3f !important;
  /* 画像読み込み前のフォールバック */
}

/* 背景を少し暗くしてテキストを読みやすく */
#header-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 0;
}

/* ヘッダー内要素をオーバーレイの上に */
#header-container>* {
  position: relative;
  z-index: 1;
}

/* ============================================
   #header 全体を Flexbox 縦並びに
   上段: ロゴ  /  中段: テロップ（中央）
   ============================================ */
#header {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 300px;
  padding: 18px 20px 24px;
  box-sizing: border-box;
  width: 100%;
}

/* ============================================
   ロゴ＋サイトタイトル（上段・左寄せ）
   ============================================ */
.child-header-logo {
  /* absolute 廃止 → normal flow */
  position: static;
  width: 100%;
  z-index: 3;
  margin-bottom: 8px;
  flex-shrink: 0;
}

/* ロゴリンク：横並び */
.child-header-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: inherit;
}

/* ロゴ画像 */
.child-header-logo-img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* サイトタイトル：「視覚的階層【最大】」
   他のどの要素より圧倒的に大きく・白文字・極太・強shadow */
.child-header-site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(26px, 4.5vw, 52px) !important;
  /* 【最大】PC 52px */
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

/* YouTube SVG アイコン：バナー右下配置ブロック */
.child-yt-icon-wrap {
  position: absolute;
  bottom: 14px;
  right: 18px;
  z-index: 10;
}

/* スマホでは非表示、PCのみ表示 */
@media screen and (max-width: 834px) {
  .child-yt-icon-wrap--pc-only {
    display: none !important;
  }
}

.child-yt-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  color: #ffffff !important;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.child-yt-icon-link:hover {
  opacity: 1;
  transform: scale(1.08);
}

.child-yt-icon {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}

.child-yt-icon-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  white-space: nowrap;
}

/* ============================================
   メインテロップ（中段・中央）
   ============================================ */
.child-header-text-overlay {
  /* absolute 廃止 → flex child */
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  text-align: center;
  width: 100%;
  max-width: 980px;
  padding: 0 12px;
  line-height: 1.3;
}

/* メインタイトル（h1）：「視覚的階層【2番目】」 ゴールド + 黒縁取り */
.child-header-main-title {
  margin: 0 0 0 0;
  padding: 0;

  /* 改行を絶対禁止 + 画面幅に自動追従 */
  white-space: nowrap;
  font-size: clamp(22px, 4.5vw, 46px) !important;
  /* 【2番目】サイトタイトルより小さく */
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.2;

  /* ゴールドグラデーション */
  background: linear-gradient(180deg,
      #ffe566 0%,
      #f9d871 40%,
      #f5b800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  /* ソフトシャドウのみ */
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

/* サブタイトル（h2）：「視覚的階層【3番目】」 純白・控えめ */
.child-header-sub-title {
  margin: 0;
  padding: 0;
  white-space: nowrap;
  font-size: clamp(16px, 2.6vw, 30px) !important;
  /* 【3番目】最も小さく */
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

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

/* タブレット（834px以下） */
@media screen and (max-width: 834px) {
  #header {
    min-height: 260px;
    padding: 14px 16px 20px;
  }

  .child-header-logo {
    margin-bottom: 10px;
  }

  .child-header-logo-img {
    width: 46px;
    height: 46px;
  }

  .child-header-site-title {
    font-size: clamp(18px, 4.5vw, 36px);
  }

  .child-header-main-title {
    font-size: clamp(20px, 5vw, 44px);
  }

  .child-header-sub-title {
    font-size: clamp(14px, 3.2vw, 28px);
  }
}

/* スマートフォン（480px以下） */
@media screen and (max-width: 480px) {
  #header-container {
    margin-bottom: 28px;
  }

  #header {
    min-height: 220px;
    padding: 12px 12px 16px;
    margin-bottom: 24px;
  }

  .child-header-logo {
    margin-bottom: 8px;
  }

  .child-header-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 6px;
  }

  .child-header-site-title {
    font-size: clamp(16px, 5vw, 28px);
    /* スマホでも最大 */
    gap: 5px;
  }

  .child-yt-icon {
    width: 22px;
    height: 15px;
  }

  .child-header-main-title {
    font-size: clamp(18px, 5.5vw, 32px);
    letter-spacing: 0.01em;
  }

  .child-header-sub-title {
    font-size: clamp(13px, 3.8vw, 22px);
    letter-spacing: 0.02em;
  }
}