/* ==========================================================================
   重量物輸送ページ（heavy-transport）固有スタイル
   LOWER_SPEC_transport.md 準拠。lower.css の後に読み込む。
   お悩み / 保有車両カード / 商材タイル / 安全教育カード / 事例カード / 依頼の流れ
   ========================================================================== */

/* ==========================================================================
   お悩み ※推定 LOWER_SPEC §3-3
   ========================================================================== */
.worry {
  padding-top: var(--lower-section-py);
  padding-bottom: var(--lower-section-py);
}
.lead-heading,
.worry__resolve {
  text-align: center;
  font-size: var(--fs-30);
  font-weight: var(--fw-bold);
  line-height: 1.5;
}
.worry__resolve {
  margin-top: 24px;
}

.worry__bubble {
  position: relative;
  margin: 40px auto 0;
  width: fit-content;
  min-height: 50px; /* テキスト要素のためheight固定を回避（coding-rules-xd.md §5） */
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
}
.worry__bubble-text {
  color: var(--color-white);
  font-size: var(--fs-20);
  font-weight: var(--fw-bold);
  text-align: center;
}
.worry__bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid var(--color-primary);
}

.worry__box {
  margin: 40px auto 0;
  max-width: 886px;
  padding: 40px;
  background: var(--grad-diagonal);
  border: 1.4px solid var(--color-border-card);
}
/* チェックリスト（.check-list__item / .check-list__icon）は lower.css に統合（2026-09-07） */

.worry__arrow {
  margin: 24px auto 0;
  width: 0;
  height: 0;
  border-left: 60.5px solid transparent;
  border-right: 60.5px solid transparent;
  border-top: 37px solid var(--color-primary);
}

/* ==========================================================================
   保有車両一覧（POINT 02 従属）※推定 LOWER_SPEC §3-4
   ========================================================================== */
.vehicle-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));
  justify-content: center;
  gap: 40px;
}
.vehicle-card {
  min-width: 0;
  border: 1.4px solid var(--color-border-card);
  padding: 20px;
}
.vehicle-card__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.vehicle-card__specs {
  margin-top: 16px;
}
.vehicle-card__specs > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  font-size: var(--fs-16);
  line-height: var(--lh-list-16);
}
.vehicle-card__specs dt {
  flex-shrink: 0;
}
.vehicle-card__specs dd {
  min-width: 0;
}
/* 写真未支給の台は仮写真（取り扱い商材例 .material-tile__photo--placeholder と同じ見た目。
   修正依頼 No.3: 原稿が「写真」の灰色枠のカードに使う） */
.vehicle-card__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-diagonal);
  border: 1.4px solid var(--color-border-card);
}
.vehicle-card__placeholder-text {
  font-size: var(--fs-24);
  font-weight: var(--fw-bold);
  color: var(--color-heading-en);
}

/* ==========================================================================
   取り扱い商材例（POINT 03 従属）※推定 LOWER_SPEC §3-4
   ========================================================================== */
.material-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}
.material-tile {
  min-width: 0;
}
.material-tile__photo {
  width: 100%;
  aspect-ratio: 199 / 142;
  overflow: hidden;
}
.material-tile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.material-tile__label {
  margin-top: 8px;
  text-align: center;
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  overflow-wrap: break-word;
}
.material-section__note {
  margin-top: 16px;
  text-align: right;
  font-size: var(--fs-14);
}

/* ==========================================================================
   安全教育カード（POINT 04 従属・3カード）※推定 LOWER_SPEC §3-4
   ========================================================================== */
.safety-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));
  justify-content: center;
  gap: 40px;
}
.safety-card {
  min-width: 0;
}
.safety-card__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.safety-card__title {
  margin-top: 16px;
  font-size: var(--fs-18);
  font-weight: var(--fw-bold);
}
.safety-card__body {
  margin-top: 8px;
  font-size: var(--fs-16);
  line-height: var(--lh-list-16);
  overflow-wrap: break-word;
}

/* ==========================================================================
   事例カード「もっと見る」ボタン（POINT 05 従属）※推定 LOWER_SPEC §3-4
   .case-cards / .case-card 本体は lower.css へ移設（2026-09-07。値は変更なし）
   ========================================================================== */
.case-section__more {
  display: flex; /* .btn-fillのinline-flexだとmargin:autoで中央寄せできないため上書き */
  margin: 40px auto 0;
  width: 263px;
}
/* 実績カード（事例実績一覧の実在事例を表示）。タイトル・項目の行数がカードごとに違っても
   「詳細を見る」を下端にそろえる（works.css の .case-cards--grid と同じ考え方）。
   lower.css の .case-card__btn-row の余白 20px は padding-top に移し、下端寄せは margin-top:auto で行う */
