/* ==========================================================================
   1. ビジネスモデル概要セクション（干渉防止のため「bm-section-」を使用）
   ========================================================================== */

/* コンテナ全体のデザイン */
.bm-section-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* セクションヘッダー */
.bm-section-header {
  margin-bottom: 30px;
}

.bm-section-subtitle {
  font-weight: bold;
  margin: 0 0 15px 0;
  line-height: 1.4;
}

.bm-section-title {
  font-weight: bold;
  line-height: 1.5;
  margin: 0;
}

/* リード文 */
.bm-section-lead {
  margin-bottom: 40px;
}

.bm-section-lead p {
  line-height: 1.8;
  margin: 0 0 1.5em 0;
}

.bm-section-lead p:last-child {
  margin-bottom: 0;
}

.bm-section-lead strong {
  font-weight: bold;
}

/* ビジュアルエリア（PC版は横並び、スマホは縦並び） */
.bm-section-visuals {
  display: flex;
  gap: 30px;
  justify-content: space-between;
}

.bm-visual-card {
  flex: 1;
  min-width: 0;
}

.bm-visual-title {
  text-align: center;
  font-weight: bold;
  margin: 0 0 15px 0;
  line-height: 1.4;
}

.bm-image-wrapper {
  width: 100%;
}

.bm-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .bm-section-container {
    padding: 30px 15px;
  }

  .bm-section-visuals {
    flex-direction: column;
    gap: 40px;
  }
}

/* ==========================================================================
   2. 成功事例紹介セクション（干渉防止のため「bm-cases-」を使用）
   ========================================================================== */

/* コンテナ全体のデザイン */
.bm-cases-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 20px;
  box-sizing: border-box;
}

/* セクションヘッダー */
.bm-cases-header {
  text-align: center;
  margin-bottom: 40px;
}

.bm-cases-subtitle {
  font-weight: bold;
  color: #008000;
  margin: 0 0 10px 0;
  letter-spacing: 0.1em;
}

.bm-cases-title {
  font-weight: bold;
  line-height: 1.4;
  margin: 0;
}

/* 事例カードグリッド（PC時は3列、タブレットは2列、スマホは1列） */
.bm-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 50px;
}

/* 事例個別カード */
.bm-case-card {
  background-color: #fcfcfc;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bm-case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

/* 地方バッジ */
.bm-case-badge {
  display: inline-block;
  background-color: #333333;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: bold;
  margin-bottom: 12px;
}

/* 本業（住宅メーカーなど） */
.bm-case-industry {
  font-weight: bold;
  margin: 0 0 16px 0;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 8px;
}

/* カード内テーブル */
.bm-case-table {
  width: 100%;
  border-collapse: collapse;
}

.bm-case-table th,
.bm-case-table td {
  padding: 8px 0;
  text-align: left;
  border-bottom: 1px dashed #e0e0e0;
}

.bm-case-table tr:last-child th,
.bm-case-table tr:last-child td {
  border-bottom: none;
}

.bm-case-table th {
  font-weight: normal;
  color: #666666;
  width: 40%;
}

.bm-case-table td {
  font-weight: bold;
  color: #333333;
}

/* 強調文字 */
.bm-highlight {
  color: #d32f2f;
}

/* フォトギャラリー */
.bm-cases-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.bm-gallery-item {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bm-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 3 / 2;
}

/* レレスポンシブ（960px以下は2列、640px以下は1列） */
@media screen and (max-width: 960px) {
  .bm-cases-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media screen and (max-width: 640px) {
  .bm-cases-container {
    padding: 30px 15px;
  }

  .bm-cases-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bm-cases-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==========================================================================
   3. ロードマップセクション (全フェーズ統一ブルー＆崩れ修正デザイン)
   ========================================================================== */

/* 全体コンテナ */
.f-roadmap-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 10px;
  box-sizing: border-box;
}

.f-roadmap-container *,
.f-roadmap-container *::before,
.f-roadmap-container *::after {
  box-sizing: border-box;
}

/* カード共通（PC時は左右並び） */
.f-roadmap-card {
  display: flex;
  border: 2px solid #005bac; /* フェーズ1と同等のブルーで統一 */
  border-radius: 8px;
  margin-bottom: 40px;
  background-color: #fff;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 91, 172, 0.08);
  position: relative;
}

.f-roadmap-card:last-child {
  margin-bottom: 0;
}

/* フェーズ間の接続矢印（PC表示時のみカード間に下向きの矢印を表示） */
.f-roadmap-card:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  border-style: solid;
  border-width: 16px 12px 0 12px;
  border-color: #005bac transparent transparent transparent;
  z-index: 2;
}

/* 左側ヘッダー（縦型レイアウト） */
.f-roadmap-header {
  width: 280px;
  background-color: #005bac; /* メインブルーで統一 */
  color: #fff;
  padding: 40px 20px 25px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* バッジデザイン（丸みのあるカプセル型） */
.f-roadmap-badge {
  background-color: #ffffff;
  color: #005bac;
  font-weight: bold;
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 25px;
  display: inline-block;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* フェーズ名タイトル */
.f-roadmap-title {
  font-weight: 800; /* 極太 */
  line-height: 1.4;
  margin-bottom: 30px;
  letter-spacing: 0.05em;
  width: 100%;
}

/* 期間デザイン（画像通りの半透明ダークブルー背景） */
.f-roadmap-period {
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.15); /* ヘッダーの青に対して少し暗い半透明背景 */
  color: #ffffff;
  flex-shrink: 0;
  margin-top: auto; /* ★常にヘッダーの最下部に固定する設定 */
  letter-spacing: 0.05em;
}

/* 右側詳細コンテンツエリア */
.f-roadmap-body {
  flex-grow: 1;
  padding: 30px;
  box-sizing: border-box;
  background-color: #fafcff; /* 極薄のブルー背景 */
  display: flex;
}

/* 右側詳細エリア */
.f-roadmap-right {
  flex-grow: 1;
}

.f-roadmap-lead {
  margin: 0 0 25px 0;
  line-height: 1.7;
  color: #333333;
}

.f-roadmap-lead strong {
  font-weight: bold;
  color: #005bac;
}

/* リストスタイル */
.f-roadmap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.f-roadmap-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px dotted #e2e8f0;
  line-height: 1.6;
}

.f-roadmap-item:last-child {
  border-bottom: none;
}

/* 丸数字（ナンバリング） */
.f-roadmap-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background-color: #005bac;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.f-roadmap-item-title {
  font-weight: bold;
  width: 200px;
  flex-shrink: 0;
  padding-right: 15px;
  color: #005bac;
}

