:root {
  --my-header-height: 87px;
  --my-navigation-grey: #231f20;
}

body {
  padding-top: var(--my-header-height) !important;
}

@media (width <= 1199.98px) {
  body {
    padding-top: 85px !important;
  }

  .l-site-header-logo {
    padding: 25px 0;
  }

  .l-site-header-logo img {
    width: 100px;
  }

  .footer-link li.footer-link-title-main {
    font-size: 14px;
  }
}

/* 下層ページ フッター直前の余白 */
.wp-singular .container.pb-0.mb-0 {
  margin-bottom: 120px !important;
}

/* タイトルレベル２の要素 折り返しを制御 */
.section-subtitle {
  flex-wrap: nowrap;
}

/* 本文中に有るCTAボタン（青背景）のカスタマイズ */
.c-button-type01 .d-brochure-bg-btn.is-inner-btn button {
  padding: 4px 20px;
  overflow-wrap: break-word;
}

.c-button-type01 .is-caret-link.is-icon-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-button-type01 .is-caret-link.is-icon-arrow::before {
  display: inline-block;
  transform: rotate(-90deg);
  padding-right: 0;
  padding-bottom: 8px;
}

/* フォーム 項目見出し 自動折り返し */
.field-label {
  overflow-wrap: anywhere;
}

/* ヘッダー 言語切り替えボタン */
a.hp-language_switch {
  background-color: #ddd;
  font-family: "Noto sans JP", serif;
  font-weight: normal;
  border: none;
  display: flex;
  align-items: center;
  padding: 7.5px 7px;
  position: relative;
  padding-right: calc(10px + 1.4em);
  color: #444;
  font-size: 13px;
  line-height: 1;
}

a.hp-language_switch::after {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f0ac";
  border: none;
  top: 0;
  bottom: 0;
  margin: auto 0;
  right: 6px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  position: absolute;
}

a.hp-language_switch .ls-flag {
  display: inline;
  vertical-align: middle;
}

a.hp-language_switch .ls-native {
  margin-left: 0.4em;
  vertical-align: middle;
}

/* ===========================
       Hamburger
    =========================== */

.gnav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.gnav-hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentcolor;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
  transform-origin: center;
}

.gnav-hamburger[aria-expanded="true"] .gnav-hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.gnav-hamburger[aria-expanded="true"] .gnav-hamburger-bar:nth-child(2) {
  opacity: 0;
}

.gnav-hamburger[aria-expanded="true"] .gnav-hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
       Global Navigation（共通）
    =========================== */

.gnav,
.gnav-pc {
  position: relative;
  flex: 1;
  width: auto;
  max-width: 840px;
}

.gnav-list {
  list-style: none;
  margin: 0;
  width: 100%;
  padding: 5px 0;
}

.gnav-link {
  color: #2d2d2d;
}

.l-site-header .menu_list .nav_item .gnav-menu-lv1__trigger .arrow::after {
  transition: transform 0.2s ease;
}

.l-site-header
  .menu_list
  .nav_item.is-open
  .gnav-menu-lv1__trigger
  .arrow::after {
  transform: rotate(-180deg) translateY(-2px);
}

@media (width >= 1200px) {
  .gnav-item {
    font-size: 15px;
    display: inline-block;
    list-style: none;
    margin-top: 22.5px;
    margin-bottom: 22.5px;
  }
}

.gnav-panel {
  position: fixed;
  top: var(--my-header-height);
  left: 0;
  width: 100%;
  min-height: 400px;
  max-height: 680px;
  overflow-y: auto;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    visibility 0.2s;
}

.gnav-item.is-open .gnav-panel {
  visibility: visible;
  opacity: 1;
  z-index: 10;
}

.gnav-sublist {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 1.5rem 2rem;
  gap: 0.25rem 0;
}

