/* ================================================
   カスタムプロパティ
   ================================================ */
:root {
  --header-height-sp: 60px;
  --header-height-pc: 72px;
  --slidein-transition: 0.3s ease;

  /* ===== z-index 階層管理 ===== */
  --z-drawer:    40; /* フルスクリーンナビ（右スライドイン） */
  --z-floating:  50; /* フローティング要素（ヘッダー借用用） */
}

/* ================================================
   ベースレイアウト（スニペット共通）
   ================================================ */
.l-container {
  margin-block: 40px;
}

.l-inner {
  max-width: calc(1200px + 20px * 2);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .l-inner {
    padding-inline: 40px;
  }
}

.p-snippet-title {
  font-size: 24px;
  line-height: 1.6;
  font-weight: bold;
  text-align: center;
}

@media (min-width: 768px) {
  .p-snippet-title {
    font-size: 32px;
  }
}

.p-snippet-content {
  margin-block-start: 24px;
  font-size: 16px;
  line-height: 1.8;
  color: #555;
}

/* ================================================
   c-header: ヘッダー全体
   ================================================ */
.c-header {
  position: sticky;
  top: 0;
  /* ナビ展開時もヘッダーを前面に保つため、通常の --z-header(20) ではなく --z-floating(50) を借用 */
  z-index: var(--z-floating);
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.c-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(1200px + 20px * 2);
  margin-inline: auto;
  padding-inline: 20px;
  height: var(--header-height-sp);
}

@media (min-width: 768px) {
  .c-header__inner {
    padding-inline: 40px;
    height: var(--header-height-pc);
  }
}

.c-header__logo {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .c-header__logo {
    font-size: 24px;
  }
}

/* ================================================
   c-hamburger: ハンバーガーボタン
   ================================================ */
.c-hamburger {
  /* ボタンリセット */
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px;

  /* 3本線を縦に並べるレイアウト */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
}

@media (min-width: 768px) {
  /* PCでは非表示 */
  .c-hamburger {
    display: none;
  }
}

/* ハンバーガーの1本線 */
.c-hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #333;
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* ×（バツ）アニメーション */
/* is-active クラスが付いたとき、3本線 → ×に変形 */

/* 1本目: 右上がりの斜線 */
.c-hamburger.is-active .c-hamburger__line:nth-child(1) {
  /* 線の高さ(2px) + gap(5px) = 7px（中央線との距離） */
  transform: translateY(7px) rotate(45deg);
}

/* 2本目: 非表示 */
.c-hamburger.is-active .c-hamburger__line:nth-child(2) {
  opacity: 0;
}

/* 3本目: 右下がりの斜線 */
.c-hamburger.is-active .c-hamburger__line:nth-child(3) {
  /* 線の高さ(2px) + gap(5px) = 7px（中央線との距離） */
  transform: translateY(-7px) rotate(-45deg);
}

/* ================================================
   c-nav: PCナビゲーション（横並び）
   ================================================ */
.c-nav {
  /* モバイル: 非表示 */
  display: none;
}

@media (min-width: 768px) {
  /* PC: 常に表示（横並び） */
  .c-nav {
    display: block;
  }
}

.c-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .c-nav__list {
    display: flex;
    gap: 32px;
  }
}

.c-nav__link {
  display: block;
  padding: 0;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

/* マウス系デバイスかつホバー操作が可能な場合のみ適用（タッチデバイス・ハイブリッドのタッチ操作を除外） */
@media (any-hover: hover) and (pointer: fine) {
  .c-nav__link:hover {
    color: #0066cc;
  }
}

/* ================================================
   c-slidein-nav: スライドインナビゲーション
   画面右側外（translateX(100%)）に配置し、
   is-open で translateX(0) にスライドして全画面を覆う
   ================================================ */
.c-slidein-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* 画面全体を覆う */
  z-index: var(--z-drawer); /* ドロワー / フルスクリーンナビ */
  background-color: #fff;

  /* ヘッダー分の余白を確保し、ナビリンクがヘッダーと重ならないようにする */
  padding-top: var(--header-height-sp);

  /* 初期状態: 画面右側外に配置 */
  transform: translateX(100%);
  transition: transform var(--slidein-transition);
}

/* is-open クラスで左にスライドして全画面表示 */
.c-slidein-nav.is-open {
  transform: translateX(0);
}

@media (min-width: 768px) {
  /* PCでは非表示 */
  .c-slidein-nav {
    display: none;
  }
}

/* ================================================
   c-slidein-nav__list / item / link: メニューリスト
   ================================================ */
.c-slidein-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* モバイル: 区切り線 */
.c-slidein-nav__item {
  border-bottom: 1px solid #f0f0f0;
}

.c-slidein-nav__item:last-child {
  border-bottom: none;
}

.c-slidein-nav__link {
  display: block;
  padding: 16px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

/* マウス系デバイスかつホバー操作が可能な場合のみ適用（タッチデバイス・ハイブリッドのタッチ操作を除外） */
@media (any-hover: hover) and (pointer: fine) {
  .c-slidein-nav__link:hover {
    color: #0066cc;
  }
}
