/* ==========================================================================
   重量物保管ページ（service/storage）固有スタイル
   LOWER_SPEC_storage.md 準拠。style.css → lower.css の後に読み込む。
   lower.css / style.css は変更しない。重量物輸送ページ（service-transport.css）と
   共通する部品は値をそのまま写して定義する（service-transport.css 自体は読み込まない）。
   お悩み / 保有倉庫カード / 商材タイル / 3つの特長カード / ポイント写真の拡張 /
   空き倉庫情報表 / プレースホルダー
   ========================================================================== */

/* ==========================================================================
   プレースホルダーは lower.css の .placeholder に統合（2026-09-07）
   ========================================================================== */

/* ==========================================================================
   お悩み ※service-transport.css .worry* と同値（LOWER_SPEC_transport.md §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 01 従属）※.vehicle-cards 相当（値は転用）
   2026-10 修正依頼対応: 東北・関東・東海のエリアごとに .warehouse-area でまとめる。
   エリア見出しは下層共通の .lower-subheading（h4）を使い、親の「保有倉庫一覧」（h3）より
   一段小さくして階層を分け、余白を調整する。
   写真は、原稿でカードの位置に写真があった倉庫は <img>、「写真」の灰色枠だった倉庫は
   従来どおり .placeholder（PHOTO表記）。
   ========================================================================== */
.warehouse-area {
  margin-top: 60px;
}
.warehouse-section > .lower-subheading + .warehouse-area {
  margin-top: 40px;
}
/* 親の .lower-subheading は 24px（SP 20px）。エリア見出しは PC 20px / SP 17px（SPは下のメディアクエリ） */
.warehouse-area__title {
  font-size: var(--fs-20);
}
.warehouse-area__title + .warehouse-cards {
  margin-top: 24px;
}
.warehouse-cards {
  display: grid;
  /* カード幅300px×3列を6分割し、1枚で2列ぶん使う（3列にするのは1060px以上、2列は769〜1059px）。
     最終行が1〜2枚のエリアでもカードを中央に寄せるため。 */
  grid-template-columns: repeat(6, minmax(0, 130px));
  justify-content: center;
  gap: 40px;
}
.warehouse-card {
  min-width: 0;
  border: 1.4px solid var(--color-border-card);
  padding: 20px;
}
.warehouse-card__photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover; /* <img> のとき用。.placeholder には影響しない */
}
.warehouse-card__specs {
  margin-top: 16px;
}
.warehouse-card__specs > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  font-size: var(--fs-16);
  line-height: var(--lh-list-16);
}
.warehouse-card__specs dt {
  flex-shrink: 0;
}
.warehouse-card__specs dd {
  min-width: 0;
}
/* 保有設備は「10t×1基、5t×1基」のような短い語の並び。語の途中で折り返して「基、」だけの行ができないよう、
   日本語の字間では折らず、「、」「／」と半角スペースの位置でだけ折り返す */
.warehouse-card__equip {
  word-break: keep-all;
  overflow-wrap: anywhere; /* 万一1語が枠より長くてもはみ出さない（通常は効かない） */
}
/* 企業サイトのある倉庫名は別タブのリンク（下層共通の同意文リンクと同じ赤＋下線） */
.warehouse-card__link {
  color: var(--color-primary);
  text-decoration: underline;
}
@media (min-width: 769px) {
  .warehouse-card {
    grid-column: span 2;
  }
  /* 最終行が2枚のとき・1枚のときは中央に寄せる（3列） */
  .warehouse-card:nth-last-child(2):nth-child(3n + 1) {
    grid-column: 2 / span 2;
  }
  .warehouse-card:last-child:nth-child(3n + 1) {
    grid-column: 3 / span 2;
  }
}
/* 769〜1059px は2列にする。3列（カード幅300px×3＋間隔40px×2＋左右余白80px＝1060px）が
   収まらない幅ではカードが縮み、保有設備の改行と重なって「基、」「地」だけの行ができるため。
   最終行が1枚のときは3列のときと同じく中央に寄せる。 */
@media (min-width: 769px) and (max-width: 1059px) {
  .warehouse-cards {
    grid-template-columns: repeat(4, minmax(0, 130px));
  }
  .warehouse-card,
  .warehouse-card:nth-last-child(2):nth-child(3n + 1),
  .warehouse-card:last-child:nth-child(3n + 1) {
    grid-column: span 2;
  }
  .warehouse-card:last-child:nth-child(2n + 1) {
    grid-column: 2 / span 2;
  }
}

/* ==========================================================================
   取り扱い商材例（POINT 02 従属）※service-transport.css .material-tile* と同値
   本ページの10タイルはすべて写真入り（400x286 の img を .material-tile__photo に cover 表示）
   ========================================================================== */
.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);
}

/* ==========================================================================
   3つの特長カード（POINT 03 従属）※service-transport.css .safety-card* と同値
   ========================================================================== */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));
  justify-content: center;
  gap: 40px;
}
.feature-card {
  min-width: 0;
}
.feature-card__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.feature-card__title {
  margin-top: 16px;
  font-size: var(--fs-18);
  font-weight: var(--fw-bold);
}
.feature-card__body {
  margin-top: 8px;
  font-size: var(--fs-16);
  line-height: var(--lh-list-16);
  overflow-wrap: break-word;
}
.feature-section__btn-row {
  margin-top: 40px;
  text-align: center;
}

/* ==========================================================================
   事例カード「もっと見る」ボタン（POINT 04 従属）
   .case-cards / .case-card 本体は lower.css の共通部品をそのまま使う
   ========================================================================== */
