@charset "utf-8";

/* ==========================================
 * 0. 共通変数定義（Design Tokens）
 * ========================================== */
:root {
  /* Color Palette */
  --color-primary: #00458F;
  --color-secondary: #00a0e9;
  --color-accent: #009be3;
  --color-orange: #ff6b00;
  --color-bg-light: #f5f5f5;
  --color-bg-darkblue: #a3c7d2;
  --color-btn-dark: #336371;
  --color-btn-cyan: #02A2D7;
  --color-text-main: #333333;
  --color-text-dark: #1e414c;
  --color-white: #ffffff;

  /* Layout Size */
  --max-width-site: 1200px;
  --max-width-content: 1000px;

  /* Breakpoint */
  --bp-sp: 768px;
}

/* ==========================================
 * 1. ベース・共通スタイル
 * ========================================== */
html, body {
  overflow-x: hidden;
}

#breadcrumb .breadcrumb {
  margin-bottom: 10px;
}

/* PC / SP 表示切替ヘルパー */
.is-pc { display: block; }
.is-sp { display: none; }

@media screen and (max-width: 768px) {
  .is-pc { display: none !important; }
  .is-sp { display: block !important; }
}

/* ボタン共通 */
.btn_area {
  margin-top: 60px;
  margin-bottom: 60px;
}

.btn-transfer {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 460px;
  max-width: 100%;
  height: 60px;
  background-color: var(--color-btn-cyan);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 9999px;
  padding: 0 32px;
  box-sizing: border-box;
  margin: 0 auto;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-transfer:hover {
  opacity: 0.8;
  color: var(--color-white);
  text-decoration: none;
}

.btn-transfer::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--color-white);
}

.disorder_section03 .btn-transfer {
  background-color: var(--color-btn-dark);
}

/* ==========================================
 * 2. メインビジュアル (Main Visual)
 * ========================================== */
.main-visual {
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-left: 0;
  padding-right: 0;
  background-color: var(--color-secondary);
  box-sizing: border-box;
  overflow: hidden;
}

.main-visual-inner {
  width: 100%;
  max-width: var(--max-width-site);
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

.mv-title-area {
  position: relative;
  z-index: 10;
  text-align: center;
}

.mv-title-img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.mv-illust-img {
  width: auto;
  display: block;
}

/* KV: PC レイアウト */
@media screen and (min-width: 769px) {
  .main-visual-inner {
    height: 380px;
  }

  .mv-title-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
  }

  .mv-title-img {
    max-width: 650px;
  }

  .mv-illust-left,
  .mv-illust-right {
    position: absolute;
    bottom: 0;
    z-index: 5;
  }

  .mv-illust-left { left: -80px; }
  .mv-illust-right { right: 10px; }

  .mv-illust-img {
    height: 160px;
  }
}

/* KV: スマホ レイアウト */
@media screen and (max-width: 768px) {
  .main-visual {
    padding-top: 32px;
    padding-bottom: 0;
  }

  .main-visual-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .mv-title-area {
    width: 88%;
    max-width: 380px;
    margin-bottom: 24px;
  }

  .mv-illust-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    margin-top: auto;
  }

  .mv-illust-left,
  .mv-illust-right {
    position: static;
    line-height: 0;
  }

  .mv-illust-left { width: 52%; }
  .mv-illust-right { width: 39%; }

  .mv-illust-left img,
  .mv-illust-right img {
    width: 100%;
    height: auto;
    display: block;
  }
}

/* ==========================================
 * 3. セクション 01：導入テキスト (Section 01)
 * ========================================== */
.disorder_section01 {
  max-width: 950px;
  margin: 0 auto;
}

.disorder_section01 p {
  text-align: center;
  color: var(--color-primary);
  line-height: 2.0;
  font-size: 16px;
  margin: 60px auto;
}