.case-section .case-card {
  display: flex;
  flex-direction: column;
}
.case-section .case-card__btn-row {
  margin-top: auto;
  padding-top: 20px;
}

/* ==========================================================================
   料金参考例 ※推定 LOWER_SPEC §3-8
   見出しを.band-heading化（No.37）したことで、直後の.price__table-wrap
   （lower.css側でmargin:0）が見出しに詰まって見えるため、このページのみ余白を補う。
   修正依頼（2026-10-02）No.2: 見出しと表の間に .section-lead で
   「詳細なお見積りはお問い合わせください。」を入れたので、余白は
   見出し→リード文→表 の順に振り分ける。
   No.5: 運賃タリフ（距離＋小型/中型/大型/トレーラーの5列×22行）。.price__table の
   基本定義は lower.css（このページ専用）。lower.css は変更せず、5列表向けに上書きする。
   ========================================================================== */
.price .section-lead {
  margin-top: 24px;
  text-wrap: balance; /* 320px 幅で「くださ／い。」のように2文字だけ折り返すのを防ぎ、2行になる時は行の長さを揃える */
  word-break: auto-phrase; /* 「お問／い合わせ」のような語の途中ではなく、文節の切れ目で折り返す（非対応ブラウザは通常の折り返し） */
}
.price .section-lead + .price__table-wrap {
  margin-top: 24px;
}
/* 5列になったため、旧4列用の幅（712px）から広げる。注記は表の右端に揃える */
.price__table-wrap,
.price__note {
  max-width: 880px;
}
/* 表の枠は tabindex="0"（キーボードで横スクロールできるようにするため）。フォーカス時の輪郭を明示する */
.price__table-wrap:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.price__table {
  min-width: 680px; /* 769〜820px でも枠（689〜740px）に収まり、横スクロールを出さない（SP の最小幅と同じ値） */
  table-layout: fixed; /* 長いラベル行の折り返しで数値列の幅が変わらないよう列幅を固定 */
  border-collapse: separate; /* 1列目を sticky で固定しても罫線が追従するよう collapse を使わない（罫線は下辺のみで見た目は同じ） */
  border-spacing: 0;
}
.price__table thead th:first-child {
  width: 30%; /* 長いラベル（20kmを増すごとに加算する金額）が1行に収まる幅 */
}
.price__table th:first-child {
  position: sticky; /* 横スクロール時に距離の列を左に固定 */
  left: 0;
  z-index: 1;
}
.price__table tbody th {
  background-color: var(--color-white); /* sticky で下の列が透けないよう不透明にする */
  white-space: normal; /* lower.css は nowrap。「200kmを超えて…加算する金額」の長いラベルを折り返す */
  word-break: keep-all; /* 長いラベルは HTML の <wbr>（意味の切れ目）でだけ折り返し、「超え／て」のような途中切れを防ぐ */
}
/* 見出しの「（2tクラス）」は2行目へ。幅が足りない時に「クラ／ス）」のように途中で切れるのを防ぐ */
.price__class {
  display: block;
}
/* 長いラベルの「意味のまとまり」。PCでは「…まで」「…金額」の2行、狭い SP 固定列ではまとまりの中の <wbr> で折り返す */
.price__phrase {
  display: inline-block;
}

/* ==========================================================================
   依頼の流れ ※推定 LOWER_SPEC §3-9
   ========================================================================== */
.flow__row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 14.85px;
  margin-top: 40px;
}
.section-heading + .flow__row,
.band-heading + .flow__row {
  margin-top: 70px;
}
.flow-step {
  flex: 1 1 0;
  min-width: 0;
  max-width: 300px;
  text-align: center;
}
.flow-step__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.flow-step__number {
  margin-top: 12px;
  font-size: var(--fs-20);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}
.flow-step__label {
  margin-top: 4px;
  font-size: var(--fs-20);
  font-weight: var(--fw-bold);
  overflow-wrap: break-word;
}
.flow__arrow-wrap {
  flex: 0 0 auto;
  width: 10.3px;
  height: 40px;
  margin-top: 82px; /* 写真(アスペクト3:2)の縦中央に合わせる目安（要確認: カンプ無しのため実測補正なし） */
  display: flex;
  align-items: center;
  justify-content: center;
}
.flow__arrow-wrap--break {
  display: none;
}

/* ==========================================================================
   POINT 01 地図オーバーレイ（No.38 ディレクター初回チェック対応）
   拠点のプロット＆矢印で全国への輸送を可視化。座標は
   assets/data/office-pins.json の x_pct/y_pct を 860×1042 のviewBoxに
   換算した値（office/index.htmlの拠点マップと同じ校正結果を流用）。
   ========================================================================== */
