/* =========================================
   Base & Reset
========================================= */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans CJK JP', sans-serif;
  color: #333333;
  line-height: 1.6;
  font-size: 12px; /* スマホ時のベーステキストを12pxに設定 */
}

/* ユーティリティクラス */
.text-red { color: #B91D17; font-weight: 700; }
.text-xs { font-size: 10px; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 18px; }
.text-gray { color: #777777; }
.mt-1 { margin-top: 4px; }
.mt-3 { margin-top: 12px; }
.mb-3 { margin-bottom: 12px; }
.highlight-yellow {
  background: linear-gradient(transparent 60%, #FFDF3C 60%);
  font-weight: 700;
}

@media (min-width: 768px) {
  .text-sm { font-size: 14px; }
}

/* =========================================
   Layout & Container (SP First)
========================================= */
.case-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #ffffff;
}

/* =========================================
   Case Card (Detailed)
========================================= */
.case-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 40px;
}

.case-card {
  background: #F2F2F2;
  border-radius: 16px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 6px 16px;
  background: linear-gradient(135deg, #751E0B 0%, #CB1A1A 100%);
  border-radius: 6px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

@media (min-width: 768px) {
  .case-card__badge {
    font-size: 16px;
  }
}

.case-card__title {
  color: #B91D17;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.9px;
  margin: 0;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .case-card__title {
    font-size: 18px;
  }
}

.case-card__images {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-card__images img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #D9D9D9;
}

/* 業種・状況リスト */
.case-card__info-box {
  background: white;
  border-radius: 8px;
  padding: 16px 12px;
}
@media (min-width: 768px) {
  .case-card__info-box {
    padding: 16px;
  }
}

.info-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-list__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.info-list__item dt {
  background: #F2F2F2;
  border-radius: 6px;
  padding: 4px 12px;
  color: #777777;
  font-size: 12px;
  font-weight: 700;
  min-width: 64px;
  text-align: center;
}
.info-list__item dd {
  flex: 1;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  padding-top: 2px;
}

/* Before / After */
.case-compare {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-compare__box {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}
.compare-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.compare-header h4 {
  margin: 0;
  color: white;
  background-color: unset;
  font-size: 14px;
  font-weight: 700;
}
.compare-label {
  background: white;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
}
.compare-body {
  padding: 16px 12px;
  font-size: 12px;
  font-weight: 500;
}
.compare-body p {
  margin: 0;
}

@media (min-width: 768px) {
  .compare-body {
    padding: 16px;
  }
}

/* Before固有のスタイル */
.case-compare__box.is-before .compare-header { background: #555555; }
.case-compare__box.is-before .compare-label { color: #555555; }

/* After固有のスタイル */
.case-compare__box.is-after .compare-header { background: #B91D17; }
.case-compare__box.is-after .compare-label { color: #B91D17; }

/* インパクト（グリッド） - After内に配置 */
.impact-grid {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.impact-grid__item {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}
.impact-grid__item dt {
  background: #F2F2F2;
  border-radius: 6px;
  padding: 4px 6px;
  text-align: center;
  color: #616161;
  font-size: 10px;
  font-weight: 700;
  width: 88px;
}
.impact-grid__item dd {
  flex: 1;
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
}

/* Solution */
.case-solution {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}
.solution-header {
  background: #00528C;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.solution-label {
  background: white;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #00528C;
}
.solution-header h4 {
  margin: 0;
  color: white;
  font-size: 14px;
  font-weight: 700;
}
.solution-body {
  padding: 16px;
  font-size: 12px;
  color: #333333;
}
.solution-list {
  margin: 0;
  padding-left: 0; /* 元の余白をリセット */
  list-style: none; /* デフォルトの黒丸を消す */
  counter-reset: solution-num; /* カウンターを初期化 */
}
.solution-list li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 1.4em; /* 番号を置くための左余白 */
}
.solution-list li::before {
  content: counter(solution-num) "."; /* 「1.」「2.」の形式で出力 */
  counter-increment: solution-num; /* 番号を1ずつ増やす */
  position: absolute;
  left: 0;
  top: 0;
  color: #00528C; /* Solutionのテーマカラー（青）に合わせて統一感を出す */
  font-weight: 700;
}
.solution-list strong {
  color: #00528C;
}
.solution-conclusion {
  font-size: 14px; /* ここは元から14pxにしていました */
  font-weight: 500;
}

@media (min-width: 768px) {
  .solution-header {
    padding: 12px 16px;
  }
}

/* =========================================
   Summary Cards (Bottom 3 items)
========================================= */
.summary-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.summary-card {
  background: #F2F2F2;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.summary-card__category {
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #751E0B 0%, #CB1A1A 100%);
  color: white;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-bottom-right-radius: 8px;
}
.summary-card__category.personal {
  padding: 6px 12px;
}
.summary-card__body {
  padding: 48px 16px 24px;
}
.summary-card__title {
  margin: 0 0 12px 0;
  background-color: unset;
  font-size: 16px;
  font-weight: 700;
}
.summary-card__text {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
}

.end-txt {
  font-size: 12px;
  font-weight: 500;
}

/* =========================================
   PC Responsive (768px以上)
========================================= */
@media (min-width: 768px) {

  /* PC時のベーステキストを14pxに設定 */
  body {
    font-size: 14px;
  }

  /* SP時に12px指定されている各要素をPCで14pxに引き上げ */
  .info-list__item dt,
  .info-list__item dd,
  .compare-label,
  .compare-body,
  .impact-grid__item dt,
  .solution-label,
  .solution-body,
  .summary-card__text {
    font-size: 14px;
  }

  /* メイン事例ラッパーを2カラムのグリッドにする */
  .case-card-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 60px;
  }

  .case-card {
    padding: 32px 24px;
    margin-bottom: 0;
    gap: 16px;
  }

  /* dtとddを横並びにする設定（PC時のみ） */
  .impact-grid__item {
    gap: 16px;
  }
  .impact-grid__item dt {
    width: 130px;
    flex-shrink: 0;
  }

  /* サマリー事例群を3カラムの横並びにする */
  .summary-cards-grid {
    flex-direction: row;
  }
  .summary-card {
    flex: 1;
  }

  .end-txt {
    font-size: 14px;
  }
}