/* =========================================================
   おうち薬膳コーディネーター講座 LP スタイルシート
   目次
   1. 基本設定・変数（色や余白はここでまとめて管理）
   2. 共通パーツ（コンテナ・見出し・ボタン・リスト）
   3. ヘッダー
   4. ファーストビュー（hero）
   5. 各セクション共通レイアウト
   6. カード・グリッド
   7. カリキュラム
   8. 講師紹介
   9. FAQ
   10. 受講料
   11. 申し込みセクション
   12. フッター
   13. トップに戻るボタン
   14. レスポンシブ（スマホ対応）
   ========================================================= */

/* -------------------------------------------
   1. 基本設定・変数
   ここの色（カラーコード）を変えるだけで
   サイト全体の配色を変更できます
------------------------------------------- */
:root {
  /* カラー */
  --color-bg: #fbf6f0;          /* ページ全体の背景色（クリーム） */
  --color-bg-alt: #f4ebe0;      /* 交互に使う少し濃いめの背景色 */
  --color-primary: #c17b5c;     /* メインカラー（テラコッタ） */
  --color-primary-dark: #a8623f;/* メインカラーの濃い色（ホバー時など） */
  --color-accent: #7c8b5d;      /* アクセントカラー（セージグリーン） */
  --color-text: #3e3229;        /* 基本の文字色 */
  --color-text-light: #6b5d52;  /* 少し薄い文字色 */
  --color-white: #ffffff;

  /* 余白・角丸・影 */
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 24px;
  --shadow-card: 0 4px 16px rgba(62, 50, 41, 0.08);

  /* フォント */
  --font-base: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;

  /* コンテンツの最大幅 */
  --container-width: 1080px;
}

/* -------------------------------------------
   リセット・基本設定
------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-m);
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

h1, h2, h3, p {
  margin: 0 0 1em 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* 画面読み上げ用のみのテキスト（見た目には表示しない） */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* キーボード操作時のフォーカスを見やすく（アクセシビリティ対応） */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* スキップリンク（見出しへ飛べるリンク。通常は非表示、フォーカス時のみ表示） */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--color-text);
  color: var(--color-white);
  padding: 10px 16px;
  border-radius: var(--radius-s);
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 8px;
}

/* -------------------------------------------
   2. 共通パーツ
------------------------------------------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
}

h2.center,
p.center {
  text-align: center;
}

h2.small-heading {
  font-size: 1.3rem;
}

.lead-text {
  color: var(--color-text-light);
  font-size: 1rem;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(193, 123, 92, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.btn-large {
  padding: 16px 40px;
  font-size: 1.05rem;
}

.btn-xlarge {
  padding: 20px 48px;
  font-size: 1.15rem;
}

/* チェックリスト（〇〇な方向け） */
.check-list li,
.cross-list li {
  position: relative;
  padding: 8px 0 8px 32px;
  border-bottom: 1px dashed rgba(62, 50, 41, 0.15);
}
.check-list li:last-child,
.cross-list li:last-child {
  border-bottom: none;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.cross-list li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* 白背景セクション用（申し込みボックス内）のチェックリスト */
.check-list-white li {
  border-bottom-color: rgba(255, 255, 255, 0.25);
}
.check-list-white li::before {
  color: var(--color-white);
}

/* 番号つきリスト（薬膳の再定義セクションなど） */
.number-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}
.number-list .number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* -------------------------------------------
   3. ヘッダー
------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(251, 246, 240, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(62, 50, 41, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary-dark);
  white-space: nowrap;
}
.logo span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-text-light);
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-nav a:not(.btn) {
  font-weight: 500;
  font-size: 0.95rem;
}
.primary-nav a:not(.btn):hover {
  color: var(--color-primary);
}

/* ハンバーガーボタン（デフォルトはスマホでのみ表示） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle-bar {
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* -------------------------------------------
   4. ファーストビュー（hero）
------------------------------------------- */
.hero {
  padding: 56px 0 64px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1.5;
  font-weight: 900;
  color: var(--color-text);
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--color-text-light);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.hero-badges li {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--color-white);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: var(--shadow-card);
}

/* -------------------------------------------
   5. 各セクション共通レイアウト
------------------------------------------- */
.section {
  padding: 64px 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-cta {
  margin-top: 32px;
}

/* テキストと画像を左右に並べるレイアウト */
.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* reverse: 画像を左、テキストを右にしたい場合に使用 */
.section-split-reverse .section-split-text {
  order: 2;
}
.section-split-reverse .section-split-image {
  order: 1;
}

/* -------------------------------------------
   6. カード・グリッド
------------------------------------------- */
.card-grid {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background-color: var(--color-white);
  border-radius: var(--radius-m);
  padding: 28px 20px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5em;
}

.card p {
  color: var(--color-text-light);
  font-size: 0.92rem;
  margin-bottom: 0;
}

.card .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.card-check {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.card-check p {
  color: var(--color-text);
  font-weight: 500;
}

/* -------------------------------------------
   7. カリキュラム／流れ（ステップ表示）
------------------------------------------- */
.flow-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  counter-reset: flow;
}
.flow-list li {
  background-color: var(--color-white);
  border: 2px solid var(--color-accent);
  color: var(--color-text);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.flow-list li:not(:last-child)::after {
  content: "→";
  margin-left: 12px;
  color: var(--color-accent);
  font-weight: 700;
}

.curriculum-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.curriculum-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: var(--color-white);
  border-radius: var(--radius-m);
  padding: 16px 24px;
  box-shadow: var(--shadow-card);
}
.curriculum-step {
  flex-shrink: 0;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.curriculum-title {
  font-weight: 500;
}

/* -------------------------------------------
   8. 講師紹介
------------------------------------------- */
.instructor-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: center;
}

.instructor-photo img {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.instructor-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary-dark);
}

