/* ========================================
   YOYAGE Service Page Styles
   Purpose: service blueprint pipeline
   Loaded only on /service/index.html
   ======================================== */

/* Page hero, breadcrumb, support matrix & resource banner
   styles live in components.css (shared cross-page). */

/* ---------- 2. Service Blueprint (From Inquiry to Delivery) ---------- */
/* 蓝图网格背景：极淡工程网格，仅本模块使用 */
.section-blueprint {
  background-color: var(--color-bg);
  background-image:
    linear-gradient(rgba(222, 229, 235, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222, 229, 235, 0.45) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* 大卡 2×2 行配对 + 中央管道轴线 + 轴尾向下箭头 */
.pipeline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 112px;
  row-gap: 24px;
  padding-bottom: 8px;
}

.pipeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 40px;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background-color: rgba(0, 100, 124, 0.18);
}

.pipeline::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid rgba(0, 100, 124, 0.35);
}

/* 阶段：flex 使同行两卡同高、上下对齐（不设 position，节点与引线相对 .pipeline 定位） */
.stage {
  display: flex;
  flex-direction: column;
}

.stage-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 轴上节点：相对 .pipeline 等距分布（12.5%/37.5%/62.5%/87.5%），间距一致 */
.stage-node {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-bg);
  border: 2px solid var(--color-brand);
  color: var(--color-brand);
  font-size: var(--fs-h3);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.stage:nth-of-type(1) .stage-node {
  top: 12.5%;
}

.stage:nth-of-type(2) .stage-node {
  top: 37.5%;
}

.stage:nth-of-type(3) .stage-node {
  top: 62.5%;
}

.stage:nth-of-type(4) .stage-node {
  top: 87.5%;
}

/* 阶段大卡与轴之间的虚线引线（与节点中心等高） */
.stage-body::before {
  content: "";
  position: absolute;
  width: 28px;
  border-top: 2px dashed var(--color-brand);
}

.stage--left .stage-body::before {
  right: calc(50% + 28px);
}

.stage--right .stage-body::before {
  left: calc(50% + 28px);
}

.stage:nth-of-type(1) .stage-body::before {
  top: 12.5%;
}

.stage:nth-of-type(2) .stage-body::before {
  top: 37.5%;
}

.stage:nth-of-type(3) .stage-body::before {
  top: 62.5%;
}

.stage:nth-of-type(4) .stage-body::before {
  top: 87.5%;
}

/* 阶段大卡：头图 + 概述 + 卡内详情行 */
.stage-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.stage-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.stage-card-media {
  position: relative;
  aspect-ratio: 5 / 2;
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.stage-card-media img {
  transition: transform 0.3s ease;
}

.stage-card:hover .stage-card-media img {
  transform: scale(1.04);
}

.stage-card-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-process);
  z-index: 1;
}

.stage-card-header {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px 22px;
  color: var(--color-white);
}

.stage-card-icon {
  display: inline-flex;
  color: var(--color-white);
}

.stage-card-icon svg {
  width: 28px;
  height: 28px;
}

.stage-card-step {
  font-size: var(--fs-tag);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.stage-card-title {
  color: var(--color-white);
  font-size: var(--fs-h3);
}

.stage-card-overview {
  position: relative;
  padding: 14px 22px;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 卡内细线：左右内缩 22px，不到达卡片边缘 */
.stage-card-overview::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  border-bottom: 1px solid var(--color-border);
}

/* 卡内详情行：1px 细横线分隔 */
.stage-detail {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 22px;
}

.stage-detail + .stage-detail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  border-top: 1px solid var(--color-border);
}

.stage-detail-number {
  flex-shrink: 0;
  min-width: 44px;
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--color-brand);
  line-height: 1;
  transition: color var(--transition-fast);
}

.stage-detail:hover .stage-detail-number {
  color: var(--color-brand-dark);
}

.stage-detail-title {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--color-title);
  margin-bottom: 6px;
}

.stage-detail-desc {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 模块底部文字链接 */
.pipeline-footer {
  margin-top: 40px;
  text-align: center;
  color: var(--color-text-muted);
}

.pipeline-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-brand);
}

.pipeline-footer-link .link-arrow {
  transition: transform var(--transition-fast);
}

.pipeline-footer-link:hover .link-arrow {
  transform: translateX(4px);
}

/* ---------- 3. Responsive ---------- */
@media (max-width: 991px) {
  /* 退化为单列左轴时间轴 */
  .pipeline {
    grid-template-columns: 1fr;
  }

  .pipeline::before {
    left: 24px;
    transform: none;
  }

  .pipeline::after {
    left: 24px;
  }

  .stage {
    position: relative;
    margin-left: 64px;
  }

  .stage-body {
    position: relative;
  }

  .stage:nth-of-type(1) .stage-node,
  .stage:nth-of-type(2) .stage-node,
  .stage:nth-of-type(3) .stage-node,
  .stage:nth-of-type(4) .stage-node {
    left: -40px;
    right: auto;
    top: 32px;
    bottom: auto;
    transform: translateX(-50%);
  }

  .stage:nth-of-type(1) .stage-body::before,
  .stage:nth-of-type(2) .stage-body::before,
  .stage:nth-of-type(3) .stage-body::before,
  .stage:nth-of-type(4) .stage-body::before {
    left: -40px;
    right: auto;
    top: 60px;
    bottom: auto;
    width: 40px;
  }
}

@media (max-width: 767px) {
  .pipeline::before {
    left: 20px;
  }

  .pipeline::after {
    left: 20px;
  }

  .stage {
    margin-left: 52px;
  }

  .stage:nth-of-type(1) .stage-node,
  .stage:nth-of-type(2) .stage-node,
  .stage:nth-of-type(3) .stage-node,
  .stage:nth-of-type(4) .stage-node {
    left: -32px;
    top: 32px;
    width: 40px;
    height: 40px;
    font-size: var(--fs-small);
  }

  .stage:nth-of-type(1) .stage-body::before,
  .stage:nth-of-type(2) .stage-body::before,
  .stage:nth-of-type(3) .stage-body::before,
  .stage:nth-of-type(4) .stage-body::before {
    left: -32px;
    top: 52px;
    width: 32px;
  }

  .stage-card-media {
    aspect-ratio: 16 / 10;
  }

  .stage-card-header {
    padding: 16px 18px;
  }

  .stage-card-overview {
    padding: 12px 16px;
  }

  .stage-card-overview::after {
    left: 16px;
    right: 16px;
  }

  .stage-detail {
    padding: 12px 16px;
  }

  .stage-detail + .stage-detail::before {
    left: 16px;
    right: 16px;
  }

  .stage-detail-number {
    min-width: 36px;
  }

  .page-hero-background img {
    object-position: calc(50% - 600px) center;
  }
}
