@charset "UTF-8";
/* ======================== */
/* 共通スタイル（モバイル優先） */
/* ======================== */
/* .header {
  background-color: var(--primary);
  color: var(--white);
  position: relative;
} */
 body {
  padding-top: 100px; /* ヘッダーの高さに合わせる */
  font-family: 'Noto Sans JP', sans-serif;
}
.header {
  background-color: #f2f2f2;
  color: var(--white);
  position: fixed;   /* ← fixed に変更 */
  top: 0;            /* 画面上部に固定 */
  left: 0;
  width: 100%;       /* 横幅いっぱいに */
  z-index: 1200;     /* ナビより上に表示 */
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-logo{
  padding-left: 50px;
    width: 350px;
}
.header-logo h1 img{
    transition: all 0.3s ease;   
}
.header-logo h1 img:hover{
    opacity: 0.5;
}
.header-nav {
  position: fixed;
  top: 69px;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--primary);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index: 1000;
}

.header-nav__list {
  display: block;
  text-align: center;
  padding-top: 50px;
}
.header__nav-item:last-child{
  background-color: #cb1719;
  color: #ffffff;
  text-align: center;
  width: 140px;
  height: 100px;
  display: flex;           /* Flexboxにする */
  flex-direction: column;  /* 縦方向に並べる */
  justify-content: center; /* 縦方向の中央揃え */
  align-items: center;     /* 横方向の中央揃え */
}
/* ▼ お問い合わせボタン */
.header__nav-item:last-child a {
  display: flex;               /* 横並びにする */
  align-items: center;         /* 上下中央寄せ */
  justify-content: center;     /* 水平方向中央寄せ */
  gap: 8px;                    /* 画像と文字の間隔（調整OK） */
  flex-direction: column;      /* ← 今は縦方向。これを削除 or 横並びにしたいならrow */
  color: #fff;
  background-color: #cb1719;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 12px 20px;
}

/* PCホバー時（反転） */
@media screen and (min-width: 1280px) {
  .header__nav-item:last-child a:hover {
    background-color: #fff;
    color: #cb1719;
    border-color: #cb1719;
  }
}
.header__nav-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.header__nav-item {
  /*margin-top: 50px;*/
  font-family: 'Noto Sans JP', sans-serif;
}

/* ハンバーガーメニュー表示（モバイル） */
.header__hamburger {
  display: block;
  background: #cb1719;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1100;
  padding: 8px 18px;
}

.hamburger__line {
  display: block;
  border: #ffffff solid 2px;
  border-radius: 20%;
  margin-top: 7px;
  width: 100%;
  transition: 0.3s;
  width: 35px;
}
.hamburger__text{
  color: #ffffff;
  margin-top: 2px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
}

/* ハンバーガー開閉時の変形 */
.header__hamburger.active .hamburger__line:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.header__hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
}
.header__hamburger.active .hamburger__line:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* メニューが開いた状態 */
.header-nav.open {
  transform: translateX(0);
  
}

/* ▼ ドロップダウン基本 */
.dropdown {
  position: relative;
}

.dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #f2f2f2;
  list-style: none;
  padding: 10px 0;
  margin: 0;
  min-width: 180px;
  z-index: 100;
}

