/*
 * Support 页 —— 1:1 对应设计稿 Astra 6月 / 1015:1604
 *
 *   首屏 1048:1996    整幅 1920×960，居中白字（走 page-banner 默认款）
 *   四项服务 1056:2706 白底 py120，标题栈 137 与四栏之间 96
 *     四栏共 1600（左右各 160），每栏 px32 py40、右侧 1px #DEDFE0 分隔
 *     图标 60 → 两端对齐 → 标题 32/38(-0.64) + 说明 24/32(-0.24)，常态都是 #999
 *     hover：底色 #F4F6F7、标题转黑（设计稿里第二栏就是这个态）
 *   服务板块 1066:491  整幅 820：左图 898，右侧 #141414
 *     上下 80 左右 40：小标 32/38 #999 → 主标 56/56 白(-2.24) → 2px 红线 → 说明 36/40 Bold #808080
 *     右边再留 160 的暗色空档
 *   培训图廊 1070:1066 #F9F9F9 py120，标题栈与图条之间 96
 *     四格 582 高、间距 20，合起来 1440：常态 289、展开 513
 *     图上压 80% 黑；序号牌 60×60（常态 #333/描边 #808080，展开 #1B2227/描边 #333）
 *     标题 36/40 Bold、说明 18/25 Bold：常态 #808080，展开转白
 *     底部 4px 横条：常态 #999，展开转主题色
 *
 * 尺寸字号走 CSS 变量，由组件的响应式控制项按断点写入。
 */

.astra-sup {
  --sup-primary: #e60012;
  --sup-text: #333333;
  --sup-strong: #000000;
  --sup-muted: #808080;
  --sup-subtle: #999999;
  --sup-border: #dedfe0;
  --sup-cool: #f4f6f7;
  --sup-dark: #141414;

  font-family: inherit;
  color: var(--sup-text);
}

/* 居中区块标题：48/53 + 红线 100×4 + 副标题 24/32 */
.astra-sup__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: calc(var(--sup-header-width, 1280px) + 32px);
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
}

.astra-sup__title {
  margin: 0;
  width: 100%;
  font-size: var(--sup-title-size, 48px);
  line-height: var(--sup-title-line, 53px);
  font-weight: 700;
  letter-spacing: -1.92px;
  color: var(--sup-strong);
  overflow-wrap: break-word;
}

.astra-sup__rule {
  display: block;
  flex: 0 0 auto;
  width: 100px;
  height: 4px;
  background: var(--sup-primary);
}

.astra-sup__sub {
  margin: 0;
  width: 100%;
  font-size: var(--sup-sub-size, 24px);
  line-height: var(--sup-sub-line, 32px);
  font-weight: 600;
  letter-spacing: -0.24px;
  color: var(--sup-subtle);
}

.astra-sup__empty {
  margin: 0;
  padding: 24px 0;
  font-size: 18px;
  color: var(--sup-subtle);
  text-align: center;
}

/* ==================================================== 四项服务 1056:2706 */
.astra-sup-features {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sup-features-gap, 96px);
  padding: var(--sup-features-padding, 120px) 0;
  background: #ffffff;
}

.astra-sup-features__row {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: calc(var(--sup-features-width, 1600px) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

.astra-sup-features__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  min-height: var(--sup-features-height, 414px);
  padding: 40px 32px;
  border-right: 1px solid var(--sup-border);
  background: transparent;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.astra-sup-features__item:last-child {
  border-right: 0;
}

/* 设计稿里第二栏就是 hover 态：浅底 + 标题转黑 */
.astra-sup-features__item:hover,
.astra-sup-features__item:focus-within {
  background: var(--sup-cool);
}

.astra-sup-features__icon {
  flex: 0 0 auto;
  width: var(--sup-icon-size, 60px);
  height: var(--sup-icon-size, 60px);
  display: block;
}

.astra-sup-features__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.astra-sup-features__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  width: 100%;
}

.astra-sup-features__name {
  margin: 0;
  width: 100%;
  font-size: var(--sup-feature-name-size, 32px);
  line-height: 38px;
  font-weight: 600;
  letter-spacing: -0.64px;
  color: var(--sup-subtle);
  transition: color 0.3s;
}

.astra-sup-features__item:hover .astra-sup-features__name,
.astra-sup-features__item:focus-within .astra-sup-features__name {
  color: var(--sup-strong);
}

.astra-sup-features__desc {
  margin: 0;
  width: 100%;
  font-size: var(--sup-feature-desc-size, 24px);
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.24px;
  color: var(--sup-subtle);
}

/* ==================================================== 服务板块 1066:491 */
/* 设计稿只画了一块 820 高，三块服务改成轮播一屏一块，页面高度与设计稿一致。
 * 翻页点放在右边那条 160 的暗色空档里（设计稿 1066:553 那个空元素，正好留给它） */
.astra-sup-bands {
  position: relative;
}

.astra-sup-bands .swiper {
  overflow: hidden;
}

.astra-sup-bands .swiper-slide {
  height: auto;
}

/* 翻页点放在暗色面板左下、与文案同一条左边线。
 * 不放右边那条 160 空档里：站上的悬浮客服条是 fixed 在视口右侧（x 1813-1873），会盖住它。
 * 选择器里带上 .swiper-pagination-bullets：Swiper 自带的
 * `.swiper-pagination-horizontal{left:0;width:100%}` 会把这条撑成整行宽，不压掉会顶出横向滚动条 */
.astra-sup-bands .astra-sup-bands__dots,
.astra-sup-bands .astra-sup-bands__dots.swiper-pagination-bullets {
  position: absolute;
  top: auto;
  right: auto;
  bottom: var(--sup-dots-bottom, 40px);
  left: calc(var(--sup-band-media, 46.77%) + 40px);
  transform: none;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: auto;
}

.astra-sup-bands__dots .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  opacity: 1;
  cursor: pointer;
  transition: background-color 0.3s, height 0.3s;
}

