/* ============================================================
   相模原眼科 詳細ページCSS (page-detail.css)
   ============================================================
   3-4階層目: /guide/近視/, /ope/hakunaisho/ 等
   - 記事ヘッダー（タイトル＋MV）
   - 目次 (TOC)
   - 見出し (H1/H2/H3/H4)
   - 本文テキスト
   - テーブル（情報表、料金表、比較表）
   - リスト（箇条書き、番号付き）
   - 画像（figure / caption）
   - 補足ボックス（注意書き、ポイント、警告）
   - お悩み共感セクション
   - FAQ（アコーディオン / 展開型）
   - ステップ（フロー表示）
   - 自由診療通知
   - バッジ（保険/自由診療ラベル）
   - 関連コンテンツ
   - ページナビゲーション
   ============================================================ */

/* ----------------------------------------------------------
   Article Header
   ---------------------------------------------------------- */
.article-header {
  background: linear-gradient(135deg, var(--c-primary-light) 0%, #dce8f0 100%);
  padding: 48px var(--gutter);
  text-align: center;
  margin-bottom: 40px;
}

.article-header__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.5;
  margin-bottom: 10px;
}

.article-header__sub {
  font-size: 0.9rem;
  color: var(--c-text-light);
}

/* With MV Image */
.article-header--mv {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.article-header--mv img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.article-header--mv .article-header__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  color: #fff;
}
.article-header--mv .article-header__title {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}


/* ----------------------------------------------------------
   Table of Contents (TOC)
   ---------------------------------------------------------- */
.toc {
  background: var(--c-bg-gray);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-m);
  padding: 24px 28px;
  margin-bottom: 48px;
}

.toc__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border);
}

.toc__list {
  list-style: decimal;
  padding-left: 24px;
}

.toc__list li {
  margin-bottom: 6px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.toc__list a {
  color: var(--c-text);
  text-decoration: none;
}
.toc__list a:hover {
  color: var(--c-primary);
  text-decoration: underline;
}

/* Nested TOC */
.toc__list .toc__list {
  list-style: disc;
  margin-top: 4px;
  padding-left: 20px;
}


/* ----------------------------------------------------------
   Article Body
   ---------------------------------------------------------- */
.article-body {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}


/* ----------------------------------------------------------
   Headings (H2 / H3 / H4)
   ---------------------------------------------------------- */
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-text);
  padding-bottom: 12px;
  margin-top: 56px;
  margin-bottom: 24px;
  border-bottom: 3px solid var(--c-primary);
  line-height: 1.5;
}
.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--c-text);
  margin-top: 32px;
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 4px solid var(--c-primary);
  line-height: 1.5;
}

.article-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text-light);
  margin-top: 24px;
  margin-bottom: 12px;
  line-height: 1.5;
}


/* ----------------------------------------------------------
   Body Text
   ---------------------------------------------------------- */
.article-body p {
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.article-body strong {
  font-weight: 700;
  color: var(--c-text);
}

.article-body a {
  color: var(--c-primary);
  text-decoration: underline;
}
.article-body a:hover {
  color: var(--c-primary-dark);
}

/* Lead Text (冒頭文) */
.lead {
  font-size: 1.02rem;
  line-height: 2;
  margin-bottom: 40px;
  padding: 0 4px;
}

/* Horizontal Rule */
.article-body hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 40px 0;
}


/* ----------------------------------------------------------
   Lists
   ---------------------------------------------------------- */
.article-body ul {
  padding-left: 24px;
  margin-bottom: 20px;
  list-style: disc;
}

.article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
  list-style: decimal;
}

.article-body li {
  margin-bottom: 8px;
  font-size: 0.95rem;
  line-height: 1.75;
}

.article-body li strong {
  color: var(--c-text);
}

/* Bullet with custom marker */
.article-body ul.list--check {
  list-style: none;
  padding-left: 0;
}
.article-body ul.list--check li {
  padding-left: 28px;
  position: relative;
}
.article-body ul.list--check li::before {
  content: "\2714";
  position: absolute;
  left: 0;
  color: var(--c-primary);
  font-weight: bold;
}


/* ----------------------------------------------------------
   Tables
   ---------------------------------------------------------- */

/* 基本テーブル */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 0.92rem;
}

