/* 官网保存页内联样式 + Vue 壳层补充 */
body {
  font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
}

#app {
  min-height: 100vh;
}

body.prevent-scroll {
  overflow: hidden;
}

@media (min-width: 991px) {
  #wrapper .header-with-megamenu.new-header .stx-logo {
    height: 40px !important;
  }
}

@media (max-width: 1024px) {
  #wrapper .header-with-megamenu.new-header .stx-logo {
    height: 30px !important;
  }
}

@media (min-width: 991px) {
  .page-heading h1.field-pageheadingtitle {
    font-size: 48px !important;
    line-height: 60px !important;
  }
}

#forex-tabs .tabs-nav {
  background: linear-gradient(244.81deg, #1e95cb 16%, #11377c 84%);
}

#forex-tabs .tab-nav.active {
  color: #12225c;
  background: #fff;
}

/* Pricing 行情表（与官网内联样式一致，原页 #forex-table 区块） */
@media (min-width: 768px) {
  #forex-table .market-prices__content {
    box-shadow: 0 0 10px 0 rgb(0 0 0 / 14%);
    border-radius: 10px;
    padding: 0 30px 10px;
  }
}

#forex-table .market-prices .pricing-tabs--market-tabs {
  overflow-x: auto;
  white-space: nowrap;
}

#forex-table .pricing-tabs-wrapper {
  background: linear-gradient(244.81deg, #1e95cb 16%, #11377c 84%);
  margin: 0 -30px;
  padding: 30px 30px 1px;
  border-radius: 10px 10px 0 0;
}

#forex-table .pricing-tabs--market-tabs {
  border-bottom: none;
}

#forex-table .pricing-tabs__tab--selected {
  border-bottom: 3px solid #fff;
}

#forex-table .pricing-tabs__tab {
  color: #fff;
  padding: 15px 30px;
}

#forex-table .pricing-tabs-wrapper.gradient-right .pricing-tabs::after {
  background: linear-gradient(to right, transparent, #fff);
  width: 20px;
}

#forex-table .pricing-tabs-wrapper.gradient-left .pricing-tabs::before {
  background: linear-gradient(to right, transparent, #fff);
  width: 20px;
}

#forex-table .pricing-tabs::-webkit-scrollbar {
  display: none;
}

#forex-table .pricing-search-bar__input {
  min-width: 300px;
}

@media (max-width: 767px) {
  /* 父级勿裁切负 margin / 全宽渐变条 */
  #forex-table,
  #forex-table .component-content,
  #forex-table .market-prices,
  #forex-table .market-prices__content {
    overflow: visible;
  }

  #forex-table .pricing-tabs-wrapper {
    width: calc(100% + 30px);
    max-width: none;
    margin: 15px -15px;
    padding: 30px 15px 1px;
    border-radius: 0;
    box-sizing: border-box;
    background: linear-gradient(244.81deg, #1e95cb 16%, #11377c 84%);
  }

  #forex-table .pricing-tabs__tab {
    padding: 15px 20px;
  }

  #forex-table .pricing-search-bar__input {
    min-width: 0;
    width: 100%;
  }
}

.dropdown-list.open {
  display: block !important;
}

/*
 * 移动端 Mega Menu 二级菜单（仅 max-width:1024px）
 * 官网依赖 HeaderWithMegamenu JS；此处只补 drill-down，不覆盖 PC 样式。
 */