.gnav-sublist a {
  display: block;
  padding: 0.4rem 1rem 0.4rem 0;
  font-size: 0.875rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

@media (any-hover: hover) {
  .gnav-sublist a:hover {
    text-decoration: underline;
  }
}

/* 戻るボタン（デスクトップでは非表示） */
.gnav-back {
  display: none;
}

/* ===========================
       3階層目ナビゲーション（共通）
    =========================== */

.gnav-subsublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ===========================
       パネルレイアウト（共通）
    =========================== */

.gnav-panel-inner {
  display: flex;
  flex-direction: column;
}

.gnav-panel-head {
  padding: 1rem 1.25rem;
  margin-bottom: 10px;
}

.gnav-panel-head-link {
  display: block;
  font-size: 0.9375rem;
  font-weight: bold;
  color: #0350a3;
  text-decoration: none;
}

/* ===========================
       PC（min-width: 1200px）
    =========================== */

@media (width >= 1200px) {
  .l-site-header {
    background: #fff;
    position: fixed;
    z-index: 10;
    top: 0;
    right: 0;
    left: 0;
  }

  .gnav,
  .gnav-pc {
    margin: 0 18px;
  }

  .gnav-overlay {
    display: none;
  }

  .gnav-panel {
    padding: 83px 17.3378%;
    overflow-y: scroll;
  }

  /* 3階層目 */
  .gnav-sublist-item {
    border-left: 1px solid #dadadc;
    padding: 10px 0 0;
  }

  .gnav-sublist-item.has-sub {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .gnav-sublist-group-link {
    font-weight: bold;
  }

  .gnav-back-sub {
    display: none;
  }

  .gnav-subsublist a {
    display: block;
    padding: 0.3rem 1rem;
    font-size: 0.8125rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
  }

  @media (any-hover: hover) {
    .gnav-subsublist a:hover {
      text-decoration: underline;
    }
  }

  /* パネルレイアウト */
  .gnav-panel-inner {
    flex-direction: column;
  }

  .gnav-panel-head {
    padding: 0;
    background: transparent;
  }

  .gnav-panel-head-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1rem;
  }

  /* "+" サークルアイコン */
  .gnav-panel-head-link::after {
    content: "→";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0350a3;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
  }

  .gnav-panel-body {
    flex: 1;
    padding: 0;
  }

  /* gnav-sublist を4カラムグリッドに */
  .gnav-panel-body .gnav-sublist {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 2.5rem;
    padding: 0;
  }

  /* カラム内：複数の2階層目リンクを左詰め・縦積みで並べる */
  .gnav-column-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.25rem;
  }

  /* 2階層目：フラットリンク（子なし） */
  .gnav-panel-body .gnav-sublist > li > a {
    font-size: 0.9375rem;
    font-weight: bold;
    color: #0350a3;
    padding: 0;
    white-space: normal;
  }

  @media (any-hover: hover) {
    .gnav-panel-body .gnav-sublist > li > a:hover {
      text-decoration: underline;
    }
  }

  /* 2階層目：グループリンク（子あり） */
  .gnav-panel-body .gnav-sublist .gnav-sublist-group-link {
    color: #0350a3;
    font-size: 0.9375rem;
    padding: 0 20px;
    white-space: normal;
    transition-duration: 0.3s;
    transition-property: background-color, color;
  }

  .gnav-panel-body .gnav-sublist span.gnav-sublist-group-link {
    display: block;
  }

  @media (any-hover: hover) {
    .gnav-panel-body .gnav-sublist a.gnav-sublist-group-link:hover {
      background-color: #dcdcdc;
      border-left: 1px solid #004ea2;
    }
  }

  /* 3階層目 */
  .gnav-panel-body .gnav-subsublist {
    margin-top: 13px;
  }

  .gnav-panel-body .gnav-subsublist a {
    color: var(--my-navigation-grey);
    font-size: 0.875rem;
    padding: 0.25rem 20px;
    white-space: normal;
    transition-duration: 0.3s;
    transition-property: background-color, color;
  }

  @media (any-hover: hover) {
    .gnav-panel-body .gnav-subsublist a:hover {
      text-decoration: underline;
      color: var(--my-navigation-grey);
      background-color: #dcdcdc;
      border-left: 1px solid #004ea2;
    }
  }

  .gnav-subpanel-head {
    display: none;
  }

  .gnav-panel-body .gnav-subsublist.hp-change_level_2_to_3 {
    margin-top: 0;
  }

  .hp-flex-sp_only {
    display: none !important;
  }
}

/* ===========================
       SP（max-width: 1199.98px、タブレット幅を含む）
    =========================== */

