/* ============================================================
   深华天成官网 · 客户案例排版增强层 v1
   作用：只做增量覆盖，不修改主包样式；可整体删除回滚。
   范围：案例列表卡片（3 种模板差异化）+ 案例详情正文排版
   ============================================================ */

/* ---------- 一、案例列表卡片：三种模板差异化 ---------- */

/* 成果数据型：薄荷绿顶边 + 数据感 */
.case-card-new.template-case_metrics {
  border-top: 5px solid #16b39a;
  background: linear-gradient(145deg, #fff, #effbf8);
}
.case-card-new.template-case_metrics .case-index {
  color: #16b39a;
}

/* 工程交付型：科技蓝左边 + 工程感 */
.case-card-new.template-case_engineering {
  border-left: 5px solid #075cff;
  background: linear-gradient(120deg, #fff 35%, #f4f8ff);
}
.case-card-new.template-case_engineering .case-index {
  color: #075cff;
}

/* 项目故事型：叙事型，去掉纯白呆板感 */
.case-card-new.template-case_story {
  border-top: 5px solid #0b2545;
  background: linear-gradient(150deg, #fff, #f7f9fc);
}
.case-card-new.template-case_story .case-index {
  color: #7f97b5;
}

/* 卡片交互与细节统一 */
.case-card-new {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.case-card-new:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(7, 92, 255, 0.14);
}
.case-card-new .case-tags span {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
}

/* ---------- 二、案例详情正文排版 ---------- */

.case-richtext > *:first-child {
  margin-top: 0;
}
.case-richtext p {
  margin: 0 0 15px;
}
.case-richtext h4 {
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 3px solid #075cff;
  font-size: 23px;
  line-height: 1.35;
  color: #0b2545;
}
.case-richtext h4:first-child {
  margin-top: 0;
}

/* 正文图片：统一自适应，避免原图 800px 撑破版心 */
.case-richtext img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 26px auto;
  border: 1px solid #e6eefa;
  border-radius: 14px;
  background: #fff;
}

/* 列表：自定义标记，行距更松 */
.case-richtext ul {
  margin: 0 0 20px;
  padding-left: 0;
  list-style: none;
}
.case-richtext ul > li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 22px;
}
.case-richtext ul > li::before {
  position: absolute;
  top: 0.72em;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #16b39a;
  content: "";
}
.case-richtext ol > li {
  margin-bottom: 10px;
}
.case-richtext li > strong {
  color: #0b2545;
}

/* 规格参数表：工程交付型案例的核心信息块 */
.case-richtext table {
  width: 100%;
  margin: 0 0 26px;
  border: 1px solid #e3ecf8;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  font-size: 15px;
}
.case-richtext table th,
.case-richtext table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eaf1fa;
  text-align: left;
  vertical-align: top;
}
.case-richtext table th {
  width: 34%;
  color: #0b2545;
  background: #f5f9ff;
  font-weight: 700;
  white-space: nowrap;
}
.case-richtext table tr:last-child th,
.case-richtext table tr:last-child td {
  border-bottom: 0;
}

/* 指标卡：成果数据型案例的关键指标区 */
.case-richtext .metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 0 0 26px;
}
.case-richtext .metric-item {
  padding: 16px 18px;
  border: 1px solid #d9ece6;
  border-radius: 14px;
  background: linear-gradient(160deg, #fff, #f0fbf8);
}
.case-richtext .metric-value {
  display: block;
  color: #0f8f7c;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
}
.case-richtext .metric-label {
  display: block;
  margin-top: 7px;
  color: #5b7392;
  font-size: 13px;
}

/* 结论/客户评价条 */
.case-richtext .case-callout {
  margin: 0 0 24px;
  padding: 15px 20px;
  border-left: 4px solid #16b39a;
  border-radius: 0 12px 12px 0;
  color: #24564d;
  background: #f1fbf8;
}
.case-richtext .case-callout strong {
  color: #0f8f7c;
}

/* 移动端收紧留白 */
@media (max-width: 640px) {
  .case-richtext h4 {
    margin: 30px 0 13px;
    font-size: 20px;
  }
  .case-richtext table {
    font-size: 14px;
  }
  .case-richtext table th,
  .case-richtext table td {
    display: block;
    width: 100%;
    border-bottom: 0;
  }
  .case-richtext table tr {
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid #eaf1fa;
  }
}

/* md-table styles for solution detail */
.md-table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 15px; line-height: 1.7; }
.md-table th { background: #f0f4ff; color: #1a3a6b; text-align: left; padding: 12px 14px; border: 1px solid #dde3ee; font-weight: 600; }
.md-table td { padding: 12px 14px; border: 1px solid #e4e9f2; vertical-align: top; }
.md-table tr:nth-child(even) td { background: #fafbfe; }
.md-table td strong { color: #1a3a6b; }
.case-richtext table { width: 100%; border-collapse: collapse; }
.case-richtext th, .case-richtext td { border: 1px solid #e4e9f2; padding: 12px 14px; }

/* ---------- 三、案例列表统一卡片（参考图样式） ---------- */

/* 取消旧版按案例模板区分的边框和底色，所有案例保持同一视觉语言。 */
.case-grid {
  gap: 22px;
}

.case-card-new,
.case-card-new.template-case_metrics,
.case-card-new.template-case_engineering,
.case-card-new.template-case_story {
  min-height: 0;
  padding: 24px 30px 26px;
  border: 1px solid #cfe0ef;
  border-top: 5px solid #12b79f;
  background: linear-gradient(145deg, #ffffff 8%, #f3fbfa 100%);
  box-shadow: none;
}

.case-card-new:hover,
.case-card-new.template-case_metrics:hover,
.case-card-new.template-case_engineering:hover,
.case-card-new.template-case_story:hover {
  transform: translateY(-4px);
  border-color: #a9d8d1;
  border-top-color: #12b79f;
  box-shadow: 0 18px 42px rgba(20, 76, 111, 0.11);
}

.case-card-new::after {
  right: -58px;
  bottom: -62px;
  width: 176px;
  height: 176px;
  border-color: rgba(182, 213, 239, 0.72);
  box-shadow:
    0 0 0 32px rgba(224, 239, 251, 0.52),
    0 0 0 64px rgba(239, 247, 253, 0.58);
}

.case-card-new .case-index,
.case-card-new.template-case_metrics .case-index,
.case-card-new.template-case_engineering .case-index,
.case-card-new.template-case_story .case-index {
  color: #06a88f;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.case-card-new .case-meta {
  gap: 12px;
  margin: 14px 0 8px;
  color: #075cff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.case-card-new h3 {
  max-width: 100%;
  margin: 0 0 10px;
  color: #071c38;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.36;
  letter-spacing: -0.02em;
}

.case-card-new p {
  flex: 0 0 auto;
  margin-bottom: 0;
  color: #657d94;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 3;
}

.case-card-new .case-tags {
  position: relative;
  z-index: 1;
  gap: 7px;
  margin: 13px 0 17px;
}

.case-card-new .case-tags span {
  padding: 4px 11px;
  border: 1px solid #c9ddf5;
  border-radius: 999px;
  color: #506d8c;
  background: rgba(248, 252, 255, 0.86);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.case-card-new button {
  position: relative;
  z-index: 1;
  padding-bottom: 7px;
  border-bottom-color: #83b3ff;
  color: #075cff;
  font-size: 16px;
  font-weight: 800;
}

@media (max-width: 780px) {
  .case-card-new,
  .case-card-new.template-case_metrics,
  .case-card-new.template-case_engineering,
  .case-card-new.template-case_story {
    min-height: 0;
    padding: 22px 24px 24px;
  }
}
