/*
Theme Name:   ORION Child (KAWAI BAG)
Theme URI:    https://example.com/
Description:  ORION(TCD037)の子テーマ。KAWAI BAG様サイト用カスタマイズ。
Author:       Your Name
Author URI:   https://example.com/
Template:     orion_tcd037
Version:      1.0.0
Text Domain:  orion-child
*/

/* ==========================================================================
   Template: orion_tcd037 は、テーマエディターのURL
   (theme-editor.php?theme=orion_tcd037) から確認済みのフォルダ名です。
   ========================================================================== */


/* ==========================================================================
   ここから下に、トップページをデザインカンプに寄せるためのCSSを追加していきます。
   このファイルは親テーマのCSSより後に読み込まれるので、
   同じセレクタを書けば親テーマのスタイルを上書きできます。
   ========================================================================== */

/* -----------------------------------
   共通カラー・変数（デザインに合わせて調整）
------------------------------------ */
:root{
  --kawai-navy: #1a1a4e;   /* ヘッダー/フッターの紺色（デザイン参照して調整） */
  --kawai-text: #333333;
  /* サイト全体のフォントを親テーマのtcd-font-type2（明朝系）に統一 */
  --kawai-font-mincho: var(--tcd-font-type2);
  /* 親テーマの見出し用フォント変数も同じフォントに統一 */
  --tcd-font-type1: var(--tcd-font-type2);
}

/* -----------------------------------
   0.4 サイト全体を明朝体に変更
   ・見出し（.headline / .custom-section-title など）は既存の
     var(--tcd-font-type1) を明朝体で上書きすることで反映
   ・本文はbody要素にfont-familyを指定して継承させる
     （アイコンフォント用クラスは個別にfont-family指定があるため上書きされません）
------------------------------------ */
body{
  font-family: var(--kawai-font-mincho);
}
h1, h2, h3, h4, h5, h6,
.headline,
.title,
.custom-section-title,
.custom-banner-title,
.custom-split-label{
  font-family: var(--kawai-font-mincho);
}
/* TOPビジュアルの「KAWAI BAG」ロゴだけは明朝体にしない（元のフォントのまま） */
#header_logo_index .logo{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif !important;
}
/* 親テーマの .rich_font クラス（headline/titleに併用されていることが多い）が
   同じ優先度で明朝体指定を上書きしてしまうことがあるため、!importantで確実に明朝体にする */
.rich_font{
  font-family: var(--tcd-font-type2) !important;
}

/* -----------------------------------
   0. 諸悪の根源対策：
   .index_content1 というクラスが、企業理念／創業テキスト／カワイの強み
   3セクション共通の入れ物として使われており、テーマ標準で
   padding: 25px 0 50px; が入っていた（検証で判明）。
   これが原因で margin による余白調整が効かなかったため、
   まずここをゼロリセットしてから、他の余白指定を効かせる。
------------------------------------ */
#index_dis .index_content1{
  padding: 0 !important;
}
#index_content2 .index_content1{
  width: 1200px;
  margin: 0 auto;
  padding: 115px 0 0;
}
/* #index_content1 の .index_content1 はテキストカードとして独自にpaddingを指定するため、ここでは対象外 */


/* -----------------------------------
   0.5 見出し以外の本文テキストを14pxに統一
------------------------------------ */
#index_content1 .index_content_header .desc,
#index_content1 .index_content_header .desc p,
#index_content2 .index_content_header .desc,
#index_content2 .index_content_header .desc p,
#index_dis .index_content_header3 .desc,
#index_dis .index_content_header3 .desc p,
#index_content2 .index_box_list .box .info .desc,
#index_content2 .index_box_list .box .info .desc p{
  font-size: 14px !important;
}


/* -----------------------------------
   0.6 PC版の余白統一
   ・コンテンツ同士の間：100px
   ・コンテンツ内のテキストと画像の間：50px
   （SPは別途メディアクエリ内で40px/20pxに上書きされます）
------------------------------------ */
#index_dis,
#index_content2,
#index_custom_sections{
  margin-top: 0px;
}
/* 創業テキストの上だけ115pxに */
#index_dis{
  margin-top: 115px;
}
/* #index_content1はmarginではなくpaddingで統一（marginが効かない実績があるため） */
#index_content1{
  padding-top: 0;
}
#index_content2 .index_content_header{
  margin-bottom: 50px;
}
/* #index_disはmarginが効かないため、次の要素側にpadding-topを追加する方式に変更 */
#index_dis .custom-photo-grid{
  padding-top: 95px;
}
#index_dis .index_content_header3 .headline{
  font-size: 50px !important;
  margin-bottom: 34px;
  letter-spacing: 0.06em;
  line-height: 1.8;
}
#index_dis .index_content_header3 .desc p{
  line-height: 250%;
}