.instructor-details summary {
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 700;
  margin-top: 8px;
}
.instructor-details p {
  margin-top: 12px;
  color: var(--color-text-light);
}

/* -------------------------------------------
   9. FAQ（detailsタグでアコーディオンを実現）
------------------------------------------- */
.faq-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--color-white);
  border-radius: var(--radius-m);
  padding: 8px 24px;
  box-shadow: var(--shadow-card);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 32px;
}

/* Safari向けにデフォルトの三角マーカーを消す */
.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "Q.";
  color: var(--color-primary);
  margin-right: 8px;
}

/* 開閉アイコン（＋／－） */
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 16px;
  font-size: 1.2rem;
  color: var(--color-accent);
}
.faq-item[open] summary::after {
  content: "－";
}

.faq-item p {
  padding-bottom: 16px;
  color: var(--color-text-light);
}

/* -------------------------------------------
   10. 受講料
------------------------------------------- */
.price-box {
  max-width: 640px;
  margin: 32px auto 0;
  background-color: var(--color-white);
  border-radius: var(--radius-l);
  padding: 40px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.price-amount {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--color-primary-dark);
}
.price-amount span {
  font-size: 1rem;
  font-weight: 500;
  margin-left: 6px;
  color: var(--color-text-light);
}

.price-table {
  margin-top: 24px;
  text-align: left;
}
.price-table th,
.price-table td {
  padding: 14px 8px;
  border-bottom: 1px solid rgba(62, 50, 41, 0.1);
  font-size: 0.92rem;
}
.price-table th {
  width: 35%;
  color: var(--color-text-light);
  font-weight: 500;
}

/* -------------------------------------------
   11. 申し込みセクション（最終CTA）
------------------------------------------- */
.apply-section {
  padding: 72px 0;
}

.apply-box {
  max-width: 640px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-white);
  border-radius: var(--radius-l);
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(168, 98, 63, 0.35);
}

.apply-box h2 {
  color: var(--color-white);
}

.apply-price {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.apply-box .check-list {
  text-align: left;
  max-width: 380px;
  margin: 0 auto 32px;
}

/* -------------------------------------------
   12. フッター
------------------------------------------- */
.site-footer {
  background-color: var(--color-text);
  color: var(--color-white);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.logo-footer {
  color: var(--color-white);
}
.logo-footer span {
  color: rgba(255, 255, 255, 0.65);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}
.footer-links a:hover {
  color: var(--color-white);
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* -------------------------------------------
   13. トップに戻るボタン
------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(62, 50, 41, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 90;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background-color: var(--color-primary-dark);
}

/* =========================================================
   14. レスポンシブ対応（タブレット・スマホ）
   ※このプロジェクトはモバイルファーストではなく、
     デスクトップを基準に「画面が狭くなったら」調整する方式です
   ========================================================= */

/* タブレット以下 */
@media (max-width: 900px) {
  .card-grid-4,
  .card-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .instructor-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .instructor-photo img {
    width: 200px;
  }
}

/* スマホ */
@media (max-width: 700px) {
  .section {
    padding: 48px 0;
  }

  /* ナビゲーションをハンバーガーメニューに切り替え */
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    border-bottom: 1px solid rgba(62, 50, 41, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .primary-nav.is-open {
    max-height: 400px;
  }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    gap: 16px;
  }
  .primary-nav .btn {
    width: 100%;
  }

  /* ハンバーガーアイコンを×に変形 */
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* 横並びを縦並びに */
  .hero-inner,
  .section-split,
  .section-split-reverse .section-split-text,
  .section-split-reverse .section-split-image {
    order: initial;
  }
  .hero-inner,
  .section-split {
    grid-template-columns: 1fr;
  }
  .hero-image {
    order: -1; /* スマホでは画像を先に表示 */
  }

  .hero-badges {
    justify-content: center;
  }

  .card-grid-2,
  .card-grid-3,
  .card-grid-4,
  .card-grid-5 {
    grid-template-columns: 1fr;
  }

  .flow-list {
    flex-direction: column;
    align-items: stretch;
  }
  .flow-list li {
    justify-content: center;
    text-align: center;
  }
  .flow-list li:not(:last-child)::after {
    content: "↓";
    display: block;
    margin: 4px auto 0;
  }

  .curriculum-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .price-box {
    padding: 32px 20px;
  }

  .apply-box {
    padding: 36px 20px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}
