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

.ard-tech {
  position: relative;
  background: #F8F8F8;
  padding: 120px 0 140px;
  overflow: hidden;
}

.ard-tech__title {
  font-size: min(76px, 3.958vw);
  font-weight: 800;
  line-height: 1.184;    /* 90/76 */
  letter-spacing: -0.02em;
  color: #3EA8D9;
  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(32px, 1.667vw);
  line-height: 1.5;      /* 48/32 */
  letter-spacing: -0.02em;
  color: #999999;
  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: #A8CE50;
  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(24px, 1.25vw);
  font-weight: 600;
  line-height: 48px;
  letter-spacing: -0.02em;
  color: #333333;
}

.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);   /* 绿色 #A8CE50 */
  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: 8px;
}

/* 证书图 313×443 @ (265, 29) */
.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: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

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

.ard-tech__cert-frame.is-out-next { animation-name: ard-cert-out-next; }
.ard-tech__cert-frame.is-out-prev { animation-name: ard-cert-out-prev; }
.ard-tech__cert-frame.is-in-next  { animation-name: ard-cert-in-next; }
.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, 16px) * -1)); }
}

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

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

@keyframes ard-cert-in-prev {
  from { opacity: 0; transform: translateX(calc(var(--translate-md, 16px) * -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(44px, 2.292vw);
  aspect-ratio: 1 / 1;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.ard-tech__cert-arrow img {
  width: min(32px, 1.667vw);
  height: auto;
  display: block;
}

.ard-tech__cert-arrow:hover {
  background: #ECF6FB;
}

.ard-tech__cert-arrow--prev {
  left: 3.61%;           /* 29/804 */
}

.ard-tech__cert-arrow--next {
  right: 3.61%;          /* (804-772)/804 */
}

/* 页码 01/06 @ (0, 485) */
.ard-tech__cert-pager {
  position: absolute;
  left: 0;
  bottom: 5.64%;         /* 514-485 */
  font-size: 18px;
  font-weight: 800;
  line-height: 24px;
  color: #999999;
}

.ard-tech__cert-pager b {
  font-size: 32px;
  line-height: 24px;
  font-weight: 800;
  color: #A8CE50;
}

/* ---------- 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;
  }
}

@media (max-width: 768px) {
  .ard-tech {
    padding: 64px 0 80px;
    display: flex;               /* 移动端竖排，用 order 重排：标题→描述→线→奖状→条目 */
    flex-direction: column;
  }
  .ard-tech__title {
    order: 1;
    font-size: 36px;
    text-align: center;          /* 标题左右居中 */
    margin: 0 0 20px;
  }
  .ard-tech__desc {
    order: 2;
    font-size: 17px;
    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 个条目居左 */
  }
  .ard-tech__item {
    font-size: 16px;
    line-height: 1.6;
    gap: 12px;
  }
  .ard-tech__cert {
    order: 4;
    position: relative;          /* 作为内部 bg/frame 绝对定位的上下文（static 会上溯到 .ard-tech 导致图覆盖文字） */
    right: auto;                 /* 清除 PC 残留 right:4.375%，确保 margin auto 真正左右居中 */
    top: auto;                   /* 清除 PC 残留 top:35.93%，避免 relative 下被下推 */
    margin: 0 auto 40px;         /* 奖状紧贴上方绿线 */
    width: calc(100% - 2 * var(--container-padding));
    aspect-ratio: auto;
    height: 290px;               /* 270→290：页码与条目下移 20px */
  }
  .ard-tech__cert-bg,
  .ard-tech__cert-frame {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;                  /* inset + auto margin：上下、左右居中（不用 transform，避免与切换动画冲突） */
    max-width: 85%;
    max-height: 85%;
  }
  .ard-tech__cert-arrow {
    width: 44px;                 /* 固定 PC 端箭头尺寸（2.292vw 在移动端只剩 ~9px，几乎不可见） */
  }
  .ard-tech__cert-arrow img {
    width: 32px;
  }
  .ard-tech__cert-pager {
    order: 5;                  /* JS 把页码移到奖状后、条目前；静态居中显示 */
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    text-align: center;
    margin: 8px auto 40px;     /* 页码上移到奖状附近 */
    font-size: 12px;
  }
  .ard-tech__cert-pager b {
    font-size: 20px;           /* 页码数字也相应缩小 */
    line-height: 20px;
  }
}
/* ==================== 无障碍降级 ==================== */
@media (prefers-reduced-motion: reduce) {
  .ard-tech__cert-frame,
  .ard-tech__cert-bg {
    animation: none !important;
  }
}
