.c-header {
  background-color: #333;
  box-sizing: border-box;
  display: flex;
  color: #fff;
}

.c-header__list {
  display: flex;
  margin-left: auto; /* リストを右側に寄せる */
  padding: 0;
}

.c-header__list-item {
  list-style: none;
}

.c-header__list-link {
  color: #fff;
  margin-right: 20px;
  text-decoration: none;
  padding: 10px 0px;
}

.c-header__list-link:hover {
  filter: opacity(0.6);
}

/* ハンバーガーメニュー */
.c-hamburger-menu {
  position: relative;
}

/* ハンバーガーメニューのボタンスタイル */
.c-hamburger-menu__input {
  display: none;
}

.c-hamburger-menu__bg {
  background-color: #000;
  cursor: pointer;
  display: none;
  left: 0;
  opacity: 0.4;
  top: 0;
  width: 0;
  z-index: -1;
}

.c-hamburger-menu__button {
  display: none;
}

@media (max-width: 768px) {
  .c-header__list {
    display: none;
  }

  .c-header__list-link {
    margin-right: 0px;
  }

  .c-hamburger-menu__button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 32px;
    cursor: pointer;
    z-index: 101; /* メニューの上に表示 */
  }

  .c-hamburger-menu__button-mark {
    background-color: #fff;
    height: 2px;
    width: 20px;
    transition: 0.3s;
  }

  .c-hamburger-menu__bg {
    display: none;
  }

  /* チェックボックスがONのときのスタイル */
  /* ハンバーガーメニューのオーバーレイ */
  #hamburger:checked ~ .c-hamburger-menu__bg {
    display: block; /* オーバーレイを表示 */
    position: fixed; /* 固定位置に配置 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明の黒い背景 */
    z-index: 99; /* メニューより上に表示 */
    transition: background-color 0.3s ease; /* オーバーレイのスムーズな表示 */
  }

  /* バーガーメニューが表示されたときのメニューリスト */
  .c-hamburger-menu__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-40%);
    background-color: #333;
    padding: 20px 0;
    width: 80%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
  }
  /* メニューが開いたときの表示 */
  #hamburger:checked ~ .c-hamburger-menu__list {
    opacity: 1;
  }

  /* 個々のメニュー項目のスタイル */
  .c-hamburger-menu__list-item {
    width: 80%; /* それぞれのボックスの幅を調整 */
    margin: 20px 0; /* 各ボックスの間隔 */
    padding: 12px;
    text-align: center; /* テキストの中央揃え */
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #444;
    border: 2px solid #007bff; /* 四角で囲むためのボーダー */
    border-radius: 6px; /* 角を少し丸くする */
    transition: background-color 0.3s ease;
    padding-left: 20px;
  }

  /* ホバーしたときの効果 */
  .c-hamburger-menu__list-item:hover {
    background-color: #007bff;
  }
}
