/* ==========================================================================
   NEXUS Layout — layout.css
   全站框架：页头 / 导航 / 抽屉 / 页脚 / 悬浮客服 / 返回顶部 / 移动端工具条 / Cookies
   ========================================================================== */

/* ==========================================================================
   Header — 顶部工具条
   ========================================================================== */

.nx-head {
  position: sticky;
  top: 0;
  z-index: var(--nx-z-header);
  background: var(--nx-white);
  border-bottom: 1px solid var(--nx-line);
  /* 顶栏高度（吸顶时通过 header 整体位移将其移出视口，仅触发合成，不引起重排） */
  --nx-bar-h: 46px;
  transition: transform var(--nx-dur) var(--nx-ease),
              box-shadow var(--nx-dur) var(--nx-ease),
              background-color var(--nx-dur) var(--nx-ease);
}

.nx-head.is-stuck {
  transform: translateY(calc(var(--nx-bar-h) * -1));
  box-shadow: 0 8px 30px -22px rgba(0, 28, 83, .5);
}

.nx-head__bar {
  position: relative;
  z-index: 2;
  height: var(--nx-bar-h);
  background: var(--nx-graphite);
  color: rgba(255, 255, 255, .78);
}

.nx-head__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nx-sp-4);
  height: 46px;
}

.nx-head__contact {
  display: flex;
  align-items: center;
  gap: var(--nx-sp-4);
  min-width: 0;
  overflow: hidden;
}

.nx-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .82);
  white-space: nowrap;
  transition: color var(--nx-dur-fast) var(--nx-ease);
}

.nx-pill .iconfont {
  font-size: 14px;
  color: var(--nx-amber-bright);
}

.nx-pill:hover { color: #fff; }

.nx-head__bar-right {
  display: flex;
  align-items: center;
  gap: var(--nx-sp-4);
}

/* 社交图标 */
.nx-social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nx-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--nx-radius);
  color: rgba(255, 255, 255, .74);
  font-size: 14px;
  transition: all var(--nx-dur-fast) var(--nx-ease);
}

.nx-social__link:hover {
  background: var(--nx-accent);
  border-color: var(--nx-accent);
  color: var(--nx-graphite);
  transform: translateY(-2px);
}

/* 语言切换 */
.nx-lang { position: relative; }

.nx-lang__current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--nx-radius);
  color: rgba(255, 255, 255, .84);
  font-size: 12.5px;
  cursor: pointer;
  transition: all var(--nx-dur-fast) var(--nx-ease);
}

.nx-lang__current:hover { border-color: rgba(255, 255, 255, .42); color: #fff; }

.nx-lang__current img {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 1px;
}

.nx-lang__caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform var(--nx-dur-fast) var(--nx-ease);
}

.nx-lang.is-open .nx-lang__caret { transform: rotate(180deg); }

.nx-lang__drop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 178px;
  padding: 6px;
  background: var(--nx-white);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--nx-dur) var(--nx-ease);
}

.nx-lang.is-open .nx-lang__drop {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nx-lang__drop a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--nx-ink-70);
  transition: all var(--nx-dur-fast) var(--nx-ease);
}

.nx-lang__drop a img {
  width: 22px;
  height: 15px;
  object-fit: cover;
}

.nx-lang__drop a:hover {
  background: var(--nx-sand-deep);
  color: var(--nx-accent);
  padding-left: 16px;
}

/* ==========================================================================
   Header — 主导航
   ========================================================================== */

/* 迭代58（C 方案）：页头容器独立放宽到 1480px，导航字号回到 14px。
   正文容器仍是 1320，logo 左缘与正文左缘错开 (1480-1320)/2 = 80px。
   视口不足 1480 时自动退化为满宽，仍比原 1320 宽，不会压到 logo。 */
@media (min-width: 1201px) {
  .nx-head__main > .nx-container,
  .nx-head__bar > .nx-container { max-width: var(--nx-container-head); }
}

.nx-head__main-inner {
  display: flex;
  align-items: center;
  gap: var(--nx-sp-5);
  height: var(--nx-header-h);
}

.nx-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  max-width: 240px;
}

.nx-logo img {
  max-height: 46px;
  width: auto;
  object-fit: contain;
  transition: opacity var(--nx-dur-fast) var(--nx-ease);
}

.nx-logo:hover img { opacity: .82; }

.nx-nav { flex: 1; min-width: 0; }

.nx-nav__list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
}

.nx-nav__item { position: relative; }

.nx-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* 迭代58（C 方案）：字号与字距回到原值 14px / .04em，只保留内距收紧（12→6px）。
     内距才是省空间的主力（10 个菜单共省 120px），字号影响的是视觉重量。 */
  padding: 10px 6px;
  font-family: var(--nx-font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: var(--nx-ls-wide);
  text-transform: uppercase;
  color: var(--nx-ink);
  white-space: nowrap;
  position: relative;
}

.nx-nav__link::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 2px;
  height: 1px;
  background: var(--nx-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--nx-dur) var(--nx-ease-out);
}

.nx-nav__item:hover > .nx-nav__link::after,
.nx-nav__link.inmenu_1::after { transform: scaleX(1); }

.nx-nav__item:hover > .nx-nav__link { color: var(--nx-amber-deep); }

/* 二级/三级下拉 */
.nx-sub {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 236px;
  padding: 8px 0;
  background: var(--nx-white);
  border: 1px solid var(--nx-line);
  border-top: 2px solid var(--nx-accent);
  border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: all var(--nx-dur) var(--nx-ease);
}

/* 顶层下拉子项较多时：多列网格显示（由 page.js 按数量加 is-multi） */
.nx-nav__item > .nx-sub.is-multi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 4px;
  min-width: 520px;
  padding: 12px 10px;
}

