/* メニュー設定 */
/* -------------------PC------------------- */
@media screen and (min-width: 769px) {
  .main-menu {
    display: flex;
    justify-content: flex-end;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .main-menu li a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    padding: 8px 12px;
    transition: opacity 0.3s ease;
  }

  .main-menu li a:hover {
    opacity: 0.7;
  }
  
  nav.site-nav {
      flex: auto;
  }

  .main-menu li.current-menu-item a {
  position: relative;
}

.main-menu li.current-menu-item a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 3px;
  background-color: #fff;
  transition: width 0.3s ease;
}

}



/* ハンバーガーアイコン */
.hamburger {
  display: none; /* ← これを追加して初期状態で非表示に */
  position: relative;
}
.hamburger__line {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: #ffffff;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger__line:nth-child(1) { top: 0; }
.hamburger__line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger__line:nth-child(3) { bottom: 0; }

.hamburger.active .hamburger__line:nth-child(1) {
  transform: rotate(45deg);
  top: 40%;
}
.hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger__line:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 50%;
}


/* ハンバーガーアイコン SP */
@media screen and (max-width: 768px) {
  .hamburger {
    display: block; /* ← SP時に表示 */
    width: 30px;
    height: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
  }
/*   .menu-overlay--sp {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg-menu);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .menu-overlay--sp.active {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-overlay--sp .main-menu {
    display: flex;
    flex-direction: column;
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
  }

  .menu-overlay--sp .main-menu li a {
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
  } */
}



/* スクロールロック設定 */
.scroll-lock {
  overflow: hidden;
  height: 100vh;
}

/* PC表示で横一列に */
.site-header__inner {
    display: flex;
    margin: 20px 40px 20px;
}

/* ロゴ設定 */
h1.site-logo {
    width: 11.31%;
    display: inline-block;
    margin: auto;
    
}
h1.site-logo a img {
    width: 100%;
}

@media screen and (max-width: 768px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: var(--color-bg-menu);
  }

  .site-header__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 0 auto;
  }

  h1.site-logo {
    width: 8rem;
    max-width: 600px;
    margin: initial;
    z-index: 10000;
  }
}

/*  表示設定 */
.desktop-only {
  display: block;
}
@media screen and (max-width: 768px) {
  .desktop-only {
    display: none;
  }
  .site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
  }

}

/* PC用：TOPページだけMVの下にメニュー */
.nav-after-hero {
  display: block;
}

@media screen and (max-width: 768px) {
  .nav-after-hero {
    display: none;
  }

  .site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
  }
}



@media screen and (max-width: 768px) {
  .menu-overlay {
    display: none;
  }
}


/* 追加CSS */
/* Sticky header base */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent;
  transition: background-color .2s, box-shadow .2s, backdrop-filter .2s;
  will-change: background-color, box-shadow, backdrop-filter;
}
.site-header.is-stuck{
  background: rgba(41,41,41,.92);
  backdrop-filter: saturate(180%) blur(8px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.admin-bar .site-header{ 
  top:32px;
 }

 @media (max-width:600px){ 
  .admin-bar .site-header{ top:46px; } 
}

.site-header__inner{
  display:flex;
  align-items:center;
  max-width:1200px;
  margin:0 auto;
  padding:10px 20px 10px;
}

/* logo */
.site-logo img{ 
  height:28px; 
  width:auto;
 }
.site-title{ 
  font-weight:700;
 }

/* PCナビ */
.site-nav{ 
  margin-left:auto;
 }

.main-menu{ 
  display:flex;
  gap:32px;
  list-style:none;
  margin:0;
  padding:0; }

.main-menu > li > a{
  display:inline-block;
  padding:10px 0;
  text-decoration:none;
}

.main-menu > li > a::after{
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 3px;
  background-color: #fff;
  transition: width 0.3s ease;
}

/* ハンバーガー（SP表示） */
.hamburger{
  display:none;
  position:relative;
  width:28px;
  height:22px;
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
}

.hamburger__line{
  position:absolute;
  left:0;
  right:0;
  height:2px;
  transform-origin:center;
  transition:transform .2s, opacity .2s, top .2s;
}

.hamburger__line:nth-child(1){ top:0; }
.hamburger__line:nth-child(2){ top:10px; }
.hamburger__line:nth-child(3){ top:20px; }

/* SPレイアウト */
@media (max-width:600px){
  .hamburger{
    display:inline-block;
    margin-left:auto;
  }
  
  .site-nav{
    position:fixed;
    inset:0 0 0 auto;
    width:min(86vw,360px);
    background:#292929;
    transform:translateY(100%);
    transition:transform .25s;
    z-index:1001;
  }

  .main-menu{ 
    flex-direction:column; 
    gap:0; 
    padding:24px;
   }

  .main-menu > li > a{ 
    padding:0;
    text-align:center;
  }

  .menu-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.36);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s; 
    z-index:1000;
  }

  /* 開いた状態（JSで .is-open を付与） */
  .site-header.is-open .site-nav{ transform:translateY(0%); }
  .site-header.is-open .menu-overlay{ opacity:1; pointer-events:auto; }
  .site-header.is-open .hamburger__line:nth-child(1){ top:10px; transform:rotate(45deg); }
  .site-header.is-open .hamburger__line:nth-child(2){ opacity:0; }
  .site-header.is-open .hamburger__line:nth-child(3){ top:10px; transform:rotate(-45deg); }
}

