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

  /* ===== z-index 階層管理 ===== */
  --z-header: 20; /* ヘッダー背景 */
}

/* ================================================
   ベースレイアウト（スニペット共通）
   ================================================ */
.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-index: var(--z-header);
  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: ナビゲーション
   ================================================ */
.c-nav {
  /* モバイル: 非表示（デフォルト） */
  display: none;
  position: absolute;
  top: var(--header-height-sp); /* .c-header の高さに合わせる */
  left: 0;
  width: 100%;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  /* PC: 常に表示（横並び） */
  .c-nav {
    display: block;
    position: static;
    width: auto;
    background: none;
    border: none;
    box-shadow: none;
  }
}

/* モバイル: is-open クラスで表示 */
.c-nav.is-open {
  display: block;
}

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

@media (min-width: 768px) {
  /* PC: 横並び */
  .c-nav__list {
    display: flex;
    gap: 32px;
  }
}

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

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

@media (min-width: 768px) {
  /* PC: 区切り線なし */
  .c-nav__item {
    border: none;
  }
}

.c-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-nav__link:hover {
    color: #0066cc;
  }
}

@media (min-width: 768px) {
  /* PC: パディング調整 */
  .c-nav__link {
    padding: 0;
    font-size: 14px;
  }
}