/* 多列下拉较宽，左对齐导航项避免溢出屏幕 */
.nx-nav__item > .nx-sub.is-multi {
  left: 0;
  transform: translate(0, 10px);
}

/* 桌面端下拉显示由 JS「悬停意图」控制（.is-open），避免鼠标路过即误触；
   无 JS 环境（html.no-js）退回纯 :hover 行为 */
html.no-js .nx-nav__item:hover > .nx-sub.is-multi {
  transform: translate(0, 0);
}

.nx-nav__item.is-open > .nx-sub.is-multi {
  transform: translate(0, 0);
}

.nx-nav__item > .nx-sub.is-multi > .nx-sub__item {
  break-inside: avoid;
}

.nx-nav__item > .nx-sub.is-multi > .nx-sub__item > .nx-sub__link {
  padding: 10px 14px;
  white-space: normal;
  line-height: 1.45;
  border-radius: var(--nx-radius);
}

/* 嵌套三级下拉保持单列 */
.nx-sub .nx-sub {
  display: block;
  min-width: 236px;
  padding: 8px 0;
}

/* ============ Mega Menu：子项含孙级时按列分组展示（服务分组矩阵） ============ */
@media (min-width: 1201px) {
  .nx-nav__item > .nx-sub.is-mega {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 0 6px;
    min-width: 780px;
    padding: 16px 12px 14px;
    left: 0;
    transform: translate(0, 10px);
  }

  html.no-js .nx-nav__item:hover > .nx-sub.is-mega { transform: translate(0, 0); }
  .nx-nav__item.is-open > .nx-sub.is-mega { transform: translate(0, 0); }

  /* 每列一个分组：组标题 + 组内服务静态列表 */
  .nx-nav__item > .nx-sub.is-mega > .nx-sub__item { position: static; }

  .nx-nav__item > .nx-sub.is-mega > .nx-sub__item > .nx-sub__link {
    padding: 0 12px 10px;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--nx-graphite);
    white-space: normal;
    line-height: 1.4;
    border-bottom: 1px solid var(--nx-line);
    border-radius: 0;
  }

  .nx-nav__item > .nx-sub.is-mega > .nx-sub__item > .nx-sub__link .nx-nav__caret { display: none; }

  .nx-nav__item > .nx-sub.is-mega .nx-sub {
    position: static;
    display: block;
    min-width: 0;
    padding: 2px 0 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  /* 关键修复：mega 收起时，其孙级链接列表虽被上方规则强制为 visibility:visible，
     但父级 .nx-sub 处于 visibility:hidden + opacity:0，这些“不可见”的链接仍可被鼠标命中，
     从而误触展开整块下拉（即“移到链接上就弹出”）。此处仅在菜单未展开时将其设为
     不可见且不可交互；展开态由父级 .nx-sub 的打开规则统一恢复。 */
  .nx-nav__item:not(.is-open) > .nx-sub.is-mega .nx-sub {
    visibility: hidden;
    pointer-events: none;
  }

  .nx-nav__item > .nx-sub.is-mega .nx-sub .nx-sub__link {
    padding: 7px 12px;
    font-size: 13px;
    line-height: 1.45;
    white-space: normal;
    border-radius: var(--nx-radius);
  }

  .nx-nav__item > .nx-sub.is-mega .nx-sub .nx-sub__link:hover {
    padding-left: 16px;
    background: var(--nx-sand-deep);
    color: var(--nx-graphite);
  }
}

/* 桌面端下拉显示由 JS「悬停意图」控制（.is-open），避免鼠标路过即误触；
   无 JS 环境（html.no-js）退回纯 :hover 行为 */
.nx-nav__item.is-open > .nx-sub {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

html.no-js .nx-nav__item:hover > .nx-sub {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nx-sub__item { position: relative; }

.nx-sub__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--nx-ink-70);
  transition: all var(--nx-dur-fast) var(--nx-ease);
}

.nx-sub__link:hover {
  background: var(--nx-sand-deep);
  color: var(--nx-ink);
  padding-left: 26px;
}

.nx-sub__item:hover > .nx-sub__link {
  background: var(--nx-sand-deep);
  color: var(--nx-amber-deep);
}

.nx-sub .nx-sub {
  top: -9px;
  left: 100%;
  transform: translate(10px, 0);
}

.nx-sub__item.is-open > .nx-sub {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0);
}

html.no-js .nx-sub__item:hover > .nx-sub {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0);
}

.nx-nav__caret {
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .55;
}

/* 头部右侧操作区 */
.nx-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  color: var(--nx-ink);
  font-size: 17px;
  transition: all var(--nx-dur-fast) var(--nx-ease);
}

.nx-icon-btn:hover {
  background: var(--nx-graphite);
  border-color: var(--nx-graphite);
  color: #fff;
}

.nx-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  cursor: pointer;
}

.nx-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--nx-ink);
  transition: transform var(--nx-dur) var(--nx-ease), opacity var(--nx-dur) var(--nx-ease);
}

.nx-burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nx-burger.is-active span:nth-child(2) { opacity: 0; }
.nx-burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 搜索面板 */
.nx-search-panel {
  overflow: hidden;
  max-height: 0;
  background: var(--nx-sand);
  border-top: 1px solid transparent;
  transition: max-height var(--nx-dur) var(--nx-ease), border-color var(--nx-dur) var(--nx-ease);
}

.nx-search-panel.is-open {
  max-height: 120px;
  border-top-color: var(--nx-line);
}

.nx-search-panel__inner {
  display: flex;
  align-items: center;
  gap: var(--nx-sp-4);
  padding: var(--nx-sp-5) 0;
}