.disorder_section01 p span.under_deco {
  font-weight: bold;
  background: linear-gradient(transparent 70%, #FFE380 70%);
}

.disorder_title {
  text-align: center;
}

.disorder_title p {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 50px;
  color: var(--color-primary);
}

@media screen and (max-width: 768px) {
  .disorder_section01 p {
    text-align: left;
  }
  .disorder_title p {
    font-size: 28px;
  }
}

/* ==========================================
 * 4. セクション 02：基本フロー 5STEP (Section 02)
 * ========================================== */
.step-list {
  list-style: none;
  margin: 40px auto;
  padding: 0;
  display: flex;
  gap: 16px;
  max-width: var(--max-width-site);
  box-sizing: border-box;
}

.step-item {
  flex: 1;
  position: relative;
  border: 2.5px solid #005086;
  border-radius: 16px;
  padding: 24px 14px 16px;
  background-color: var(--color-white);
  box-sizing: border-box;
}

.step-header {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-white);
  padding: 0 10px;
  color: #005086;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
}

.step-header .num {
  font-size: 20px;
  font-weight: 800;
  margin: 0 2px;
}

.step-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.step-title {
  color: #005086;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  margin: 0 0 12px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}

.step-image-box {
  background-color: #e6e6e6;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 4 / 3;
}

.step-image-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.step-desc {
  font-size: 13px;
  color: var(--color-text-main);
  line-height: 1.5;
  margin: 0;
  letter-spacing: -0.02em;
}

/* STEP レスポンシブ */
@media (max-width: 900px) {
  .step-list {
    flex-wrap: wrap;
    gap: 24px 16px;
  }
  .step-item {
    flex: 1 1 calc(50% - 16px);
  }
}

@media (max-width: 768px) {
  .step-list {
    flex-direction: column;
    gap: 32px;
  }

  .step-item {
    width: 100%;
    padding: 20px 16px 16px;
  }

  .step-body {
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
  }

  .step-left { flex: 0 0 48%; }

  .step-title {
    font-size: 14px;
    min-height: auto;
    margin-bottom: 8px;
    text-align: left;
    justify-content: flex-start;
  }

  .step-image-box { margin-bottom: 0; }
  .step-right { flex: 1; padding-top: 4px; }
  .step-desc { font-size: 12.5px; }
}

/* ==========================================
 * 5. セクション 03：原因別の対応方法 (Section 03)
 * ========================================== */
.disorder_section03 {
  position: relative;
  background-color: transparent;
}

.disorder_section03 .disorder_title p {
  color: #265666;
}

/* 背景全幅用擬似要素の設定 */
.disaster-container,
.disaster-detail-wrapper {
  position: relative;
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 60px 0;
  box-sizing: border-box;
}

.disaster-detail-wrapper {
  padding-top: 0;
}

.disaster-container::before,
.disaster-detail-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background-color: var(--color-bg-darkblue);
  z-index: -1;
}

/* --- 5-1. グリッドナビゲーション --- */
.disaster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.disaster-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-white);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--color-text-dark);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.disaster-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.disaster-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}

.disaster-label {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  flex-grow: 1;
  padding: 0 12px;
}

.arrow-icon {
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--color-text-dark);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
}

.arrow-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 8px;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--color-text-dark);
  border-bottom: 1.5px solid var(--color-text-dark);
  transform: rotate(45deg);
}

@media (max-width: 850px) {
  .disaster-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 550px) {
  .disaster-list { grid-template-columns: 1fr; }
  .disaster-label { font-size: 16px; }
}

/* --- 5-2. 原因別詳細カードリスト --- */
.disaster-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.disaster-detail-item {
  background-color: var(--color-white);
  border-radius: 16px;
  padding: 30px 32px;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.disaster-detail-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--color-text-main);
  margin: 0 0 24px 0;
  display: flex;
  align-items: center;
}

.disaster-detail-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 22px;
  background-color: var(--color-orange);
  margin-right: 12px;
  border-radius: 2px;
}