/* -----------------------------------
   1. ヘッダー（ロゴ＋グロナビ）
   現状は TCDテーマオプションの配色設定で背景色 #222222 になっています。
   デザインのネイビーに変更したい場合は、できるだけ
   外観 > TCDテーマオプション > 基本設定 のカラーピッカーで変更してください（管理がラク）。
   どうしてもCSSで上書きしたい場合のみ、下記コメントを外して調整してください。
------------------------------------ */
#header {
  background-color: var(--kawai-navy) !important;
}
.mobile #global_menu,
.mobile #global_menu ul.menu,
.pc #global_menu{
  background-color: var(--kawai-navy) !important;
}
/* PCヘッダーで現在ページ(HOME)の文字が紺色になり見えなくなる問題を解消 */
.pc #global_menu li.current-menu-item > a,
.pc #global_menu > ul > li.active > a{
  color: #fff !important;
}


/* -----------------------------------
   2. MV（#header_slider）
   現在このdivの中身が空です。
   外観 > TCDテーマオプション > トップページ > ヘッダーコンテンツ から
   画像・動画・スライドのいずれかをアップロードしてください。
   ここでは高さなど見た目の微調整のみ扱います。
------------------------------------ */
#header_logo_index .logo{
  letter-spacing: 0.05em;
  color: var(--kawai-navy) !important;
  font-size: 60px !important;
  font-weight: bold !important;
}
#header_logo_index .desc{
  font-size: 16px;
  color: var(--kawai-navy) !important;
}
/* MV下のスクロール誘導ボタン（丸いシェブロン） */
#header_logo_index .link{
  background-color: var(--kawai-navy) !important;
}
#header_logo_index .link::before,
#header_logo_index .link::after,
#header_logo_index .link span{
  color: #fff !important;
}


/* -----------------------------------
   3. #index_content1（企業理念的な一言／見出し＋本文＋画像）
   既にTCDテーマオプションのコンテンツ1で入力済み。
   デザインに寄せて余白・文字サイズを微調整。
------------------------------------ */
#index_content1 .index_content_header{
  margin-bottom: 0 !important;
}
#index_content1 .index_content_header .headline{
  letter-spacing: 0.08em;
  margin: 0 0 34px 0;
  color: #000;
}
/* 創業テキストの見出しは50pxに統一 */
#index_dis .index_content_header3 .headline{
  font-size: 50px !important;
}
/* カワイの強み：テキストと画像の間の余白(55px)を削除 */
#index_content2 .index_content_header{
  margin-bottom: 0 !important;
}
#index_content2 .index_content_header .headline{
  margin: 0 0 20px 0;
  color: #000;
}
/* 創業テキスト：テキストと写真グリッドの間の余白も削除 */
#index_dis .index_content_header3{
  margin-bottom: 0 !important;
}
#index_content1 .index_content_header .desc p{
  line-height: 250%;
}


/* -----------------------------------
   4. #index_content2（カワイの強み／3カラムボックス）
   .box1 / .box2 / .box3 が横並びになるよう調整
------------------------------------ */
#index_content2 .index_box_list{
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 110px 0 0 0;
}
#index_content2 .index_box_list .box{
  width: 360px;
  margin: 0 22px 0 0;
  padding: 0;
  position: relative;
}
#index_content2 .index_box_list .box .image img{
  width: 100%;
  height: 240px;
  object-fit: cover;
}
#index_content2 .index_box_list .box .info{
  text-align: center;
  padding-top: 12px;
}
#index_content2 .index_box_list .box .info .headline{
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: left;
}
#index_content2 .index_box_list .box .info .desc{
  line-height: 250%;
  text-align: left;
}
/* テキストと重なって見えてしまう「詳細を見る」ボタンは非表示に */
#index_content2 .index_box_list .box .info .link{
  display: none;
}


/* -----------------------------------
   4.5 縫製中/一部商品写真（4枚組みグリッド）
   front-page.php で #index_dis 内に直接コーディングした部分
------------------------------------ */
.custom-photo-grid{
  display: flex;
  gap: 0;
  width: 100%;
  margin: 15px 0 0;
}
.custom-photo-grid-item{
  flex: 1 1 0;
  height: 320px;
  overflow: hidden;
}
.custom-photo-grid-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ウィンドウ幅が1921px以上になったら、高さを固定せず
   縦横比(約3:2)を維持したまま画像も一緒に大きくする */