.nx-search-panel form {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  border-bottom: 1px solid var(--nx-ink);
}

.nx-search-panel input[type="text"] {
  flex: 1;
  padding: 12px 4px;
  border: 0;
  background: transparent;
  font-size: 16px;
}

.nx-search-panel input[type="text"]:focus { outline: none; }

.nx-search-panel input::placeholder {
  color: var(--nx-ink-45);
  letter-spacing: .04em;
}

.nx-search-panel button {
  padding: 12px 4px 12px 16px;
  font-size: 18px;
  color: var(--nx-ink);
  transition: color var(--nx-dur-fast) var(--nx-ease);
}

.nx-search-panel button:hover { color: var(--nx-amber); }

/* ==========================================================================
   Mobile drawer & mask
   ========================================================================== */

.nx-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 28, 83, .58);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--nx-dur) var(--nx-ease);
  z-index: var(--nx-z-mask);
}

.nx-mask.is-open { opacity: 1; visibility: visible; }

/* 迭代58（C 方案）导航密度分档
   ----------------------------------------------------------------------
   页头容器放宽到 1480 后，1440 及以上视口 en/ja/zh/ar 可直接用回 14px；
   fr/es 因菜单文案与右侧 CTA 明显更长（Mon blog / Demander un devis /
   Solicitar presupuesto），需要单独降一档；
   1440 以下视口可用宽度骤减（这是视口约束，与容器无关），全局逐级回收。
   html:lang() 提权的规则必须限定 min-width:1201px，
   否则会压过 ≤1200 的移动端抽屉样式（抽屉应为 16px / 24px）。 */

/* —— 法语 / 西班牙语 —— */
@media (min-width: 1201px) {
  html:lang(fr) .nx-nav__link,
  html:lang(es) .nx-nav__link { padding: 10px 5px; font-size: 12.5px; letter-spacing: .02em; }

  html:lang(fr) .nx-nav__link::after,
  html:lang(es) .nx-nav__link::after { left: 5px; right: 5px; }
}

@media (min-width: 1201px) and (max-width: 1439px) {
  html:lang(fr) .nx-nav__link,
  html:lang(es) .nx-nav__link { padding: 10px 4px; font-size: 12px; letter-spacing: 0; }

  html:lang(fr) .nx-nav__link::after,
  html:lang(es) .nx-nav__link::after { left: 4px; right: 4px; }

  html:lang(fr) .nx-head__actions .nx-btn--sm,
  html:lang(es) .nx-head__actions .nx-btn--sm { padding: 11px 14px; }
}

@media (min-width: 1201px) and (max-width: 1319px) {
  html:lang(fr) .nx-head__main-inner,
  html:lang(es) .nx-head__main-inner { gap: 18px; }

  html:lang(fr) .nx-nav__link,
  html:lang(es) .nx-nav__link { padding: 10px 3px; font-size: 11.5px; }

  html:lang(fr) .nx-nav__link::after,
  html:lang(es) .nx-nav__link::after { left: 3px; right: 3px; }

  html:lang(fr) .nx-head__actions .nx-btn--sm,
  html:lang(es) .nx-head__actions .nx-btn--sm { padding: 11px 10px; }
}

/* —— 全局：1440 以下逐级回收 —— */
@media (max-width: 1439px) {
  .nx-nav__link { font-size: 13px; }
}

@media (max-width: 1359px) {
  .nx-nav__link { padding: 10px 4px; font-size: 12px; }
  .nx-nav__link::after { left: 4px; right: 4px; }
}

@media (max-width: 1260px) {
  .nx-head__main-inner { gap: 20px; }
  .nx-nav__list { gap: 0; }
  .nx-nav__link { padding: 10px 3px; font-size: 11.5px; }
  .nx-nav__link::after { left: 3px; right: 3px; }
}

/* 1201~1260 是最窄的「仍显示横向导航」区间，fr/es 再收一档
   （实测 en 需要 11.5px/3px，fr/es 还需额外 30px：字距 + CTA 内距各让一点） */
@media (min-width: 1201px) and (max-width: 1260px) {
  html:lang(fr) .nx-nav__link,
  html:lang(es) .nx-nav__link { font-size: 11px; letter-spacing: -.012em; }

  html:lang(fr) .nx-head__actions .nx-btn--sm,
  html:lang(es) .nx-head__actions .nx-btn--sm { padding: 11px 9px; }
}