@media (max-width: 1024px) {
  /*
   * 展开汉堡菜单：与官网一致，navigation 绝对定位在顶栏下、随内容撑开；
   * 超出视口时由 .stx-navigation 整体滚动（非 megamenu 固定高度区域）。
   */
  .menu-visible.header-with-megamenu.new-header {
    overflow: visible;
  }

  /* 官网移动端顶栏固定 49px；勿用 height:auto（会塌成 logo 30px） */
  #wrapper .menu-visible.header-with-megamenu.new-header,
  .header-with-megamenu.new-header.menu-visible {
    height: 49px !important;
    min-height: 49px;
  }

  /* 顶栏（含语言下拉）始终在展开的导航菜单之上 */
  .header-with-megamenu.new-header .stx-main-bar {
    position: relative;
    z-index: 1002;
  }

  .menu-visible.header-with-megamenu.new-header .stx-main-bar {
    height: 49px !important;
    min-height: 49px;
  }

  .menu-visible.header-with-megamenu.new-header .stx-navigation {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    position: absolute !important;
    top: 49px;
    left: 0;
    right: 0;
    width: 100% !important;
    height: auto !important;
    max-height: calc(100dvh - 49px);
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 999;
    background: #fff;
  }

  .menu-visible.header-with-megamenu.new-header .stx-navigation .stx-megamenu,
  .menu-visible.header-with-megamenu.new-header
    .stx-navigation
    .stx-megamenu.stx-megamenu--no-marketing-image-on-mobile {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: auto !important;
    width: 100% !important;
    overflow: visible !important;
    flex-direction: column;
    position: relative;
  }

  .menu-visible.header-with-megamenu.new-header .stx-navigation .stx-bottom-buttons {
    display: flex !important;
  }

  /* 进入子菜单后隐藏其它一级项 */
  .menu-visible.header-with-megamenu.new-header.mobile-drilldown
    .stx-navigation
    .stx-megamenu__item--main.level-0.mobile-hidden {
    display: none !important;
  }

  .menu-visible.header-with-megamenu.new-header
    .stx-navigation
    .stx-megamenu__item--main.level-0.active
    > label {
    display: none !important;
  }

  /*
   * 官网 .active 时用 display:contents，在 Vue 壳层下子菜单常无法展开；
   * 改为 block 布局，并保留 submenu-container 纵向排列。
   */
  .menu-visible.header-with-megamenu.new-header
    .stx-navigation
    .stx-megamenu
    .stx-megamenu__item--main.stx-megamenu__item--main.active
    > .stx-megamenu__inner {
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    min-height: auto !important;
    padding: 0 16px 24px !important;
    background: #fff;
  }

  .menu-visible.header-with-megamenu.new-header
    .stx-navigation
    .stx-megamenu
    .stx-megamenu__item--main.stx-megamenu__item--main.active
    .stx-main--megamenu__inner_iconlinks {
    display: none !important;
  }

  .menu-visible.header-with-megamenu.new-header
    .stx-navigation
    .stx-megamenu__item--main.stx-megamenu__item--main.active
    .stx-back-button {
    display: block !important;
    width: 100%;
    text-align: left;
    padding: 12px 0;
    margin: 0;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }

  .menu-visible.header-with-megamenu.new-header
    .stx-navigation
    .stx-megamenu
    .stx-megamenu__item--main.stx-megamenu__item--main.active
    .stx-megamenu__container {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  .menu-visible.header-with-megamenu.new-header
    .stx-navigation
    .stx-megamenu
    .stx-megamenu__item--main.stx-megamenu__item--main.active
    .stx-megamenu__submenu-container {
    display: flex !important;
    flex-direction: column !important;
  }

  .menu-visible.header-with-megamenu.new-header
    .stx-navigation
    .stx-megamenu
    .stx-megamenu__item--main.stx-megamenu__item--main.active
    .stx-megamenu__submenu {
    display: block !important;
    margin-bottom: 24px;
  }
}

#hpheader h1 {
  font-weight: 300;
}

#hppromocontainer {
  margin-top: 140px;
}

html[lang='zh-CN'] .stx-megamenu__link,
html[lang='zh-CN'] .button-with-image-gradient,
html[lang='zh-CN'] .tab-nav {
  line-height: 1.35;
  word-break: keep-all;
}

html[lang='zh-CN'] .mi-related-article__title {
  line-height: 1.4;
}

.card-simple-dark .card-desc a {
  text-decoration: underline !important;
  color: #fff !important;
}

@media (max-width: 768px) {
  #hppromocontainer {
    margin-bottom: -25px;
  }
}