/* 動き控えめ設定に配慮 */
@media (prefers-reduced-motion:reduce){
  .site-header, .site-nav, .menu-overlay, .hamburger__line{ transition:none !important; }
}

/* ==== fix pack: append at end of _header.css ==== */

/* 1) Desktopだけ sticky に限定（SPの fixed をつぶさない） */
@media (min-width: 769px){
  .site-header{ position: sticky; top: 0; }
}

/* 2) SPは必ず fixed（MVの上に来る）＋MVを下げる */
@media (max-width: 768px){
  .site-header{ position: fixed !important; top: 0; z-index: 1000; }
  .mv{ margin-top: 56px; } /* ヘッダー高さぶんだけ下げる。必要なら数値調整OK */
}

/* 3) rgbaの誤記修正（背景とオーバーレイが透明になる問題） */
.site-header.is-stuck{
  background: rgba(41,41,41,0.92);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
@media (max-width: 768px){
  .menu-overlay{ background: rgba(0,0,0,0.36); }
}

/* 4) SPメニューは“右から全幅スライド” */
@media (max-width: 768px){
  .site-nav{
    inset: 0 0 0 auto;
    width: 100vw;
    transform: translateX(100%);   /* ← YじゃなくX */
  }
  .site-header.is-open .site-nav{ transform: translateX(0); }
}

/* 5) PCの下線を“現在ページのみ”に限定 */
@media (min-width: 769px){
  .main-menu > li > a::after{ content: none; }
  .main-menu > li.current-menu-item > a{ position: relative; }
  .main-menu > li.current-menu-item > a::after{
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 5px;
    width: 30%;
    height: 2px;
    background: #fff;
  }
}

/* ==== SPドロワー修正（追記） ==== */
@media (max-width:1024px){
  /* ヘッダーは上に固定（既にあればOK） */
  .site-header{ position: fixed; top:0; left:0; right:0; z-index: 2000; }

  /* 右パネル：幅を全幅ではなく 86vw/最大360px に限定 */
  .site-nav{
    position: fixed;
    top: var(--header-h, 56px);
    right: 0; bottom: 0; left: auto;
    width: min(100vw);
    height: calc(100vh - var(--header-h, 56px));
    background: #292929;
    transform: translateX(100%);          /* 初期は隠す（右へ退避） */
    transition: transform .25s ease;
    z-index: 1999;                         /* ヘッダーより下、オーバーレイより上 */
    overflow-y: auto;
    opacity: .9;
  }

  /* オーバーレイ（画面全体を覆うが、ヘッダーより下） */
  .menu-overlay{
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.36);          /* ← 小数点ありの正しいrgba */
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1998;
  }

  /* 開いた状態：右パネルを表示／オーバーレイを有効化 */
  .site-header.is-open .site-nav{ transform: translateX(0); }
  .site-header.is-open .menu-overlay{ opacity: 1; pointer-events: auto; }

  /* ハンバーガーは常に最前面（×化もここで） */
  .hamburger{
    position: relative;
    z-index: 2001;
  }

  .hamburger__line{ 
    position:absolute;
    left:0;
    right:0;
    height:2px;
    transition: transform .2s, opacity .2s, top .2s; }
    
  .hamburger__line:nth-child(1){ top:0; }
  .hamburger__line:nth-child(2){ top:10px; }
  .hamburger__line:nth-child(3){ top:20px; }

  .site-header.is-open .hamburger__line:nth-child(1){ top:10px; transform: rotate(45deg); }
  .site-header.is-open .hamburger__line:nth-child(2){ opacity: 0; }
  .site-header.is-open .hamburger__line:nth-child(3){ top:10px; transform: rotate(-45deg); }

  /* MV（メインビジュアル）をヘッダー分だけ下げる（被り防止） */
  .mv{ margin-top: var(--header-h, 56px); }
}