@media (max-width: 1200px) {
  .nx-head { --nx-bar-h: 40px; }
  .nx-head__bar-inner { height: 40px; }
  .nx-head__contact { display: none; }
  .nx-head__bar-right { margin-left: auto; }

  .nx-burger { display: flex; }

  .nx-head__actions { margin-left: auto; }

  .nx-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(88vw, 380px);
    background: var(--nx-white);
    border-left: 1px solid var(--nx-line);
    box-shadow: var(--nx-shadow-lg);
    transform: translateX(102%);
    transition: transform var(--nx-dur-slow) var(--nx-ease-out);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: var(--nx-z-drawer);
    padding: 76px 0 var(--nx-sp-7);
  }

  .nx-nav.is-open { transform: none; }

  .nx-nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
  }

  .nx-nav__item { border-bottom: 1px solid var(--nx-line-soft); }

  .nx-nav__link {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    font-size: 16px;
  }

  .nx-nav__link::after { display: none; }

  .nx-nav__item > .nx-nav__link:active { color: var(--nx-accent); }

  .nx-sub {
    position: static;
    min-width: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    display: none;
    background: #EAF1F9;
    padding: 0;
    list-style: none;
    margin: 0;
  }

  .nx-nav__item.is-open > .nx-sub,
  .nx-sub__item.is-open > .nx-sub { display: block; }

  /* 多列下拉（.is-multi）是桌面端的两列网格，抽屉里必须退回单列全宽。
     原规则 `.nx-nav__item > .nx-sub.is-multi`（权重 0,3,0）高于移动端 `.nx-sub`（0,1,0），
     导致「资源」子菜单在抽屉里常驻展开（display:grid 覆盖 display:none）
     且保持 min-width:520px → 溢出屏幕。LTR 向右溢出还勉强能读，
     RTL 向左溢出会把文字左半截裁掉。 */
  .nx-nav__item > .nx-sub.is-multi {
    display: none;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: 100%;
    padding: 0;
    left: auto;
  }

  .nx-nav__item.is-open > .nx-sub.is-multi { display: block; }

  .nx-sub__item { width: 100%; border-top: 1px solid rgba(0,0,0,.05); }

  .nx-sub__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 24px 14px 40px;
    font-size: 15px;
    line-height: 1.4;
    color: #001C53 !important;
    opacity: 1 !important;
    visibility: visible !important;
    white-space: normal;
    overflow: visible;
    text-decoration: none;
  }
  .nx-sub__link:hover,
  .nx-sub__link:active { padding-left: 40px; color: #001C53 !important; background: #EAF1F9; }

  .nx-sub .nx-sub { background: #EAF1F9; }
  .nx-sub .nx-sub .nx-sub__link {
    padding-left: 56px;
    font-size: 14px;
    color: #5A5F66 !important;
  }

  .nx-nav__link,
  .nx-sub__link { position: relative; }

  .nx-nav__caret {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin: -12px -12px -12px 0;
    border: 0;
    background: transparent;
    opacity: 1;
    transition: transform var(--nx-dur) var(--nx-ease);
  }
  .nx-nav__caret::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    margin: -6px 0 0 -6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }

  .nx-nav__item.is-open > .nx-nav__link .nx-nav__caret,
  .nx-sub__item.is-open > .nx-sub__link .nx-nav__caret { transform: rotate(180deg); }
}

@media (max-width: 640px) {
  .nx-head__main-inner { height: 68px; gap: var(--nx-sp-3); }
  .nx-logo img { max-height: 36px; }
  .nx-head__actions .nx-btn { display: none; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.nx-foot {
  position: relative;
  background: var(--nx-graphite);
  color: rgba(255, 255, 255, .7);
  margin-top: var(--nx-section);
}

/* 页脚 CTA 条 */
.nx-cta {
  position: relative;
  background: var(--nx-graphite-soft);
  border-top: 1px solid var(--nx-graphite-line);
  border-bottom: 1px solid var(--nx-graphite-line);
  overflow: hidden;
}

/* 首页已自带独立 CTA 转化带（.nx-section.nx-cta），为避免与页脚 CTA 文字重复，
   仅在首页（body.index）隐藏页脚 CTA；内页仍保留页脚 CTA 以维持询盘转化。 */
body.index .nx-foot .nx-cta { display: none; }

.nx-cta::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(57, 255, 20, .18), transparent 68%);
  pointer-events: none;
}

.nx-cta__text {
  max-width: 760px;
}

.nx-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nx-sp-6);
  padding-top: var(--nx-sp-5);
  padding-bottom: var(--nx-sp-5);
}

.nx-cta__title {
  font-size: var(--nx-fs-h3);
  color: #fff;
  margin-bottom: 6px;
}

.nx-cta__desc { font-size: 14px; color: rgba(255, 255, 255, .6); }

.nx-foot__main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: var(--nx-sp-6);
  padding: var(--nx-sp-7) 0 var(--nx-sp-6);
}

.nx-foot__col-title {
  font-size: 15px;
  color: #fff;
  margin-bottom: var(--nx-sp-4);
  padding-bottom: 10px;
  position: relative;
  letter-spacing: var(--nx-ls-wide);
}

.nx-foot__col-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background: var(--nx-accent);
}

.nx-foot__brand-block { max-width: 380px; }

.nx-foot__logo {
  display: inline-block;
  margin-bottom: var(--nx-sp-3);
}

.nx-foot__logo img {
  max-height: 44px;
  width: auto;
  /* 迭代58：改用官方白色版 logo 素材（blueasia-logo-white.png），
     不再用 brightness(0) invert(1) 反白——反白会把三角细节压成纯白剪影 */
}

.nx-foot__intro {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .58);
  margin-bottom: var(--nx-sp-5);
}

.nx-foot__qr {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--nx-graphite-line);
  border-radius: var(--nx-radius);
}

.nx-foot__qr img {
  width: 108px;
  height: 108px;
  object-fit: cover;
}

.nx-foot__qr span {
  font-size: 11px;
  letter-spacing: var(--nx-ls-caps);
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  text-align: center;
}

.nx-foot__list li { margin-bottom: 11px; }

.nx-foot__list a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: rgba(255, 255, 255, .66);
  padding-left: 14px;
  transition: all var(--nx-dur-fast) var(--nx-ease);
}

.nx-foot__list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background: var(--nx-amber);
  transform: translateY(-50%);
  transition: width var(--nx-dur-fast) var(--nx-ease);
}

.nx-foot__list a:hover {
  color: #fff;
  padding-left: 22px;
}

.nx-foot__list a:hover::before { width: 14px; }

.nx-foot__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.nx-foot__contact-item .iconfont {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--nx-graphite-line);
  border-radius: var(--nx-radius);
  color: var(--nx-accent);
  font-size: 15px;
  transition: all var(--nx-dur-fast) var(--nx-ease);
}

.nx-foot__contact-item:hover .iconfont {
  background: var(--nx-accent);
  border-color: var(--nx-accent);
  color: var(--nx-graphite);
}

