/* ==========================================================================
   components.css —— 可复用组件：按钮 / 卡片 / Hero / 时间轴 / 面包屑等
   --------------------------------------------------------------------------
   维护说明：跨页面复用的 UI 组件统一在此维护，命名遵循 BEM。
   ========================================================================== */

/* ==========================================================================
   按钮：触屏最小高度 44px，PC/移动通用
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-size);
  padding: 0.6rem 1.75rem;
  border-radius: 999px;
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-align: center;
}
/* 实心主按钮 */
.btn--primary {
  background: var(--color-accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(7, 159, 202, 0.35);
}
/* 描边按钮（浅色背景用） */
.btn--outline {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}
.btn--outline:hover { background: var(--color-accent); color: #fff; }
/* 描边按钮（深色背景用） */
.btn--ghost {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  background: transparent;
}
.btn--ghost:hover { background: #fff; color: var(--color-primary); border-color: #fff; }

/* 按钮组：移动端自动换行、等宽好点按 */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.btn-group--center { justify-content: center; }
@media (max-width: 480px) {
  .btn-group .btn { flex: 1 1 100%; } /* 手机上按钮通栏，避免误触 */
}

/* ==========================================================================
   Hero 首屏（首页大图 / 内页页头共用基础）
   ========================================================================== */
.hero {
  position: relative;
  /* Banner 图 + 半透明深色遮罩保证白字可读；图片缺失时兜底深蓝渐变 */
  background:
    linear-gradient(rgba(5, 23, 40, 0.4), rgba(5, 23, 40, 0.4)),
    url("../img/home-banner.png") center / cover no-repeat,
    linear-gradient(135deg, #05283c 0%, var(--color-primary) 100%);
  color: var(--color-text-invert);
  overflow: hidden;
}
.hero__inner {
  position: relative;
  padding: clamp(4rem, 12vw, 8rem) 0;
  text-align: center;
  /* max-width: 860px; */
  margin: 0 auto;
}
.hero__vision {
  display: inline-block;
  padding: 0.35rem 1.1rem;
  margin-bottom: var(--space-md);
  border: 1px solid #70e4ff;
  border-radius: 999px;
  color: #70e4ff;
  font-size: 1rem; /* --fs-small 的两倍（28px） */
  /* font-weight: 700; */
  letter-spacing: 0.15em;
}
.hero__title { color: #fff; margin-bottom: var(--space-sm); }
.hero__subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  margin-bottom: var(--space-lg);
}
.hero .btn-group { justify-content: center; }

/* 首页首屏（非内页页头）：高度 600px，内容垂直居中 */
.hero:not(.page-hero) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 600px;
}

/* 内页页头（较矮）：最低 360px，内容垂直居中 */
.page-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
}
.page-hero .hero__inner { padding: clamp(3rem, 8vw, 5rem) 0; }
/* 关于我们页专属 Banner 图 */
.page-hero--about {
  background:
    linear-gradient(rgba(5, 23, 40, 0.2), rgba(5, 23, 40, 0.2)),
    url("../img/about-banner.png") center / cover no-repeat,
    linear-gradient(135deg, #05283c 0%, var(--color-primary) 100%);
}
/* 芯片代理页专属 Banner 图 */
.page-hero--chip {
  background:
    linear-gradient(rgba(5, 23, 40, 0.3), rgba(5, 23, 40, 0.3)),
    url("../img/chip-distributionBanner.png") center / cover no-repeat,
    linear-gradient(135deg, #05283c 0%, var(--color-primary) 100%);
}
/* 芯片代理页 Banner 文字居中；描述加宽，保证三行内显示完；字间距略缩小 */
.page-hero--chip .page-hero__desc {
  text-align: center;
  max-width: 1200px;
  letter-spacing: -0.02em;
}
/* 芯片代理页 Banner：面包屑绝对定位到顶部，正文上下左右居中 */
.page-hero--chip .container { position: relative; }
.page-hero--chip .breadcrumb {
  position: absolute;
  top: 0;
  left: var(--container-pad);
}
.page-hero--chip .hero__inner { max-width: 1200px; }
/* AI算力服务页专属 Banner 图 */
.page-hero--ai {
  background:
    linear-gradient(rgba(5, 23, 40, 0.25), rgba(5, 23, 40, 0.25)),
    url("../img/projects-banner.png") center / cover no-repeat,
    linear-gradient(135deg, #05283c 0%, var(--color-primary) 100%);
}
/* 行业洞察页专属 Banner 图 */
.page-hero--insights {
  background:
    linear-gradient(rgba(5, 23, 40, 0), rgba(5, 23, 40, 0)),
    url("../img/insightsbanner.png") center / cover no-repeat,
    linear-gradient(135deg, #05283c 0%, var(--color-primary) 100%);
}
.page-hero__desc {
  color: white;
  max-width: 780px;
  margin: var(--space-sm) auto 0;
  text-align: left;
}

/* ==========================================================================
   卡片
   ========================================================================== */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.card__icon {
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-sm);
}
.card h3 { color: var(--color-primary); margin-bottom: var(--space-xs); }
.card p { color: var(--color-text-secondary); font-size: var(--fs-small); }

/* 业务入口大卡片（首页两大业务） */
.biz-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
}
.biz-card--sm {
  padding: var(--space-md);
}
.biz-card__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.biz-card__head h3 { margin: 0; font-size: var(--fs-h4); }
.biz-card__head img { flex-shrink: 0; }
.biz-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-sm) 0;
  padding: 0;
  list-style: none;
}
.biz-card__tags li {
  padding: 0.25rem 0.9rem;
  background: var(--color-bg-soft);
  color: var(--color-primary);
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
}
.biz-card__brands {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
}
.biz-card__brands img {
  height: 64px;
  width: 100%;
  object-fit: contain;
  border: 1.5px solid rgba(7, 159, 202, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.biz-card__brands img:hover {
  border-color: rgba(7, 159, 202, 0.65);
  box-shadow: 0 2px 8px rgba(7, 159, 202, 0.12);
}
.biz-card .btn { align-self: flex-start; margin-top: auto; }

/* ==========================================================================
   资深代理·上市赋能广告图
   ========================================================================== */
.empower-section .section__head .section__desc { color: var(--color-text); }
.empower-banner {
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.empower-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   发展历程时间轴
   ========================================================================== */
.timeline {
  list-style: none;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent), var(--color-cyan));
}
.timeline__item {
  position: relative;
  padding: 0 0 var(--space-lg) 2.5rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--color-accent);
}
.timeline__year {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.timeline__item h3 { color: var(--color-primary); margin-bottom: var(--space-xs); }
.timeline__item p { color: var(--color-text-secondary); }

/* ==========================================================================
   产品线区块（图标 + 简介 + 品牌表格）
   ========================================================================== */
/* 产品线通栏分区：每条产品线独立整行，搭配 section--soft 实现整行变色 */
.section--productline-head { padding-bottom: var(--space-lg); }
.section--productline { padding: var(--space-lg) 0; }
/* 浅色通栏内的表格保持白底，与解决方案分区一致 */
.section--productline.section--soft .table-scroll { background: #fff; }
/* 解决方案表专属：方案类型列加宽不换行，代表产品列适当收窄（不影响其他表格） */
.table--solutions th:first-child,
.table--solutions td:first-child {
  width: 210px;
  white-space: nowrap;
}
.table--solutions th:nth-child(2),
.table--solutions td:nth-child(2) {
  width: 44%;
}
.productline { margin-bottom: var(--space-xl); }
.productline:last-child { margin-bottom: 0; }
.productline__head {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* 图标与子标题间距缩小一半 */
  margin-bottom: var(--space-sm);
}
.productline__head img { width: 44px; height: 44px; flex-shrink: 0; }
.productline__head h3 { color: var(--color-primary); }
.productline > p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}
/* 产品线居中变体（四大产品线标题与简介均居中） */
.productline--center .productline__head {
  justify-content: center;
}
.productline--center > p {
  text-align: center;
}

/* ==========================================================================
   公司介绍：左侧图片 + 右侧文字（左右布局，图片高度与文字一致）
   ========================================================================== */
.intro-media {
  display: flex;
  gap: var(--space-lg);
  align-items: stretch;
}
.intro-media__img {
  flex: 0 0 42%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.intro-media__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.intro-media__text {
  flex: 1;
}
.intro-media__text p:first-child { margin-top: 0; }
.intro-media__text p:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .intro-media { flex-direction: column; }
  .intro-media__img { flex: none; position: static; aspect-ratio: 16 / 9; }
  .intro-media__img img { position: static; }
}

/* ==========================================================================
   数字亮点条（十年积累 / 三十余家品牌等）
   ========================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  text-align: center;
}
@media (max-width: 768px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats__num {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.stats__label { font-size: var(--fs-small); color: white; }

/* ==========================================================================
   AI算力服务：能力标签胶囊 + 服务卡片
   ========================================================================== */
.svc-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: var(--space-lg);
}
.svc-pill {
  padding: 0.4rem 1.4rem;
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-primary);
  background: rgba(7, 159, 202, 0.06);
  letter-spacing: 0.03em;
}

/* 服务卡片：图标左上 + 标题加粗大字 + 简介小字 */
.svc-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
}
.svc-card .card__icon {
  margin-bottom: var(--space-xs);
}
.svc-card h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}
.svc-card p {
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================================
   CTA 通栏
   ========================================================================== */
.cta-banner { text-align: center; }
.cta-banner h2 { margin-bottom: var(--space-md); }

/* ==========================================================================
   文章列表（行业洞察）
   ========================================================================== */
.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.article-card__tag {
  align-self: flex-start;
  font-size: 0.75rem;
  color: var(--color-accent);
  background: rgba(7, 159, 202, 0.1);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  margin-bottom: var(--space-xs);
}
.article-card h3 { font-size: var(--fs-h4); }
.article-card__more {
  margin-top: auto;
  padding-top: var(--space-sm);
  font-size: var(--fs-small);
  font-weight: 600;
}

/* ==========================================================================
   联系信息列表
   ========================================================================== */
.contact-list {
  list-style: none;
  padding: 0;
}
.contact-list li {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--color-border);
}
.contact-list li:last-child { border-bottom: none; }
.contact-list strong { color: var(--color-primary); flex-shrink: 0; }

