/* ===== 移动端：沿用 PC 端构图（左/中/右交替），只做等比适配，不重排 ===== */

html, body { overflow-x: hidden; }

/* 锚点跳转时标题不被固定导航挡住 */
section[id] { scroll-margin-top: calc(var(--nav-h, 56px) + 8px); }

@media (max-width: 860px) {
  .hero-card__body {
    left: 20px !important;
    right: 20px !important;
    width: auto !important;
    max-width: none !important;
    gap: 12px !important;
    top: auto !important;
    bottom: 14% !important;
    transform: none !important;
    align-items: flex-start !important;
  }

  .hero-card.pos-left-middle .hero-card__body,
  .hero-card.pos-right-middle .hero-card__body,
  .hero-card.pos-center-middle .hero-card__body,
  .hero-card.pos-center .hero-card__body {
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
  }

  .hero-card.pos-left-middle .hero-card__body,
  .hero-card.pos-left-top .hero-card__body,
  .hero-card.pos-left-bottom .hero-card__body { align-items: flex-start !important; }
  .hero-card.pos-left-middle .hero-card__body *,
  .hero-card.pos-left-top .hero-card__body *,
  .hero-card.pos-left-bottom .hero-card__body * { text-align: left !important; }

  .hero-card.pos-right-middle .hero-card__body,
  .hero-card.pos-right-top .hero-card__body,
  .hero-card.pos-right-bottom .hero-card__body { align-items: flex-end !important; }
  .hero-card.pos-right-middle .hero-card__body *,
  .hero-card.pos-right-top .hero-card__body *,
  .hero-card.pos-right-bottom .hero-card__body * { text-align: right !important; }

  .hero-card.pos-center .hero-card__body,
  .hero-card.pos-center-top .hero-card__body,
  .hero-card.pos-center-bottom .hero-card__body { align-items: center !important; }
  .hero-card.pos-center .hero-card__body *,
  .hero-card.pos-center-top .hero-card__body *,
  .hero-card.pos-center-bottom .hero-card__body * { text-align: center !important; }

  .hero-title { font-size: clamp(20px, 6vw, 28px) !important; line-height: 1.28 !important; letter-spacing: 0 !important; }
  .hero-sub { font-size: 14px !important; line-height: 1.65 !important; }
  .eyebrow { font-size: 11px !important; }
  .cta-title { font-size: clamp(20px, 5.6vw, 26px) !important; line-height: 1.3 !important; }

  .actions { gap: 10px !important; margin-top: 16px !important; }
  .btn { min-height: 44px !important; padding: 11px 18px !important; font-size: 13px !important; }

  /* 不要覆盖 .wrap 宽度：.hero .wrap 必须是 100%，否则首屏背景右侧留黑边 */
  .cta-card { padding: 56px 0 64px !important; }
  .footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important; }

  .nav__burger { width: 44px !important; height: 44px !important; }
  .nav-drawer a { min-height: 46px; display: flex; align-items: center; }

  img, video { max-width: 100%; }
  input, textarea, select { font-size: 16px !important; }
}

/* ===== 手机端点击切页：直接切换，不残留上一页背景 ===== */
@media (max-width: 860px) {
  .page-ghost,
  .page-ghost.is-out { display: none !important; opacity: 0 !important; visibility: hidden !important; }

  body.is-page-leaving .block,
  body.is-page-leaving .footer { animation: none !important; opacity: 1 !important; filter: none !important; transform: none !important; }

  body.is-page-enter .block,
  body.is-page-enter .footer,
  body.is-page-enter-active .block,
  body.is-page-enter-active .footer { animation: none !important; opacity: 1 !important; filter: none !important; transform: none !important; }

  .hero-card__media,
  .hero-card__media img,
  .hero-card__media video { transition: none !important; }
}

/* ===== 企业文化（/about）：独立占满一屏，和桌面一致 ===== */
@media (max-width: 860px) {
  [id="about.culture"] {
    min-height: 100svh !important;
    display: flex !important;
    align-items: center !important;
    padding: 80px 0 64px !important;
  }
  [id="about.culture"] .wrap { width: 100% !important; padding: 0 20px !important; box-sizing: border-box !important; }
  [id="about.culture"] .section-head { margin-bottom: 20px !important; }
  [id="about.culture"] .section-title { font-size: 26px !important; line-height: 1.25 !important; letter-spacing: 0 !important; text-transform: none !important; }
}
@media (max-width: 640px) {
  .culture-carousel { margin-top: 6px !important; }
  .culture-carousel__viewport { height: auto !important; min-height: 176px !important; }
  .culture-slide { height: auto !important; min-height: 168px !important; padding: 0 4px !important; }
  .culture-slide__num { font-size: 11px !important; }
  .culture-slide__title { font-size: 24px !important; line-height: 1.25 !important; margin: 6px 0 4px !important; }
  .culture-slide__text { font-size: 13px !important; line-height: 1.55 !important; }
  .culture-carousel__footer { margin-top: 16px !important; }
  .culture-arrow { width: 38px !important; height: 38px !important; }
}

