/* ===== ヘッダー ===== */
.header_section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.navi_wrapper {
  position: relative;
  width: 100%;
  height: 83px;
}

.navi_menu {
  background: rgba(255, 255, 255, 0.8);
  padding: 30px 60px 30px 0px;
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: center;
  justify-content: flex-end;
  width: calc(100% - 880px);
  position: absolute;
  left: 280px;
  top: 0;
  height: 83px;
}

.link {
  color: #000000;
  text-align: left;
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--font-sm);
  font-weight: 500;
  position: relative;
  cursor: pointer;
  transition: color 0.3s;
}

.link:hover {
  color: var(--primary-color);
}

.navi_menu .link a {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  height: 100%;
}

/* リンクボタン */
.link-button {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  height: 83px;
  position: absolute;
  right: 0;
  top: 0;
}

.link_text {
  color: var(--white);
  text-align: left;
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--font-md);
  font-weight: 500;
  position: relative;
}

.price_link {
  background: var(--primary-color);
  padding: 10px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 300px;
  height: 83px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

.price_link:hover {
  background-color: #007a8d;
}

.reserve_link {
  background: var(--secondary-color);
  padding: 10px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 300px;
  height: 83px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

.reserve_link:hover {
  background-color: #004350;
}

/* ロゴ */
.logo {
  width: 280px;
  height: 280px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1001;
}

.logo_container {
  background: rgba(0, 137, 158, 0.8);
  width: 280px;
  height: 280px;
  position: absolute;
  left: 0;
  top: 0;
}

.rebase_logo_white {
  width: 200px;
  height: 181px;
  position: absolute;
  left: 40px;
  top: 50px;
  object-fit: cover;
}

/* モバイルメニューの開閉機能 */
.mobile_menu_button {
  display: none; /* デフォルトでは非表示 */
  position: fixed;
  top: 15px;
  right: 15px;
  width: 100px;  /* サイズを100pxに戻す */
  height: 100px; /* サイズを100pxに戻す */
  background-color: var(--primary-color);
  border-radius: 5px;
  z-index: 1002;
  cursor: pointer;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.mobile_menu_button span {
  display: block;
  position: absolute;
  width: 50px;  /* 大きいボタンに合わせてバーの幅を拡大 */
  height: 5px;  /* 大きいボタンに合わせてバーの高さを拡大 */
  background-color: white;
  border-radius: 3px;
  left: 50%;      /* 中央揃えのために50%に変更 */
  transform: translateX(-50%); /* 中央揃えのために追加 */
  transition: all 0.3s;
}

.mobile_menu_button span:nth-child(1) {
  top: 30px;  /* 大きいボタンに合わせて位置を調整 */
}

.mobile_menu_button span:nth-child(2) {
  top: 48px;  /* 大きいボタンに合わせて位置を調整 */
}

.mobile_menu_button span:nth-child(3) {
  top: 66px;  /* 大きいボタンに合わせて位置を調整 */
}

.mobile_menu_button.active span:nth-child(1) {
  transform: translateX(-50%) translateY(18px) rotate(45deg); /* 位置を調整 */
}

.mobile_menu_button.active span:nth-child(2) {
  opacity: 0;
}

.mobile_menu_button.active span:nth-child(3) {
  transform: translateX(-50%) translateY(-18px) rotate(-45deg); /* 位置を調整 */
}

.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.menu-overlay.active {
  display: block;
}

/* ヘッダーのレスポンシブ対応 */
@media (max-width: 1600px) {
  .navi_menu {
    width: calc(100% - 760px);
    left: 240px;

  }

  .logo, 
  .logo_container {
    width: 240px;
    height: 240px;
  }
  
  .rebase_logo_white {
    width: 140px;
    height: auto;
    top: 60px;
  }

  .link{
    font-size: 0.9em;
  }

  .price_link{
    width: 260px;
  }

  .reserve_link{
    width: 260px;
  }

  .link_text{
    font-size: 1em;
  }
}

@media (max-width: 1440px) {
  .navi_menu {
    width: calc(100% - 640px);
    left: 200px;
    gap: 30px; 
    padding: 30px 40px 30px 0px;
  }

  .logo, 
  .logo_container {
    width: 200px;
    height: 200px;
  }
  
  .rebase_logo_white {
    width: 140px;
    height: auto;
    left: 30px;
    top: 40px;
  }

  .link{
    font-size: 0.9em;
  }

  .price_link{
    width: 220px;
  }

  .reserve_link{
    width: 220px;
  }

  .link_text{
    font-size: 1em;
  }
}

/* モバイル用固定CTAボタン */
.mobile_cta {
  display: none; /* デフォルトでは非表示 */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile_cta_button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  text-decoration: none;
  color: var(--white);
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--font-sm);
  font-weight: 500;
  transition: background-color 0.3s;
}

.simulation_button {
  background-color: var(--primary-color);
  width: 50%;
  float: left;
}

.simulation_button:hover {
  background-color: #007a8d;
}

.contact_button {
  background-color: var(--secondary-color);
  width: 50%;
  float: right;
}

.contact_button:hover {
  background-color: #004350;
}

/* モバイルメニュー対応 (1280px以下) */
@media (max-width: 1280px) {
  /* ハンバーガーメニューボタンを表示 */
  .mobile_menu_button {
    display: block;
    z-index: 1002; /* 最前面に表示 */
  }
  
  /* 既存のナビメニューをモーダル用にスタイル変更 */
  .navi_menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* 画面全体を覆う */
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9); /* 暗い背景色 */
    z-index: 1001;
    display: none; /* 初期状態は非表示 */
    flex-direction: column;
    justify-content: center; /* 中央揃え */
    align-items: center; /* 中央揃え */
    padding: 0;
    overflow-y: auto;
  }
  
  /* メニューが開いた時のスタイル */
  .navi_menu.active {
    display: flex; /* 表示切替 */
  }
  
  /* メニュー項目のスタイル調整 */
  .navi_menu .link {
    width: auto;
    text-align: center;
    font-size: 1.2em; /* 大きめのフォント */
  }
  
  /* メニュー内のリンクの色を白に */
  .navi_menu .link a {
    color: white;
  }
  
  /* 通常のヘッダーCTAボタンを非表示 */
  .link-button {
    display: none;
  }
  
  /* モバイル用固定CTAボタンを表示 */
  .mobile_cta {
    display: flex;
  }
  
  /* ロゴサイズの調整とz-index修正 */
  .logo {
    width: 150px;
    height: 150px;
    z-index: 1003; /* メニューとハンバーガーボタンより上に設定 */
  }
  
  .logo_container {
    width: 150px;
    height: 150px;
  }
  
  .rebase_logo_white {
    width: 100px;
    height: auto;
    left: 25px;
    top: 30px;
  }
  
  /* モーダルメニュー表示時に背景をスクロールさせない */
  body.menu-open {
    overflow: hidden;
  }
}

