@charset "utf-8";
/* CSS Document */

/* 共通 */
body {
  font-family: "游明朝","Yu Mincho","游明朝体","YuMincho","ヒラギノ明朝 Pro W3","Hiragino Mincho Pro","HiraMinProN-W3","HGS明朝E","ＭＳ Ｐ明朝","MS PMincho",serif;
  margin: 0;
}

.G-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

.global_menu a {
  text-decoration: none;
  color: #fff;
  box-sizing: border-box;
}

#hanburger,
.submenu_toggle {
  display: none;
}

/* --------------------
   PC表示
-------------------- */


.global_menu {
  width: 100%;
  position: relative;
  color: #fff;
  background: #051039;
  text-align: center;
}

.global_menu > .G-nav > li {
  display: inline-block;
}

/* 親メニュー */
.global_menu > .G-nav > li > a,
.global_menu > .G-nav > li > .menu_row > a {
  display: block;
  padding: 16px 26px;
  font-size: 0.95rem;
}

/* メニュー基準 */
.menu {
  position: static;
}

.submenu_button {
  display: none;
}

/* PCでは menu_row を通常表示に戻す */
.menu_row {
  display: block;
}

/* PCでは開閉ボタンを非表示 */
.menu_row .submenu_toggle {
  display: none !important;
}

/* 親メニュー hover */
.menu:hover > .menu_row > .menu_link,
.menu:hover > .menu_link {
  color: #C9A96E !important;
}

/* --------------------
   メガメニュー（PC）
-------------------- */

.child_menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;

  background: rgba(5,16,57,0.92);
  backdrop-filter: blur(6px);
  padding: 0 20px; /* ←最初は高さゼロなので上下paddingは入れない */

  box-sizing: border-box;
  z-index: 999;
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);

  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
}

/* hover時 */
.menu:hover .child_menu {
  max-height: 500px; /* ←十分な高さ（内容より大きく） */
  opacity: 1;
  padding: 35px 20px; /* ←ここで余白が出て“伸びる感”が出る */
}

/* 内側 */
.child_menu_inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  line-height: 1.2;
  font-size: 0.95rem;
  list-style: none;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 40px;

  text-align: left;
}

/* 列 */
.mega_column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* タイトル */
.mega_title {
  margin: 0 0 14px 0;
  padding-bottom: 8px;
  color: #ECB429;
  font-weight: bold;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

/* リンク */
.mega_column li a {
  display: block;
  padding: 8px 0;
  color: #fff;
  transition: 0.2s;
}

.mega_column li a:hover {
  color: #C9A96E;
}

/* PCではハンバーガー非表示 */
.menu_button {
  display: none;
}

/* --------------------
   スマホ表示
-------------------- */


@media screen and (max-width: 768px) {

  .menu_button {
    display: block;
    width: 50px;
    height: 50px;
    position: fixed;
    top: 20px;
    right: 20px;
    background: #051039;
    z-index: 1001;
    cursor: pointer;
    box-sizing: border-box;
  }

  .menu_button span,
  .menu_button span::before,
  .menu_button span::after {
    content: "";
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: 0.3s;
  }

  .menu_button span::before {
    transform: translate(-50%, -9px);
  }

  .menu_button span::after {
    transform: translate(-50%, 7px);
  }

  #hanburger:checked + .menu_button span {
    background: transparent;
  }

  #hanburger:checked + .menu_button span::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  #hanburger:checked + .menu_button span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .global_menu {
    display: block;
    visibility: hidden;
    opacity: 0;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 80px 20px 20px;
    background: #fff; /* ←スマホは白背景 */
    overflow-y: auto;
    text-align: left;
    z-index: 1000;
    transition: 0.3s;
  }

  #hanburger:checked ~ .global_menu {
    visibility: visible;
    opacity: 1;
  }

  .global_menu > .G-nav > li {
    display: block;
    position: relative;
  }

  /* スマホの通常リンク */
  .global_menu > .G-nav > li > a {
    width: 100%;
    padding: 14px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.12);
    color: #000;
  }

  /* 子メニューを持つ行 */
  .menu_row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.12);
    background: #fff;
  }

  .menu_row .menu_link {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 14px 10px;
    color: #000 !important;
  }

  /* 開閉ボタン */
  .menu_row .submenu_toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 56px !important;
    height: 48px !important;
    flex: 0 0 56px !important;
    border: none;
    background: rgba(201,169,110,0.12) !important;
  border-left: 1px solid rgba(201,169,110,0.25);
	  transition: 0.2s;
    color: #000 !important;
    font-size: 28px !important;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
    right: 0;
    top: 0;
    z-index: 2;
    appearance: none;
    -webkit-appearance: none;
    border-left: 1px solid rgba(0,0,0,0.08);
  }

  /* スマホではPCのhover開閉を無効化 */
  .menu:hover .child_menu,
  .menu.has-child:hover .child_menu,
  .global_menu .menu:hover .child_menu {
    display: none !important;
    max-height: 0 !important;
    opacity: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
  }

  /* スマホの子メニュー */
  .child_menu {
    display: none;
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    opacity: 1;
    max-height: none;
    overflow: visible;
    transition: none;
  }

  /* クリック後に開く */
  .menu.open > .child_menu,
  .menu.has-child.open > .child_menu,
  .global_menu .menu.open > .child_menu {
    display: block !important;
    max-height: none !important;
    opacity: 1 !important;
    padding: 10px 0 0 15px !important;
    overflow: visible !important;
  }

  .child_menu_inner {
    max-width: none;
    display: block;
    margin: 0;
    padding: 0;
  }

  .mega_column {
    margin-bottom: 18px;
  }

  .mega_title {
    color: #9A6C00;
    margin: 12px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0,0,0,0.12);
  }

  .mega_column li a {
    color: #000;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
}
