/* 首都圏クルマ救急隊｜作業実績詳細ページ 共通スタイル
   カラー：白ベース／紺（信頼）／赤（アクセント）
   外部フレームワーク不使用・JavaScript不要 */

:root {
  --navy: #14284d;
  --navy-deep: #0d1c38;
  --navy-line: #d5dae6;
  --red: #c8102e;
  --red-dark: #a50d26;
  --line-green: #06c755;
  --line-green-dark: #05a648;
  --ink: #1d2430;
  --ink-soft: #445068;
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --bg-note: #fff7f2;
  --focus: #ffb300;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(20, 40, 77, 0.10);
  --wrap: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* モバイル固定CTAに本文が隠れないよう下部に余白 */
  padding-bottom: env(safe-area-inset-bottom);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

a { color: var(--navy); }
a:hover { color: var(--red); }

/* キーボード操作時のフォーカス表示 */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; display: block; }

/* --- スキップリンク --- */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* --- ヘッダー --- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--navy-line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}
.site-header__brand { display: flex; align-items: center; gap: 12px; }
.site-header__logo { height: 40px; width: auto; }
.site-header__name {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  letter-spacing: .02em;
}
.header-tel {
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  font-size: 1.05rem;
}
.header-tel span { font-size: .78rem; font-weight: 600; color: var(--ink-soft); display: block; }

/* --- パンくず --- */
.breadcrumb { background: var(--bg-soft); font-size: .82rem; }
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0; padding: 10px 0;
}
.breadcrumb li { color: var(--ink-soft); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--navy-line); }
.breadcrumb a { color: var(--navy); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* --- ヒーロー --- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 32px 0 36px;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .06em;
  padding: 6px 14px;
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(1.4rem, 5.2vw, 2.1rem);
  line-height: 1.5;
  margin: 16px 0 18px;
  font-weight: 800;
}
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.hero__tags li {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 600;
}
.hero__meta { font-size: .84rem; color: #cfd7e8; margin: 0; }
.hero__meta a { color: #fff; }

/* --- 本文レイアウト --- */
main { display: block; }
.section { padding: 34px 0; }
.section:nth-of-type(even) { background: var(--bg-soft); }
.section h2 {
  font-size: clamp(1.2rem, 4.4vw, 1.55rem);
  color: var(--navy);
  border-left: 6px solid var(--red);
  padding-left: 14px;
  margin: 0 0 18px;
  line-height: 1.5;
}
.section h3 { color: var(--navy); font-size: 1.05rem; margin: 24px 0 8px; }
.section p { margin: 0 0 14px; }
.lead { font-size: 1.05rem; }

/* 定義リスト（ケース概要） */
.case-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 18px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.case-facts dt { font-weight: 700; color: var(--navy); }
.case-facts dd { margin: 0; color: var(--ink); }

/* --- ギャラリー --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0;
}
.gallery figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: var(--bg-soft);
}
.gallery figcaption {
  font-size: .82rem;
  color: var(--ink-soft);
  padding: 10px 12px;
  line-height: 1.6;
}

/* --- 箇条書きカード --- */
.pill-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pill-list li {
  background: #fff;
  border: 1px solid var(--navy-line);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--navy);
  position: relative;
  padding-left: 38px;
}
.pill-list li::before {
  content: "";
  position: absolute; left: 14px; top: 50%;
  width: 10px; height: 10px; margin-top: -5px;
  background: var(--red); border-radius: 50%;
}
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--red); font-weight: 800;
}

/* --- 注意書き（免責） --- */
.note {
  background: var(--bg-note);
  border: 1px solid #f3c9b8;
  border-left: 5px solid var(--red);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: .92rem;
  color: var(--ink);
  margin: 18px 0 0;
}
.note strong { color: var(--red-dark); }

.safety-box {
  background: #fff;
  border: 1px solid var(--navy-line);
  border-top: 5px solid var(--navy);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* --- CTA --- */
.cta {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 40px 0;
}
.cta h2 { color: #fff; border-left-color: #fff; }
.cta p { color: #dbe2f0; }
.cta__buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  padding: 16px 26px;
  border-radius: 12px;
  min-height: 56px;
  font-size: 1.05rem;
  flex: 1 1 220px;
}
.btn small { display: block; font-size: .72rem; font-weight: 600; opacity: .9; }
.btn--tel { background: var(--red); color: #fff; }
.btn--tel:hover { background: var(--red-dark); color: #fff; }
.btn--line { background: var(--line-green); color: #fff; }
.btn--line:hover { background: var(--line-green-dark); color: #fff; }
.btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn--ghost:hover { border-color: #fff; color: #fff; }

/* --- フッター --- */
.site-footer {
  background: var(--navy-deep);
  color: #c3ccdd;
  padding: 28px 0 96px; /* 固定CTA分の余白を確保 */
  font-size: .85rem;
}
.site-footer a { color: #fff; }
.site-footer__row { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.site-footer p { margin: 6px 0; }

/* --- モバイル固定CTA（画面を塞ぎすぎない細めのバー） --- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--navy-line);
  box-shadow: 0 -4px 16px rgba(20,40,77,.12);
  backdrop-filter: blur(4px);
}
.sticky-cta a {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
  font-weight: 700;
  min-height: 48px;
  border-radius: 10px;
  font-size: .98rem;
}
.sticky-cta .s-tel { background: var(--red); color: #fff; }
.sticky-cta .s-line { background: var(--line-green); color: #fff; }
.sticky-cta small { display:block; font-size:.66rem; font-weight:600; opacity:.9; }

/* デスクトップでは固定CTAを隠す（本文内CTAで十分） */
@media (min-width: 768px) {
  .sticky-cta { display: none; }
  .site-footer { padding-bottom: 28px; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .gallery img { height: 200px; }
}

/* --- 狭い画面（〜360px対応） --- */
@media (max-width: 520px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery img { height: 42vw; min-height: 130px; }
  .pill-list { grid-template-columns: 1fr; }
  .case-facts { grid-template-columns: 1fr; gap: 4px 0; padding: 16px; }
  .case-facts dd { margin-bottom: 10px; }
  .header-tel { font-size: .95rem; }
  .btn { flex: 1 1 100%; }
}

/* 動きの抑制設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skip-link { transition: none; }
}