.nx-foot__contact-item span {
  display: block;
  font-size: 11px;
  letter-spacing: var(--nx-ls-caps);
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
  margin-bottom: 2px;
}

.nx-foot__contact-item a,
.nx-foot__contact-item p {
  color: rgba(255, 255, 255, .82);
  word-break: break-word;
}

.nx-foot__contact-item a:hover { color: var(--nx-amber-bright); }

.nx-foot__bottom {
  border-top: 1px solid var(--nx-graphite-line);
  padding: var(--nx-sp-5) 0;
}

.nx-foot__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nx-sp-4);
  font-size: 13px;
  color: rgba(255, 255, 255, .45);
}

.nx-foot__bottom-inner a:hover { color: var(--nx-accent); }

.nx-foot__social {
  display: flex;
  gap: 8px;
}

.nx-foot__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--nx-graphite-line);
  border-radius: 50%;
  color: rgba(255, 255, 255, .7);
  font-size: 15px;
  transition: all var(--nx-dur) var(--nx-ease);
}

.nx-foot__social a:hover {
  background: var(--nx-accent);
  border-color: var(--nx-accent);
  color: var(--nx-graphite);
  transform: translateY(-3px);
}

@media (max-width: 1024px) {
  .nx-foot__main {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--nx-sp-6);
  }
}

@media (max-width: 640px) {
  .nx-cta__inner { flex-direction: column; align-items: flex-start; }
  .nx-foot__main { grid-template-columns: 1fr; padding-top: var(--nx-sp-7); }
  .nx-foot__bottom-inner { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   悬浮客服 / 返回顶部 / 移动端底部工具条
   ========================================================================== */

.nx-float {
  position: fixed;
  right: 0;
  top: 42%;
  z-index: var(--nx-z-float);
}

.nx-float__toggle {
  position: absolute;
  right: 0;
  top: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nx-graphite);
  color: #fff;
  border-radius: var(--nx-radius) 0 0 var(--nx-radius);
  font-size: 19px;
  box-shadow: var(--nx-shadow-md);
  transition: background-color var(--nx-dur-fast) var(--nx-ease);
}

.nx-float__toggle:hover { background: var(--nx-amber); }

.nx-float__panel {
  position: absolute;
  right: -232px;
  top: 0;
  width: 232px;
  padding: var(--nx-sp-4);
  background: var(--nx-white);
  border: 1px solid var(--nx-line);
  border-right: 0;
  border-radius: var(--nx-radius) 0 0 var(--nx-radius);
  box-shadow: var(--nx-shadow-lg);
  transition: right var(--nx-dur-slow) var(--nx-ease-out);
}

.nx-float.is-open .nx-float__panel { right: 46px; }

.nx-float__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--nx-ls-caps);
  text-transform: uppercase;
  color: var(--nx-ink);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--nx-line);
}

.nx-float__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13.5px;
  color: var(--nx-ink-70);
  border-bottom: 1px dashed var(--nx-line-soft);
}

.nx-float__item:last-child { border-bottom: 0; }

.nx-float__item i {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nx-sand-deep);
  border-radius: var(--nx-radius);
}

.nx-float__item i img { max-width: 15px; max-height: 15px; }
.nx-float__item i .iconfont { font-size: 16px; line-height: 1; }
.nx-float__item:hover { color: var(--nx-amber-deep); }
.nx-float__item:hover i { background: var(--nx-amber-wash); }

.nx-float__social {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--nx-line);
}

.nx-float__soc {
  flex: 1;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  background: var(--nx-graphite);
  border-radius: var(--nx-radius);
  transition: background-color var(--nx-dur-fast) var(--nx-ease), transform var(--nx-dur-fast) var(--nx-ease);
}

.nx-float__soc:hover { color: #fff; transform: translateY(-2px); }
.nx-float__soc--li:hover { background: #0A66C2; }
.nx-float__soc--fb:hover { background: #1877F2; }
.nx-float__soc--tw:hover { background: #000000; }
.nx-float__soc--ig:hover { background: #E4405F; }
.nx-float__soc--wx:hover { background: #07C160; }

@media (max-width: 1024px) {
  .nx-float { display: none; }
}

.nx-totop {
  position: fixed;
  right: 22px;
  bottom: 92px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nx-white);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  color: var(--nx-ink);
  font-size: 18px;
  box-shadow: var(--nx-shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--nx-dur) var(--nx-ease);
  z-index: var(--nx-z-float);
}

.nx-totop.is-show { opacity: 1; visibility: visible; transform: none; }

.nx-totop:hover {
  background: var(--nx-graphite);
  border-color: var(--nx-graphite);
  color: #fff;
  transform: translateY(-3px);
}

@media (max-width: 1024px) {
  .nx-totop { bottom: 78px; right: 14px; width: 40px; height: 40px; }
}

/* 移动端底部工具条 */
.nx-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--nx-white);
  border-top: 1px solid var(--nx-line);
  box-shadow: 0 -6px 24px -18px rgba(0, 28, 83, .5);
  z-index: var(--nx-z-float);
}

.nx-tabbar__inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.nx-tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 4px;
  font-size: 11px;
  color: var(--nx-ink-70);
  transition: color var(--nx-dur-fast) var(--nx-ease);
}

.nx-tabbar__item .iconfont { font-size: 19px; line-height: 1; }

.nx-tabbar__item:active,
.nx-tabbar__item.is-active { color: var(--nx-amber); }

.nx-tabbar__item--quote {
  background: var(--nx-amber);
  color: #fff;
}

@media (max-width: 1024px) {
  .nx-tabbar { display: block; }
  body { padding-bottom: 58px; }
}

/* ==========================================================================
   Cookies 协议条
   ========================================================================== */

#cookies_agreement {
  position: fixed;
  z-index: var(--nx-z-cookie);
  left: var(--nx-sp-4);
  bottom: var(--nx-sp-4);
  width: min(420px, calc(100% - var(--nx-sp-4) * 2));
  padding: var(--nx-sp-5);
  background: var(--nx-white);
  border: 1px solid var(--nx-line);
  border-top: 3px solid var(--nx-amber);
  border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--nx-sp-4);
  transition: opacity var(--nx-dur) var(--nx-ease), transform var(--nx-dur) var(--nx-ease);
}

