/* 全体の余白リセット & ヘッダーの高さ分 padding-top */
body {
  margin: 0;
  padding-top: 70px; /* ヘッダーの高さ分 */
  font-family: Arial, sans-serif;
}

/* ヘッダー */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: space-between; /* タイトルとメニューを左右に */
  padding: 0 20px;
  z-index: 1000;
  box-sizing: border-box;
}

.menu-item.active a {
  border-bottom: 2px solid white;
}

/* タイトル部分 */
.title h1 {
  margin: 0;
  color: white;
  font-size: 24px;
}

.title a {
  color: inherit;
  text-decoration: none;
}

/* ナビバー */
.nav .menu-group {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-item {
  display: inline-block;
  margin-left: 20px; /* メニュー間の余白 */
}

.menu-item a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 16px;
  font-family: 'Arial', sans-serif; /* 好きなフォントに変更 */
}

/* ページ本文 */
main p {
  margin: 20px 0;
  line-height: 1.5;
}

/* ハンバーガーボタン */
.hamburger {
  display: none; /* PCでは非表示 */
  width: 30px;
  height: 24px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  background-color: white;
  margin: 5px 0;
  transition: all 0.3s ease;
}
/* ハンバーガーを開いたとき */
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* スマホ表示 */
@media screen and (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: black;

    /* アニメーション用 */
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .menu-item {
    display: block;
    text-align: center;
    padding: 15px 0;
  }
}
