/* -------------------

※後で消す
aタグの範囲を広げるスタイルを
汎用型にしてstyle.cssに移す予定
【該当箇所】
37行目、69行目

---------------------- */

/* -------ヘッダー全体------- */
.head_wrapper {
  width: 100%;
  height: 8rem;
  color: #6fa8dc;
  background-color: transparent;
  font-family: "M PLUS 1 Code", monospace;
  position: absolute;
  top: 0;
}

/* -------ヘッダー内のコンテンツ------- */
.head_contaier {
  width: 120rem;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: end;
}

/* ロゴ画像 */
.head_logo {
  max-width: 20rem;
  height: auto;
  margin-bottom: 0.5rem;
  margin-right: 5rem;
  transition: all 0.3s;
}

.head_logo a {
  width: 100%;
  height: 100%;
  display: block;
}

/* ロゴ画像：ホバー */
.head_logo:hover {
  opacity: 0.6;
}

/* -------メニュー------- */
.menu_container {
  width: 100%;
  height: 100%;
  position: relative;
}

.head_list {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: end;
}

.head_menu {
  width: 100%;
  text-align: center;
  transition: all 0.2s;
  padding-bottom: 1rem;
}

.head_menu a {
  width: 100%;
  height: 100%;
  display: block;
}

/* メニュー：ホバー */
.head_menu:hover {
  opacity: 0.7;
}

/* -------トップへ戻るボタン------- */
.top_button {
  width: 8rem;
  height: 8rem;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background-color: #6fa8dc;
  color: #ffffff;
  font-size: 3rem;
  border-radius: 50%;
  z-index: 99;
}

.top_button a {
  display: block;
  width: 8rem;
  height: 8rem;
  text-align: center;
  align-content: center;
}

.test_contents {
  height: 200vh;
}

@media screen and (max-width:768px) {

  .head_wrapper {
    height: 6rem;
  }

  /* -------ヘッダー内のコンテンツ------- */
  .head_contaier {
    width: 100%;
  }

  /* ロゴ画像 */
  .head_logo {
    max-width: 15rem;
    margin: auto 1rem;
  }

  /* メニューのオーバーレイ */
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: 0.4s;
    z-index: 1;
  }

  /* -------ハンバーガーメニュー------- */
  .hamburger_menu {
    width: 5.2rem;
    height: 5.2rem;
    border-radius: 50%;
    background-color: #ffffff;
    display: inline-block;
    align-content: center;
    position: fixed;
    top: 1.5rem;
    right: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
    z-index: 99;
  }

  .hamburger_menu span {
    width: 100%;
    display: block;
    background-color: #6fa8dc;
    height: 0.3rem;
    transition: all 0.3s;
  }

  /* 線の下余白 */
  .hamburger_menu span:nth-child(1),
  .hamburger_menu span:nth-child(2) {
    margin-bottom: 0.3rem;
  }

  /* -------メニュー------- */
  .menu_container {
    width: 80%;
    height: 100%;
    background-color: #ffffff;
    display: block;
    padding: 5rem 2rem;
    margin: 0;
    position: fixed;
    top: 0;
    right: -100%;
    transition: right 0.4s ease;
    z-index: 99;
  }

  .head_list {
    display: block;
  }

  .head_menu {
    text-align: left;
  }

  .head_menu a {
    padding: 1rem 0;
  }

  /* ハンバーガーメニューの開閉(三から✖になる) */
  #menu_toggle:checked~.hamburger_menu span:nth-child(1) {
    transform: translateY(0.5rem) rotate(45deg);
  }

  #menu_toggle:checked~.hamburger_menu span:nth-child(2) {
    opacity: 0;
  }

  #menu_toggle:checked~.hamburger_menu span:nth-child(3) {
    transform: translateY(-0.7rem) rotate(-45deg);
  }

  /* メニューが開くと右からスライドインしてくる */
  #menu_toggle:checked~.head_contaier>.menu_container {
    right: 0;
    /* メニューが開いたら右を0にする */
  }

  /* ハンバーガーメニューが開くとメニュー背景にオーバーレイがかかる */
  #menu_toggle:checked~.overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* -------トップへ戻るボタン------- */
  .top_button {
    width: 5.2rem;
    height: 5.2rem;
    font-size: 2rem;
  }

  .top_button a {
    width: 5.2rem;
    height: 5.2rem;
  }

}