.table th,
.table td {
  border: 1px solid var(--c-border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

.table thead th {
  background: var(--c-primary);
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.table tbody th {
  background: var(--c-bg-gray);
  font-weight: 600;
  white-space: nowrap;
}

.table tbody td {
  background: #fff;
}

/* 比較テーブル */
.table--compare thead th:first-child {
  background: #4a8ec7;
}
.table--compare tbody td {
  text-align: center;
}

/* 料金テーブル */
.table--price tbody td:not(:first-child) {
  text-align: right;
  font-family: var(--font-en);
  font-weight: 600;
}

/* 横スクロール（モバイル） */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0 28px;
}
.table-wrap .table {
  margin: 0;
  min-width: 500px;
}


/* ----------------------------------------------------------
   Images / Figures
   ---------------------------------------------------------- */
.article-body figure {
  margin: 28px 0;
  text-align: center;
}

.article-body figure img {
  border-radius: var(--radius-m);
  max-width: 100%;
}

.article-body figcaption {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-top: 8px;
}


/* ----------------------------------------------------------
   Concern Box (お悩み共感セクション)
   ---------------------------------------------------------- */
.concern-box {
  background: #fef9f0;
  border: 2px solid #f0c36d;
  border-radius: var(--radius-l);
  padding: 28px 28px 20px;
  margin-bottom: 28px;
}

.concern-box__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #c58b1f;
  margin-bottom: 14px;
}

.concern-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.concern-box li {
  padding: 7px 0 7px 30px;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.65;
}
.concern-box li::before {
  content: "\2714";
  position: absolute;
  left: 0;
  color: #e8961b;
  font-weight: bold;
  font-size: 0.9rem;
}


/* ----------------------------------------------------------
   Highlight Box (ポイント / 重要情報)
   ---------------------------------------------------------- */
.box {
  border-radius: var(--radius-m);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 0.95rem;
  line-height: 1.75;
}

.box p { margin-bottom: 8px; }
.box p:last-child { margin-bottom: 0; }

/* Point (Blue) */
.box--point {
  background: var(--c-primary-light);
  border-left: 5px solid var(--c-primary);
}

/* Warning (Red) */
.box--warning {
  background: #fdf2f2;
  border-left: 5px solid var(--c-accent);
}

/* Notice (Yellow) */
.box--notice {
  background: #fff8e1;
  border-left: 5px solid #f0c36d;
}

/* Gray (Neutral) */
.box--gray {
  background: var(--c-bg-gray);
  border-left: 5px solid #bbb;
}


/* ----------------------------------------------------------
   Risk Box (放置リスク)
   ---------------------------------------------------------- */
.risk-box {
  background: #fdf2f2;
  border: 2px solid #e57373;
  border-radius: var(--radius-l);
  padding: 24px 28px;
  margin: 24px 0;
}

.risk-box__title {
  font-size: 1rem;
  font-weight: 700;
  color: #c62828;
  margin-bottom: 12px;
}

.risk-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.risk-box li {
  padding: 5px 0 5px 26px;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.65;
}
.risk-box li::before {
  content: "\26A0";
  position: absolute;
  left: 0;
  font-size: 0.9rem;
}


/* ----------------------------------------------------------
   Self-Pay Notice (自由診療通知)
   ---------------------------------------------------------- */
.self-pay-notice {
  background: #fff8e1;
  border: 1px solid #ffc107;
  border-radius: var(--radius-m);
  padding: 18px 22px;
  margin: 16px 0 28px;
  font-size: 0.9rem;
  line-height: 1.75;
}

.self-pay-notice p { margin-bottom: 8px; }
.self-pay-notice p:last-child { margin-bottom: 0; }

.self-pay-notice ul {
  list-style: disc;
  padding-left: 20px;
  margin: 8px 0 0;
}

.self-pay-notice li {
  font-size: 0.88rem;
  margin-bottom: 4px;
}


/* ----------------------------------------------------------
   Badges (保険/自由診療ラベル)
   ---------------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-s);
  vertical-align: middle;
  margin-left: 8px;
}

.badge--insurance {
  background: var(--c-primary);
  color: #fff;
}

.badge--self-pay {
  background: #f57c00;
  color: #fff;
}

.badge--new {
  background: var(--c-accent);
  color: #fff;
}


/* ----------------------------------------------------------
   FAQ
   ---------------------------------------------------------- */

/* FAQ Style A: Static (展開型) */
.faq {
  margin: 32px 0;
}

.faq__item {
  border-bottom: 1px solid var(--c-border-light);
  padding: 20px 0;
}
.faq__item:first-child {
  border-top: 1px solid var(--c-border-light);
}

.faq__q {
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-text);
  padding-left: 36px;
  position: relative;
  margin-bottom: 10px;
  line-height: 1.6;
}
.faq__q::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-en);
}