#cookies_agreement.cookies-bottom {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  padding: var(--nx-sp-4) var(--nx-gutter);
}

#cookies_agreement .cookies-content {
  flex: 1;
  min-width: 220px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--nx-ink-70);
}

#cookies_agreement .cookies-content a { color: var(--nx-amber-deep); text-decoration: underline; }

#cookies_agreement .cookies-button {
  padding: 12px 26px;
  background: var(--nx-graphite);
  color: #fff;
  border-radius: var(--nx-radius);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--nx-ls-caps);
  text-transform: uppercase;
  transition: all var(--nx-dur-fast) var(--nx-ease);
}

#cookies_agreement .cookies-button:hover {
  background: var(--nx-amber);
  transform: translateY(-2px);
  box-shadow: var(--nx-shadow-amber);
}

.cookies_none { display: none !important; }

.cookies-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--nx-z-cookie) + 1);
  background: rgba(0, 28, 83, .58);
  backdrop-filter: blur(3px);
}

.cookies-open-popup { display: block; }

.cookies-popup-box {
  width: min(920px, 90%);
  max-height: 80vh;
  margin: 6vh auto;
  padding: var(--nx-sp-6);
  background: var(--nx-white);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow-lg);
  overflow-y: auto;
}

.cookies-popup-box-top {
  font-size: 26px;
  margin-bottom: var(--nx-sp-4);
  padding-bottom: var(--nx-sp-3);
  border-bottom: 1px solid var(--nx-line);
}

.cookies-popup-box-con {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--nx-ink-70);
}

.cookies-popup-box-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--nx-sp-5);
}

.cookies-popup-box-foot .cookies-button {
  padding: 13px 34px;
  background: var(--nx-graphite);
  color: #fff;
  border-radius: var(--nx-radius);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--nx-ls-caps);
  text-transform: uppercase;
  transition: all var(--nx-dur-fast) var(--nx-ease);
}

.cookies-popup-box-foot .cookies-button:hover { background: var(--nx-amber); }

@media (max-width: 640px) {
  #cookies_agreement { padding: var(--nx-sp-4); }
  #cookies_agreement .cookies-button { width: 100%; }
  .cookies-popup-box { padding: var(--nx-sp-4); margin: 4vh auto; }
}

/* ==========================================================================
   RTL — 阿拉伯语镜像（迭代57）
   --------------------------------------------------------------------------
   仅在 <html dir="rtl"> 时生效（dir 由模板 {zan:lang const='htmldir' /} 输出），
   其余语言零影响。flex / grid 会随 direction 自动镜像，因此这里只处理
   物理方向属性（left / right、padding-left / right、border-left / right、
   text-align、translateX）以及阿拉伯文的排印细节。
   ========================================================================== */

/* ---------- 1. 阿拉伯文排印 ---------- */
/* Oswald / Inter 只有 latin + latin-ext 子集，阿拉伯字母会逐字回退到系统字体，
   导致字重、基线、字宽全乱。RTL 语言整体换用系统阿拉伯字体栈：
   Windows = Segoe UI / macOS·iOS = Geeza Pro / Android = Noto Naskh Arabic。 */
html:lang(ar) {
  --nx-font-display: 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Droid Arabic Naskh', Arial, sans-serif;
  --nx-font-body: 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Droid Arabic Naskh', Arial, sans-serif;
  /* 阿拉伯字母连写：字距会在连写处插入缝隙，全站归零 */
  --nx-ls-caps: normal;
  --nx-ls-wide: normal;
  --nx-ls-tight: normal;
  /* 阿拉伯文有上下附加符与深降部，行高需要比拉丁文更松，否则标题会切字 */
  --nx-lh-tight: 1.3;
  --nx-lh-snug: 1.5;
  --nx-lh-body: 1.9;
}

/* 硬编码的字距（.04em / .12em 等）同样要清掉 */
html:lang(ar) body,
html:lang(ar) body * { letter-spacing: normal !important; }

/* 表单控件跟随页面方向 */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select { direction: rtl; }

/* ---------- 2. 顶栏 / 语言切换 ---------- */
html[dir="rtl"] .nx-head__bar-right,
html[dir="rtl"] .nx-head__actions { margin-left: 0; margin-right: auto; }

html[dir="rtl"] .nx-lang__drop { right: auto; left: 0; }

html[dir="rtl"] .nx-lang__drop a:hover { padding-left: 12px; padding-right: 16px; }

/* ---------- 3. 主导航下拉 ---------- */
/* 三级菜单在 LTR 向右展开，RTL 向左展开 */
html[dir="rtl"] .nx-sub .nx-sub { left: auto; right: 100%; }

/* 多列 / 巨型下拉改右对齐导航项 */
html[dir="rtl"] .nx-nav__item > .nx-sub.is-multi,
html[dir="rtl"] .nx-nav__item > .nx-sub.is-mega { left: auto; right: 0; }

/* 二级菜单悬停缩进改从右侧进 */
html[dir="rtl"] .nx-sub__link:hover,
html[dir="rtl"] .nx-sub__link:active { padding-left: 14px; padding-right: 26px; }

html[dir="rtl"] .nx-nav__item > .nx-sub.is-mega .nx-sub .nx-sub__link:hover { padding-left: 12px; padding-right: 16px; }