.map-overlay {
  position: relative;
  width: 100%;
  height: 100%;
}
.map-overlay__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-overlay__arrow {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3px;
  stroke-linecap: round;
  opacity: 0.85;
}
.map-overlay__arrow-head {
  fill: var(--color-primary);
  opacity: 0.85;
}
.map-overlay__pin {
  fill: var(--color-primary);
  stroke: var(--color-white);
  stroke-width: 2px;
}
/* 地図画像が平行四辺形に切り取られて九州南部や北海道東端が欠けていた。原因は lower.css の
   .point-block__photo img:first-child（平行四辺形クリップ、詳細度 0,2,1）が
   .point-block__photo--plain img の clip-path:none（0,1,1）に勝っていたため。
   同じ詳細度で打ち消す（lower.css は変更せず、このファイルが後に読み込まれることを利用）。 */
.point-block__photo--plain img:first-child {
  clip-path: none;
}

/* ==========================================================================
   Responsive: SP（768px以下）LOWER_SPEC §5
   ========================================================================== */
@media (max-width: 768px) {
  .worry {
    padding-top: var(--lower-section-py-sp);
    padding-bottom: var(--lower-section-py-sp);
  }
  .lead-heading,
  .worry__resolve {
    padding: 0 16px;
    font-size: var(--fs-24);
  }
  .worry__box {
    margin-left: 16px;
    margin-right: 16px;
    padding: 24px;
  }

  .vehicle-cards,
  .safety-cards {
    grid-template-columns: minmax(0, 1fr);
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    row-gap: 40px;
  }
  .material-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-section__more {
    width: calc(100% - 32px);
    max-width: 300px;
  }

  /* 料金参考例: SP は表を横スクロール枠（.price__table-wrap の overflow-x:auto）に入れ、
     1列目（距離）を左に固定してページ自体は横スクロールさせない */
  .price .section-lead {
    margin-top: 16px;
    padding: 0 16px;
  }
  .price .section-lead + .price__table-wrap {
    margin-top: 16px;
  }
  .price__table {
    min-width: 680px; /* 固定列120px＋数値列140px×4。375pxでは2列目の途中までが見え、続きがあることが分かる */
  }
  .price__table thead th:first-child {
    width: 120px; /* 最長の切れ目「200kmを超えて」(14px で約98px)が余白込みで収まる幅 */
  }
  .price__table th:first-child {
    border-right: 1px solid var(--color-border-card); /* 固定列と流れる列の境目 */
  }
  .price__table tbody th {
    font-size: var(--fs-14); /* 固定列は120px幅。長いラベルの行数を抑える */
  }

  .flow__row {
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
  }
  .section-heading + .flow__row,
  .band-heading + .flow__row {
    margin-top: 0;
  }
  .flow__row + .flow__row {
    margin-top: 0;
  }
  .flow__row .flow-step {
    max-width: none;
    width: 100%;
  }
  .flow__arrow-wrap,
  .flow__arrow-wrap--break {
    width: 40px;
    height: 10.3px;
    margin: 16px auto;
  }
  .flow__arrow-wrap--break {
    display: flex;
  }
  .flow__arrow {
    transform: rotate(90deg);
  }
}

/* 料金参考例: 600〜768px は表が（ほぼ）横幅に収まるので、固定列を広げて長いラベルの行数を減らす */
@media (min-width: 600px) and (max-width: 768px) {
  .price__table thead th:first-child {
    width: 26%;
  }
}

/* 料金参考例: SP は枠が画面の左右いっぱいなので、フォーカスの輪郭は枠の内側に描く（外側だと画面端で切れる）。
   固定列（position: sticky）のセルは枠の輪郭より前面に描かれ、左端・左上・左下の線が隠れるため、
   フォーカス中だけ固定列のセルにも同じ色の線を引いて輪郭をつなぐ */
@media (max-width: 768px) {
  .price__table-wrap:focus-visible {
    outline-offset: -2px;
  }
  .price__table-wrap:focus-visible .price__table th:first-child {
    box-shadow: inset 2px 0 0 var(--color-primary);
  }
  .price__table-wrap:focus-visible .price__table thead th:first-child {
    box-shadow: inset 2px 2px 0 var(--color-primary);
  }
  .price__table-wrap:focus-visible .price__table tbody tr:last-child th:first-child {
    box-shadow: inset 2px -2px 0 var(--color-primary);
  }
}

/* 保有車両一覧: 769〜1059px は2列。3列のままだとカードが 203〜299px に縮み、
   「荷台内寸 長さ（mm）：」等のラベルがカードの内側余白に食い込む（769px で最大16px）。
   3列でカード幅が 300px に届くのは 1060px 以上（重量物保管の倉庫カードと同じ境目）。
   1060px 以上は3列（PC 指定のまま）、768px 以下は SP 指定（1列）のまま */
@media (min-width: 769px) and (max-width: 1059px) {
  .vehicle-cards {
    grid-template-columns: repeat(2, minmax(0, 300px));
  }
}
