/* ============================================================
   About-R&D — Technology Innovation（证书轮播）
   Figma: #596:34352 (1920×1080 var(--color-soft-gray))
   标题 @(208,120) 76/90 ExtraBold var(--color-primary)；描述 @(208,240) 32/48 var(--color-text-muted)
   绿线 @(208,388) 360×4 var(--color-secondary)；列表 @(208,492) 4 项 gap 20（六边形 22 + 24px/48 var(--color-text)）
   证书轮播 @(1032,388) 804×514：底图 565×500 @(138,0) + 证书 313×443 @(265,29)
     箭头 32×24 @(29,239)/(772,239) + 页码 01/06 @(0,485)（透明背景，非白块）
   5 张证书无限左右循环（当前 1 真实图 + 4 mock 同图，待替换）
   全部坐标按 1920 基准换算 vw/百分比，min(vw,px) 封顶
   ============================================================ */

.ard-tech {
  position: relative;
  background: var(--color-soft-gray);
  padding: 120px 0 240px;
  overflow: hidden;
}

.ard-tech__title {
  font-size: clamp(1.75rem, 3.9583vw, 4.75rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin: 0 0 min(30px, 1.563vw);   /* 标题→描述 30px */
  margin-left: 10.83%;   /* 208/1920 */
}

.ard-tech__desc {
  max-width: 84.375%;    /* 1620/1920 */
  font-size: min(1.875rem, 1.667vw);
  line-height: 1.5;      /* 48/32 */
  letter-spacing: -0.02em;
  color: var(--color-text-secondary);
  opacity: 0.7;
  margin: 0 0 min(100px, 5.208vw);  /* 描述→绿线 100px */
  margin-left: 10.83%;
}

.ard-tech__line {
  display: block;
  width: min(360px, 18.75vw);   /* 360/1920 */
  height: 4px;
  background: var(--color-secondary);
  margin: 0 0 min(100px, 5.208vw);  /* 绿线→列表 100px */
  margin-left: 10.83%;
}

/* 左侧列表 @ (208, 492) 588 宽，4 项 gap 20（间距 68 - 项高 48） */
.ard-tech__list {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: 10.83%;
  width: 30.625%;        /* 588/1920 */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ard-tech__item {
  display: flex;
  align-items: center;
  gap: 16px;             /* 六边形→文字 42-22=20？设计稿文字 x42 六边形 22 宽 → gap 20 */
  font-size: min(1.5rem, 1.25vw);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-text);
  white-space: nowrap;
}

.ard-tech__dot {
  flex: 0 0 22px;
  width: 22px;
  height: calc(22px * 0.866);   /* 平顶正六边形 宽:高=2:√3，同 product-detail KV 的 pd2-kv__feature-dot */
  background: var(--color-secondary);   /* 绿色 var(--color-secondary) */
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

/* 右侧证书轮播 @ (1032, 388) 804×514——透明背景 */
.ard-tech__cert {
  position: absolute;
  right: 4.375%;         /* 84/1920 */
  top: 35.93%;           /* 388/1080 */
  width: 41.875%;        /* 804/1920 */
  aspect-ratio: 804 / 514;
}

/* 证书底图 565×500 @ (138, 0) */
.ard-tech__cert-bg {
  position: absolute;
  left: 17.16%;          /* 138/804 */
  top: 0;
  width: 70.27%;         /* 565/804 */
  aspect-ratio: 565 / 500;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* 证书外框——绝对定位，尺寸不变 */
.ard-tech__cert-frame {
  position: absolute;
  left: 32.96%;          /* 265/804 */
  top: 5.64%;            /* 29/514 */
  width: 38.93%;         /* 313/804 */
  aspect-ratio: 313 / 443;
  object-fit: cover;
  border-radius: var(--radius-xs);
  transform-origin: center center;
  transform: scale(0.85);
}

/* 证书图片容器——复用原 cert-frame 位置，图片居中 + 标题在下 */
.ard-tech__cert-wrap {
  position: absolute;
  left: 32.96%;          /* 265/804 */
  top: 5.64%;            /* 29/514 */
  width: 38.93%;         /* 313/804 */
  aspect-ratio: 313 / 443;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

/* 证书图片——缩至容器 85%（容器位置不变） */
.ard-tech__cert-wrap .ard-tech__cert-frame {
  position: relative;
  left: auto;
  top: auto;
  width: 85%;
  aspect-ratio: 313 / 443;
  transform: none;               /* 覆盖外部 scale，已在 85% 宽度内 */
}

/* 证书标题——灰色、较小、与图片左右居中 */
.ard-tech__cert-caption {
  display: block;
  margin-top: 12px;
  font-size: clamp(0.8125rem, 0.04vw + 0.8rem, 0.875rem);
  line-height: 1.4;
  color: var(--color-text-muted);
  text-align: center;
}

/* 证书切换动效：淡出（方向位移）→ 换图 → 从对侧淡入 */
.ard-tech__cert-wrap .ard-tech__cert-frame.is-out-next,
.ard-tech__cert-wrap .ard-tech__cert-frame.is-out-prev,
.ard-tech__cert-bg.is-out {
  animation: ard-cert-out var(--duration-base, 0.3s) var(--ease-standard, ease) forwards;
}

.ard-tech__cert-wrap .ard-tech__cert-frame.is-in-next,
.ard-tech__cert-wrap .ard-tech__cert-frame.is-in-prev {
  animation: ard-cert-in var(--duration-base, 0.3s) var(--ease-standard, ease) forwards;
}

.ard-tech__cert-wrap .ard-tech__cert-frame.is-out-next { animation-name: ard-cert-out-next; }
.ard-tech__cert-wrap .ard-tech__cert-frame.is-out-prev { animation-name: ard-cert-out-prev; }
.ard-tech__cert-wrap .ard-tech__cert-frame.is-in-next  { animation-name: ard-cert-in-next; }
.ard-tech__cert-wrap .ard-tech__cert-frame.is-in-prev  { animation-name: ard-cert-in-prev; }

@keyframes ard-cert-out-next {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(calc(var(--translate-md, 1rem) * -1)); }
}

@keyframes ard-cert-out-prev {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(var(--translate-md, 1rem)); }
}

@keyframes ard-cert-in-next {
  from { opacity: 0; transform: translateX(var(--translate-md, 1rem)); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes ard-cert-in-prev {
  from { opacity: 0; transform: translateX(calc(var(--translate-md, 1rem) * -1)); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes ard-cert-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.ard-tech__cert-arrow {
  position: absolute;
  top: 46.5%;            /* 239/514 */
  transform: translateY(-50%);
  width: min(45px, 2.344vw);
  aspect-ratio: 1 / 1;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;              /* 六边形，不需要圆角 */
  pointer-events: auto;
}

.ard-tech__cert-arrow img {
  width: 100%;
  height: 100%;
  object-fit: fill;      /* 拉伸填满，与 acs-switch 六边形箭头一致 */
  display: block;
}

.ard-tech__cert-arrow:hover img {
  filter: brightness(0.85);
}

.ard-tech__cert-arrow:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
  border-radius: var(--radius-md-lg);
}

.ard-tech__cert-arrow--prev {
  left: 6.5%;            /* 视觉校正：hex SVG 左箭头内容偏左，右移使左右间距对称 */
}

.ard-tech__cert-arrow--next {
  right: 2%;             /* 视觉校正：hex SVG 右箭头内容偏右，左收使左右间距对称 */
}

/* 页码 01/06 @ (0, 485) */
.ard-tech__cert-pager {
  position: absolute;
  left: 0;
  bottom: 5.64%;         /* 514-485 */
  font-size: clamp(1rem, 0.08vw + 0.98rem, 1.125rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.ard-tech__cert-pager b {
  font-size: clamp(1.25rem, 0.48vw + 1.14rem, 2rem);
  line-height: 1.5;
  font-weight: 600;
  color: var(--color-secondary);
}

/* ---------- responsive ---------- */

@media (max-width: 1440px) {
  .ard-tech {
    padding: 100px 0 120px;
  }
  .ard-tech__title,
  .ard-tech__desc,
  .ard-tech__line,
  .ard-tech__list {
    margin-left: var(--container-padding);
  }
  .ard-tech__desc {
    max-width: 100%;          /* 覆盖 PC 84.375%，避免灰色描述被限制在窄宽内 */
  }
  .ard-tech__cert {
    position: static;
    margin: 64px var(--container-padding) 0 auto;
  }
}

/* PC端：箭头相对于 .ard-tech__cert 定位 */
.ard-tech__cert-arrows {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 44px;
  width: calc(85% + 100px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 768px) {
  .ard-tech {
    padding: 64px 0 80px;
    display: flex;               /* 移动端竖排，用 order 重排：标题→描述→线→奖状→条目 */
    flex-direction: column;
  }
  .ard-tech__title {
    order: 1;
    font-size: clamp(1.5rem, 0.81vw + 1.31rem, 2.75rem);
    line-height: 1.18;
    text-align: center;
    margin: 0 0 20px;
  }
  .ard-tech__desc {
    order: 2;
    font-size: clamp(0.9375rem, 0.08vw + 0.92rem, 1.0625rem);
    text-align: center;          /* 描述左右居中 */
    margin: 0 0 40px;
  }
  .ard-tech__line {
    order: 3;
    width: 220px;
    margin: 0 auto 24px;         /* 绿线左右居中，下方仅留 24px */
  }
  .ard-tech__list {
    order: 6;
    width: auto;
    margin-left: var(--container-padding);   /* 4 个条目居左 */
    margin-top: -100px;
  }
  .ard-tech__item {
    font-size: 1rem;
    line-height: 1.6;
    gap: 12px;
  }
  .ard-tech__cert {
    order: 4;
    position: relative;
    left: 0;
    right: 0;
    top: auto;
    margin: 0 auto 24px;
    padding: 0;
    width: 100%;
    max-width: calc(100% - 2 * var(--container-padding));
    aspect-ratio: auto;
    height: auto;
    text-align: center;
  }
  /* 隐藏白色背景框 */
  .ard-tech__cert-bg {
    display: none;
  }
  /* 奖状图片容器 */
  .ard-tech__cert-wrap {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    order: 1;
  }
  .ard-tech__cert-wrap .ard-tech__cert-frame {
    position: relative;
    left: auto;
    top: auto;
    width: 60%;
    height: auto;
    transform: none;
  }
  /* 文字说明在奖状下方 */
  .ard-tech__cert-caption {
    position: relative;
    order: 2;
    margin-top: 12px;
    font-size: clamp(0.9375rem, 0.04vw + 0.92rem, 1rem);
    text-align: center;
    width: 100%;
  }
  /* 左右箭头行 - 放在证书图片两侧上下居中 */
  .ard-tech__cert-arrows {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 85%;
    z-index: 5;
    pointer-events: none;
    transform: translateY(-30px);
  }
  .ard-tech__cert-arrow {
    position: static;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    z-index: 5;
    transform: none;
    pointer-events: auto;
    cursor: pointer;
  }
  .ard-tech__cert-arrow--prev {
    left: auto;
    margin: 0;
  }
  .ard-tech__cert-arrow--next {
    right: auto;
    margin: 0;
  }
  .ard-tech__cert-arrow img {
    width: 44px;
    height: 44px;
    object-fit: contain;
  }
  /* 页码 */
  .ard-tech__cert-pager {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    text-align: center;
    margin: 8px auto 0;
    font-size: clamp(0.6875rem, 0.04vw + 0.68rem, 0.75rem);
  }
  .ard-tech__cert-pager b {
    font-size: clamp(1rem, 0.16vw + 0.96rem, 1.25rem);
    line-height: 1.6;
  }
}
/* ==================== 无障碍降级 ==================== */
@media (max-width: 576px) {
  .ard-tech__title {
    font-size: clamp(1.625rem, 8vw, 2.25rem);
    line-height: 1.18;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ard-tech__cert-frame,
  .ard-tech__cert-bg {
    animation: none !important;
  }
}
