/* --------------------------------------------------
   固定ヘッダー（トップは透明 → スクロールで白に変化）
   ロゴ中央寄せナビ ＋ 電話ボタン ＋ ハンバーガー
-------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  z-index: 999;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none;
}

/* ロゴ初期状態（縮小） */
.site-header .logo-img {
  height: 40px;
  transform: none;
}

/* JS で data-ready="1" が付与されたらアニメ有効 */
.site-header[data-ready="1"] .logo-img {
  transition: height 0.8s ease-in-out, transform 0.8s ease-in-out;
  transform-origin: left center;
  will-change: transform;
}

/* スクロール後に「拡大」状態に変化 */
.site-header.enlarge .logo-img {
  height: 50px;
  transform: scale(1.05);
}

/* スクロール時：背景白＋影追加 */
.site-header.scrolled {
  background-color: #ffffff !important;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------
   ヘッダー内構造
-------------------------------------------------- */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  padding: 0 20px;
  flex-wrap: nowrap;
}

.header-left {
  flex-shrink: 0;
}

.header-center {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  padding-left: 20px;
}

.header-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* --------------------------------------------------
   ロゴ
-------------------------------------------------- */
.logo {
  display: flex;
  align-items: center;
  margin-left: 10px;
  margin-top: 5px;
}

.logo img {
  height: 60px;
  width: auto;
  max-height: 70px;
  display: block;
}

/* 白黒ロゴ切り替え */
.logo-img.logo-white {
  display: block;
}
.logo-img.logo-black {
  display: none;
}

.site-header.scrolled .logo-img.logo-white {
  display: none;
}
.site-header.scrolled .logo-img.logo-black {
  display: block;
}

/* モバイルロゴ少し小さく */
@media screen and (max-width: 768px) {
  .logo img {
    height: 50px;
    margin-top: 6px;
  }
}

/* --------------------------------------------------
   ナビゲーションメニュー（PC時）
-------------------------------------------------- */
.main-nav {
  display: flex;
}

.pc-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pc-menu li {
  text-align: center;
}

.pc-menu li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  display: inline-block;
  line-height: 1;
  transition: color 0.3s ease;
}

.pc-menu li a:hover {
  text-decoration: underline;
}

/* スクロール後：文字色黒 */
.site-header.scrolled .pc-menu li a {
  color: #333 !important;
}

/* --------------------------------------------------
   サブページ用：最初から白背景
-------------------------------------------------- */
.site-header.subpage {
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-header.subpage .pc-menu li a {
  color: #333;
}

.site-header.subpage .logo-img.logo-white {
  display: none;
}
.site-header.subpage .logo-img.logo-black {
  display: block;
}

/* --------------------------------------------------
   ハンバーガー（共通設定・PCでは非表示）
-------------------------------------------------- */
:root {
  --menu-anim: 0.6s;
}

.hamburger {
  display: none;
  font-size: 1.5em;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  z-index: 10001;
  transition: color var(--menu-anim) ease;
}

.site-header.scrolled .hamburger,
.site-header.subpage .hamburger {
  color: #333;
}

/* --------------------------------------------------
   電話ボタン
-------------------------------------------------- */
.call-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.call-button img {
  width: 26px;
  height: 26px;
}

.call-button:hover {
  opacity: 0.7;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .call-button {
    width: 46px;
    height: 46px;
	  top: 12px !important;   /* ← ここを好きな位置に調整 */
    right: 45px !important; /* ← 右側からの距離も調整可 */
  }
}

/* --------------------------------------------------
   SPメニュー共通（初期状態では非表示）
-------------------------------------------------- */
.sp-menu-inner,
.sp-menu-links,
.sp-menu-lang {
  display: none;
}

/* --------------------------------------------------
   レスポンシブ対応：スマホでは縦並び
   1024px 以下でハンバーガー＆オーバーレイメニュー
-------------------------------------------------- */
@media screen and (max-width: 1024px) {
  .header-inner {
    height: 72px;
    padding: 0 12px;
  }

  /* PCメニューは消す */
  .pc-menu {
    display: none;
  }

 /* 完全に透けないメニューバックグラウンド */
.main-nav {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: #ffffff !important;  /* ← 完全不透明の白 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--menu-anim) ease,
    transform var(--menu-anim) ease,
    visibility 0s linear var(--menu-anim);
  pointer-events: none;
  display: block;
}

.main-nav.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
  pointer-events: auto;
  background-color: #ffffff !important;  /* ← active でも完全白 */
}
  /* 中身ラッパー */
  .sp-menu-inner {
    display: block;
    max-width: 520px;
    margin: 0 auto;
  }

  /* 上部ヘッダー（MENU + CLOSE） */
  .sp-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }

  .sp-menu-header-label {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #888;
  }

  .sp-menu-close {
    border: none;
    background: none;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    color: #333;
  }

  /* メイン項目 */
  .sp-menu-main {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
  }

  .sp-menu-main li {
    border-bottom: 1px solid #e4e4e4;
  }

  .sp-menu-main li a {
    display: block;
    padding: 14px 4px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
    text-decoration: none;
  }

  /* 下の細かなリンク群（2列グリッド） */
  .sp-menu-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid #e4e4e4;
    border-bottom: 1px solid #e4e4e4;
    margin: 16px 0;
  }

  .sp-menu-links a {
    display: block;
    padding: 10px 8px;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    border-right: 1px solid #e4e4e4;
    border-bottom: 1px solid #e4e4e4;
  }

  .sp-menu-links a:nth-child(2n) {
    border-right: none;
  }

  /* 言語切替ボタン */
  .sp-menu-lang {
    display: flex;
    max-width: 320px;
    margin: 18px auto 0;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #e4e4e4;
  }

  .sp-menu-lang button {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
  }

  .sp-menu-lang button.is-active {
    background: #e60012;   /* 赤っぽく */
    color: #fff;
  }

  /* ハンバーガー */
  .hamburger {
    display: block;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10001;
    color: #fffff;
  }

  /* メニュー中は白背景＋ハンバーガーもグレー */
  body.nav-open .hamburger {
    color: #fffff;
  }

  /* お問い合わせアイコン：ハンバーガーの左 */