/* ==========================================================================
   联系我们：左侧图标信息栏 + 右侧地图
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-lg);
  align-items: stretch;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.contact-item:last-child { margin-bottom: 0; }
/* 白色图标配蓝色圆角底块 */
.contact-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-accent);
}
.contact-item__icon img { }
.contact-item__body h3 {
  font-size: var(--fs-h4);
  color: var(--color-text);
  margin-bottom: 0.35rem;
}
.contact-item__body p { color: var(--color-text-secondary); }
/* 地图：高度随左侧信息栏拉齐，无圆角 */
.contact-map { height: 100%; }
.contact-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-card);
}
@media (max-width: 900px) {
  .contact-map { height: auto; }
  .contact-map img { height: auto; }
}

/* ==========================================================================
   面包屑（利于 SEO 结构与用户定位）
   ========================================================================== */
.breadcrumb {
  padding: var(--space-sm) 0 0;
  font-size: var(--fs-small);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.6);
}
.breadcrumb a { color: rgba(255, 255, 255, 0.8); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; }

/* ==========================================================================
   滚动渐入动效（配合 main.js 的 IntersectionObserver）
   --------------------------------------------------------------------------
   用法：给任意元素加 data-reveal 属性即可获得进入视口时的淡入上移效果；
   说明：仅在 <html class="js">（JS 可用）时隐藏初始态，JS 失效不影响内容展示。
   ========================================================================== */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---- 卡片渐入：每次进入页面后，卡片首次进入视口时播放一次淡入动画
   说明：参考 aixuanwu.com 的 AOS fade-up 效果（上移 100px、0.8s ease-out）；
   同组卡片由 main.js 设置递增的 animation-delay，逐张错峰入场；
   用 animation 实现入场，不占用 transition，hover 上浮时长保持原样 ---- */