@media (max-width: 780px) {
  .logo, 
  .logo_container {
    width: 140px;
    height: 140px;
  }
  
  .rebase_logo_white {
    width: 80px;
    height: auto;
    left: 30px;
    top: 34px;
  }

  .mobile_menu_button {
    width: 80px;
    height: 80px;
  }

  .mobile_menu_button span:nth-child(1) {
    top: 25px;
  }
  
  .mobile_menu_button span:nth-child(2) {
    top: 40px;
  }
  
  .mobile_menu_button span:nth-child(3) {
    top: 55px;
  }
}

@media (max-width: 430px) {
  .logo, 
  .logo_container {
    width: 100px;
    height: 100px;
  }
  
  .rebase_logo_white {
    width: 60px;
    height: auto;
    left: 20px;
    top: 25px;
  }

  .mobile_menu_button {
    width: 60px;
    height: 60px;
  }

  .mobile_menu_button span{
    width: 40px;
    height: 4px;
  }

  .mobile_menu_button span:nth-child(1) {
    top: 15px;
  }
  
  .mobile_menu_button span:nth-child(2) {
    top: 30px;
  }
  
  .mobile_menu_button span:nth-child(3) {
    top: 45px;
  }

  .simulation_button {
    font-size: 0.9em;
  }

  .contact_button {
    font-size: 0.9em;
  }
}

/* オーバーレイ背景は不要になったので削除または非表示に */
.menu-overlay {
  display: none;
}