html[dir="rtl"] .nx-sub .nx-sub .nx-sub__link { padding-left: 8px; padding-right: 56px; }

/* 移动端抽屉：LTR 从右滑出、RTL 从左滑出（汉堡按钮在 RTL 下位于左侧）。
   必须包在 max-width 断点内：桌面端 .nx-nav 是 flex 子项，若被赋予
   transform 会被整条推出视口。 */
@media (max-width: 1200px) {
  html[dir="rtl"] .nx-nav {
    right: auto;
    left: 0;
    border-left: 0;
    border-right: 1px solid var(--nx-line);
    transform: translateX(-102%);
  }
  html[dir="rtl"] .nx-nav.is-open { transform: none; }
}

html[dir="rtl"] .nx-nav__caret::before { margin: -6px -6px 0 0; }

/* ---------- 4. 页脚 ---------- */
html[dir="rtl"] .nx-foot__col-title::after { left: auto; right: 0; }

html[dir="rtl"] .nx-foot__list a { padding-left: 0; padding-right: 14px; }

html[dir="rtl"] .nx-foot__list a::before { left: auto; right: 0; }

html[dir="rtl"] .nx-foot__list a:hover { padding-left: 0; padding-right: 22px; }

/* 底部 CTA 的装饰方块/角标 */
html[dir="rtl"] .nx-cta::before { right: auto; left: -60px; }

/* ---------- 5. 悬浮工具条 / 返回顶部 / 底部工具条 ---------- */
html[dir="rtl"] .nx-float { right: auto; left: 0; }

html[dir="rtl"] .nx-float__toggle { right: auto; left: 0; }

html[dir="rtl"] .nx-float__panel { right: auto; left: -232px; border-right: 1px solid var(--nx-line); border-left: 0; }

html[dir="rtl"] .nx-float.is-open .nx-float__panel { right: auto; left: 46px; }

html[dir="rtl"] .nx-totop { right: auto; left: 22px; }

@media (max-width: 640px) {
  html[dir="rtl"] .nx-totop { right: auto; left: 14px; }
}

/* ---------- 6. 卡片 / 徽标 / 表单 ---------- */
html[dir="rtl"] .nx-card--corner::before { left: auto; right: -1px; border-left-color: currentColor; border-right-color: var(--nx-accent); }

html[dir="rtl"] .nx-card--corner::after { right: auto; left: -1px; border-right-color: currentColor; border-left-color: var(--nx-accent); }

html[dir="rtl"] .nx-badge { left: auto; right: 0; }

html[dir="rtl"] .nx-field__label { left: auto; right: 2px; }

/* ---------- 7. 栏目页：标题装饰 / 分类列表 ---------- */
html[dir="rtl"] .nx-page__title { padding-left: 0; padding-right: var(--nx-sp-4); border-left: 0; border-right: 3px solid var(--nx-amber); }

html[dir="rtl"] .nx-widget__title { padding-left: 0; padding-right: 12px; }

html[dir="rtl"] .nx-widget__title::before { left: auto; right: 0; }

html[dir="rtl"] .nx-cate__item > a:hover,
html[dir="rtl"] .nx-cate__item.active > a { padding-left: 14px; padding-right: 20px; }

html[dir="rtl"] .nx-cate__item.active > a::before { left: auto; right: 0; }

html[dir="rtl"] .nx-cate__sub li a { padding: 9px 28px 9px 14px; }

html[dir="rtl"] .nx-cate__sub li a:hover,
html[dir="rtl"] .nx-cate__sub li.active a { padding-left: 14px; padding-right: 34px; }

html[dir="rtl"] .nx-nrow__date { left: auto; right: 0; }

html[dir="rtl"] .nx-single__title::after { left: auto; right: 0; }

/* ---------- 8. 正文排版 ---------- */
html[dir="rtl"] .nx-prose blockquote { border-left: 0; border-right: 3px solid var(--nx-amber); }

html[dir="rtl"] .nx-prose ul li,
html[dir="rtl"] .nx-prose ol li { padding-left: 0; padding-right: 22px; }

html[dir="rtl"] .nx-prose ul li::before,
html[dir="rtl"] .nx-prose ol li::before { left: auto; right: 0; }

html[dir="rtl"] .nx-article__summary { border-left: 0; border-right: 3px solid var(--nx-accent); }

html[dir="rtl"] .nx-authorbox { border-left: 0; border-right: 3px solid var(--nx-accent); }

