#mainvisual_frontpage {
  margin-top: 140px !important;
}
/* 下層ページ：固定ヘッダー分の余白 */
.inc_common_header {
  display: block;
  padding-top: 140px;
}
/* ===== New Header Design ===== */
#header_index {
  padding: 0 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  margin: 0 !important;
  background: none !important;
}

.b_header_wrap_sp #menu_btn,
#b_menu_src,
#header_second {
  display: none !important;
}

#header-top-bar {
  background-color: #ffffff;
  width: 100%;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition:
    height 0.3s ease,
    opacity 0.3s ease;
}

#header_index.scrolled #header-top-bar {
  height: 0;
  opacity: 0;
}

#header_index.scrolled #header-main-bar,
#header_index.scrolled-up #header-main-bar {
  background-color: rgba(245, 245, 245, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#header_index.scrolled-up #header-top-bar {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#header-top-logo {
  height: 39px;
  width: auto;
  display: block;
}

#header-main-bar {
  background-color: #f5f5f5;
  width: 100%;
  height: 75px;
}

#header-main-bar-inner {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  /* 左右を同幅の 1fr にしてナビを常にバー中央（上段ロゴと同じ中心線）に置く */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 24px;
  align-items: center;
  padding: 0 40px;
  box-sizing: border-box;
  height: 100%;
}

#header-main-bar-inner > a {
  justify-self: start;
}

#header-brand-logo-img {
  height: 51px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

#header-nav-links {
  width: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#header-nav-links a {
  font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W6", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #000000;
  text-decoration: none;
  letter-spacing: 0.44px;
  white-space: nowrap;
  display: inline-block;
}

#header-nav-links a:hover {
  opacity: 0.65;
  color: #000000;
}

#header-right-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
  flex-shrink: 0;
}

.header-search-btn {
  background-color: #000000;
  border: none;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.header-search-btn img {
  width: 12.5px;
  height: 12px;
  display: block;
}

#header-contact-btn {
  background-color: #000000;
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 100px;
  padding: 0 18px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

#header-contact-btn .header-contact-icon {
  display: none;
}

#header-contact-btn:hover {
  opacity: 0.8;
}

/* SNS・英語サイトリンク */
.header-sns-links {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 0 8px;
  padding: 0 0 0 20px;
  border-left: 1px solid #cccccc;
  list-style: none;
}

.header-sns-links li {
  margin: 0;
  padding: 0;
}

.header-sns-links a {
  display: flex;
  align-items: center;
  text-decoration: none !important;
}

.header-sns-links a:hover {
  opacity: 0.6;
}

.header-sns-links .header-sns-icon-instagram {
  width: 20px;
  height: 20px;
  display: block;
}

.header-sns-links .header-sns-icon-youtube {
  width: 28px;
  height: auto;
  display: block;
}

.header-sns-links .header-lang-link {
  gap: 6px;
  color: #000000 !important;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.header-sns-links .header-lang-icon {
  width: 20px;
  height: 20px;
  display: block;
}

#header_index #menu_btn.header-menu-btn {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  z-index: 2010;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}

#header_index #menu_btn.header-menu-btn .header-menu-icon {
  width: 32.5px;
  height: 9.5px;
  display: block;
}

/* 閉じるボタン（メニューとは別要素） */
.header-menu-close {
  display: none;
  position: fixed;
  top: 24px;
  right: 40px;
  z-index: 2010;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
#menu.open .header-menu-close {
  display: block;
}
.header-menu-close::before,
.header-menu-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 2px;
  background-color: #ffffff;
}
.header-menu-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.header-menu-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.header-menu-close:hover {
  opacity: 0.7;
}

.header-menu-label {
  font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W6", sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #000000;
  line-height: 1;
  letter-spacing: 0.3px;
}

/* 検索モーダルを固定ヘッダーより前面に */
.b_modal_area {
  z-index: 10000;
}

/* メニュー展開時、項目をヘッダーの下から表示（×ボタンと重ねない） */
#header_index #menu .menu_wrap_list {
  padding-top: 160px;
}

/* ===== SP ===== */
@media screen and (max-width: 767px) {
  #mainvisual_frontpage {
    margin-top: 116px !important;
  }
  .inc_common_header {
    padding-top: 116px;
  }

  #header-top-bar {
    height: 44px;
  }
  #header-top-logo {
    height: 28px;
  }

  #header-main-bar {
    height: 72px;
  }
  #header-main-bar-inner {
    display: flex;
    padding: 0 16px;
  }
  #header-brand-logo-img {
    height: 32px;
  }

  #header-nav-links {
    display: none;
  }
  #header-right-actions {
    margin-left: auto;
    gap: 16px;
  }

  /* SNS・英語リンクは SP ではメニュー内に任せて非表示 */
  .header-sns-links {
    display: none;
  }

  /* 検索ボタンは SP では非表示 */
  #header_index .header-search-btn {
    display: none;
  }

  /* CONTACT は封筒アイコンの丸ボタン */
  #header-contact-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  #header-contact-btn .header-contact-icon {
    display: block;
    width: 15px;
    height: auto;
  }
  #header-contact-btn .header-contact-label {
    display: none;
  }

  /* SP では PC 用メニューを使わない */
  #header_index #menu {
    display: none !important;
  }
  /* SP 用メニュー：ヘッダーより前面に表示 */
  .b_header_wrap_sp #menu {
    z-index: 10001;
  }
  .alternate .b_header_wrap_sp #menu .menu_wrap_list {
    padding-top: 80px;
  }
  .header-menu-close {
    top: 16px;
    right: 16px;
  }

  /* SP メニュー内 SNS・英語リンク（左上、×ボタンと同じ高さに配置） */
  .b_header_wrap_sp .menu-sp-sns {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2; /* 後続の .menu_wrap_list（relative）の上余白に覆われてタップできないのを防ぐ */
    height: 48px;
    display: flex;
    align-items: center;
    gap: 22px;
  }
  .b_header_wrap_sp .menu-sp-sns a {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
  }
  /* 黒アイコンを白に反転 */
  .b_header_wrap_sp .menu-sp-sns img {
    display: block;
    filter: brightness(0) invert(1);
  }
  .b_header_wrap_sp .menu-sp-sns .menu-sp-sns-instagram {
    width: 22px;
    height: 22px;
  }
  .b_header_wrap_sp .menu-sp-sns .menu-sp-sns-youtube {
    width: 30px;
    height: auto;
  }
  .b_header_wrap_sp .menu-sp-sns .menu-sp-lang {
    gap: 6px;
    padding-left: 22px;
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    letter-spacing: 0.5px;
  }
  .b_header_wrap_sp .menu-sp-sns .menu-sp-lang img {
    width: 20px;
    height: 20px;
  }
}
