/* 横向滚动工艺流程样式 */
.horizontal-flow-section {
  position: relative;
  padding: 4rem 0;
  background-color: #f9f9f9;
  overflow: hidden;
}

.horizontal-flow-section .container {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: #00476b;
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* 流程控制按钮 */
.flow-controls {
  position: relative;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 2rem;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: #ffffff;
  border: 2px solid #00476b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.scroll-btn:hover {
  background-color: #00476b;
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.scroll-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.scroll-btn-left {
  left: 0;
}

.scroll-btn-right {
  right: 0;
}

.scroll-btn i {
  font-size: 1.5rem;
  color: #00476b;
  transition: color 0.3s ease;
}

.scroll-btn:hover i {
  color: white;
}

/* 横向滚动容器 */
.flow-scroll-container {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 1rem 0;
}

.flow-scroll-container::-webkit-scrollbar {
  display: none;
}

/* 流程轨道 */
.flow-track {
  display: flex;
  gap: 0;
  padding: 1rem 0;
  min-width: max-content;
}

/* 流程阶段 */
.flow-stage {
  position: relative;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
}

/* 阶段卡片 */
.stage-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 300px;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  border: 1px solid #e0e0e0;
}

.stage-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: #00476b;
}

.stage-card:hover .stage-icon {
  background-color: #00476b;
}

.stage-card:hover .stage-icon i {
  color: white;
}

.stage-number {
  position: absolute;
  top: -15px;
  left: 20px;
  width: 30px;
  height: 30px;
  background-color: #00476b;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 3;
}

.stage-icon {
  width: 60px;
  height: 60px;
  background-color: #f0f7ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: background-color 0.3s ease;
}

.stage-icon i {
  font-size: 2rem;
  color: #00476b;
  transition: color 0.3s ease;
}

.stage-content {
  flex: 1;
}

.stage-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  position: relative;
}

.stage-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #00476b;
  transition: width 0.3s ease;
}

.stage-card:hover .stage-title::after {
  width: 100%;
}

.stage-description {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

/* 阶段连接器 */
.stage-connector {
  width: 60px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.stage-connector i {
  font-size: 2rem;
  color: #00476b;
  animation: arrowSlide 2s ease-in-out infinite;
}

@keyframes arrowSlide {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px);
  }
}

/* 自定义滚动条 */
.custom-scrollbar {
  margin-top: 2rem;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

.scrollbar-track {
  width: 100%;
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.scrollbar-thumb {
  height: 100%;
  background-color: #00476b;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
  min-width: 50px;
}

.scrollbar-thumb:hover {
  background-color: #003a57;
}

/* 滚动动画 */
@keyframes scrollRight {
  0% { transform: translateX(0); }
  100% { transform: translateX(-30px); }
}

.flow-stage.in-view .stage-card {
  animation: fadeInUp 0.6s ease forwards;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .horizontal-flow-section {
    padding: 2rem 0;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .stage-card {
    width: 260px;
    height: 220px;
    padding: 1.25rem;
  }
  
  .stage-title {
    font-size: 1.1rem;
  }
  
  .stage-description {
    font-size: 0.85rem;
  }
  
  .stage-connector {
    width: 40px;
  }
  
  .stage-connector i {
    font-size: 1.2rem;
  }
  
  .scroll-btn {
    width: 40px;
    height: 40px;
  }
  
  .scroll-btn i {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .stage-card {
    width: 240px;
    height: 200px;
    padding: 1rem;
  }
  
  .stage-icon {
    width: 50px;
    height: 50px;
  }
  
  .stage-icon i {
    font-size: 1.5rem;
  }
}

/* 确保最后一个阶段没有连接器 */
.flow-stage:last-child .stage-connector {
  display: none;
}