/* ==========================================================================
   Flow-X 新导航栏、多语言切换器与字体系统 (v2)
   ========================================================================== */

/* --------------------------------------------------------------------------
   字体：Inter（英文/PT/ES）、卓健橄榄简体（简中）、AlibabaSansTC（繁中）
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'FlowXInter';
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
  src: url('../../replace/font/Inter Thin%E5%AD%97%E4%BD%93.ttf') format('truetype');
}

@font-face {
  font-family: 'FlowXZhuoJian';
  font-weight: 400;
  font-style: normal;
  font-display: block;
  src: url('../../replace/font/%E5%8D%93%E5%81%A5%E6%A9%84%E6%A6%84%E7%AE%80%E4%BD%93%281%29.ttf') format('truetype');
}

@font-face {
  font-family: 'AlibabaSansTC';
  font-weight: 300;
  font-display: block;
  src: url('../../replace/font/AlibabaSansTC/AlibabaSansTC-45/AlibabaSansTC-45.woff2') format('woff2'),
       url('../../replace/font/AlibabaSansTC/AlibabaSansTC-45/AlibabaSansTC-45.ttf') format('truetype');
}
@font-face {
  font-family: 'AlibabaSansTC';
  font-weight: 400;
  font-display: block;
  src: url('../../replace/font/AlibabaSansTC/AlibabaSansTC-55/AlibabaSansTC-55.woff2') format('woff2'),
       url('../../replace/font/AlibabaSansTC/AlibabaSansTC-55/AlibabaSansTC-55.ttf') format('truetype');
}
@font-face {
  font-family: 'AlibabaSansTC';
  font-weight: 700;
  font-display: block;
  src: url('../../replace/font/AlibabaSansTC/AlibabaSansTC-75/AlibabaSansTC-75.woff2') format('woff2'),
       url('../../replace/font/AlibabaSansTC/AlibabaSansTC-75/AlibabaSansTC-75.ttf') format('truetype');
}
@font-face {
  font-family: 'AlibabaSansTC';
  font-weight: 900;
  font-display: block;
  src: url('../../replace/font/AlibabaSansTC/AlibabaSansTC-95/AlibabaSansTC-95.woff2') format('woff2'),
       url('../../replace/font/AlibabaSansTC/AlibabaSansTC-95/AlibabaSansTC-95.ttf') format('truetype');
}

/* --------------------------------------------------------------------------
   按语言切换字体：设 html 根与 body
   -------------------------------------------------------------------------- */