.disaster-detail-content {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.detail-image-box {
  flex: 0 0 260px;
  background-color: #f2f2f2;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.detail-image-box img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.detail-text-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.detail-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-main);
}

/* 吹き出しコンポーネント */
.speech-bubble-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: auto;
}

.speech-bubble {
  position: relative;
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.5;
  width: fit-content;
  max-width: calc(100% - 100px);
  box-sizing: border-box;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 7px 0 7px 10px;
  border-color: transparent transparent transparent var(--color-accent);
}

.worker-image {
  width: 80px;
  height: auto;
  flex-shrink: 0;
}

/* ==========================================
 * 6. BLOCK 6 (列車接触事故のフロー詳細)
 * ========================================== */
.accident-flow-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.accident-flow-step {
  position: relative;
}

.accident-flow-step:not(:last-child)::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 16px auto;
  border-style: solid;
  border-width: 14px 10px 0 10px;
  border-color: var(--color-accent) transparent transparent transparent;
}

.step-card-inner {
  background-color: var(--color-bg-light);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-sizing: border-box;
}

/* 左側：白枠画像カード（標準設定） */
.step-card-image {
  flex: 0 0 160px;
  background-color: var(--color-white);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.step-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* STEP 3 専用：白枠（.step-card-image）2つ縦並び構成 */
@media screen and (min-width: 769px) {

  .step3-flow .step-card-inner {
  align-items: stretch;

}
  .step3-flow .step-image-col {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }

  .step3-flow .step-card-image {
    display: flex !important;
    justify-content: center;
    align-items: center;
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 12px;
    width: 100%;
    min-height: 120px;
    box-sizing: border-box;
  }

  .step3-flow .step-card-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }
}

.step-card-body {
  flex: 1;
  color: var(--color-text-main);
}

.step-card-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #222222;
}

.step-text-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  font-size: 16px;
  line-height: 1.6;
}

.step-text-list li {
  position: relative;
  padding-left: 1.2em;
  margin-bottom: 4px;
}

.step-text-list li::before {
  content: "・";
  position: absolute;
  left: 0;
  top: 0;
}

.group-heading {
  font-size: 16px;
  font-weight: bold;
  margin: 12px 0 6px 0;
  color: var(--color-text-main);
}

.note-text {
  font-size: 16px;
  margin: 4px 0 6px 0;
  color: #444444;
}

.step-plain-text {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.disaster-detail-item .speech-bubble-wrapper {
  max-width: 930px;
  margin: auto;
  justify-content: space-around;
}

.disaster-detail-item .last .speech-bubble {
  width: 770px;
  margin-top: 54px;
}

/* ==========================================
 * 7. スマホ・タブレット用レスポンシブ (レスポンシブ統合)
 * ========================================== */
@media (max-width: 768px) {
  /* 原因別詳細カード */
  .disaster-detail-item {
    padding: 20px 16px;
  }

  .disaster-detail-content {
    flex-direction: column;
    gap: 20px;
  }

  .detail-image-box {
    width: 100%;
    height: 140px;
    padding: 12px;
    flex: none;
    box-sizing: border-box;
  }

  .detail-image-box img {
    width: 100%;
    height: 130%;
    object-fit: contain;
  }

  .speech-bubble {
    max-width: calc(100% - 85px);
  }

  /* BLOCK 6 フローカード */
  .step-card-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 16px;
  }

  .step-card-image {
    width: 100%;
    height: 140px;
    flex: none;
    box-sizing: border-box;
    padding: 12px;
  }

  .step-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .step-card-body { width: 100%; }
  .step-card-title { font-size: 15px; margin-bottom: 12px; }
  .step-text-list { font-size: 13px; }

  /* STEP 3 スマホ用表示 */
  .step3-flow .step-image-col {
    display: flex;
    gap: 16px;
  }
  .step3-flow .step-card-image {
    flex: 1;
  }
}