.astra-sup-bands__dots .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.6);
}

.astra-sup-bands__dots .swiper-pagination-bullet-active {
  width: 28px;
  border-radius: 6px;
  background: var(--sup-primary);
}


.astra-sup-band {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: var(--sup-band-height, 820px);
  background: var(--sup-dark);
}

.astra-sup-band__media {
  position: relative;
  flex: 0 0 auto;
  width: var(--sup-band-media, 46.77%);
  overflow: hidden;
  background: #ebebeb;
}

.astra-sup-band__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.astra-sup-band__panel {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: stretch;
  background: var(--sup-dark);
}

/* 设计稿这块是「两端对齐 + 两个固定空档（32 / 80）」排的，不是等距分布：
 * 少了空档，红线会掉到离标题很远的地方 */
.astra-sup-band__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  padding: 80px 40px;
}

.astra-sup-band__gap {
  flex: 0 0 auto;
  width: 100%;
  height: var(--sup-band-gap-sm, 32px);
}

.astra-sup-band__gap--lg {
  height: var(--sup-band-gap-lg, 80px);
}


/* 右边那块空的暗色档（设计稿 1066:553，160 宽） */
.astra-sup-band__tail {
  flex: 0 0 auto;
  width: var(--sup-band-tail, 160px);
}

.astra-sup-band__eyebrow {
  margin: 0;
  width: 100%;
  font-size: var(--sup-band-eyebrow-size, 32px);
  line-height: 38px;
  font-weight: 600;
  letter-spacing: -0.64px;
  color: var(--sup-subtle);
}

.astra-sup-band__name {
  margin: 0;
  width: 100%;
  font-size: var(--sup-band-name-size, 56px);
  line-height: var(--sup-band-name-line, 56px);
  font-weight: 700;
  letter-spacing: -2.24px;
  color: #ffffff;
  overflow-wrap: break-word;
}

.astra-sup-band__rule {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--sup-primary);
}

.astra-sup-band__desc {
  margin: 0;
  width: 100%;
  min-height: var(--sup-band-desc-min, 240px);
  font-size: var(--sup-band-desc-size, 36px);
  line-height: var(--sup-band-desc-line, 40px);
  font-weight: 700;
  letter-spacing: -0.72px;
  color: var(--sup-muted);
}

/* ==================================================== 培训图廊 1070:1066 */
.astra-sup-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sup-steps-gap, 96px);
  padding: var(--sup-steps-padding, 120px) 0;
  background: #f9f9f9;
}

.astra-sup-steps__strip {
  display: flex;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  max-width: calc(var(--sup-steps-width, 1440px) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

/* 展开只动 flex-grow：改 flex-basis 是长度与 auto 互切，动画会跳、
 * 跳完光标落到邻居身上会连锁触发（方案详情页那次的教训） */
.astra-sup-steps__item {
  position: relative;
  flex-grow: 0;
  flex-shrink: 1;
  flex-basis: var(--sup-step-collapsed, 289px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  height: var(--sup-step-height, 582px);
  padding: 40px;
  overflow: hidden;
  text-decoration: none;
  will-change: flex-grow;
  transition: flex-grow 0.45s ease;
}

.astra-sup-steps__item.is-active {
  flex-grow: 1;
}

.astra-sup-steps__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.astra-sup-steps__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.astra-sup-steps__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  transition: background-color 0.45s ease;
}

/* 设计稿展开态的蒙版也是 80%，「变亮」的观感来自文字转白 + 红色横条，
 * 底下再叠一层自上而下的渐变（1069:1004） */
.astra-sup-steps__item.is-active .astra-sup-steps__bg::after {
  background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.3) 100%
    ),
    rgba(0, 0, 0, 0.8);
}

.astra-sup-steps__head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  height: 200px;
  width: 100%;
}

.astra-sup-steps__badge-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.astra-sup-steps__badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--sup-text);
  border: 1px solid var(--sup-muted);
  font-size: 36px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.72px;
  color: #ffffff;
  transition: background-color 0.45s ease, border-color 0.45s ease;
}

