@charset "utf-8";
/* CSS Document */

/* リセット */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ",
    Meiryo, sans-serif;
  /*background: #f5f5f5;*/
  line-height: 1.6;
}

/* ヘッダー */
.header {
  position: sticky;
  top: 0;
  z-index: 200; /* 全体の上に出す */
  background: #000;
  color: #fff;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

/* ロゴ画像：三本線の高さに合わせる */
.logo img {
  height: 45px;  /* 三本線と揃える */
  width: auto;
  display: block;
}


.nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100%; /* SPは全幅 */
  background: rgba(0, 0, 0, 0.8);
  color: #fff;

  /* ← 常に画面固定（すでにOK） */
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);

  z-index: 150;  /* 三本線(210)より下、しかし他より前 */

  /* ★追加：メニューの内部だけスクロール可能にする */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* PC時 */
@media (min-width: 768px) {
  .nav {
    width: auto;
    min-width: 240px;
    max-width: 320px;
  }
}

/* メニュー制御チェックボックス（メイン） */
.nav-toggle {
  display: none;
}

/* 三本線アイコン */
.nav-toggle-label {
  width: 30px;
  height: 24px; /* ロゴと同じ高さ */
  position: relative;
  cursor: pointer;
  z-index: 210; /* nav より前面にして、×を押せるようにする */
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 30px;
  height: 3px;
  background: #fff; /* 三本線は白 */
  border-radius: 2px;
  transition:
    transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
    top 0.35s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.25s ease;
}

.nav-toggle-label span {
  top: 10px; /* 中央線 */
}
.nav-toggle-label span::before {
  top: -8px; /* 上 */
}
.nav-toggle-label span::after {
  top: 8px;  /* 下 */
}

/* メインメニュー領域（右からスライドイン） */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100%;  /* SP時は全幅 */
  background: rgba(0, 0, 0, 0.8); /* 黒80%透過 */
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 100; /* ラベルより後ろ */
}

.main-menu {
  list-style: none;
  padding: 80px 1.5rem 1.5rem; /* 上に余白（ヘッダー分＋α） */
}

.main-menu > li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* 通常のメニュー項目 */
.main-menu > li > a {
  display: block;
  padding: 1rem 0.5rem;
  color: #fff;
  text-decoration: none;
}

.main-menu > li > a:hover {
  text-decoration: underline;
}

/* PC時は幅を「文字幅＋余白」程度に */
@media (min-width: 768px) {
  .nav {
    width: auto;
    min-width: 240px;
    max-width: 320px;
  }

  .main-menu {
    padding: 80px 2rem 2rem;
  }
}

/* メインメニュー開閉（バーガー） */
.nav-toggle:checked ~ .nav {
  transform: translateX(0);
}

/* 三本線 → × */
.nav-toggle:checked + .nav-toggle-label span {
  transform: rotate(45deg);
}
.nav-toggle:checked + .nav-toggle-label span::before {
  top: 0;
  transform: rotate(90deg);
}
.nav-toggle:checked + .nav-toggle-label span::after {
  top: 0;
  opacity: 0;
}

/* ========================= */
/* サブメニュー（▼で開閉） */
/* ========================= */

.has-sub {
  position: relative;
}

/* サブメニュー用チェックボックスは非表示 */
.sub-toggle {
  display: none;
}

/* サブメニューの見出し部分（▼付き） */
.sub-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0.5rem;
  cursor: pointer;
  color: #fff;
}

/* ▼アイコン */
.sub-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.sub-arrow::before {
  content: "▼";
  font-size: 0.8rem;
}

/* サブメニュー本体 */
.sub-menu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  padding-left: 1rem;
  transition: max-height 0.35s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* サブメニューのリンク */
.sub-menu li a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
}

.sub-menu li a:hover {
  text-decoration: underline;
}

/* サブメニュー開いたときの状態 */
.sub-toggle:checked + .sub-label + .sub-menu {
  max-height: 500px; /* 中身に合わせて十分な値を設定 */
}

/* ▼を回転させて「開いている」ことを示す */
.sub-toggle:checked + .sub-label .sub-arrow {
  transform: rotate(180deg);
}

/* コンテンツエリア */
.content {
  padding: 1.5rem;
}