@media screen and (min-width: 1921px){
  .custom-photo-grid-item{
    height: auto;
    aspect-ratio: 3 / 2;
  }
}
.custom-btn-area{
  margin-top: 60px;
  margin-bottom: 152px;
  text-align: center;
}
/* バナー内（代表挨拶／事業概要）のボタンだけ専用の余白 */
.custom-btn-area-banner{
  margin-top: 34px;
  margin-bottom: 60px;
}
/* 写真グリッド直下のボタンだけ、上下の余白を調整 */
#index_dis > .custom-btn-area{
  margin-top: 60px;
  margin-bottom: 152px;
  text-align: center;
}
/* 白い背景の上で使うVIEW MORE（最初から紺色塗りつぶし） */
.custom-viewmore-btn-dark{
  color: #fff;
  background: var(--kawai-navy);
  border-color: var(--kawai-navy);
}
@media (hover: hover){
  .custom-viewmore-btn-dark:hover{
    color: var(--kawai-navy);
    background: #fff;
    border-color: var(--kawai-navy);
  }
}


/* -----------------------------------
   5. #index_dis（事業概要バナー＋創業テキスト）
   ※ フリースペースの「事業概要」バナーと内容が重複していないか要確認
------------------------------------ */
#index_dis .index_wide_image{
  position: relative;
}
#index_dis .index_wide_image .image img{
  width: 100%;
  height: 400px;
  object-fit: cover;
}
#index_dis .index_wide_image .caption{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
}


/* -----------------------------------
   6. カスタムバナー（事業概要／代表挨拶）
   #index_freespace 内に直接書かれた .custom-banner-section
------------------------------------ */
.custom-banner-section{
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-bottom: 0;
}
.custom-banner-image{
  position: relative; /* 画像を通常フローに戻し、実寸の縦横比で高さを決めさせる */
}
.custom-banner-img{
  width: 100%;
  height: auto;
  display: block;
}
.custom-banner-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}
.custom-banner-inner{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
}
.custom-banner-title{
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  text-shadow: 0 0 6px rgba(0,0,0,0.4);
}
.custom-viewmore-btn{
  display: inline-block;
  min-width: 200px;
  padding: 22px 134px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 1px solid #fff;
  transition: all 0.3s;
}
.custom-viewmore-btn:hover{
  text-decoration: none;
}
.custom-viewmore-btn-white{
  color: #fff;
  background: var(--kawai-navy);
  border-color: #fff;
}
@media (hover: hover){
  .custom-viewmore-btn-white:hover{
    color: var(--kawai-navy);
    background: #fff;
    border-color: var(--kawai-navy);
  }
}


/* -----------------------------------
   6.5 セクション見出し＋本文（OEM/ODMなど、フリースペースで使う共通パーツ）
   .custom-section-header
------------------------------------ */
.custom-section-header{
  text-align: center;
  max-width: 800px;
  margin: 0 auto 76px;
  padding-top: 140px;
}
.custom-section-title{
  font-family: var(--kawai-font-mincho) !important;
  font-size: 50px;
  font-weight: bold;
  margin: 0 0 24px;
}
.custom-section-desc p{
  font-size: 14px;
  line-height: 250%;
  margin: 0;
}


/* -----------------------------------
   7. OEM/ODM ＆ 自社ブランド（2分割バナー）
   .custom-split-section
------------------------------------ */
.custom-split-section{
  display: flex;
  width: 100%;
}
.custom-split-item{
  position: relative;
  display: block;
  width: 50%;
  overflow: hidden;
  text-decoration: none;
}
.custom-split-img{
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s;
}
.custom-split-item:hover .custom-split-img{
  transform: scale(1.05);
}
.custom-split-label{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 38px;
  text-align: center;
  letter-spacing: 0.1em;
  text-shadow: 0 0 6px rgba(0,0,0,0.5);
  white-space: nowrap;
  line-height: 1.5;
  font-weight: bold;
}
.custom-split-sublabel{
  display: block;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.05em;
}


/* -----------------------------------
   8. 使わなくなったフリースペースを非表示（余白防止）
   代表挨拶・OEM/ODMはfront-page.php側に直接コーディング済みのため、
   #index_freespace（空のまま）が余白を生まないよう非表示にする
------------------------------------ */
#index_freespace{
  display: none !important;
}


/* -----------------------------------
   9. フッターだけ「株式会社カワイ」を追加表示
   （サイトタイトル設定は共通のため、フッターのみCSSで一行追加）
------------------------------------ */
#footer_logo{
  text-align: center;
}
#footer_logo .logo_area::before{
  content: "株式会社カワイ";
  display: block;
  font-family: var(--kawai-font-mincho);
  font-size: 40px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}
#footer_logo .logo{
  font-size: 16px !important;
}


/* -----------------------------------
   10. スマホ専用：ヘッダーロゴの文字色／下部固定フッターバーの配色
------------------------------------ */
.mobile #header_logo .logo a{
  color: #fff !important;
}
.mobile #global_menu li a{
  color: #fff !important;
}
/* スマホ最下部に固定表示される「フッターバー」機能の配色
   実際のクラス名が異なる場合は、要素を検証して書き換えてください */
