@charset "utf-8";
/* ==================================================== */
/* 1. 基本・デスクトップ（ドロップダウンメニュー）スタイル */
/* ==================================================== */
.header-inner {
  position: relative;
  display: flex;
  justify-content: flex-end;
}
#global-nav {
  /* モバイルで設定されたposition: fixed, transform, width/height をリセット */
  position: static;
  transform: none;
  width: auto;
  height: auto;
  background-color: transparent;
  overflow-y: visible;
  /* デスクトップでは常に表示 */
  display: block;
}
/* メインメニューの基本スタイル */
header .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; /* 横並び */
}
header .menu > li {
  position: relative;
  border-right: 1px solid #d8d9dd;
}
header .menu > li:first-child {
  border-left: 1px solid #d8d9dd;
}
header .menu > li.current {
  background: inherit;
  background: #f1f3f5;
}
header .menu > li:nth-child(3) > a,
header .menu > li:nth-child(4) > a {pointer-events: none;}



header .menu a {
  display: block;
  text-decoration: none;
  color: #333;
  white-space: nowrap;
  padding: 5px 20px;
}

header .sub-menu {
  position: absolute;
  top: 100%; /* 親要素の下に配置 */
  left: 0;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  min-width: 200px;
  /* 初期状態では非表示（アニメーション付き） */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}
header .sub-menu a {
  padding: 8px 15px;
  text-align: left;
  font-size: 90%;
}
/* sub-menuのドロップダウン表示（liにホバー時） */
header .menu > li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* ハンバーガーメニューボタンはデスクトップでは非表示 */
header .hamburger-menu {
  display: none;
}
/* デスクトップではトグルボタンを非表示に。 */
header .submenu-toggle {
  display: none;
}

#footer02 a {
    color: #fff;
    font-size: 90%;
    padding: 10px 10px 10px 0;
}

#fMenu {
    display: flex;
    justify-content: space-between;
    max-width: 1000px;
    margin: auto;
    flex-wrap: wrap;
}

#fMenu li {
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: flex-start;
}
#fMenu div {padding: 0 0 20px;}

#fMenu .sub-menu a {
    padding: 5px 5px 5px 20px;
    font-size: 80%;
    position: relative;
}
#fMenu .sub-menu a::before {
content: "";
  position: absolute;
  top: 0;
  left: 0.3em;
  width: 0.6em;  /* 横棒の長さ */
  height: 0.7em; /* 縦棒の長さ */
  border-left: 1px solid #fff;   /* 縦線 */
  border-bottom: 1px solid #fff; /* 横線 */
}


/* ==================================================== */
/* 2. モバイル（1024px以下）スタイル - ハンバーガーメニュー */
/* ==================================================== */
@media (max-width: 1024px) {
  /* メニュー開閉時に背景のスクロールを禁止 */
  body.no-scroll {
    overflow: hidden;
  }
  /* メインナビゲーションの配置と初期状態（画面外に隠す） */
  #global-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 80%;
    height: 100%;
    background-color: rgb(27 37 71 / 91%);
    z-index: 999;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
  }
  /* メニューが開いたとき */
  #global-nav.is-open {
    display: block;
    transform: translateX(0);
  }
  /* メインメニューを縦並びにする */
  header .menu {
    flex-direction: column;
    padding-top: 60px; /* ハンバーガーボタンとの兼ね合いで調整 */
  }
  header .menu > li {
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* トグルボタンを position: absolute で配置するための設定 */
    position: relative;
  }
  header .menu > li.current {
    background: #83a1b1;
    border-bottom: none;
  }
  header .menu > li > a {
    color: #fff;
    padding: 15px 20px;
    text-align: left;
    /* トグルボタンが重ならないようスペースを確保 */
    padding-right: 50px;
  }
  /* デスクトップのhover効果をモバイルで完全に無効化 */
  header .menu > li:hover > .sub-menu {
    opacity: 0;
    visibility: hidden;
    transform: none;
  }
  /* サブメニューのスタイル（モバイル用アコーディオン） */
  #global-nav .sub-menu {
    position: static; /* 絶対位置指定を解除 */
    background: rgba(255, 255, 255, 0.1);
    border: none;
    box-shadow: none;
    min-width: auto;
    /* JS(jQuery)で開閉するためCSSでは非表示にするのみ */
    display: none;
    /* ?? 修正点: デスクトップの非表示設定を上書きし、すぐに表示されるようにする */
    visibility: visible;
    opacity: 1;
    transform: none; /* 移動を解除 */
    transition: none; /* アニメーションも切る */
  }
  header .sub-menu a {
    color: #ddd;
    padding: 10px 20px;
    text-align: left;
    font-size: 90%;
  }
  /* サブメニュー開閉トグルボタンのスタイル */
  header .submenu-toggle {
    display: block; /* モバイルでのみ表示に上書き */
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    line-height: 50px; /* 縦方向の中央寄せのため、liの高さに依存 */
    text-align: center;
    margin: 0;
    padding: 0;
    z-index: 100;
    transition: transform 0.3s;
  }
  /* 開いている状態のボタンのスタイル (例: 記号を回転させる) */
  header .menu > li.is-open-accordion > .submenu-toggle {
    transform: rotate(180deg);
  }
  /* ==================================================== */
  /* 3. ハンバーガーボタン（×ボタンへの切り替え）スタイル */
  /* ==================================================== */
header .hamburger-menu {
    display: block;
    position: fixed;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    z-index: 1001;
    cursor: pointer;
    padding: 0;
}
  /* ... 以下、ハンバーガーボタン内の .line のスタイルは変更なし ... */
header .hamburger-menu .line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}
  header .hamburger-menu.is-active .line {
    background-color: #fff; /* 開いた時のボタンの色（メニュー背景に合わせて） */
  }
  /* 3本の線それぞれの位置 */
  header .hamburger-menu .line1 {
    top: 5px;
  }
  header .hamburger-menu .line2 {
    top: 50%;
    transform: translateY(-50%);
  }
  header .hamburger-menu .line3 {
    top: auto;
    bottom: 5px;
  }
  /* Xボタンに変化 */
  header .hamburger-menu.is-active .line1 {
    transform: rotate(45deg) translate(7px, 7px); /* 線を回転・移動 */
  }
  header .hamburger-menu.is-active .line2 {
    opacity: 0; /* 中央の線を非表示 */
  }
  header .hamburger-menu.is-active .line3 {
    transform: rotate(-45deg) translate(7px, -7px); /* 線を回転・移動 */
  }
}