@media (min-width: 992px) {
  #hpheader .callout-body {
    width: 50%;
  }

  #hpheader {
    background-position: calc(70% - 0px) calc(50% + 0px) !important;
  }
}

@media (max-width: 991px) {
  #hpheader {
    background-image: none !important;
  }
}

/* ========== 内页（菜单子页面） ========== */
body.is-inner-page {
  background: #f9f9fc;
}

body.is-inner-page .inner-page-content > .row {
  flex-direction: column;
}

/* Hero */
body.is-inner-page .inner-page-hero {
  background: linear-gradient(244.81deg, #1e95cb 16%, #11377c 84%);
  padding: 48px 0 56px;
}

body.is-inner-page .inner-page-hero .field-pageheadingtitle {
  color: #fff;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.15;
  margin-bottom: 16px;
}

body.is-inner-page .inner-page-hero .field-pageheadingclarifyingtext {
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 8px;
}

body.is-inner-page .page-hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* 区块容器 */
body.is-inner-page .inner-page-section .component-content > .row {
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

body.is-inner-page .inner-page-section--alt {
  background: #fff;
}

body.is-inner-page .section-title .field-title {
  text-align: center;
  font-weight: 300;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.25;
  color: #12225c;
  margin-bottom: 12px;
}

body.is-inner-page .section-title .field-subtitle {
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(18, 34, 92, 0.75);
  max-width: 720px;
  margin: 0 auto 8px;
}

/* 特性卡片网格 */
body.is-inner-page .inner-page-cards > .component-content {
  display: block !important;
  width: 100%;
  max-width: none !important;
  padding: 0 !important;
}

body.is-inner-page .inner-page-card-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100% !important;
  flex-wrap: unset !important;
}

body.is-inner-page .inner-page-card-grid .card-simple {
  max-width: none !important;
  width: 100% !important;
  height: 100%;
  margin: 0 !important;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(18, 34, 92, 0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}

body.is-inner-page .inner-page-card-grid .card-simple:hover {
  box-shadow: 0 8px 24px rgba(18, 34, 92, 0.12);
  transform: translateY(-2px);
}

body.is-inner-page .inner-page-card-grid .card-desc p {
  margin: 0;
  color: rgba(18, 34, 92, 0.85);
}

body.is-inner-page .inner-page-card-grid .arrow-link a {
  font-weight: 600;
  color: #12225c;
}

@media (max-width: 991px) {
  body.is-inner-page .inner-page-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  body.is-inner-page .inner-page-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 链接磁贴 */
body.is-inner-page .inner-page-tile-wrap {
  width: 100%;
}

body.is-inner-page .inner-page-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

body.is-inner-page .inner-page-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 16px 20px;
  border: 1px solid #12225c;
  border-radius: 10px;
  background: #fff;
  color: #12225c;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

body.is-inner-page .inner-page-tile:hover {
  background: #12225c;
  color: #fff;
  box-shadow: 0 4px 16px rgba(18, 34, 92, 0.2);
}

/* 富文本区块 */
body.is-inner-page .inner-page-rich {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(18, 34, 92, 0.9);
}

body.is-inner-page .inner-page-rich ul {
  padding-left: 1.25rem;
  margin: 12px 0;
}

body.is-inner-page .inner-page-rich li {
  margin-bottom: 8px;
}

/* 底部 CTA */
body.is-inner-page .inner-page-bottom-cta {
  background: linear-gradient(244.81deg, #12225c 16%, #0a1640 84%);
}

body.is-inner-page .inner-page-bottom-cta__inner {
  text-align: center;
  padding: 56px 24px;
  color: #fff;
}

body.is-inner-page .inner-page-bottom-cta .field-title {
  color: #fff;
  font-weight: 300;
  font-size: clamp(28px, 3.5vw, 36px);
  margin-bottom: 12px;
}

body.is-inner-page .inner-page-bottom-cta .field-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  margin-bottom: 28px;
}

body.is-inner-page .inner-page-bottom-cta__buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