.dp-footer-bar,
#footer_bar,
.footer-bar{
  background-color: var(--kawai-navy) !important;
}
.dp-footer-bar *,
#footer_bar *,
.footer-bar *{
  color: #fff !important;
}
/* コピーライト行 */
#copyright{
  background-color: var(--kawai-navy) !important;
  color: #fff !important;
}
#copyright a{
  color: #fff !important;
}

/* SPハンバーガーメニュー：a.menu_button::beforeがアイコン本体
   （検証で確認済み）。背景色は変えず、色だけ白反転させる */
.mobile a.menu_button::before{
  filter: invert(1) brightness(2);
}

/* PCヘッダーのリンクホバーは色を変えず、少し薄くするだけに */
.pc #header_logo .logo a:hover,
.pc #global_menu > ul > li > a:hover,
.pc #global_menu li.current-menu-item > a:hover{
  color: #fff !important;
  opacity: 0.7;
}


/* -----------------------------------
   スマホ（〜969px：ORION本体のresponsive.cssと同じブレークポイント）
------------------------------------ */
@media screen and (max-width: 969px){

  /* 代表挨拶／事業概要バナー：文字位置を少し上寄りに調整 */
  .custom-banner-inner{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -38%);
    width: 100%;
    text-align: center;
  }

  /* =========================================================
     SP共通の余白ルール
     ・画面いっぱいに広がっていないブロックの左右余白：20px
     ・コンテンツ（セクション）同士の余白：40px
     ・コンテンツ内のテキストと画像の余白：20px
     ========================================================= */

  /* 左右余白20px（フルブリードのバナー・写真グリッド・分割バナーは対象外） */
  #index_content1 .index_content_header,
  #index_content2 .index_content_header,
  #index_dis .index_content_header3,
  .custom-section-header,
  #footer_top_inner,
  #footer_bottom_inner{
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
  }

  /* コンテンツ同士の間を40pxに統一（二重にならないよう各セクションのmargin/paddingは一旦リセット） */
  #index_content1,
  #index_dis,
  #index_content2,
  #index_custom_sections{
    margin-top: 40px !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  /* #index_content1はmarginが効かなかったのでpaddingに切り替え（二重にならないようmarginは0に） */
  #index_content1{
    margin-top: 0 !important;
    padding-top: 40px !important;
  }

  /* カワイの強み：テキストと画像の間が広すぎるので20pxに詰める（index_box_list側の余白もリセット） */
  #index_content2 .index_box_list{
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* clearfix(:after)が余白を作ってしまっている箇所を無効化 */
  #index_content1 .clearfix:after,
  #index_dis .clearfix:after,
  #index_content2 .clearfix:after{
    content: "" !important;
    height: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
  }

  /* 事業概要バナー：ORION本体と同じく画像の実寸比率で自然に表示（固定高さは廃止） */

  /* コンテンツ内：テキストと画像の間を20pxに統一 */
  #index_content1 .index_content_header,
  #index_dis .index_content_header3,
  #index_content2 .index_content_header{
    margin-bottom: 20px !important;
    padding-bottom: 0 !important;
  }
  .custom-section-header{
    margin-bottom: 34px !important;
    padding-top: 60px !important;
  }
  /* OEM/ODMセクションの本文もSPでは左揃えに */
  .custom-section-desc{
    text-align: left !important;
  }

  /* SP版のボタン上下余白 */
  #index_dis > .custom-btn-area{
    margin-top: 36px;
    margin-bottom: 80px;
  }
  /* カワイの強みボタン（SP）：中央揃え、上下余白のみ調整 */
  .custom-btn-area{
    text-align: center;
    margin-top: 24px;
    margin-bottom: 60px;
  }

  #index_content2 .index_box_list{
    display: block;
  }
  #index_content2 .index_box_list .box{
    width: 100%;
    margin: 0 0 30px 0;
  }
  /* 最後のボックスは次のセクションとの間隔(40px)と二重にならないよう余白ゼロに */
  #index_content2 .index_box_list .box:last-child{
    margin-bottom: 0 !important;
  }
  #index_content2 .index_box_list .box .image img{
    height: auto;
  }
  #index_content2 .index_box_list .box .info .headline{
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
  }
  /* PC版でline-heightを2.2に変更したが、SPは元の1.8のまま維持 */
  #index_content2 .index_box_list .box .info .desc{
    line-height: 1.8;
  }

  .custom-photo-grid{
    gap: 0;
    padding-top: 20px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
  }
  /* slick初期化前（万一JSが効かない場合）のフォールバック：2x2グリッド */
  .custom-photo-grid:not(.slick-initialized){
    display: flex;
    flex-wrap: wrap;
  }
  .custom-photo-grid:not(.slick-initialized) .custom-photo-grid-item{
    flex: 1 1 45%;
  }
  /* slick初期化後：1枚ずつのスライドショー */
  .custom-photo-grid.slick-initialized{
    display: block;
  }
  .custom-photo-grid.slick-initialized .custom-photo-grid-item{
    aspect-ratio: auto;
    height: 280px;
  }
  .custom-photo-grid .slick-dots{
    bottom: -28px;
  }
  /* Previous/Next の文字がそのまま見えてしまう不具合の対策 */
  .custom-photo-grid .slick-prev,
  .custom-photo-grid .slick-next{
    font-size: 0;
    line-height: 0;
    color: transparent;
  }

  /* 企業理念・カワイの強み・創業テキストの見出し/本文をSPで中央揃えに固定 */
  #index_content1 .index_content_header,
  #index_content2 .index_content_header,
  #index_dis .index_content_header3{
    text-align: center !important;
  }
  #index_content1 .index_content_header .headline,
  #index_content2 .index_content_header .headline,
  #index_dis .index_content_header3 .headline{
    text-align: center !important;
  }
  /* 本文（desc）は見出しと違って左揃えに */
  #index_content1 .index_content_header .desc,
  #index_content2 .index_content_header .desc,
  #index_dis .index_content_header3 .desc{
    text-align: left !important;
  }
  /* ただし「カワイが選ばれる理由」だけは中央揃えに戻す */
  #index_content2 .index_content_header .desc{
    text-align: center !important;
  }
  /* SPの見出しサイズを28pxに統一 */
  #index_content1 .index_content_header .headline,
  #index_content2 .index_content_header .headline,
  #index_dis .index_content_header3 .headline,
  #footer_logo .logo_area::before{
    font-size: 28px !important;
  }
  /* SP版：創業テキストの見出し上下余白 */
  #index_dis .index_content_header3 .headline{
    margin-top: 60px !important;
    margin-bottom: 18px !important;
  }
  /* SP版：企業理念・カワイの強みの見出し余白 */
  #index_content1 .index_content_header .headline{
    letter-spacing: 0.08em;
    margin: 0 0 18px 0;
    color: #000;
  }
  #index_content2 .index_content_header .headline{
    margin: 0 0 18px 0;
    color: #000;
  }
  /* SP版：企業理念/創業テキスト/カワイの強みの共通コンテナ */
  .index_content1{
    width: 100% !important;
    padding: 25px 0 28px !important;
  }
  /* カワイの強み：画像は左右20pxの余白をつけて画面いっぱいにしない */
  #index_content2 .index_box_list{
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
  }

  /* フッターのテキストを中央揃えに */
  #footer_logo,
  #footer_top_inner,
  #footer_bottom_inner{
    text-align: center;
  }
  .footer_menu ul.menu,
  #footer_menu_bottom ul.menu{
    text-align: center;
  }
  .footer_menu ul.menu li,
  #footer_menu_bottom ul.menu li{
    float: none;
    display: inline-block;
  }
  #footer_social_link{
    text-align: center;
  }

  .custom-section-title{
    font-size: 28px;
    margin-bottom: 18px;
  }

  /* スマホ版だけ、事業概要／代表挨拶バナーを固定高さ＋クロップ表示に戻す（崩れ対策） */
  .custom-banner-section{
    height: 260px !important;
  }
  .custom-banner-image{
    position: absolute !important;
    inset: 0 !important;
  }
  .custom-banner-img{
    height: 100% !important;
    object-fit: cover !important;
  }

  .custom-banner-title{
    font-size: 28px;
    margin-bottom: 16px;
  }
  .custom-viewmore-btn{
    min-width: 160px;
    padding: 24px 58px;
    font-size: 12px;
  }

  /* OEM/ODMは PC・SPともに横並びのまま、幅だけ縮小 */
  /* スマホ版だけ、固定高さ＋クロップ表示に戻す（崩れ対策） */
  .custom-split-item{
    height: 200px !important;
  }
  .custom-split-img{
    height: 100% !important;
    object-fit: cover !important;
  }
  .custom-split-label{
    font-size: 18px;
  }
}

