/* service-process.css - 服务流程样式优化 */

/* 服务流程容器样式 */
.service-process-row {
  margin: 5rem 0;
  padding: 2rem;
  background-color: var(--surface-color);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* 主标题样式 */
.service-process-row h2 {
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--heading-color);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent-color);
  position: relative;
}

.service-process-row h2:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background-color: var(--accent-color);
}

/* 流程描述文字 */
.service-process-row > p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-bottom: 2.5rem;
  max-width: 800px;
}

/* 流程子标题 */
.service-process-row h3 {
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--heading-color);
  margin: 2.5rem 0 1.5rem;
  padding: 0.8rem 0;
  position: relative;
  display: inline-block;
}

.service-process-row h3:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), transparent);
  border-radius: 2px;
}

/* IVF辅助生殖服务流程标题特殊样式 */
.service-process-row h3:nth-of-type(1) {
  /*color: var(--accent-color);*/
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color), transparent 95%) 0%, transparent 100%);
  padding: 0.8rem 1.5rem;
  border-radius: 8px 8px 0 0;
}

/* 生物材料转运服务流程标题特殊样式 */
.service-process-row h3:nth-of-type(2) {
  color: #ed1c67;
  background: linear-gradient(135deg, rgba(237, 28, 103, 0.05) 0%, transparent 100%);
  padding: 0.8rem 1.5rem;
  border-radius: 8px 8px 0 0;
}

/* 流程列表容器 */
.service-process-row ul {
  list-style: none;
  margin: 0 0 2.5rem 0;
  counter-reset: step-counter;
  background-color: var(--background-color);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

/* IVF流程列表特殊边框 */
.service-process-row h3:nth-of-type(1) + ul {
  border-left: 4px solid var(--accent-color);
}

/* 生物材料流程列表特殊边框 */
.service-process-row h3:nth-of-type(2) + ul {
  border-left: 4px solid #ed1c67;
}

/* 流程步骤样式 */
.service-process-row ul li {
  counter-increment: step-counter;
  padding: 1.2rem 0 1.2rem 3.5rem;
  position: relative;
  font-size: 1rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
  transition: all 0.3s ease;
}

.service-process-row ul li:last-child {
  border-bottom: none;
}

.service-process-row ul li:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 97%);
  padding-left: 3.8rem;
  color: var(--default-color);
}

/* 步骤编号样式 */
.service-process-row ul li:before {
  content: counter(step-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  background: #7fb2dc;
  color: var(--contrast-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--accent-color), transparent 60%);
}

/* 生物材料流程步骤编号特殊样式 */
.service-process-row h3:nth-of-type(2) + ul li:before {
  background: #ed1c67;
  box-shadow: 0 4px 10px rgba(237, 28, 103, 0.2);
}

/* 步骤内容中的强调文字 */
.service-process-row ul li strong {
  color: var(--heading-color);
  font-weight: 600;
}

/* 流程步骤中的子列表 */
.service-process-row ul li p {
  margin: 0.5rem 0 0 0;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 子列表样式 */
.service-process-row ul li ul {
  margin: 0.8rem 0 0 1rem;
  padding: 0;
  background: none;
  border: none;
  counter-reset: sub-counter;
}

.service-process-row ul li ul li {
  padding: 0.5rem 0 0.5rem 2rem;
  border: none;
  font-size: 0.9rem;
  counter-increment: sub-counter;
}

.service-process-row ul li ul li:before {
  content: counter(sub-counter, lower-alpha);
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.75rem;
  background: color-mix(in srgb, var(--default-color), transparent 85%);
  color: var(--default-color);
  box-shadow: none;
}

/* 流程步骤间的分隔线增强 */
.service-process-row ul li:not(:last-child):after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 3.5rem;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--default-color), transparent 85%), transparent);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .service-process-row {
    padding: 1.5rem;
    margin: 3rem 0;
  }

  .service-process-row h2 {
    font-size: 1.8rem;
  }

  .service-process-row h3 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
  }

  .service-process-row ul {
    padding: 1rem;
  }

  .service-process-row ul li {
    padding: 1rem 0 1rem 3rem;
    font-size: 0.95rem;
  }

  .service-process-row ul li:before {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.8rem;
  }

  .service-process-row ul li ul li {
    padding: 0.4rem 0 0.4rem 1.8rem;
    font-size: 0.85rem;
  }
}