html[dir="rtl"] .nx-ans { border-left: 0; border-right: 3px solid var(--nx-amber, #FFB400); }

html[dir="rtl"] .nx-boundary { border-left: 0; border-right: 4px solid #f0b400; }

html[dir="rtl"] .nx-posts--plain li.is-current .nx-posts__title::before { margin-right: 0; margin-left: 8px; }

html[dir="rtl"] .nx-std__meta dt { margin-right: 0; margin-left: 4px; }

/* ---------- 9. GEO 详情 / 时间线 / 核验 / 白皮书 ---------- */
html[dir="rtl"] .nx-faq__group { padding-left: 0; padding-right: 12px; border-left: 0; border-right: 4px solid var(--nx-amber, #FFB400); }

html[dir="rtl"] .nx-timeline__year { padding-left: 0; padding-right: 14px; border-left: 0; border-right: 4px solid var(--nx-amber, #FFB400); }

html[dir="rtl"] .nx-tlitem { padding-left: 0; padding-right: 26px; border-left: 0; border-right: 2px solid var(--nx-line, #e6e9f0); }

html[dir="rtl"] .nx-tlitem:last-child { border-right-color: transparent; }

html[dir="rtl"] .nx-tlitem::before { left: auto; right: -7px; }

html[dir="rtl"] .nx-std__status { right: auto; left: 14px; }

html[dir="rtl"] .nx-doc__stamp { right: auto; left: 16px; }

html[dir="rtl"] .nx-verify__hint { border-left: 0; border-right: 3px solid #e6ecf7; padding-left: 0; padding-right: 10px; }

html[dir="rtl"] .nx-wp__sumlist { padding-left: 0; padding-right: 18px; }

html[dir="rtl"] .nx-accredwall__gtitle { padding-left: 0; padding-right: 12px; border-left: 0; border-right: 3px solid var(--nx-accent, #1f8a4c); }

html[dir="rtl"] .nx-stddetail__meta dt { margin-right: 0; margin-left: 6px; }

html[dir="rtl"] .nx-stddetail__ver { margin-left: 0; margin-right: 8px; }

html[dir="rtl"] .nx-stddetail__scope,
html[dir="rtl"] .nx-stddetail__caps,
html[dir="rtl"] .nx-stddetail__mkts { padding-left: 0; padding-right: 20px; }

html[dir="rtl"] .nx-cap__acc { margin-right: 0; margin-left: 6px; }

html[dir="rtl"] .nx-confirm__summary--empty { padding-left: 0; padding-right: 0; }

html[dir="rtl"] .nx-nscard__unit { margin-left: 0; margin-right: 2px; }

/* ---------- 10. 产品图库左右切换按钮 ---------- */
html[dir="rtl"] .nx-detail__gallery .prodetails-button-next { right: auto; left: -14px; }

html[dir="rtl"] .nx-detail__gallery .prodetails-button-prev { left: auto; right: -14px; }

html[dir="rtl"] .nx-detail__gallery .prodetails-button-next { right: auto; left: 8px; }

html[dir="rtl"] .nx-detail__gallery .prodetails-button-prev { left: auto; right: 8px; }

/* ---------- 11. 首页组件 ---------- */
html[dir="rtl"] .nx-about__mark { right: auto; left: -22px; }

html[dir="rtl"] .nx-hcard__index { left: auto; right: -6px; }

html[dir="rtl"] .nx-ncard__date { left: auto; right: var(--nx-sp-4); }

html[dir="rtl"] .nx-ind__title::before { margin-right: 0; margin-left: 8px; }

/* ---------- 12. 双语混排：正文段落按自身内容方向排版 ----------
   阿拉伯语版块里暂时保留英文正文（内容待翻译）。若不处理，英文句末的
   句号会被 RTL 基线推到行首（".Each certification type ..."）。
   unicode-bidi: plaintext 让每个段落按「首个强字符」自行决定基准方向，
   英文段落自动 LTR、阿拉伯段落自动 RTL，标点各归其位。 */
html[dir="rtl"] .nx-prose p,
html[dir="rtl"] .nx-prose li,
html[dir="rtl"] .nx-prose h2,
html[dir="rtl"] .nx-prose h3,
html[dir="rtl"] .nx-prose h4,
html[dir="rtl"] .nx-prose blockquote,
html[dir="rtl"] .nx-prose dd,
html[dir="rtl"] .nx-prose td,
html[dir="rtl"] .nx-article__summary,
html[dir="rtl"] .nx-prose .nx-ans,
html[dir="rtl"] .nx-prose .nx-boundary { unicode-bidi: plaintext; }

/* ---------- 13. 兜底：源码里写死的 text-align: left 在 RTL 下需镜像 ----------
   以下组件在 page.css / theme.css / users.css 中显式写了 text-align: left，
   阿拉伯语下会导致表格单元格、FAQ 问题、自查器选项全部贴左。
   用 html:lang(ar) 提权覆盖，不影响 LTR 六语。 */
html:lang(ar) .nx-table th,
html:lang(ar) .nx-table td,
html:lang(ar) .nx-capmatrix__table th,
html:lang(ar) .nx-capmatrix__table td,
html:lang(ar) .nx-geoinsight__tbl th,
html:lang(ar) .nx-geoinsight__tbl td,
html:lang(ar) .nx-checker__table th,
html:lang(ar) .nx-checker__table td,
html:lang(ar) .nx-bloglist th,
html:lang(ar) .nx-bloglist td { text-align: right; }

html:lang(ar) .nx-faq__q,
html:lang(ar) .nx-checker__opt,
html:lang(ar) .nx-auth .nx-form__row { text-align: right; }

/* 问答文本按「自身语言」排版：阿语站上的英文问答若整体沿用 RTL 段落方向，
   句末问号会跑到行首（"… hardware products?" 变成 "?How to…"）。
   用 plaintext 逐条按首字符判定方向，配合 start 对齐：
   阿语问答仍靠右，英文问答自动靠左。 */
html[dir="rtl"] .nx-faq__q > span,
html[dir="rtl"] .nx-faq__q .nx-faq__dot,
html[dir="rtl"] .nx-faq__a .nx-prose,
html[dir="rtl"] .nx-faq__a .nx-ans__body { unicode-bidi: plaintext; }
html:lang(ar) .nx-faq__q { text-align: start; }

/* 分组侧栏：左内距改右内距（圆点侧留白） */
html:lang(ar) .nx-sidelinks--grouped ul li { padding: 7px 10px 7px 0; }

/* 上下篇：RTL 下「下一篇」的箭头在左，整行贴左 */
@media (max-width: 640px) {
  html:lang(ar) .nx-prenext__item--next { justify-content: flex-end; text-align: right; }
}

/* 表格首列在 RTL 下补右侧留白，避免文字贴边框 */
html:lang(ar) .nx-table th:first-child,
html:lang(ar) .nx-table td:first-child { padding-right: 16px; }