.faq__a {
  font-size: 0.95rem;
  padding-left: 36px;
  position: relative;
  color: var(--c-text);
  line-height: 1.75;
}
.faq__a::before {
  content: "A";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--c-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-en);
}

/* FAQ Style B: Accordion (アコーディオン) */
.faq-accordion {
  margin: 32px 0;
}

.faq-accordion dt {
  font-weight: 700;
  font-size: 0.98rem;
  padding: 16px 40px 16px 44px;
  cursor: pointer;
  position: relative;
  border-bottom: 1px solid var(--c-border-light);
  transition: background var(--transition);
  line-height: 1.6;
}
.faq-accordion dt:first-of-type {
  border-top: 1px solid var(--c-border-light);
}

.faq-accordion dt::before {
  content: "Q";
  position: absolute;
  left: 8px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-en);
}

.faq-accordion dt::after {
  content: "+";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--c-primary);
  font-weight: 700;
  transition: transform var(--transition);
}

.faq-accordion dt.active {
  background: var(--c-bg-gray);
}
.faq-accordion dt.active::after {
  content: "-";
}

.faq-accordion dt:hover {
  background: var(--c-bg-gray);
}

.faq-accordion dd {
  display: none;
  padding: 16px 20px 16px 44px;
  font-size: 0.95rem;
  line-height: 1.75;
  position: relative;
  background: var(--c-bg-light);
  border-bottom: 1px solid var(--c-border-light);
}

.faq-accordion dd::before {
  content: "A";
  position: absolute;
  left: 8px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--c-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-en);
}


/* ----------------------------------------------------------
   Steps (フロー表示)
   ---------------------------------------------------------- */
.steps {
  margin: 32px 0;
}

.step {
  display: flex;
  gap: 20px;
  margin-bottom: 0;
  padding: 24px 0;
  border-bottom: 1px solid var(--c-border-light);
  position: relative;
}
.step:last-child { border-bottom: none; }

.step__number {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
}

.step__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.7rem;
  text-align: center;
  line-height: 1.3;
}
.step__badge span {
  display: block;
  font-size: 1.1rem;
}

/* Connector line */
.step:not(:last-child) .step__number::after {
  content: "";
  display: block;
  width: 2px;
  flex: 1;
  background: var(--c-primary);
  opacity: 0.3;
  margin-top: 8px;
}

.step__body {
  flex: 1;
}

.step__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step__text {
  font-size: 0.92rem;
  color: var(--c-text-light);
  line-height: 1.75;
}

.step__img {
  flex-shrink: 0;
  width: 180px;
  border-radius: var(--radius-m);
  overflow: hidden;
}
.step__img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}


/* ----------------------------------------------------------
   Related Content
   ---------------------------------------------------------- */
.related {
  margin-top: var(--sp-section);
  padding-top: 32px;
  border-top: 1px solid var(--c-border);
}

.related__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.related__list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.related__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--c-bg-gray);
  border-radius: var(--radius-s);
  color: var(--c-text);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
}
.related__link:hover {
  background: var(--c-primary-light);
  color: var(--c-primary);
  text-decoration: none;
}
.related__link::before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 2px solid var(--c-primary);
  border-bottom: 2px solid var(--c-primary);
  transform: rotate(-45deg);
}


/* ----------------------------------------------------------
   Page Navigation (前のページに戻る)
   ---------------------------------------------------------- */
.page-nav {
  max-width: var(--w-content);
  margin: 40px auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.page-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--c-bg-gray);
  border-radius: var(--radius-m);
  color: var(--c-text-light);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
}
.page-nav__back:hover {
  background: #e0e0e0;
  color: var(--c-text);
  text-decoration: none;
}
.page-nav__back::before {
  content: "";
  width: 6px;
  height: 6px;
  border-left: 2px solid var(--c-text-light);
  border-bottom: 2px solid var(--c-text-light);
  transform: rotate(45deg);
}


/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .article-header { padding: 32px var(--gutter); }
  .article-header__title { font-size: 1.35rem; }
  .article-header--mv img { height: 180px; }

  .article-body h2 { font-size: 1.2rem; margin-top: 40px; }
  .article-body h3 { font-size: 1.02rem; }

  .toc { padding: 18px 20px; }

  .step { flex-direction: column; gap: 12px; }
  .step__number { flex-direction: row; width: auto; gap: 12px; }
  .step:not(:last-child) .step__number::after { display: none; }
  .step__img { width: 100%; }

  .concern-box { padding: 20px; }
  .risk-box { padding: 20px; }

  .table-wrap { margin: 16px -16px; padding: 0 16px; }
}