@media (width <= 1199.98px) {
  .l-site-header {
    background: #fff;
  }

  .container-fluid {
    position: fixed;
    z-index: 10;
    top: 0;
    background: #fff;
  }

  /* ナビ全体：右からスライドイン（幅82.9%） */
  .gnav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: calc(100% - 64px);
    background: #fff;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    visibility: hidden;
  }

  .gnav.is-navOpen {
    transform: translateX(0);
    visibility: visible;
  }

  /* タブレット幅：展開時の最大横幅を固定 */
  @media (width >= 768px) {
    .gnav {
      max-width: 326px;
    }
  }

  /* オーバーレイ */
  .gnav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: #000;
    opacity: 0;
    pointer-events: none;
    z-index: 8;
    transition: opacity 0.3s ease;
  }

  .gnav-overlay.is-visible {
    opacity: 0.5;
    pointer-events: auto;
  }

  /* 1階層目リスト */
  .gnav-list {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    inset: 85px 0 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    background: #fff;
    padding: 0;
    justify-content: normal !important;
  }

  /* タブレット幅：ナビの頭をヘッダー下部に合わせる */
  @media (width >= 768px) {
    .gnav-list {
      inset: 86px 0 0;
    }
  }

  .gnav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    height: auto;
    padding: 15px 20px !important;
    border-bottom: 1px solid #e5e5e5;
    justify-content: space-between;
  }

  /* 子パネル：右の画面外に待機 → スライドイン */
  .gnav-panel {
    position: fixed;
    inset: 86px 0 0;
    min-height: unset;
    max-height: unset;
    overflow-y: auto;
    background: #fff;
    box-shadow: none;
    border-top: none;
    opacity: 1;
    visibility: visible;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .gnav-item.is-open .gnav-panel {
    transform: translateX(0);
  }

  /* 戻るボタン */
  .gnav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 90%;
    font-size: 18px;
    padding: 8px 0;
    font-weight: bold;
    background-color: #fff;
    border: none;
    cursor: pointer;
    color: var(--my-navigation-grey);
    margin: 0 auto;
  }

  .gnav-back::after {
    content: "Back";
  }

  .gnav-sublist {
    flex-direction: column;
    padding: 0;
    gap: 0;
  }

  .gnav-sublist a,
  .gnav-sublist span {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e5e5;
    white-space: normal;
  }

  .gnav-sublist span {
    width: 100%;
  }

  .gnav-sublist-parent a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
  }

  .gnav-sublist-parent a::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentcolor;
    border-top: 1.5px solid currentcolor;
    transform: rotate(45deg);
    flex-shrink: 0;
  }

  /* 3階層目 */
  .gnav-sublist-item.has-sub .gnav-sublist-group-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e5e5;
    font-weight: bold;
    color: #0350a3;
    text-decoration: none;
    white-space: normal;
    box-sizing: border-box;
    font-size: 0.875rem;
  }

  .gnav-sublist-item.has-sub .gnav-sublist-group-link::after {
    content: "";
    display: inline-block;
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentcolor;
    border-top: 1.5px solid currentcolor;
    transform: rotate(45deg);
  }

  .gnav-subpanel {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    background: #fff;
    z-index: 1;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .gnav-sublist-item.has-sub.is-subopen .gnav-subpanel {
    transform: translateX(0);
  }

  .gnav-back-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 90%;
    font-size: 18px;
    padding: 8px 0;
    font-weight: bold;
    background-color: #fff;
    border: none;
    cursor: pointer;
    color: var(--my-navigation-grey);
    margin: 0 auto;
  }

  .gnav-back-sub::after {
    content: "Back";
  }

  .gnav-subsublist {
    width: 90%;
    margin: 0 auto;
  }

  .gnav-subsublist a {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e5e5;
    white-space: normal;
    color: var(--my-navigation-grey);
    text-decoration: none;
  }

  /* パネルレイアウト */
  .gnav-panel-body .gnav-sublist > li > a {
    color: #0350a3;
    font-weight: bold;
  }

  .gnav-subpanel-head {
    width: 90%;
    margin: 0 auto;
  }

  .gnav-subpanel-head a {
    display: block;
    font-size: 0.9375rem;
    font-weight: bold;
    color: #0350a3;
    text-decoration: none;
  }

  .gnav-subpanel-head .hp-blue-sp {
    margin-top: 8px;
    display: inline-block;
  }

  .hp-blue-sp {
    color: #0350a3;
  }

  .hp-bold-sp {
    font-weight: bold;
  }

  .l-site-header .menu_list .nav_item .gnav-menu-lv1__trigger {
    padding-bottom: 0;
    display: block;
  }

  @media (any-hover: hover) {
    .l-site-header .menu_list .nav_item .gnav-menu-lv1__trigger:hover {
      border-bottom: 1px solid #e5e5e5;
    }
  }

  .l-site-header .menu_list .nav_item .gnav-menu-lv1__trigger a {
    width: 100%;
  }

  .l-site-header .menu_list .nav_item .gnav-menu-lv1__trigger .arrow {
    width: 100%;
    display: block;
  }

  .l-site-header .menu_list .nav_item .gnav-menu-lv1__trigger .arrow::after {
    bottom: 0;
    left: auto;
    right: 0;
    rotate: -90deg;
  }

  .gnav-panel-head {
    width: 90%;
    margin: 0 auto;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 0;
  }

  .gnav-panel-body {
    width: 90%;
    margin: 0 auto;
  }

  .hp-change_level_2_to_3 {
    width: 100%;
  }

  .hp-flex-sp_only {
    display: flex !important;
  }

  /* モバイルナビ内 言語切替（ナビ下部に表示） */
  .gnav-lang-item {
    margin-left: auto;
    padding: 16px 20px;
    display: flex;
    justify-content: center;
  }

  .gnav-lang-item .hp-language_switch {
    width: auto;
  }
}

.footer-link a,
.footer-link li a {
  color: var(--my-navigation-grey);
}

.footer-link-title.hp-menu2 {
  border: none;
}

.footer-link-block li a {
  transition-duration: 0.3s;
  transition-property: background-color, color;
}

@media (any-hover: hover) {
  .footer-link-block li a:hover {
    background-color: #dcdcdc;
  }
}

.hp-blue {
  color: #0350a3;
}

.hp-bold {
  font-weight: bold;
}