.f-roadmap-item-desc {
  flex-grow: 1;
  color: #555555;
}


/* --- 個別色のクラスも、すべてフェーズ1と同じブルーに統一上書き --- */
.f-roadmap-phase1, .f-roadmap-phase2, .f-roadmap-phase3, .f-roadmap-phase4 {
  border-color: #005bac;
}
.f-roadmap-phase1 .f-roadmap-header, 
.f-roadmap-phase2 .f-roadmap-header, 
.f-roadmap-phase3 .f-roadmap-header, 
.f-roadmap-phase4 .f-roadmap-header {
  background-color: #005bac;
}
.f-roadmap-phase1 .f-roadmap-period, 
.f-roadmap-phase2 .f-roadmap-period, 
.f-roadmap-phase3 .f-roadmap-period, 
.f-roadmap-phase4 .f-roadmap-period {
  color: #ffffff; /* 期間内のテキストは白 */
}
.f-roadmap-phase1 .f-roadmap-num, 
.f-roadmap-phase2 .f-roadmap-num, 
.f-roadmap-phase3 .f-roadmap-num, 
.f-roadmap-phase4 .f-roadmap-num {
  background-color: #005bac;
}
.f-roadmap-phase1 .f-roadmap-item-title, 
.f-roadmap-phase2 .f-roadmap-item-title, 
.f-roadmap-phase3 .f-roadmap-item-title, 
.f-roadmap-phase4 .f-roadmap-item-title {
  color: #005bac;
}


/* --- レスポンシブ対応（タブレット・スマホ用） --- */
@media screen and (max-width: 768px) {
  /* カードを縦積みレイアウトに変更 */
  .f-roadmap-card {
    flex-direction: column;
    margin-bottom: 30px;
  }

  /* スマホ表示時のカード間矢印のサイズ・位置調整 */
  .f-roadmap-card:not(:last-child)::after {
    bottom: -22px;
    border-width: 12px 9px 0 9px;
  }

  /* 左ヘッダーエリアを横幅100%に */
  .f-roadmap-header {
    width: 100%;
    padding: 30px 20px;
  }

  /* スマホ時は親要素の高さ固定が解除されるため、margin-top: autoから通常のマージンに切り替える */
  .f-roadmap-period {
    margin-top: 15px;
  }

  .f-roadmap-badge {
    margin-bottom: 15px;
  }

  .f-roadmap-title {
    margin-bottom: 15px;
  }

  /* 右コンテンツのパディング調整 */
  .f-roadmap-body {
    padding: 20px;
  }

  .f-roadmap-right {
    padding-left: 0;
  }

  /* リストをスマホ用に縦1列へ変更 */
  .f-roadmap-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 15px 0;
  }

  .f-roadmap-item-title {
    width: 100%;
    padding-right: 0;
  }
}