/* -----------------------------------
   11. スクロールフェードインアニメーション
   コンテンツブロックが画面内に入ったタイミングで
   ふわっと表示されるようにする（.kawai-fade / is-inview はJSで付与）
------------------------------------ */
.kawai-fade{
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.kawai-fade.is-inview{
  opacity: 1;
  transform: translateY(0);
}
/* 動きが苦手な方向けの配慮：OSで「視差効果を減らす」設定時はアニメーションなしで表示 */
@media (prefers-reduced-motion: reduce){
  .kawai-fade{
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* 見出し背景の薄文字（Service / Items 等）だけ、少し遅れて2秒かけてゆっくりフェードイン
   （右から左にスライドしながら表示：位置決め用のtransformに横方向のズレを足して実現） */
.kawai-items-heading-bg.kawai-fade{
  transform: translate(calc(-15% + 60px), -55%) !important;
  transition: opacity 2s ease 1.3s, transform 2s ease 1.3s;
}
.kawai-items-heading-bg.kawai-fade.is-inview{
  transform: translate(-15%, -55%) !important;
}

/* -----------------------------------
   12. ITEMS（製品紹介）ページ専用スタイル
   page-items.php で使用
------------------------------------ */
#kawai_items_page{
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  padding: 70px 0 100px;
}
/* ヒーロー画像の上のタイトル */
#header_image .caption .title{
  font-size: 50px;
}
/* 見出しの後ろに薄く表示する英語ラベル（今後の下層ページ共通で使い回す想定） */
.kawai-items-heading-wrap{
  position: relative;
  width: fit-content;
  margin: 1px auto 28px;
}
/* 沿革（History）内の見出しラッパーだけ下の余白を変える */
.kawai-history-section .kawai-items-heading-wrap{
  margin: 1px auto 28px;
}
/* 代表挨拶（GREETING）ページ専用：ごあいさつ・会社概要の見出し余白 */
.kawai-greeting-page .kawai-items-heading-wrap{
  margin: 1px auto 60px;
}
.kawai-company-section .kawai-items-heading-wrap{
  margin: 0px auto 60px;
}
.kawai-items-heading-bg{
  display: block;
  position: absolute;
  top: 0;
  left: 100%;
  transform: translate(-15%, -55%) !important;
  text-align: left;
  font-size: 102px;
  font-weight: normal;
  letter-spacing: 0.05em;
  color: rgba(0,0,0,0.06);
  white-space: nowrap;
  line-height: 1;
  z-index: 0;
  user-select: none;
}
.kawai-items-heading{
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 42px;
  font-weight: bold;
  margin: 0;
}
.kawai-items-intro{
  text-align: center;
  font-size: 14px;
  line-height: 2.5;
  margin: 0 0 60px;
}
.kawai-items-list{
  display: flex;
  flex-direction: column;
  gap: 90px;
}
.kawai-item-row{
  display: flex;
  align-items: flex-start;
  gap: 60px;
}
/* 偶数行目は画像とテキストの左右を入れ替える（ジグザグレイアウト） */
.kawai-item-row.is-reverse{
  flex-direction: row-reverse;
}
.kawai-item-image{
  flex: 1 1 0;
  min-width: 0;
}
.kawai-item-image img{
  width: 100%;
  height: auto;
  display: block;
}
.kawai-item-text{
  flex: 1 1 0;
  min-width: 0;
}
.kawai-item-title{
  font-family: Arial, "Hiragino Sans", "Yu Gothic Medium", "Meiryo", sans-serif !important;
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 20px;
}
.kawai-item-desc{
  font-size: 16px;
  line-height: 2.5;
}
/* 商品内のリンク（例：「公式ページへ」） */
.kawai-item-link{
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (hover: hover){
  .kawai-item-link:hover{
    color: var(--kawai-navy);
  }
}
.kawai-items-btn-area{
  text-align: center;
  margin-top: 100px;
}

@media screen and (max-width: 969px){
  #kawai_items_page{
    width: 100%;
    padding: 52px 20px 60px;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  #header_image .caption .title{
    font-size: 20px;
  }
  .kawai-items-heading-wrap{
    width: fit-content;
    margin: 0 0 16px;
  }
  /* PC用に「auto」で中央寄せにしていた指定がSPにまで効いてしまうのを防ぐ */
  .kawai-history-section .kawai-items-heading-wrap,
  .kawai-company-section .kawai-items-heading-wrap,
  .kawai-greeting-page .kawai-items-heading-wrap{
    margin: 0 0 26px;
  }
  .kawai-contact-page .kawai-items-heading-wrap{
    position: relative;
    width: fit-content;
    margin: 1px 0 16px !important;
  }
  .kawai-items-heading-bg{
    left: 100%;
    top: 0;
    transform: translate(-14%, -52%) !important;
    text-align: left;
    font-size: 56px;
  }
  .kawai-items-heading-bg.kawai-fade{
    transform: translate(calc(-14% + 40px), -52%) !important;
  }
  .kawai-items-heading-bg.kawai-fade.is-inview{
    transform: translate(-14%, -52%) !important;
  }
  .kawai-items-heading{
    font-size: 28px;
    margin-bottom: 0;
    text-align: left;
  }
  .kawai-items-intro{
    font-size: 14px;
    margin-bottom: 40px;
    text-align: left;
  }
  .kawai-items-list{
    gap: 50px;
  }
  /* スマホは常に画像が上、テキストが下の縦積みに統一 */
  .kawai-item-row,
  .kawai-item-row.is-reverse{
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
  }
  .kawai-item-title{
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.6;
  }
  .kawai-item-desc{
    font-size: 14px;
  }
  .kawai-items-btn-area{
    margin-top: 60px;
  }
}

/* -----------------------------------
   13. SERVICE（事業概要）ページ：沿革（History）年表
   page-service.php で使用
------------------------------------ */
.kawai-history-section{
  margin-top: 185px;
}
.kawai-history-subheading{
  text-align: center;
  color: inherit;
  font-size: 42px;
  font-weight: bold;
  margin: 0 0 54px;
}
/* 数字部分はTimes New Roman系ではなく、周りの漢字と同じ日本語明朝フォントの数字を使う */
.kawai-history-subheading .kawai-num{
  font-family: "Yu Mincho", "游明朝", "游明朝体", "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
}
.kawai-history-list{
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e5e5e5;
}
.kawai-history-row{
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 34px 160px 34px 0;
  border-bottom: 1px solid #e5e5e5;
  position: relative;
}
.kawai-history-year{
  flex: 0 0 232px;
  font-size: 16px;
  font-weight: normal;
}
.kawai-history-text{
  flex: 1 1 0;
  font-size: 16px;
  font-weight: normal;
  line-height: 1.8;
}
.kawai-history-image{
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 140px;
}
.kawai-history-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media screen and (max-width: 969px){
  .kawai-history-section{
    margin-top: 60px;
  }
  .kawai-history-subheading{
    display: none;
  }
  .kawai-history-row{
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 16px 0;
    position: static;
  }
  .kawai-history-year{
    flex: 0 0 100%;
    font-size: 14px;
    font-weight: normal;
  }
  .kawai-history-text{
    flex: 1 1 auto;
    font-size: 14px;
    font-weight: normal;
  }
  .kawai-history-image{
    display: none;
  }
}

/* -----------------------------------
   14. STRENGTH（カワイの強み）ページ
   page-strength.php で使用
------------------------------------ */
.kawai-strength-page .kawai-items-heading-wrap{
  position: relative;
  width: fit-content;
  margin: 1px auto 28px;
}
.kawai-strength-list{
  display: flex;
  flex-direction: column;
  gap: 120px;
}
.kawai-strength-item{
  text-align: center;
}
.kawai-strength-title{
  font-size: 42px;
  font-weight: bold;
  margin: 0 0 60px;
}
.kawai-strength-image{
  margin: 0 0 16px;
}
.kawai-strength-image img{
  width: 100%;
  height: auto;
  display: block;
}
.kawai-strength-desc{
  text-align: left;
  font-size: 16px;
  line-height: 2.2;
}

@media screen and (max-width: 969px){
  .kawai-strength-page .kawai-items-heading-wrap{
    position: relative;
    width: fit-content;
    margin: 1px 0 18px;
  }
  .kawai-strength-list{
    gap: 50px;
  }
  .kawai-strength-title{
    font-size: 22px;
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.5;
  }
  .kawai-strength-image{
    margin-bottom: 16px;
  }
  .kawai-strength-desc{
    font-size: 14px;
  }
}

/* -----------------------------------
   15. GREETING（代表挨拶）ページ
   page-greeting.php で使用
------------------------------------ */
/* 会社概要テーブル：沿革の年表と同じ見た目を流用 */
.kawai-company-list .kawai-history-year{
  flex: 0 0 200px;
  font-weight: bold;
}
.kawai-office-row{
  display: flex;
  gap: 30px;
  margin-top: 90px;
}
.kawai-office-image,
.kawai-office-map{
  flex: 1 1 0;
  min-width: 0;
  height: 320px;
}
.kawai-office-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kawai-office-map iframe{
  width: 100%;
  height: 100%;
  display: block;
}

@media screen and (max-width: 969px){
  .kawai-office-row{
    flex-direction: column;
    gap: 20px;
    margin-top: 50px;
  }
  .kawai-office-image,
  .kawai-office-map{
    height: 220px;
  }
  .kawai-company-list .kawai-history-year{
    flex: 0 0 100%;
  }
}

/* -----------------------------------
   16. CONTACT（お問い合わせ）ページ：Contact Form 7 のデザイン調整
   page-contact.php で使用
------------------------------------ */
/* お問い合わせ見出しの余白（PCのみ、ITEMS等の見出しには影響しない） */
.kawai-contact-page .kawai-items-heading-wrap{
  position: relative;
  width: fit-content;
  margin: 1px auto 60px;
}
.kawai-contact-form{
  max-width: 700px;
  margin: 0 auto;
}
.wpcf7{
  width: 100%;
  border: none;
  background: none;
}
.wpcf7 form{
  margin: 0;
}
.wpcf7 p{
  margin-bottom: 0;
  font-size: 16px;
}
.kawai-contact-form .wpcf7-form label,
.kawai-contact-form .wpcf7-form p > br + span{
  display: block;
}
.kawai-contact-form .req{
  color: #d13c3c;
  margin-left: 4px;
  font-size: 13px;
}
.kawai-contact-form .wpcf7-form-control-wrap{
  display: block;
  margin-bottom: 30px;
}
.kawai-contact-form input.wpcf7-form-control:not([type="submit"]),
.kawai-contact-form textarea.wpcf7-form-control{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--kawai-navy);
  border-radius: 0px;
  padding: 12px 14px;
  font-size: 15px;
  background: #f2f2f2;
}
.kawai-contact-form textarea.wpcf7-form-control{
  min-height: 160px;
  padding: 14px;
}
.kawai-contact-form input.wpcf7-form-control:focus,
.kawai-contact-form textarea.wpcf7-form-control:focus{
  outline: none;
  border-color: var(--kawai-navy);
  background: #fff;
  box-shadow: 0 0 0 1px var(--kawai-navy);
}
.kawai-contact-submit{
  text-align: center;
  margin-top: 50px;
}
/* 送信ボタンはITEMS等の下層ページと全く同じデザイン（.custom-viewmore-btn-darkそのもの）にする */
.kawai-contact-form input.wpcf7-submit[type="submit"]{
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  display: inline-block !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  box-sizing: content-box !important;
  min-width: 200px !important;
  height: 58px !important;
  padding: 0 134px !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  letter-spacing: 0.1em !important;
  line-height: 58px !important;
  vertical-align: middle !important;
  text-align: center !important;
  color: #fff !important;
  background: var(--kawai-navy) !important;
  border: 1px solid var(--kawai-navy) !important;
  border-radius: 0 !important;
  cursor: pointer;
  transition: all 0.3s;
}
@media (hover: hover){
  .kawai-contact-form input.wpcf7-submit[type="submit"]:hover{
    color: var(--kawai-navy) !important;
    background: #fff !important;
    border-color: var(--kawai-navy) !important;
  }
}
/* 送信ボタンの下に入り込んでレイアウトを崩していたローディング用スピナーを無効化 */
.kawai-contact-form .wpcf7-spinner{
  display: none !important;
}
.kawai-contact-form .wpcf7-not-valid-tip{
  font-size: 12px;
  color: #d13c3c;
  margin-top: 6px;
}
.kawai-contact-form .wpcf7-response-output{
  margin: 30px 0 0;
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 14px;
}