/* 动画效果 */
.service-process-row ul li {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(10px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 为每个步骤添加不同的延迟动画 */
.service-process-row ul li:nth-child(1) { animation-delay: 0.1s; }
.service-process-row ul li:nth-child(2) { animation-delay: 0.2s; }
.service-process-row ul li:nth-child(3) { animation-delay: 0.3s; }
.service-process-row ul li:nth-child(4) { animation-delay: 0.4s; }
.service-process-row ul li:nth-child(5) { animation-delay: 0.5s; }
.service-process-row ul li:nth-child(6) { animation-delay: 0.6s; }
.service-process-row ul li:nth-child(7) { animation-delay: 0.7s; }
.service-process-row ul li:nth-child(8) { animation-delay: 0.8s; }
.service-process-row ul li:nth-child(9) { animation-delay: 0.9s; }
.service-process-row ul li:nth-child(10) { animation-delay: 1.0s; }
.service-process-row ul li:nth-child(11) { animation-delay: 1.1s; }
.service-process-row ul li:nth-child(12) { animation-delay: 1.2s; }

/* 流程卡片效果 */
.service-process-flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

@media (min-width: 992px) {
  .service-process-flow {
    /*grid-template-columns: 1fr 1fr;*/
    gap: 3rem;
  }

  .service-process-row h3:nth-of-type(1) + ul {
    margin-bottom: 0;
  }
}

/* 流程卡片标题装饰 */
.service-process-flow-card {
  background: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-process-flow-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* 卡片标题区域 */
.flow-card-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, #80c0f5, color-mix(in srgb, var(--accent-color), var(--heading-color) 15%));
  color: var(--contrast-color);
}

.flow-card-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 400;
  color: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
}

.flow-card-header h3:before {
  display: none;
}

/* 卡片内容区域 */
.flow-card-content {
  padding: 1.5rem;
}

/* 视觉分隔线 */
.process-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--default-color), transparent 50%), transparent);
  margin: 2.5rem 0;
}

/* ===== 优化服务流程卡片样式 ===== */
.service-process-flow-card {
  /* 增强阴影 */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* 卡片头部：分别设置两种颜色 */
.service-process-flow-card:first-child .flow-card-header {
  background: #1cba9f; /* 主色调 */
  background: linear-gradient(145deg, #1cba9f, #17a085);
}
.service-process-flow-card:last-child .flow-card-header {
  background: #ed1c67; /* 粉色 */
  background: linear-gradient(145deg, #ed1c67, #c01554);
}

.flow-card-header h3 {
  color: #fff; /* 保证白色文字 */
}

/* 卡片内容区域 ul 容器 */
.service-process-flow-card ul {
  position: relative;
  background: transparent !important; /* 去掉原背景色，保留内联背景图 */
  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: inherit; /* 将被覆盖 */
  z-index: 0;
  overflow: hidden; /* 让伪元素圆角一致 */
}

/* 为两个卡片分别设置左边框颜色 */
.service-process-flow-card:first-child ul {
  border-left-color: #1cba9f;
}
.service-process-flow-card:last-child ul {
  border-left-color: #ed1c67;
}

/* 半透明遮罩层，提高文字可读性 */
.service-process-flow-card ul::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  z-index: 1;
  border-radius: inherit; /* 继承ul的圆角 */
}

/* li 需要位于遮罩上方 */
.service-process-flow-card ul li {
  position: relative;
  z-index: 2;
  background-color: transparent; /* 保持透明，让遮罩背景显示，但悬停时可覆盖 */
  transition: background-color 0.2s;
}
.service-process-flow-card ul li:hover {
  background-color: rgba(28, 186, 159, 0.15); /* 更透明的悬停效果 */
}

/* 步骤编号背景色分别设置 */
.service-process-flow-card:first-child ul li:before {
  background: #1cba9f;
  box-shadow: 0 4px 10px rgba(28, 186, 159, 0.3);
}
.service-process-flow-card:last-child ul li:before {
  background: #ed1c67;
  box-shadow: 0 4px 10px rgba(237, 28, 103, 0.3);
}

/* 调整 li 内 p 的样式，去除多余外边距 */
.service-process-flow-card ul li p {
  margin: 0 0 0.25rem 0;
  line-height: 1.5;
  color: #333; /* 加深文本 */
}
.service-process-flow-card ul li p:last-child {
  margin-bottom: 0;
}

/* 对于第二个流程中多行描述的 p，给予缩进，区分层级 */
.service-process-flow-card:last-child ul li p:not(:first-child) {
  padding-left: 1.8rem;
  font-size: 0.9rem;
  color: #555;
  position: relative;
}
.service-process-flow-card:last-child ul li p:not(:first-child)::before {
  content: '•';
  position: absolute;
  left: 0.8rem;
  color: #ed1c67;
  font-weight: bold;
}

/* 保持原有的列表项动画，但调整延迟顺序已在原样式中定义，继续有效 */
/* 确保响应式优化 */
@media (max-width: 768px) {
  .service-process-flow-card ul li p:not(:first-child) {
    padding-left: 1.2rem;
    font-size: 0.85rem;
  }
  .service-process-flow-card ul li p:not(:first-child)::before {
    left: 0.3rem;
  }
}

/* 如果原卡片标题有下划线等，可以去掉 */
.flow-card-header h3:before {
  display: none; /* 隐藏原有的下划线，因为我们用纯色背景 */
}

/* 调整卡片间的间距 */
.service-process-flow {
  gap: 2rem;
}

/* 增强卡片内列表项的可读性 */
.service-process-flow-card ul li {
  padding: 1rem 0 1rem 3.5rem; /* 保持原样 */
  font-size: 1rem;
}