.contact-icon-button {
  position: fixed;
  top: 16px;
  right: 64px;
  z-index: 10001;
  display: flex;
}
  /* メニュー表示中は背景スクロール停止 */
  body.nav-open {
    overflow: hidden;
  }
}

/* --------------------------------------------------
   フェードインアニメーション
-------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* トップ画像のフェード＆ズーム */
.top-image {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.top-image.show {
  opacity: 1;
  transform: scale(1);
}
/* --------------------------------------------------
   メニューオープン時の全画面ホワイトオーバーレイ
   （背景を完全に隠す）
-------------------------------------------------- */
body.nav-open::before {
  content: "";
  position: fixed;
  inset: 0;                 /* 画面全体 */
  background: #ffffff;      /* 完全不透明の白 */
  z-index: 900;             /* 背景動画より前、ヘッダー/メニューより後ろ */
}

/* ヘッダーとSPメニューはその上に表示されるように */
.site-header {
  z-index: 999;
}

@media screen and (max-width: 1024px) {
  .main-nav {
    z-index: 1000;          /* オーバーレイとヘッダーより前 */
  }
}
/* --------------------------------------------------
   電話アイコン（白 ⇔ グレー切り替え）
-------------------------------------------------- */
.phone-icon {
  width: 28px; /* 必要なら今のサイズに合わせて調整 */
  height: auto;
  display: inline-block;
}

/* デフォルト：トップ画の上では白アイコンだけを表示 */
.phone-icon--gray {
  display: none;
}

/* ▼ スクロール時 or 下層ページの「白帯ヘッダー」ではグレーを表示 */
.site-header.scrolled .phone-icon--white,
.site-header.subpage .phone-icon--white {
  display: none;
}

.site-header.scrolled .phone-icon--gray,
.site-header.subpage .phone-icon--gray {
  display: inline-block;
}
/* --------------------------------------------------
   お問い合わせメールアイコン
-------------------------------------------------- */
.contact-icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-icon-button:hover {
  opacity: 0.7;
  transform: translateY(-2px);
}

.mail-icon {
  width: 26px;
  height: 26px;
  display: inline-block;
}

/* デフォルト：トップ画の上では白アイコン */
.mail-icon--black {
  display: none;
}

/* スクロール時 or 下層ページでは黒アイコン */
.site-header.scrolled .mail-icon--white,
.site-header.subpage .mail-icon--white {
  display: none;
}

.site-header.scrolled .mail-icon--black,
.site-header.subpage .mail-icon--black {
  display: inline-block;
}
/* --------------------------------------------------
   English header: phone icon layout reset
   既存の .call-button ルールに引っ張られないように
   .en-call-button だけで位置を管理する
-------------------------------------------------- */

/* PC：ヘッダー右側で自然に並べる */
.call-button.en-call-button {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  margin: 0 !important;
  width: 38px !important;
  height: 38px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: auto !important;
}

.call-button.en-call-button img {
  width: 26px !important;
  height: 26px !important;
}

/* タブレット：ハンバーガーの左に固定 */
@media screen and (max-width: 1024px) {
  .call-button.en-call-button {
    position: fixed !important;
    top: 16px !important;
    right: 68px !important;
    left: auto !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    z-index: 10001 !important;
  }

  .call-button.en-call-button img {
    width: 24px !important;
    height: 24px !important;
  }
}

/* スマホ：少し下・少し左 */
@media screen and (max-width: 600px) {
  .call-button.en-call-button {
    position: fixed !important;
    top: 16px !important;
    right: 68px !important;
    left: auto !important;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    z-index: 10001 !important;
  }

  .call-button.en-call-button img {
    width: 22px !important;
    height: 22px !important;
  }
}