/* 语言切换器（新增组件，不改动 style.css 的任何既有规则）
 *
 * 位置：header 里导航与电话按钮之间；移动端自动收缩，不占导航位。
 * 视觉沿用模板的红色强调 + 圆角胶囊，不引入新主题变量。
 */

.lang-switch {
  position: relative;
  flex-shrink: 0;
  margin-left: 6px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #111);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .25s var(--ease, ease), color .25s var(--ease, ease);
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  border-color: var(--red, #cf1e1e);
  color: var(--red, #cf1e1e);
}

.lang-btn::after {
  content: "▾";
  font-size: 10px;
  opacity: .6;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  min-width: 158px;
  max-height: 62vh;
  margin: 0;
  padding: 6px;
  overflow: auto;
  list-style: none;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s var(--ease, ease), transform .22s var(--ease, ease), visibility .22s;
}

.lang-menu.on {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.lang-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink, #111);
  font-size: 13px;
  text-decoration: none;
}

.lang-menu a:hover {
  background: #f6f6f6;
  color: var(--red, #cf1e1e);
}

.lang-menu a.on {
  background: #fdf3f3;
  color: var(--red, #cf1e1e);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .lang-btn {
    padding: 0 9px;
    font-size: 11px;
  }
}

@media (max-width: 767px) {
  .lang-switch {
    margin-left: auto;
  }

  .lang-menu {
    min-width: 150px;
  }
}

/* <picture> 只作格式容器，不参与布局（否则会破坏 .hero-bg 的绝对定位） */
picture {
  display: contents;
}

/* ---------- 多语种标题：原文案是 5 字中文，其他语种更长 ---------- */
@media (min-width: 768px) {
  .hero-title {
    white-space: normal;
    max-width: min(1120px, 92vw);
    margin-left: auto;
    margin-right: auto;
    line-height: 1.2;
    letter-spacing: .06em;
  }
}

.page-hero h1 {
  white-space: normal;
  overflow-wrap: break-word;
}

/* 长单词语种（德语/印尼语）防溢出 */
.hero-sub, .lead, .para, .section-title { overflow-wrap: break-word; }

/* 桌面导航在长语种下允许收缩间距 */
@media (min-width: 768px) and (max-width: 1360px) {
  .main-nav { gap: 22px; }
  .main-nav a { font-size: 13px; }
}

/* 两行标题尽量均分（避免日/德/法空格断行难看） */
.hero-title, .page-hero h1, .section-title { text-wrap: balance; }

/* ---------- 客户真实 logo（图片版） ---------- */
.logo-img img {
  height: 46px;
  width: auto;
  display: block;
}
@media (max-width: 767px) {
  .logo-img img { height: 38px; }
}

/* ---------- 资质荣誉证书栅格（新增区块，复用现有色板） ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.cert-grid a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .06);
  transition: transform .25s var(--ease, ease), box-shadow .25s var(--ease, ease);
}
.cert-grid a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .12);
}
.cert-grid img {
  display: block;
  width: 100%;
  height: auto;
}
.footer .qr img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

/* ---------- 证书卡片：图片 + 名称/颁发机构说明 ---------- */
.cert-grid a {
  display: flex;
  flex-direction: column;
}
.cert-cap {
  display: block;
  padding: 10px 12px 12px;
  background: #fff;
}
.cert-cap b {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink, #111);
}
.cert-cap small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.6;
  color: #888;
}

/* ---------- 首页「资质与荣誉」条（替代模板假客户 logo） ---------- */
.cert-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 34px;
}
.cert-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line, #ececec);
  border-radius: 10px;
  background: #fff;
  transition: box-shadow .3s var(--ease, ease), transform .3s var(--ease, ease);
}
.cert-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}
.cert-item img {
  width: 64px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 auto;
  background: #f6f2e6;
}
.cert-item b {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink, #16181d);
}
.cert-item small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.5;
  color: #8b8f97;
}
@media (max-width: 980px) {
  .cert-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cert-strip { grid-template-columns: 1fr; gap: 10px; }
  .cert-item img { width: 56px; height: 38px; }
}