.astra-sup-steps__item.is-active .astra-sup-steps__badge {
  background: #1b2227;
  border-color: var(--sup-text);
}

.astra-sup-steps__name {
  margin: 0;
  width: 100%;
  font-size: var(--sup-step-name-size, 36px);
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.72px;
  color: var(--sup-muted);
  transition: color 0.45s ease;
}

/* 设计稿里标题与说明之间有一段固定空档 */
.astra-sup-steps__spacer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 100%;
  height: var(--sup-step-spacer, 116px);
}

/* 收起态的说明要截断（设计稿里就是 "…selections for…." 那样带省略号的）：
 * 格子是定高 + overflow:hidden，不截断的话长文案会顶出卡片、把底部横条挤没 */
.astra-sup-steps__desc {
  position: relative;
  z-index: 1;
  margin: 0;
  width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--sup-step-clamp, 6);
  overflow: hidden;
  font-size: var(--sup-step-desc-size, 18px);
  line-height: 25px;
  font-weight: 700;
  letter-spacing: -0.36px;
  color: var(--sup-muted);
  transition: color 0.45s ease;
}

/* 展开的那格宽一倍，文案排得下，显示全文 */
.astra-sup-steps__item.is-active .astra-sup-steps__desc {
  display: block;
  overflow: visible;
}

.astra-sup-steps__item.is-active .astra-sup-steps__name,
.astra-sup-steps__item.is-active .astra-sup-steps__desc {
  color: #ffffff;
}

.astra-sup-steps__bar {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: 4px;
  background: var(--sup-subtle);
  transition: background-color 0.45s ease;
}

.astra-sup-steps__item.is-active .astra-sup-steps__bar {
  background: var(--sup-primary);
}

/* ---------------------------------------------------------- 响应式 */
/* 设计稿只有 1920 桌面稿。字号与留白由控制项按断点输出，本段只处理排布。 */
@media (max-width: 1400px) {
  .astra-sup-features__item {
    padding: 32px 20px;
  }

  .astra-sup-band__body {
    padding: 64px 32px;
  }
}

@media (max-width: 1200px) {
  .astra-sup-features__row {
    flex-wrap: wrap;
  }

  .astra-sup-features__item {
    flex: 1 1 50%;
    min-height: 0;
  }

  /* 换行后两两一排：偶数列不要右边线，第一排底下补一条 */
  .astra-sup-features__item:nth-child(2n) {
    border-right: 0;
  }

  .astra-sup-features__item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--sup-border);
  }

  .astra-sup-band {
    flex-direction: column;
  }

  .astra-sup-band__media {
    width: 100%;
    height: var(--sup-band-media-height, 360px);
    flex: 0 0 auto;
  }

  /* body 在 __panel 这层横向容器里，不能给 0 0 auto：
   * 那样它按内容最大宽撑开、又不许收缩，整页就横向溢出了 */
  .astra-sup-band__body {
    flex: 1 1 auto;
    min-width: 0;
    gap: 16px;
  }

  .astra-sup-band__gap {
    display: none;
  }

  .astra-sup-band__desc {
    min-height: 0;
  }

  .astra-sup-band__tail {
    display: none;
  }

  /* 竖排后图在上、文案在下，点跟着挪到面板左下 */
  .astra-sup-bands .astra-sup-bands__dots,
  .astra-sup-bands .astra-sup-bands__dots.swiper-pagination-bullets {
    bottom: 20px;
    left: 20px;
  }

  /* 四格竖排铺开，不再做展开动画 */
  .astra-sup-steps__strip {
    flex-wrap: wrap;
  }

  .astra-sup-steps__item {
    flex: 1 1 calc(50% - 10px);
    /* 铺开后不再展开，高度给保底值让文案自己撑，别再截断 */
    height: auto;
    min-height: var(--sup-step-height-narrow, 460px);
  }

  .astra-sup-steps__desc {
    display: block;
    overflow: visible;
  }

  .astra-sup-steps__item.is-active {
    flex-grow: 0;
  }

  .astra-sup-steps__bg::after {
    background: rgba(0, 0, 0, 0.62);
  }

  .astra-sup-steps__name,
  .astra-sup-steps__desc {
    color: #ffffff;
  }

  .astra-sup-steps__spacer {
    height: 24px;
  }
}

@media (max-width: 768px) {
  .astra-sup-features__item {
    flex: 1 1 100%;
    border-right: 0;
    border-bottom: 1px solid var(--sup-border);
  }

  .astra-sup-features__item:last-child {
    border-bottom: 0;
  }

  .astra-sup-features__text {
    gap: 16px;
  }

  .astra-sup-band__body {
    padding: 40px 20px;
    gap: 16px;
  }

  .astra-sup-steps__item {
    flex: 1 1 100%;
    height: auto;
    min-height: 380px;
    padding: 24px;
  }

  .astra-sup-steps__head {
    height: auto;
    gap: 16px;
  }
}