/* ===== 联系我们：一屏内显示完（手机） ===== */
@media (max-width: 640px) {
  /* 联系我们：同样独立占满一屏，内容垂直居中 */
  .block.contact {
    min-height: 100svh !important;
    display: flex !important;
    align-items: flex-start !important;
    padding: 76px 0 40px !important;
    scroll-margin-top: 0;
  }
  .block.contact > .wrap { width: 100% !important; padding: 0 20px !important; box-sizing: border-box !important; }
  .contact { gap: 12px !important; }
  .contact__title { font-size: clamp(22px, 6vw, 28px) !important; line-height: 1.2 !important; }
  .contact__items { margin: 8px 0 0 !important; gap: 10px !important; flex-direction: column !important; align-items: stretch !important; width: 100% !important; }
  .contact__item { gap: 10px !important; width: 100% !important; justify-content: flex-start !important; align-items: center !important; }
  .contact__icon { flex: 0 0 40px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
  .contact__meta { text-align: left !important; min-width: 0 !important; }
  .contact__meta strong { display: block; }
  .contact__form { gap: 10px !important; }
  .contact__hint { font-size: 12px !important; margin-bottom: 2px !important; }
  .contact__field { gap: 4px !important; }
  .contact__field span { font-size: 12px !important; }
  .contact__field input { height: 42px !important; padding: 6px 10px !important; }
  .contact__field textarea { height: 76px !important; min-height: 76px !important; padding: 8px 10px !important; }
  .contact__actions { margin-top: 2px !important; gap: 10px !important; }
  .contact__actions .btn { height: 44px !important; }
}

@media (max-width: 380px) {
  .hero-title { font-size: clamp(19px, 6.4vw, 24px) !important; }
  .hero-sub { font-size: 13px !important; }
  .block.contact { padding: 72px 0 24px !important; }
  .contact__title { font-size: 22px !important; }
  .contact__field textarea { height: 64px !important; min-height: 64px !important; }
  .block--cards .section-title { font-size: 24px !important; }
  .culture-slide__title { font-size: 22px !important; }
}

/* 平板窄屏：仍保持左右关系 */
@media (min-width: 641px) and (max-width: 860px) {
  .hero-card__body { left: 40px !important; right: 40px !important; }
  .hero-title { font-size: clamp(26px, 4.2vw, 38px) !important; }
}

/* == appended-fixes == */
/* 企业文化轮播：左右箭头往内收，避免贴边 */
@media (max-width: 860px) {
  .culture-carousel__footer { padding: 0 16px !important; }
  .culture-carousel__footer .culture-arrow:first-child { margin-left: 0 !important; }
  .culture-carousel__footer .culture-arrow:last-child { margin-right: 0 !important; }
}

/* == appended-fixes == */
/* 联系我们：Email / Address 两组信息同一列对齐，文字居中 */
@media (max-width: 640px) {
  .contact__items { width: 100% !important; align-items: stretch !important; }
  .contact__item { width: 100% !important; display: flex !important; align-items: center !important; gap: 10px !important; }
  .contact__icon { flex: 0 0 40px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
  .contact__meta { flex: 1 1 auto !important; min-width: 0 !important; text-align: center !important; }
  .contact__meta strong,
  .contact__meta a,
  .contact__meta span { display: block !important; text-align: center !important; }
}

/* == appended-fixes == */
/* 联系我们：图标+文字整体居中，两组保持同轴 */
@media (max-width: 640px) {
  .contact__items { align-items: center !important; }
  .contact__item {
    justify-content: center !important;
    width: auto !important;
    max-width: 100% !important;
    gap: 10px !important;
  }
  .contact__icon { flex: 0 0 40px !important; width: 40px !important; }
  .contact__meta { flex: 0 0 236px !important; width: 236px !important; max-width: calc(100vw - 120px) !important; text-align: center !important; }
  .contact__meta strong,
  .contact__meta a,
  .contact__meta span { display: block !important; text-align: center !important; }
}

/* == appended-fixes == */
/* 联系我们：整组再往右移一点 */
@media (max-width: 640px) {
  .contact__items {
    margin-left: 32px !important;
    margin-right: -32px !important;
  }
}

/* == appended-fixes == */
/* 联系我们（仅手机端）：删除左侧图标，只保留文字并居中 */
@media (max-width: 640px) {
  .contact__icon { display: none !important; }
  .contact__items {
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-items: stretch !important;
    width: 100% !important;
  }
  .contact__item {
    width: 100% !important;
    justify-content: center !important;
    gap: 0 !important;
  }
  .contact__meta {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
    text-align: center !important;
  }
  .contact__meta strong,
  .contact__meta a,
  .contact__meta span { display: block !important; text-align: center !important; }
}

/* == appended-fixes == */
/* 首屏标题支持手动换行（内容里用换行符分行） */
.hero-card .hero-title,
.hero-title { white-space: pre-line !important; }