.dropdown__menu li a {
  display: block;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown__menu li a:hover {
  background: #f2f2f2;
  color: #cb1719;
}




/* ▼ PCホバー時（画像切り替え） */
@media screen and (min-width: 1280px) {
  .header__nav-item:last-child a:hover img {
    content: url("https://www.multibacks.co.jp/test/assets/img/common/mail02.png"); /* ホバー画像 */
  }
}



/* ▼ hover時に表示 */
.dropdown:hover .dropdown__menu {
  display: block;
}
.dropdown__menu.open {
  display: block;
}
/* ヘッダーナビのリンクホバー時 */
.header__nav-item a {
  color: #2a2a2a;                 /* 通常時の文字色（お好みで） */
  text-decoration: none;
  transition: color 0.3s ease; /* なめらかに変化 */
}
.header__nav-item:last-child a{
  color: #fff;
}

@media screen and (min-width: 1280px){
.header__nav-item a:hover {
  color: #cb1719;              /* ホバー時：赤に */
}
.header__nav-item:last-child a:hover {
    background-color: #fff;   /* 背景白 */
    color: #cb1719;           /* テキスト赤に */
    border-color: #cb1719;    /* 境界を赤で維持 */
  }
}

/* ======================== */
/* PC向け（1280px以上） */
/* ======================== */
@media screen and (min-width: 1280px){
  /* ハンバーガーは非表示 */
  .header__hamburger {
    display: none;
  }

  /* ナビゲーションは横並びで常に表示 */
  .header-nav {
    position: static;
    width: auto;
    height: auto;
    transform: none;
    background-color: transparent;
  }

  .header-nav__list {
    display: flex;
    align-items: center;
    gap: 48px;
    padding-top: 0;
    text-align: left;
    color: #2a2a2a;
    font-weight: bold;
  }
  

  .header__nav-item {
    margin-top: 0;
  }
}
@media screen and (max-width: 1279px){
  body {
  padding-top: 69px; /* ヘッダーの高さに合わせる */
}
  .header-nav__list{
    background: #cb1719;
    color: #ffffff;
  }
  .header-nav__list .header__nav-item:last-child{
    margin: 0 auto 0;
  }
  .header-nav__list .header__nav-item:first-child{
    margin-top: 0;
  }
}
@media screen and (max-width: 767px){
  .header-logo{
    padding: 10px;
    width: 250px;
  }
}
/* =========================
   SP〜TB (〜1279px) の中央寄せ
========================= */
@media screen and (max-width: 1279px){

  /* ナビ全体を縦並び＆中央寄せ */
  .header-nav__list{
    display: flex;             /* ← 追加 */
    flex-direction: column;    /* ← 追加 */
    align-items: center;       /* ← 追加：中央寄せの肝 */
    gap: 12px;                 /* お好みで */
    padding: 24px 16px 110px;        /* 少し余白 */
    margin: 0;
    list-style: none;
    background: #cb1719;
    color: #ffffff;
    text-align: center;
  }

  /* 各リンクボタンを中央揃え＆同じ幅に */
  .header__nav-item a{
    display: inline-flex;          /* ← 追加 */
    align-items: center;           /* ← 追加 */
    justify-content: center;       /* ← 追加 */
    text-align: center;
    width: min(88vw, 360px);       /* ← 幅を統一（好みで調整） */
    padding: 12px 16px;
    color: inherit;                /* 親色を継承 */
  }

  /* ▼ ドロップダウン（SP/TB時はフローで下に展開） */
  .dropdown{ position: static; }   /* ← 絶対配置を解除 */
  .dropdown > a{ width: min(88vw, 360px); } /* 親と同じ幅に */

  .dropdown__menu{
    position: static;              /* ← 絶対配置を解除 */
    display: none;                 /* JSで .open を付与して表示 */
    width: min(88vw, 360px);       /* 親と同じ幅に */
    margin: 6px 0 0;
    padding: 0;
    background: #cb1719;           /* メニューの地色を揃える */
    border: none;
    list-style: none;
  }
  .dropdown__menu.open{ display:block; }

  .dropdown__menu li a{
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: center;
    color: #ffffff;
  }

  /* 最下段の「お問い合わせ」カードも同じ幅に揃える */
  .header__nav-item:last-child{
    width: min(88vw, 360px);       /* ← ここを上書き */
    height: auto;                  /* 固定高さを解除 */
    padding: 5px;
    margin: 18px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* ロゴはそのままでもOK。念のため中央寄せ安全策 */
  .header-logo{
    padding: 10px;
    width: 210px;
    margin-left: 0;
  }
}
/* ▼ SP〜TBだけ：ヘッダーリンクのホバーを白背景＋赤文字に */
@media screen and (max-width: 1279px) {

  /* ベース：枠は通常は非表示にしておく */
  .header__nav-item a {
    border: 2px solid transparent;
  }

  /* 通常メニュー */
  .header__nav-item a:hover,
  .header__nav-item a:active,
  .header__nav-item a:focus-visible {
    background-color: #fff;
    color: #cb1719;
    border-color: #cb1719; /* 白背景で埋もれないよう輪郭維持 */
  }

  /* ドロップダウンの各項目も同じ挙動に */
  .dropdown__menu li a:hover,
  .dropdown__menu li a:active,
  .dropdown__menu li a:focus-visible {
    background-color: #fff;
    color: #cb1719;
  }

  /* お問い合わせ（最後の項目）も同じルールで反転 */
  .header__nav-item:last-child a:hover,
  .header__nav-item:last-child a:active,
  .header__nav-item:last-child a:focus-visible {
    background-color: #fff;
    color: #cb1719;
    border-color: #cb1719;
  }
  @media screen and (max-width: 1279px) {
  .header__nav-item:last-child a:hover img,
  .header__nav-item:last-child a:active img,
  .header__nav-item:last-child a:focus-visible img {
    content: url("https://www.multibacks.co.jp/test/assets/img/common/mail02.png"); /* SPでもホバー時に切替 */
  }
}
}