/* ===== DX副産物セクション：2枚目の横カードに固定 ===== */
/* 縦長化を完全に防止し、横並び3カードレイアウトに統一 */

.dx-byproducts {
  padding: 72px 0;
  background: linear-gradient(180deg, #f9fbfd 0%, #f5f8fc 100%); /* 「ハードウェア導入だけでは...」と同じ背景色 */
  position: relative;
  overflow: hidden;
}

.dx-inner {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
}

.dx-title {
  text-align: center;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  color: #1A2B4C;
}

.dx-subtitle {
  text-align: center;
  margin: 0 0 42px;
  color: rgba(15, 23, 42, 0.75);
  font-size: 15px;
  font-weight: 400;
}

/* PCは3列固定。SPは1列〜2列に落とす */
.dx-cards {
  display: grid !important; /* 既存のflexを完全に上書き */
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px;
  align-items: stretch;
}

/* これで「縦長化の原因（height/width固定）」を排除 */
.dx-card {
  background: #fff !important;
  border-radius: 20px !important;
  padding: 28px 30px 26px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important; /* 影を少し弱めて馴染ませる */
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  min-height: 260px !important; /* 縦長に"伸びすぎない"最低ライン */
  height: auto !important; /* 固定高さ禁止 */
  max-height: none !important; /* 既存の max-height を上書き */
  width: auto !important; /* 既存の width 固定を上書き */
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
}

.dx-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10) !important; /* ホバー時の影も調整 */
}

.dx-icon {
  width: 52px !important;
  height: 52px !important;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.10);
  flex-shrink: 0;
}

.dx-icon.green {
  background: rgba(46, 125, 50, 0.12);
}

.dx-icon.blue {
  background: rgba(30, 91, 184, 0.12);
}

.dx-icon.purple {
  background: rgba(106, 75, 203, 0.12);
}

.dx-card-title {
  margin: 10px 0 12px !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.3;
  letter-spacing: 0.01em;
  position: relative;
  padding-bottom: 10px;
}

/* カード別のタイトル色（意味を持つ色） */
.dx-card-title--green {
  color: #2E7D32 !important; /* ディープグリーン：環境・削減・サステナビリティ */
}

.dx-card-title--blue {
  color: #1E5BB8 !important; /* ディープブルー：クリーン・制御・最適化 */
}

.dx-card-title--purple {
  color: #6A4BCB !important; /* パープル：知識・成長・人材 */
}

/* タイトル装飾：紙削減（左縦ライン） */
.dx-card--paper .dx-card-title::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 0;
  bottom: 10px;
  width: 4px;
  background: linear-gradient(180deg, #2E7D32, rgba(46, 125, 50, 0.3));
  border-radius: 2px;
}

/* タイトル装飾：CO2削減（下線） */
.dx-card--co2 .dx-card-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: #1E5BB8;
  border-radius: 2px;
}

/* タイトル装飾：教育効率化（横の丸アクセント） */
.dx-card--edu .dx-card-title::after {
  content: "●";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: #6A4BCB;
  font-size: 10px;
  opacity: 0.6;
}

/* 数値表示は削除したため、このスタイルは使用しない */
.dx-metric {
  display: none !important;
}

.dx-desc {
  margin: 8px 0 0 !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  color: rgba(15, 23, 42, 0.75) !important;
  font-weight: 400 !important;
}

/* 詳細説明セクション */
.dx-detail {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

/* チェックリスト */
.dx-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.dx-checklist li {
  font-size: 13px;
  position: relative;
  padding-left: 20px;
  color: #334155;
  line-height: 1.6;
}

.dx-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 700;
}

/* カード別チェックマーク色 */
.dx-card--paper .dx-checklist li::before {
  color: #2E7D32;
}

.dx-card--co2 .dx-checklist li::before {
  color: #1E5BB8;
}

.dx-card--edu .dx-checklist li::before {
  color: #6A4BCB;
}