/* ---------- 首页产品展示：椭圆主图尺寸适配真实产品图 ---------- */
.product-stage .main-shot {
  max-height: 620px;
  object-fit: cover;
}
@media (max-width: 767px) {
  .product-stage .main-shot { max-height: 420px; }
}

/* ---------- 首页：滚动指示器改成可点击的圆形箭头 ---------- */
.hero-scroll {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0, 0, 0, .16);
  backdrop-filter: blur(3px);
  transition: background .3s var(--ease, ease), border-color .3s var(--ease, ease);
}
.hero-scroll:hover { background: rgba(207, 30, 30, .85); border-color: transparent; }
.hero-scroll i {
  width: 9px;
  height: 9px;
  background: none;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  border-radius: 0;
  transform: rotate(45deg) translate(-2px, -2px);
  animation: hxScrollArrow 1.8s ease-in-out infinite;
}
@keyframes hxScrollArrow {
  0%, 100% { transform: rotate(45deg) translate(-2px, -2px); opacity: .5; }
  50% { transform: rotate(45deg) translate(2px, 2px); opacity: 1; }
}

/* ---------- 首页产品展示：避免右下角按钮压住缩略图 ---------- */
.product-stage .mini.m3 { right: 20%; }

@media (max-width: 767px) {
  .hero-scroll { width: 38px; height: 38px; right: 16px; bottom: 92px; }
  .product-stage .mini.m3 { right: 8%; }
}

/* ---------- 首页首屏：加强文字可读性 + 侧边指示器对比度 ---------- */
.hero::before {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .28) 38%, rgba(0, 0, 0, .34) 62%, rgba(0, 0, 0, .72) 100%),
    radial-gradient(ellipse 60% 50% at 50% 46%, rgba(0, 0, 0, .45) 0%, transparent 72%);
}
.hero-dots {
  padding: 12px 7px;
  border-radius: 999px;
  background: rgba(12, 12, 12, .34);
  backdrop-filter: blur(4px);
  gap: 10px;
}
.hero-dots i {
  width: 7px;
  height: 7px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(255, 255, 255, .65);
}
.hero-dots i.on {
  background: var(--red);
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .22);
}
.hero-title { text-shadow: 0 6px 30px rgba(0, 0, 0, .72), 0 1px 2px rgba(0, 0, 0, .5); }
.hero-sub { text-shadow: 0 2px 10px rgba(0, 0, 0, .85); }

