/* チェックボックス非表示 */
.menu-checkbox {
  display: none;
}

/* バーガーアイコン */
.menu-button {
  box-sizing: border-box;
  position: absolute;
  top: 10px;
  right: 6%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: linear-gradient(90deg, rgba(213, 49, 42, 1), rgba(226, 137, 92, 1));
  border: 2px solid #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  z-index: 20;
  gap: 6px;
}

.menu-button span {
  display: block;
  width: 24px;
  height: 3px;
  background: #fff;
  transition: 0.3s ease-in-out;
  border-radius: 2px;
}

/* ナビゲーションメニュー（左からスライド） */
.menu {
  box-sizing: border-box;
  position: fixed;
  top: calc(-100vh - 50px);
  right: 7vw;
  max-width: 528px;
  width: 100%;
  height: 100dvh;
  background-image:
    url(../images/navi/nav_star.png),
    url(../images/navi/nav_bg.jpg);
  background-repeat:
    repeat-y,repeat;
  background-position:
    center top,center top;
  background-size:
    cover,auto;
  transition: top 0.4s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 60px 80px;
  z-index: 15;
}
.bg_wht{
  background: #fff;
  width: 100%;
  height: 100%;
  padding: 50px 30px;
  margin: 0;
}
.menu ul {
  position: relative;
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.menu ul li{
  width: 100%;
}
.menu ul li a{
  position: relative;
  display: block;
  width: 100%;
  color: #1d2088;
  text-decoration: none;
  font-size: 2.0rem;
  font-weight: 700;
  transition: 0.3s ease-in-out;
  margin-bottom: 0.5em;
  padding-left: 30px;
}
.menu ul li a::before{
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  background: #1d2088;
  border-radius: 50%;
  width: 20px;
  height: 20px;
}
.menu ul li a::after{
  content: "";
  position: absolute;
  top: 9px;
  left: 7px;
  background: #fff;
  height: calc(12px / 2 * tan(60deg));
  width: 8px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.menu a:hover{
  opacity: 0.6;
}
/* ナビ画像 */
.navitem_img{
  display: block;
  width: auto;
  height: 40px;
  margin: 20px 0 10px;
}

@media screen and (max-width : 768px) {
  .menu-button{
    top: 5px;
  }
  .menu {
    right: 0;
    padding: 30px 30px 80px;
  }
  .bg_wht{
    padding: 30px 10px 30px 20px;
  }

  .menu ul li a{
    font-size: 1.8rem;
    padding-left: 20px;
    margin-bottom: 0.5em;
  }
  .menu ul li a::before{
    top: 7px;
    width: 15px;
    height: 15px;
  }
  .menu ul li a::after{
    top: 10px;
    left: 6px;
    height: calc(10px / 2 * tan(60deg));
    width: 5px;
  }
  .navitem_img{
    height: 30px;
  }

}



/* サブメニューのスタイル */
.menu ul li .submenu {
  padding: 0;
  margin: 0;
  width: 100%;
}
.menu ul li .submenu li a::before{
  content: "●";
  font-size: 1.4rem;
  vertical-align: middle;
  margin-right: 10px;
}
.menu ul li .submenu a{
  padding: 0 120px;
}

/* オーバーレイ（背景を暗くする） */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  transition: 0.3s ease-in-out;
  visibility: hidden;
  z-index: 5;
  pointer-events: none;
}

/* メニュー表示時の動作 */
.menu-checkbox:checked ~ .menu {
  top: 0;
}
.menu-checkbox:checked ~ .overlay {
  background: rgba(0, 0, 0, 0.5);
  visibility: visible;
  pointer-events: auto;
}
/* バーガーアイコンをバツに変形 */
.menu-checkbox:checked + .menu-button span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-checkbox:checked + .menu-button span:nth-child(2) {
  opacity: 0;
}
.menu-checkbox:checked + .menu-button span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