html { font-family: 'FlowXInter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; }
html[lang="en"],
html[lang="pt-BR"],
html[lang="pt-PT"],
html[lang="es"] { font-family: 'FlowXInter', -apple-system, BlinkMacSystemFont, Arial, sans-serif; }
html[lang="zh-CN"] { font-family: 'FlowXZhuoJian', 'FlowXInter', -apple-system, 'Microsoft YaHei', sans-serif; }
html.lang-zh-tw,
html[lang="zh-TW"],
html[lang="zh-HK"] { font-family: 'AlibabaSansTC', 'FlowXInter', sans-serif; }

/* 让 Duda 未显式指定 font-family 的元素继承；Duda 的类选择器需用 !important 覆盖 */
body { font-family: inherit !important; }
body *:not(.no-i18n):not(.no-i18n *):not(.icon):not([class*="icon-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(i[class^="icon"]):not(i[class*=" icon"]) {
  font-family: inherit !important;
}

/* 但保留图标字体族（FontAwesome 等） */
.icon, [class*="icon-"],
.fa, .fas, .far, .fab, .fal, .fad,
i[class^="icon"], i[class*=" icon"] {
  font-family: revert !important;
}

/* --------------------------------------------------------------------------
   首屏：只隐藏原 Duda 中文导航 / 原注册登录按钮，其他内容正常显示。
   整页不遮白屏，避免用户感觉"加载很慢"。
   -------------------------------------------------------------------------- */
#\31 528541351,
[data-external-id="1528541351"],
#widget_9dc,
[data-external-id="214433451"] {
  visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   隐藏原 Duda 主 nav + 原注册/登录按钮（保留 Logo / 搜索 / 汉堡按钮）
   -------------------------------------------------------------------------- */
body.fx-nav-mounted #\31 528541351,
body.fx-nav-mounted [data-external-id="1528541351"],
body.fx-nav-mounted #widget_9dc,
body.fx-nav-mounted [data-external-id="214433451"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   #bcb23753 作为 flex 容器，用 order 让 [菜单 | 搜索 | 右侧组] 可控排布
   -------------------------------------------------------------------------- */
body.fx-nav-mounted #bcb23753 {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

body.fx-nav-mounted #bcb23753 > * { min-width: 0; }

body.fx-nav-mounted #bcb23753 .fx-menus { order: 1; flex: 0 0 auto; flex-wrap: nowrap; min-width: 0; }
body.fx-nav-mounted #bcb23753 #widget_7co { order: 2; flex: 0 1 auto; min-width: 0; max-width: 260px; }
body.fx-nav-mounted #bcb23753 .fx-right { order: 3; margin-left: auto; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   主菜单 & 语言切换器 共用
   -------------------------------------------------------------------------- */
.fx-menus {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  font-size: 18px;
  color: var(--color_1, #111);
  white-space: nowrap;
}

.fx-right {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  font-size: 18px;
  color: var(--color_1, #111);
  white-space: nowrap;
}

.fx-menus *, .fx-right *,
.fx-menus *::before, .fx-right *::before,
.fx-menus *::after, .fx-right *::after { box-sizing: border-box; }

.fx-menus ul, .fx-right ul { list-style: none; margin: 0; padding: 0; }

.fx-menu-item { position: relative; }

.fx-trigger {
  background: transparent;
  border: 0;
  padding: 10px 10px;
  font: inherit;
  font-weight: 200;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 6px;
  transition: color .2s ease, background-color .2s ease;
}
.fx-trigger:hover,
.fx-menu-item.fx-open > .fx-trigger,
.fx-menu-item:hover > .fx-trigger {
  color: var(--color_2, #51BB79);
  font-weight: 300;
}
.fx-trigger::after {
  content: '';
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .7;
  transition: transform .2s ease;
}
.fx-menu-item.fx-open > .fx-trigger::after,
.fx-menu-item:hover > .fx-trigger::after { transform: rotate(180deg); }

/* --------------------------------------------------------------------------
   下拉面板
   -------------------------------------------------------------------------- */
.fx-panel {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  width: max-content;
  background: rgba(255, 255, 255, 0.3) !important;
  border: 0;
  border-radius: 0 !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 28px 32px;
  z-index: 1000;
  min-width: 220px;
  max-width: min(1100px, calc(100vw - 40px));
}
.fx-menu-item.fx-open > .fx-panel,
.fx-menu-item:hover > .fx-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: flex-start;
}
.fx-panel--right-align { right: 0; left: auto; }

.fx-lang-panel { min-width: 260px; max-width: 320px; }
.fx-menu-item.fx-lang.fx-open > .fx-panel,
.fx-menu-item.fx-lang:hover > .fx-panel { display: block; }

/* --------------------------------------------------------------------------
   下拉面板 列：自适应（基于内容自然宽度），不强制最大宽度，防止 PT/ES 长词溢出
   -------------------------------------------------------------------------- */
.fx-col {
  flex: 0 0 auto;
  min-width: 140px;
  box-sizing: border-box;
}

/* 列标题：黑色，独立 class 防止被原 h4 样式劫持 */
.fx-col-title {
  display: block !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #111 !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  font-family: inherit !important;
  text-align: left !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.fx-list { display: block; }
.fx-list li { margin: 0; list-style: none; }
.fx-list a,
.fx-list button,
.fx-list .fx-label {
  display: block;
  padding: 9px 14px;
  color: #111 !important;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  background: rgba(255, 255, 255, 0) !important;
  border: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  text-shadow: none !important;
  opacity: 1 !important;
  transition: background-color .2s ease, color .2s ease;
}
.fx-list a:hover,
.fx-list a:focus,
.fx-list a:active,
.fx-list button:hover,
.fx-list button:focus,
.fx-list .fx-label:hover,
.fx-list a.fx-active,
.fx-list button.fx-active {
  color: #ffffff !important;
  background: #51BB79 !important;
  background-color: #51BB79 !important;
  font-weight: 600;
  text-shadow: none !important;
}

/* 单列：≤5 */
.fx-list-single { display: block; min-width: 140px; }

/* 6–10 也用单列显示，文字过长时在卡片内换行 */
.fx-list-two {
  display: block;
}

/* >10 单列 + 滚动 */
.fx-list-scroll {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 6px;
}

/* 允许标签文字换行 */
.fx-list a,
.fx-list button,
.fx-list .fx-label {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

/* --------------------------------------------------------------------------
   注册/登录按钮 & 语言项高亮
   -------------------------------------------------------------------------- */
.fx-right .fx-signup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--color_2, #51BB79);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .2s ease;
}
.fx-right .fx-signup:hover { background: #45a569; color: #fff; }

.fx-lang-option {
  white-space: nowrap !important;
  word-break: keep-all !important;
}

.fx-lang-option.fx-active {
  color: #fff !important;
  background: var(--color_2, #51BB79) !important;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body.fx-nav-mounted #bcb23753 .fx-menus,
  body.fx-nav-mounted #bcb23753 .fx-right { display: none; }

  body.fx-nav-mounted #\31 528541351,
  body.fx-nav-mounted [data-external-id="1528541351"],
  body.fx-nav-mounted #widget_9dc,
  body.fx-nav-mounted [data-external-id="214433451"] { display: revert !important; }

  body.fx-nav-mounted #bcb23753 { display: revert !important; }
}