html.js .card { opacity: 0; }
html.js .card.is-visible {
  opacity: 1;
  /* 基础延迟 500ms（同组后续卡片由 JS 递增）；backwards 保证延迟期间停在初始隐藏态 */
  animation: card-fade-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s backwards;
}
@keyframes card-fade-in {
  from { opacity: 0; transform: translateY(100px); }
  to { opacity: 1; transform: none; }
}
/* 用户开启"减少动态效果"时直接显示，不做动画 */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal],
  html.js .card { opacity: 1; transform: none; }
}

/* ==========================================================================
   产品咨询弹窗（参考 ai-dm-cn 产品咨询模块，适配本站设计体系）
   ========================================================================== */
.consult-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--container-pad);
}
.consult-modal.is-open { display: flex; }
.consult-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 23, 40, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.consult-modal__dialog {
  position: relative;
  width: min(960px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(5, 23, 40, 0.3);
  overflow: hidden;
  animation: consult-pop 0.25s ease;
}
@keyframes consult-pop {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.consult-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}
.consult-modal__head h2 {
  margin: 0;
  color: var(--color-primary);
  font-size: var(--fs-h3);
}
.consult-modal__close {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition);
}
.consult-modal__close:hover {
  background: var(--color-bg-soft);
  color: var(--color-primary);
}
.consult-modal__body {
  padding: var(--space-md) var(--space-lg);
  overflow-y: auto;
}
.col-red { color: #F31947; }

/* 表单分区 */
.consult-form__section { margin-bottom: var(--space-sm); }
.consult-form__title {
  font-size: var(--fs-h4);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  padding-left: 0.6rem;
  border-left: 3px solid var(--color-accent);
}
.consult-form__divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-md) 0;
}
.consult-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm) var(--space-md);
}
.consult-form__group {
  display: flex;
  align-items: center;
}
.consult-form__group--full { grid-column: 1 / -1; }
.consult-form__label {
  flex: 0 0 88px;
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.consult-form__input,
.consult-form__select,
.consult-form__textarea {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-body);
  color: var(--color-text);
  background: #fff;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.consult-form__textarea {
  height: auto;
  padding: 0.5rem 0.6rem;
  resize: vertical;
  line-height: 1.5;
}
.consult-form__input::placeholder,
.consult-form__textarea::placeholder { color: #979797; }
.consult-form__input:focus,
.consult-form__select:focus,
.consult-form__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(7, 159, 202, 0.12);
}
.consult-form__select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23979797' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
  cursor: pointer;
}
.consult-form__select:disabled { background-color: #f5f5f5; cursor: not-allowed; }
.consult-form__actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-md);
}
.consult-form__submit { min-width: 160px; }
.consult-form__submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* 移动端：表单单列、标签收窄 */
@media (max-width: 600px) {
  .consult-modal__head { padding: var(--space-sm) var(--space-md); }
  .consult-modal__body { padding: var(--space-sm) var(--space-md); }
  .consult-form__grid { grid-template-columns: 1fr; }
  .consult-form__label { flex: 0 0 76px; }
  .consult-form__submit { width: 100%; }
}