/* 任意：インフォグラフィック（ミニ図解） */
.dx-mini {
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(30, 91, 184, 0.18), rgba(30, 91, 184, 0));
  position: relative;
  overflow: hidden;
  margin-top: auto; /* 下部に配置 */
}

.dx-mini.green {
  background: linear-gradient(90deg, rgba(46, 125, 50, 0.18), rgba(46, 125, 50, 0));
}

.dx-mini.purple {
  background: linear-gradient(90deg, rgba(106, 75, 203, 0.18), rgba(106, 75, 203, 0));
}

.dx-mini::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 50%, rgba(255, 255, 255, 0.9) 0 6px, transparent 7px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.75) 0 5px, transparent 6px),
    radial-gradient(circle at 82% 50%, rgba(255, 255, 255, 0.65) 0 4px, transparent 5px);
  opacity: 0.9;
}

/* 既存のクラス名を上書き（互換性維持） */
.section-benefits {
  padding: 0 !important;
  background: none !important;
}

.benefits-grid,
.three-column-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
}

.unified-card,
.benefit-card {
  background: #fff !important;
  border-radius: 20px !important;
  padding: 28px 26px 26px !important;
  min-height: 260px !important;
  height: auto !important;
  max-height: none !important;
  width: auto !important;
  display: grid !important;
  grid-template-rows: auto auto auto 1fr !important;
  gap: 10px !important;
}

.icon-badge {
  width: 44px !important;
  height: 44px !important;
  border-radius: 999px !important;
  font-size: 18px !important;
}

.benefit-stats {
  margin-top: auto !important;
}

.stat-big {
  font-size: clamp(28px, 2.6vw, 34px) !important;
  font-weight: 900 !important;
  color: #16a34a !important;
  margin-bottom: 8px !important;
}

.benefit-stats p {
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: rgba(15, 23, 42, 0.70) !important;
}

/* タブレット以下は2列、スマホは1列 */
@media (max-width: 900px) {
  .dx-cards,
  .benefits-grid,
  .three-column-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  
  .dx-byproducts {
    padding: 60px 0;
  }
  
  .dx-title {
    font-size: clamp(24px, 4vw, 32px);
  }
  
  .dx-card,
  .unified-card,
  .benefit-card {
    min-height: 240px !important;
  }
}

@media (max-width: 560px) {
  .dx-cards,
  .benefits-grid,
  .three-column-grid {
    grid-template-columns: 1fr !important;
  }
  
  .dx-byproducts {
    padding: 50px 0;
  }
  
  .dx-inner {
    width: calc(100% - 32px);
  }
  
  .dx-title {
    font-size: clamp(22px, 5vw, 28px);
    margin-bottom: 8px;
  }
  
  .dx-subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }
  
  .dx-card,
  .unified-card,
  .benefit-card {
    padding: 24px 22px 22px !important;
    min-height: 220px !important;
  }
  
  .dx-icon,
  .icon-badge {
    width: 46px !important;
    height: 46px !important;
    font-size: 19px !important;
  }
  
  .dx-card-title {
    font-size: 20px !important;
  }
  
  /* 紙削減カードの左縦ライン調整 */
  .dx-card--paper .dx-card-title::before {
    left: -12px;
  }
  
  .dx-metric,
  .stat-big {
    font-size: clamp(26px, 6vw, 30px) !important;
  }
  
  .dx-desc,
  .benefit-stats p {
    font-size: 12px !important;
  }
  
  .dx-detail-desc {
    font-size: 12px !important;
  }
  
  .dx-checklist li {
    font-size: 12px !important;
  }
  
  .dx-mini {
    height: 35px;
  }
}

/* アニメーション効果 */
@keyframes dx-card-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dx-card {
  animation: dx-card-fade-in 0.6s ease-out forwards;
}

.dx-card:nth-child(1) {
  animation-delay: 0.1s;
}

.dx-card:nth-child(2) {
  animation-delay: 0.2s;
}

.dx-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* 印刷・エクスポート最適化 */
@media print {
  .dx-byproducts {
    background: white;
  }
  
  .dx-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }
  
  .dx-mini {
    display: none;
  }
}