/* ---------- 移动端：红色五栏改成 2 列紧凑卡片（原来 5 行占屏过多） ---------- */
@media (max-width: 767px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
    min-height: 0;
  }
  .pillar {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    padding: 22px 18px;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
  }
  .pillar .vtitle { font-size: 18px; letter-spacing: .12em; }
  .pillar .vline { font-size: 10px; padding: 5px 10px; letter-spacing: .12em; }
  .pillar-center {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 18px;
  }
  .pillar-center .badge { width: 64px; height: 64px; margin: 0; padding: 5px; }
  .pillar-center .pillar-logo { display: none; }
  .pillar-center .vtitle { margin: 0; }

  /* 产业链标签在窄屏可横向滑动，避免被裁掉 */
  .chain-labels {
    max-width: calc(100% - 32px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chain-labels::-webkit-scrollbar { display: none; }
  .chain-labels a { flex: 0 0 auto; }
}

/* ---------- 首页产品系列 tabs：6 个系列在多语种下尽量排一行 ---------- */
.products-head .tabs { gap: 8px; }
.products-head .tabs .tab {
  padding: 8px 16px;
  font-size: 12.5px;
  letter-spacing: .01em;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .products-head .tabs { gap: 6px; }
  .products-head .tabs .tab { padding: 7px 12px; font-size: 12px; }
}

/* ---------- 首页产品展示：缩略图与「更多产品」按钮错位修正 ---------- */
.product-stage .mini.m1 { left: 0; bottom: 6%; }
.product-stage .mini.m2 { right: 2%; top: 6%; }
.product-stage .mini.m3 { right: 30%; bottom: 0; }
.product-more { bottom: 2%; right: -6px; }
.product-more .circle-btn { width: 54px; height: 54px; font-size: 20px; }
.product-more span { font-size: 11px; letter-spacing: .12em; }
@media (max-width: 767px) {
  .product-stage .mini.m1 { left: 0; bottom: 2%; }
  .product-stage .mini.m2 { right: 0; top: 2%; }
  .product-stage .mini.m3 { right: 26%; bottom: 0; }
  .product-more { right: 0; bottom: -2%; }
  .product-more .circle-btn { width: 44px; height: 44px; font-size: 18px; }
}

/* ---------- 移动端：隐藏悬浮「更多产品」按钮（信息区已有「了解更多」，且会和缩略图/回顶按钮打架） ---------- */
@media (max-width: 767px) {
  .product-more { display: none; }
  .product-stage .mini.m3 { right: 22%; }
}

/* ---------- 语言切换按钮：美化（2026-11-28） ---------- */
.lang-switch { margin-left: 10px; }

.lang-btn {
  height: 38px;
  padding: 0 13px 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(207, 30, 30, .22);
  background: #fff;
  color: var(--ink, #16181d);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: border-color .25s var(--ease, ease), color .25s var(--ease, ease),
              background .25s var(--ease, ease), box-shadow .25s var(--ease, ease),
              transform .15s var(--ease, ease);
}
.lang-btn .lang-globe {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--red, #cf1e1e);
  opacity: .85;
}
/* 用细线箭头替换原来的 ▾ 字符，展开时翻转 */
.lang-btn::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 1px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  border-radius: 0;
  font-size: 0;
  opacity: .55;
  transform: rotate(45deg) translateY(-1px);
  transition: transform .25s var(--ease, ease), opacity .25s var(--ease, ease);
}
.lang-btn:hover {
  border-color: var(--red, #cf1e1e);
  color: var(--red, #cf1e1e);
  box-shadow: 0 6px 18px rgba(207, 30, 30, .14);
}
.lang-btn:hover .lang-globe { opacity: 1; }
.lang-btn:active { transform: translateY(1px); }
.lang-btn:focus-visible { outline: 2px solid rgba(207, 30, 30, .45); outline-offset: 2px; }
.lang-btn[aria-expanded="true"] {
  background: #fdf3f3;
  border-color: var(--red, #cf1e1e);
  color: var(--red, #cf1e1e);
  box-shadow: 0 6px 18px rgba(207, 30, 30, .16);
}
.lang-btn[aria-expanded="true"] .lang-globe { opacity: 1; }
.lang-btn[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-1px); opacity: .9; }

/* 下拉菜单：更轻的阴影 + 出现动画 */
.lang-menu {
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .16);
  border: 1px solid rgba(0, 0, 0, .06);
  padding: 6px;
}
.lang-menu a { border-radius: 8px; }
.lang-menu a.on { background: #fdf3f3; }

/* 移动端：语言按钮紧贴汉堡按钮左侧（.nav-wrap 原本 gap:20 + 按钮 margin 10 会留 30px） */
@media (max-width: 767px) {
  .nav-wrap { gap: 10px; }
  .lang-switch { margin-left: auto; }
  .menu-btn { margin-left: 0; }
  .lang-btn {
    height: 40px;
    padding: 0 11px 0 9px;
    font-size: 12.5px;
    gap: 6px;
  }
  .lang-btn .lang-globe { width: 14px; height: 14px; }
  .lang-menu { right: 0; min-width: 148px; }
}
@media (max-width: 380px) {
  .lang-btn span { max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