/* PCのスクロール時の見た目（rgbaの小数点ミス修正も兼ねて） */
.site-header.is-stuck{
  background: rgba(41,41,41,0.92);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}


/* ===== 価格ページだけ横はみ出しを封じる（安全網） ===== */
.is-price-page, .is-price-page html, .is-price-page body{
  width: 100%;
  max-width: 100%;
  overflow-x: clip;   /* 対応が古い端末向けに次も併用 */
  overflow-x: hidden;
}

/* 価格ページの「横幅を広げがち」な要素を強制的に収める */
.is-price-page .site-header,
.is-price-page .site-footer,
.is-price-page .mv,
.is-price-page .inner_area,
.is-price-page .site-nav,
.is-price-page .menu-overlay,
.is-price-page iframe,
.is-price-page img,
.is-price-page table,
.is-price-page .wp-block-table{
  max-width: 100%;
}

/* もし中に 100vw 指定がある場合の殺し（保険） */
.is-price-page [style*="width: 100vw"]{ width: 100% !important; }

/* 表や長い行は横スクロールで逃がす（本文がはみ出さない） */
.is-price-page .table-wrap,
.is-price-page .wp-block-table{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== 料金ページだけの横ズレ撲滅セット ===== */
body.is-price-page{
  /* ドキュメント横スクロールそのものを封じる */
  overflow-x: clip;
}
@supports not (overflow-x: clip){
  body.is-price-page{ overflow-x: hidden; } /* 互換用 */
}

/* ヘッダーを“ビューポート基準”に強制（ドキュメント幅の影響を受けない） */
body.is-price-page .site-header{
  position: fixed;          /* 下層は固定仕様 */
  top: 0; inset-inline: 0;  /* left:0; right:0; と同義。ビューポートに張り付く */
  margin: 0;
  box-sizing: border-box;
  transform: none !important;   /* 親の transform 影響でのズレを無効化 */
  translate: 0 !important;      /* 念のため */
  max-width: 100vw;             /* これで“太ったドキュメント幅”に引っ張られない */
  z-index: 2000;
}

/* ヘッダー内側が横に広がり過ぎないようにガード（数値はテーマに合わせて） */
body.is-price-page .site-header__inner{
  max-width: 1200px;
  width: min(100%, 1200px);
  margin: 0 auto;
  padding-inline: clamp(12px, 4vw, 24px);
  box-sizing: border-box;
}

/* 念のため：価格ページ内の“広がりがちな子要素”を強制クリップ */
body.is-price-page .site-nav,
body.is-price-page .menu-overlay,
body.is-price-page img,
body.is-price-page iframe,
body.is-price-page table,
body.is-price-page .wp-block-table{
  max-width: 100%;
}

/* もし off-canvas メニューが幅で押し広げてる場合の保険 */
@media (max-width:1024px){
  body.is-price-page .site-nav{
    position: fixed; right: 0; left: auto; /* 右ドロワーを確実に画面内基準に */
    transform: translateX(100%);           /* 初期は画面外へ */
  }
}

/* TOPページのMVスライダ */
.mv-slider,
.mv-static {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}



.slide,
.mv-static img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 0;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.mv-caption {
  position: absolute;
  bottom: 10%;
  left: 5%;
  z-index: 2;
  color: #fff;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* ===== MV(トップ/下層)の高さをPC/SPで分岐して管理 ===== */
:root{
  /* お好みで微調整OK */
  --mv-top-pc: clamp(320px, 56vh, 620px);  /* トップ（PC） */
  --mv-top-sp: clamp(180px, 44vh, 320px);  /* トップ（SP） */
  --mv-sub-pc: clamp(220px, 36vh, 440px);  /* 下層（PC） */
  --mv-sub-sp: clamp(160px, 32vh, 260px);  /* 下層（SP） */
}

/* コンテナの共通ベース */
.mv-slider, .mv-static{
  position: relative;
  overflow: hidden;
  margin: 0;              /* 謎余白の温床を潰す */
  line-height: 0;         /* 画像のインライン隙間を潰す */
}

/* スライド面：全面フィット＆フェード */
.slide{ 
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .6s ease;
}
.slide.active{ opacity: 1; z-index: 1; }

/* 画像は必ず全面フィットさせる（余白ゼロ） */
.slide img,
.mv-static img{
  width: 100%; height: 100%;
  object-fit: cover; 
  display: block;        /* 画像下の隙間対策 */
}

/* キャプション：ど真ん中固定 */
.mv-caption{
  position: absolute; 
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(63vw, 1100px);
  text-align: center;
  color: #fff;
  padding: clamp(8px, 2vw, 16px);
  line-height: 1.6;
  pointer-events: none;  /* 文字でクリック塞がない */
  height: fit-content;
}
.mv-caption h2{ 
  margin: 0 0 .4em; 
  font-size: clamp(22px, 3.4vw, 44px); 
  line-height: 1.2;
  display: inline-block;
  width: 100%;
}
.mv-caption p{ 
  margin: 0; 
  font-size: clamp(14px, 1.6vw, 18px); 
}

/* === 高さの適用（トップ＝スライダー／下層＝静止画像） === */
@media (max-width:600px){
  .home .mv-slider{
     min-height: var(--mv-top-pc); 
    }

  body:not(.home) 
  .mv-static{ 
    min-height: var(--mv-sub-pc); 
  }

  .mv-caption {  
    width: 93vw;
  }
  
  .mv-caption h2{ 
    font-size: 24px;
    text-align: center;
    padding: 0;
  }
  .mv-slider .mv-caption h2 {
      text-align: justify;
    }

  .mv-caption p {
    text-align: justify;
  }
}

@media (max-width:1024px){
  .home .mv-slider{ min-height: var(--mv-top-sp); }
  body:not(.home) .mv-static{ min-height: var(--mv-sub-sp); }
  /* SPはヘッダー固定ぶんだけ押し下げる（被り防止） */
  .mv-slider, .mv-static{ margin-top: var(--header-h, 56px); }
}

/* もし昔の .mv 用ルールが残っていたら無効化して干渉を防ぐ */
.mv{ height: auto !important; min-height: 0 !important; margin: 0 !important; }

/* ========== 下層MV（.mv-static）の高さを強制的にコントロール ========== */
:root{
  --mv-sub-pc: clamp(200px, 30vh, 380px);
  --mv-sub-sp: clamp(160px, 28vh, 240px);
}

/* まず固定heightを無効化（min-heightが効くように） */
.mv-static{ 
  position: relative;
  height: auto !important;   /* ← これ超重要 */
  overflow: hidden;
}

/* 画像はコンテナにフィット */
.mv-static img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;            /* 画像の下の隙間を消す */
}

/* PC：下層ページのみ適用（トップには当てない） */
@media (min-width:1025px){
  body:not(.home) .mv-static{ 
    min-height: var(--mv-sub-pc) !important;   /* ← 必要なら !important で勝ちにいく */
  }
}

/* SP：下層ページ用 */
@media (max-width:1024px){
  body:not(.home) .mv-static{ 
            display: block;
        aspect-ratio: 2 / 1;
        object-fit: cover;
        /* ヘッダー固定ぶんを押し下げ */
  }
}

/* 万一、旧 .mv の指定が干渉していたら無効化しておく */
.mv{ height:auto !important; min-height:0 !important; }

/* header中途半端サイズの調整 */
@media (max-width: 1024px) and (min-width: 601px){
  .site-header__inner {
    justify-content: space-between;
  } 
  .hamburger {
    position: relative;
    z-index: 2001;
    display: block;
  }
  .main-menu {
    display: block;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding-top: 40px;
    text-align: center;
  }
}