/*---------- toggle-icon ----------*/
.menu_btn {
  width: 45px;
}

.toggle-icon {
  position: relative;
  width: 100%;
  height: 33px;
}

.toggle-icon span {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background-color: #fff;
  transition: all .3s;
}

.toggle-icon span:nth-of-type(1) {
  top: 0;
}

.toggle-icon span:nth-of-type(2) {
  top: 14px;
}

.toggle-icon span:nth-of-type(3) {
  bottom: 0;
}

.toggle-text {
  position: relative;
}

.toggle-text::before,
.toggle-text::after {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  font-size: 1.1rem;
  margin: 5px 0 0;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  transition: all .3s;
}

.toggle-text::before {
  content: 'メニュー';
  opacity: 1;
}

.toggle-text::after {
  content: '閉じる';
  opacity: 0;
}

/* 展開時 */

.active .toggle-icon span:nth-of-type(1) {
  top: 14px;
  transform: rotate(40deg);
}

.active .toggle-icon span:nth-of-type(2) {
  display: none;
}

.active .toggle-icon span:nth-of-type(3) {
  bottom: 14px;
  transform: rotate(-40deg);
}

.active .toggle-text::before {
  opacity: 0;
}

.active .toggle-text::after {
  opacity: 1;
}


/*---------- #menu ----------*/
#menu {
  width: 100%;
  max-width: 250px;
  height: calc(100% - 90px);
  background-color: #1d426d;
  position: fixed;
  top: 90px;
  right: 0;
  overflow-y: auto;
  z-index: 999;
  transform: translate(250px);
  transition: all .5s;
}

#menu.open {
  transform: translate(0);
}

#menu ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

#menu li a {
  display: block;
  padding: 8px;
  color: #fff;
  border-bottom: 1px solid #566a82;
}

#menu_btn {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  cursor: pointer;
}

/* フォントサイズ調整 */
#menu .sub {
  font-size: 80%;
}

/* 外部リンクアイコン */
#menu a[target="_blank"] li::after {
  margin-left: 5px;
  content: "\f35d";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  display: inline-block;
  vertical-align: 1px;
}

/* --- .menu-background --- */
.menu-background {
  position: fixed;
  top: 0;
  left: 0;
  content: "";
  display: block;
  width: 0;
  height: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 4;
  opacity: 0;
  transition: opacity 0.5s;
}

.menu-background.open {
  width: 100%;
  height: 100%;
  opacity: 1;
}


/*---------- #menu02 ----------*/
#menu02 {
  width: 100%;
  max-width: 250px;
  height: 100%;
  background-color: #1d426d;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 999;
  transform: translate(250px);
  transition: all .5s;
}

#menu02.open {
  transform: translate(0);
}

#menu02 ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

#menu02 li a {
  display: block;
  padding: 8px;
  color: #fff;
  border-bottom: 1px solid #566a82;
}

#menu_btn02 {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  cursor: pointer;
}

/* フォントサイズ調整 */
#menu02 .sub {
  font-size: 80%;
}



/* 外部リンクアイコン */
#menu02 a[target="_blank"] li::after {
  margin-left: 5px;
  content: "\f35d";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  display: inline-block;
  vertical-align: 1px;
}

/* --- .menu-background --- */
.menu-background02 {
  position: fixed;
  top: 0;
  left: 0;
  content: "";
  display: block;
  width: 0;
  height: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 4;
  opacity: 0;
  transition: opacity 0.5s;
}

.menu-background02.open {
  width: 100%;
  height: 100%;
  opacity: 1;
}


/* 380px以下対策 */

.media380 {
  display: none;
}


@media screen and (max-width: 380px) {

  #menu li,
  #menu02 li {
    /* padding: 4px 0px 4px 8px; */
  }

  .media380 {
    display: inline;
  }

  .default {
    display: none;
  }

}















/* --- .ハンバーガーアニメーション --- */
.menu-trigger span:nth-of-type(2)::after {
  position: absolute;
  top: 0;
  left: 0;
  content: '';
  width: 100%;
  height: 4px;
  background-color: #fff;
  border-radius: 4px;
  transition: all .4s;
}

.menu-trigger.active span:nth-of-type(1) {
  transform: translateY(20px) scale(0);
}

.menu-trigger.active span:nth-of-type(2) {
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.menu-trigger.active span:nth-of-type(2)::after {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}

.menu-trigger.active span:nth-of-type(3) {
  transform: translateY(-20px) scale(0);
}