@media screen and (max-width: 969px){
  .kawai-contact-form .wpcf7-form p{
    margin-bottom: 0;
  }
  .kawai-contact-form .wpcf7-form-control-wrap{
    margin-bottom: 26px;
  }
  .kawai-contact-form textarea.wpcf7-form-control{
    min-height: 120px;
  }
  .kawai-contact-form input.wpcf7-submit[type="submit"]{
    min-width: 160px !important;
    padding: 0 58px !important;
    height: 60px !important;
    line-height: 60px !important;
    font-size: 12px !important;
  }
}

/* -----------------------------------
   17. POLICY（プライバシーポリシー）ページ：本文の読みやすさ調整
   page-policy.php で使用
------------------------------------ */
.kawai-policy-content{
  max-width: 900px;
  margin: 0 auto;
}
.kawai-policy-content h2{
  font-size: 22px;
  font-weight: bold;
  margin: 60px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--kawai-navy);
}
.kawai-policy-content h2:first-child{
  margin-top: 0;
}
.kawai-policy-content p{
  font-size: 15px;
  line-height: 2;
  margin: 0 0 24px;
}
.kawai-policy-content strong{
  font-weight: bold;
}

@media screen and (max-width: 969px){
  .kawai-policy-content h2{
    font-size: 18px;
    margin: 40px 0 16px;
  }
  .kawai-policy-content p{
    font-size: 14px;
    line-height: 1.9;
  }
}

/* -----------------------------------
   18. SERVICE（事業概要）ページ：見出し下の幅いっぱいの画像
   page-service.php で使用
------------------------------------ */
.kawai-service-wide-image{
  margin: 0 0 90px;
  overflow: hidden;
}
.kawai-service-wide-image img{
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

@media screen and (max-width: 969px){
  .kawai-service-wide-image{
    margin: 0 0 50px;
    max-width: 100%;
  }
}