/* 実績が1件だけのとき（重量物保管のタグを持つ事例が1社）は、3列グリッドの左端ではなく中央に置く */
@media (min-width: 769px) {
  .case-cards--single {
    grid-template-columns: minmax(0, 300px);
  }
}
.case-section__more {
  display: flex; /* .btn-fillのinline-flexだとmargin:autoで中央寄せできないため上書き */
  margin: 40px auto 0;
  width: 263px;
}

/* ==========================================================================
   ポイント写真の拡張バリエーション ※推定（LOWER_SPEC_storage.md 確認事項）
   --dual: 04（実績）写真2枚の重なり構成。1枚目は lower.css の
           .point-block__photo img:first-child で平行四辺形クリップされ、
           クリップで生じる右下の空き三角形に2枚目を差し込む。
   --empty: 03（保管から輸送までワンストップ）の写真枠。ワイヤーでは
            プレースホルダーのため、平行四辺形にせず単純な3:2矩形にする
            （2026-10 修正依頼 No.6 で写真を追加したあとも同じ枠のまま）。
   ========================================================================== */
.point-block__photo--dual .point-block__photo-sub {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 5px solid var(--color-white);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.point-block__photo--empty {
  aspect-ratio: 3 / 2;
}
/* 03 の写真は lower.css の .point-block__photo img:first-child の平行四辺形クリップを
   打ち消して 3:2 の矩形のまま表示する（同じ詳細度で、このファイルのほうが後に読み込まれる） */
.point-block__photo--empty img:first-child {
  clip-path: none;
}

/* ==========================================================================
   POINT 01 地図オーバーレイ（No.41 ディレクター初回チェック対応 → 2026-10 修正依頼 No.3）
   - 倉庫拠点（ピン）: 倉庫一覧の住所を市区町村レベルの緯度経度にし、assets/data/office-pins.json
     （lat・lng と x_pct・y_pct の21組）から最小二乗で求めた線形変換で 860×1042 の viewBox に
     換算（office/index.html の拠点マップと同じ校正）。同じ住所・同じ市区町村の倉庫は1ピンに
     まとめ、<title> に倉庫名を列挙している。
   - 航路（太平洋側）: 海上を通る青系の破線（模式線）。
   - 鉄道: 濃いグレーの線に白い破線を重ねた鉄道記号風の線（模式線）。
   - 凡例（.map-legend）: 地図画像の下側の余白に重ねる。SVG は装飾（aria-hidden）のままで、
     内容は HTML 側の .sr-only のテキストで補う。
   ========================================================================== */
.map-overlay {
  --map-sea: #2b72b8;  /* 航路（青系） */
  --map-rail: #4a4a4a; /* 鉄道（濃いグレー） */
  position: relative;
  width: 100%;
  height: 100%;
}
.map-overlay__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* 地図画像が平行四辺形に切り取られて九州西部や北海道東端が欠けていた。原因は 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;
}
.map-overlay__pin {
  fill: var(--color-primary);
  stroke: var(--color-white);
  stroke-width: 2px;
}
.map-overlay__sea {
  fill: none;
  stroke: var(--map-sea);
  stroke-width: 5;
  stroke-dasharray: 14 9;
  stroke-linejoin: round;
}
.map-overlay__rail {
  fill: none;
  stroke: var(--map-rail);
  stroke-width: 8;
  stroke-linejoin: round;
}
.map-overlay__rail-dash {
  fill: none;
  stroke: var(--color-white);
  stroke-width: 3.4;
  stroke-dasharray: 9 9;
  stroke-linejoin: round;
}
.map-legend {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  font-size: var(--fs-14);
  line-height: 1.4;
}
.map-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.map-legend__mark {
  flex-shrink: 0;
  display: block;
}
.map-legend__mark--sea {
  width: 28px;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--map-sea) 0 6px, transparent 6px 10px);
}
.map-legend__mark--rail {
  position: relative;
  width: 28px;
  height: 6px;
  background-color: var(--map-rail);
}
.map-legend__mark--rail::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 2px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--color-white) 0 5px, transparent 5px 9px);
}
.map-legend__mark--pin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color-primary);
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Responsive: SP（768px以下）LOWER_SPEC_storage.md §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;
  }

  .warehouse-cards,
  .feature-cards {
    grid-template-columns: minmax(0, 1fr);
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    row-gap: 40px;
  }
  .warehouse-area {
    margin-top: 40px;
  }
  .warehouse-section > .lower-subheading + .warehouse-area {
    margin-top: 24px;
  }
  .warehouse-area__title {
    font-size: var(--fs-17);
  }
  .warehouse-area__title + .warehouse-cards {
    margin-top: 16px;
  }
  .material-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-section__more {
    width: calc(100% - 32px);
    max-width: 300px;
  }
  .point-block__photo--dual .point-block__photo-sub {
    border-width: 4px;
  }
}

/* ==========================================================================
   空き倉庫情報の表（.availability-section）SP: 2026-11-07
   lower.css の .spec-table SP ルールは thead を block 化して見出しを上にまとめて
   並べるため、データ行（5項目）だけが並んでどの値か分からなくなる。
   thead は視覚的に隠し（読み上げ用に残す）、各セルに td の data-label を前置して
   1行＝1カードの縦積みにする。
   ========================================================================== */
@media (max-width: 768px) {
  .availability-section .spec-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .availability-section .spec-table tbody tr + tr {
    margin-top: 16px;
  }
  .availability-section .spec-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: var(--fs-14);
    font-weight: var(--fw-bold);
    color: var(--color-primary);
  }
}
