/* =========================================================
 * ヘッダー・メニュー（全ページ共通）
 * ・メニューボタンは PC / スマホともヘッダー右端に置く
 * ・開閉はチェックボックス（JS なしでも動く）。JS があれば
 *   背景スクロール停止・Esc で閉じる・aria 属性の更新を行う
 * ・ページ側の「* { font-size: 0.9em }」の影響を受けないよう px / rem で指定
 * ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #0d3e30;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* スクロールしたらヘッダーに影を付ける（site.js が付与） */
.site-header.is-scrolled {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.site-header .header_menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: 2000px;
  margin: 0 auto;
  box-sizing: border-box;
}

.site-header .header_logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.site-header .logo {
  width: 150px;
  height: auto;
  margin: 0;
  transition: transform 0.3s ease;
}

.site-header .header_logo:hover .logo {
  transform: scale(1.04);
}

.site-header .header_sns {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: #71c94e;
  font-size: 25px;
}

.site-header .header_follow {
  font-size: 22px;
}

.site-header .header_sns_link {
  display: flex;
  line-height: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header .header_sns_link:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

.site-header .header_sns_link img {
  width: 30px;
  height: 30px;
  min-width: 0;
  min-height: 0;
  margin: 0;
}

/* マイページの PC 用リンク */
.site-header .mypage_header {
  gap: 4px 0;
  margin-right: 8px;
}

.site-header .mypage_header a {
  font-size: 13px;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-header .mypage_header a[aria-current="page"] {
  color: #71c94e;
  border-bottom-color: #71c94e;
}

/* ---------- メニューボタン ---------- */

/* 見た目は隠すが、キーボード操作（Tab → Space）はできるようにする */
.site-header .checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  white-space: nowrap;
  opacity: 0;
}

.site-header .header_button {
  position: relative;
  z-index: 2000;
  display: block;
  flex: none;
  width: 48px;
  height: 48px;
  margin: 0;
  box-sizing: border-box;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background-color: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.site-header .header_button:hover {
  background-color: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.site-header .checkbox:focus-visible + .header_button {
  outline: 3px solid #71c94e;
  outline-offset: 3px;
}

/* 三本線 → × */
.site-header .icon,
.site-header .icon::before,
.site-header .icon::after {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  margin-left: -11px;
  border-radius: 2px;
  background-color: #ffffff;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1), top 0.35s cubic-bezier(0.65, 0, 0.35, 1),
    background-color 0.3s ease, opacity 0.2s ease;
}

.site-header .icon {
  top: 50%;
  margin-top: -1px;
}

.site-header .icon::before,
.site-header .icon::after {
  content: '';
  left: 0;
  margin-left: 0;
}

.site-header .icon::before {
  top: -7px;
}

.site-header .icon::after {
  top: 7px;
}

.site-header .checkbox:checked + .header_button {
  background-color: #ffffff;
  border-color: #0d3e30;
}

.site-header .checkbox:checked + .header_button .icon {
  background-color: transparent;
}

.site-header .checkbox:checked + .header_button .icon::before,
.site-header .checkbox:checked + .header_button .icon::after {
  top: 0;
  background-color: #0d3e30;
}

.site-header .checkbox:checked + .header_button .icon::before {
  transform: rotate(45deg);
}

.site-header .checkbox:checked + .header_button .icon::after {
  transform: rotate(-45deg);
}

/* ---------- メニュー本体（全画面） ---------- */

.site-header .nav {
  position: fixed;
  inset: 0;
  z-index: 1500;
  width: auto;
  height: auto;
  overflow-y: auto;
  background-color: #ffffff;
  visibility: hidden;
  pointer-events: none;
  opacity: 1;
  /* ボタンの位置から円が広がるように開く */
  clip-path: circle(0 at calc(100% - 44px) 34px);
  transition: clip-path 0.6s cubic-bezier(0.77, 0, 0.18, 1), visibility 0s linear 0.6s;
}

.site-header .checkbox:checked ~ .nav {
  visibility: visible;
  pointer-events: auto;
  clip-path: circle(150% at calc(100% - 44px) 34px);
  transition: clip-path 0.7s cubic-bezier(0.77, 0, 0.18, 1), visibility 0s;
}

.site-header .list {
  position: static;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 80px 20px 40px;
  list-style: none;
  text-align: center;
}

.site-header .nav_logo img {
  width: 140px;
  height: auto;
  margin-bottom: 12px;
}

.site-header .header_item {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-size: 16px;
  color: #0d3e30;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, #ffffff, #48922b, #ffffff) 1;
}

.site-header .link:link,
.site-header .link:visited {
  position: relative;
  display: block;
  padding: 16px 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #0d3e30;
  text-decoration: none;
  background-image: none;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.site-header .link:hover,
.site-header .link:focus-visible {
  color: #48922b;
  letter-spacing: 0.06em;
}

.site-header .link[aria-current="page"] {
  color: #48922b;
  font-weight: 700;
}

.site-header .sns_sp {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 20px;
}

.site-header .sns_sp img {
  width: 32px;
  height: 32px;
  padding: 0;
  transition: transform 0.25s ease;
}

.site-header .sns_sp a:hover img {
  transform: translateY(-3px);
}

/* 開いたとき、項目を順番にふわっと表示 */
.site-header .list > li {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.site-header .checkbox:checked ~ .nav .list > li {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.site-header .checkbox:checked ~ .nav .list > li:nth-child(1) { transition-delay: 0.25s; }
.site-header .checkbox:checked ~ .nav .list > li:nth-child(2) { transition-delay: 0.30s; }
.site-header .checkbox:checked ~ .nav .list > li:nth-child(3) { transition-delay: 0.35s; }
.site-header .checkbox:checked ~ .nav .list > li:nth-child(4) { transition-delay: 0.40s; }
.site-header .checkbox:checked ~ .nav .list > li:nth-child(5) { transition-delay: 0.45s; }
.site-header .checkbox:checked ~ .nav .list > li:nth-child(6) { transition-delay: 0.50s; }
.site-header .checkbox:checked ~ .nav .list > li:nth-child(7) { transition-delay: 0.55s; }
.site-header .checkbox:checked ~ .nav .list > li:nth-child(8) { transition-delay: 0.60s; }

/* メニューを開いている間は背景をスクロールさせない（site.js が付与）
   ※ body には overflow: hidden を付けない。付けると body がスクロールの枠になり、
     固定表示（sticky）のヘッダーがページ先頭の位置に戻ってしまう。スクロールした状態で
     メニューを開くと、ヘッダーごと閉じるボタンが画面の外に出て消えていた */
html.is-menu-open {
  overflow: hidden;
}

/* ---------- スマホ ---------- */
@media screen and (max-width: 700px) {
  .site-header .header_menu {
    padding: 8px 14px;
  }

  /* SNS アイコン・マイページの PC 用リンクはスマホではメニュー内に出す */
  .site-header .header_sns_link,
  .site-header .header_follow,
  .site-header .mypage_header {
    display: none;
  }

  .site-header .logo {
    width: 120px;
  }

  .site-header .header_button {
    width: 44px;
    height: 44px;
  }

  .site-header .nav {
    clip-path: circle(0 at calc(100% - 36px) 30px);
  }

  .site-header .checkbox:checked ~ .nav {
    clip-path: circle(150% at calc(100% - 36px) 30px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .nav,
  .site-header .checkbox:checked ~ .nav,
  .site-header .list > li,
  .site-header .checkbox:checked ~ .nav .list > li {
    transition: none !important;
  }
}
