/* ===========================
   Header
   =========================== */
.header {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.header__logo a {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* ハンバーガーボタン */
.header__toggle {
  display: block;
  width: 32px;
  height: 28px;
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 1001;
}

.header__toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-secondary);
  transition: .3s;
}

.header__toggle span:nth-child(1) { top: 0; }
.header__toggle span:nth-child(2) { top: 9px; }
.header__toggle span:nth-child(3) { top: 18px; }

/* 開いた時のアニメーション */
.header__toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.header__toggle.active span:nth-child(2) {
  opacity: 0;
}
.header__toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ハンバーガーの下に「メニュー」表示 */
.header__toggle::after {
  content: "メニュー";
  position: absolute;
  bottom: -1.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--color-secondary);
  letter-spacing: 0.05em;
  white-space: nowrap;
  }

/* ===========================
   モーダル背景
   =========================== */
.header__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 998;
}

.header__overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===========================
   横スライドメニュー
   =========================== */
.header__nav {
  position: fixed;
  top: 0;
  right: -320px; /* ← 初期位置（画面外） */
  width: 320px;
  height: 100vh;
  background: #fff;
  padding-top: 80px;
  transition: right .35s ease;
  z-index: 999;
  display: flex;
  justify-content: center;
}

.header__nav.open {
  right: 0; /* ← スライドイン */
}

.header__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 220px; /* ← 中央寄せの幅 */
  text-align: left;
}

.header__nav a {
  font-size: var(--font-size-md);
  color: var(--color-secondary);
  font-weight: 600;
}