/* ==========================================================================
   三体云动官网风格导航栏样式 (对齐 www.styd.cn)
   ========================================================================== */

body {
  padding-top: 64px !important;
}

.site-content {
  padding-top: 20px !important;
}

/* 隐藏旧版旧样式 */
#masthead.site-header {
  display: none !important;
}

/* 导航容器与外框 */
.header-wrap {
  position: fixed;
  top: 0;
  left: 0;
  height: 64px;
  width: 100%;
  z-index: 999;
  background: #ffffff;
  border-bottom: 1px solid #e8ebf1;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.03);
}

.header-wrap * {
  box-sizing: border-box;
}

.header-wrap a,
.header-wrap a:hover,
.header-wrap a:focus,
.header-wrap a:active,
.header-wrap a:visited,
.header-wrap span,
.header__menu-item,
.header__menu-item:hover,
.header__menu-item:focus,
.header__menu-item:active {
  text-decoration: none !important;
}

.header {
  height: 64px;
  max-width: 1240px;
  padding: 0 20px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__left,
.header__right {
  display: flex;
  align-items: center;
}

/* 品牌 Logo */
.header__logo {
  width: 121px;
  height: 32px;
  background-image: url(https://styd-frontend.styd.cn/images/www/styd/logo.png);
  background-repeat: no-repeat;
  background-size: 100%;
  display: block;
  flex-shrink: 0;
}

/* 菜单项 */
.header__menu {
  display: flex;
  padding-left: 20px;
  margin: 0;
  list-style: none;
}

.header__menu-item {
  display: block;
  padding: 21px 16px;
  font-size: 16px;
  line-height: 22px;
  color: #000000;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header__menu-item span {
  transition: color 0.2s ease;
}

.header__menu-item:hover > span,
.header__menu-item:hover > span > a {
  color: #3f66f6 !important;
}

.header__menu-item a,
.header__menu-item:visited,
.header__menu-item a:visited {
  color: #000000;
  text-decoration: none;
}

/* 当前激活状态 */
.header__menu--energize #headerEnergize > span,
.header__menu-item--active > span {
  color: #3f66f6 !important;
  font-weight: 500;
}

/* 更多下拉图标 */
.header__menu-item--more::after {
  content: "";
  display: inline-block;
  margin-left: 4px;
  width: 12px;
  height: 12px;
  background: url(https://styd-frontend.styd.cn/images/www/styd/arrow-down.png) no-repeat;
  background-size: 12px;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.header__menu-item--energize.header__menu-item--more::after {
  transform: rotate(180deg);
}

/* 赋能全屏宽下拉卡片浮层 */
.header__energize-wrap {
  position: absolute;
  top: 64px;
  left: 0;
  width: 100%;
  background: #ffffff;
  opacity: 0;
  height: 0;
  border-top: 1px solid #e8ebf1;
  border-bottom: 1px solid #e8ebf1;
  visibility: hidden;
  box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.06);
  transition-property: height, opacity, visibility;
  transition: opacity 0.3s ease-in, visibility 0.3s ease-in;
  overflow: hidden;
}

.header__menu-item--energize .header__energize-wrap {
  height: auto;
  opacity: 1;
  padding-top: 40px;
  visibility: visible;
}

.header__energize {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
}

.header__energize-item {
  display: flex;
  margin-bottom: 40px;
  width: 33.333%;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.header__energize-item:hover {
  text-decoration: none;
}

.header__energize-img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.header__energize-img img {
  width: 100%;
  height: 100%;
  display: block;
}

.header__energize-info {
  padding-left: 16px;
}

.header__energize-title {
  padding-top: 9px;
  padding-bottom: 9px;
  font-weight: 500;
  color: #000000;
  font-size: 16px;
  line-height: 22px;
  transition: color 0.2s ease;
}

.header__energize-item:hover .header__energize-title,
.header__energize-item--active .header__energize-title {
  color: #3f66f6 !important;
}

.header__energize-desc {
  width: 272px;
  color: #91959f;
  font-size: 16px;
  line-height: 24px;
}

/* 搜索功能 */
.header__search {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 18px;
}

.header__search-trigger {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555862;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.header__search-trigger:hover,
.header__search--open .header__search-trigger {
  background-color: #f5faff;
  color: #3f66f6;
}

.header__search-dropdown {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  width: 320px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e8ebf1;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 300;
}

.header__search--open .header__search-dropdown {
  display: block;
  animation: headerFadeIn 0.2s ease;
}

.header__search-form {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.header__search-input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: #333333;
  border: 1px solid #e5e9ee;
  border-radius: 4px 0 0 4px;
  outline: none;
  background: #f8faff;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header__search-input:focus {
  border-color: #3f66f6;
  background: #ffffff;
}

.header__search-submit {
  height: 38px;
  padding: 0 16px;
  background: #3f66f6;
  color: #ffffff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.header__search-submit:hover {
  background: #375eeb;
}

/* 登录菜单 */
.header__login {
  position: relative;
  color: #000000;
  padding: 21px 0;
  font-size: 16px;
  line-height: 22px;
  cursor: pointer;
  white-space: nowrap;
}

.header__login span {
  cursor: pointer;
  transition: color 0.2s ease;
}

.header__login:hover > span {
  color: #3f66f6;
}

.header__login::after {
  content: "";
  display: inline-block;
  margin-left: 2px;
  width: 12px;
  height: 12px;
  background: url(https://styd-frontend.styd.cn/images/www/styd/arrow-down.png) no-repeat;
  background-size: 12px;
  vertical-align: middle;
}

.header__login--hover .header__login-wrap {
  display: block;
}

.header__login-wrap {
  display: none;
  position: absolute;
  margin-top: 14px;
  left: -22px;
  width: 160px;
  height: 112px;
  box-shadow: 0px 0px 4px 4px rgba(145, 145, 146, 0.08);
  border: 1px solid #e8ebf1;
  background: #ffffff;
  border-radius: 4px;
  z-index: 300;
}

.header__login-wrap::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 26px;
  display: block;
  width: 14px;
  height: 8px;
  background: url(https://styd-frontend.styd.cn/images/www/styd/login-arrow-top.png) no-repeat;
  background-size: 14px 8px;
}

.header__login-item {
  cursor: pointer;
  padding-left: 23px;
  height: 40px;
  display: flex;
  align-items: center;
  color: #000000;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.header__login-item:visited {
  color: #000000;
}

.header__login-item:hover {
  background: rgba(232, 235, 241, 0.5);
  color: #3f66f6;
}

.header__login-item:first-child {
  margin-top: 16px;
}

.header__login-item--pro::after {
  content: "";
  display: inline-block;
  margin-left: 4px;
  width: 30px;
  height: 16px;
  background: url(https://styd-frontend.styd.cn/images/www/styd/icon-pro.png) no-repeat;
  background-size: 30px 16px;
}

/* 免费体验按钮 */
.header__experience {
  cursor: pointer;
  margin-left: 28px;
  width: 104px;
  height: 34px;
  color: #ffffff !important;
  font-size: 16px;
  line-height: 34px;
  text-align: center;
  background: #3f66f6;
  border-radius: 17px;
  text-decoration: none;
  display: inline-block;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.header__experience:hover {
  background: #375eeb;
  color: #ffffff !important;
  text-decoration: none;
}

/* 移动端汉堡按钮（默认 PC 隐藏） */
.header__right-menu {
  display: none;
}

/* 移动端内置搜索框（PC 隐藏） */
.header__mobile-search {
  display: none;
}

@keyframes headerFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 针对 1024px ~ 1200px 屏幕略微收紧菜单内边距 */
@media only screen and (min-width: 1025px) and (max-width: 1200px) {
  .header__menu {
    padding-left: 10px;
  }
  .header__menu-item {
    padding: 21px 10px;
    font-size: 15px;
  }
  .header__experience {
    margin-left: 16px;
  }
}

/* 针对 769px ~ 1024px 平板横屏/小屏电脑 */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
  .header__menu {
    padding-left: 6px;
  }
  .header__menu-item {
    padding: 21px 6px;
    font-size: 13px;
  }
  .header__logo {
    width: 105px;
    height: 28px;
  }
  .header__experience {
    margin-left: 10px;
    width: 84px;
    height: 30px;
    line-height: 30px;
    font-size: 13px;
  }
  .header__search {
    margin-right: 8px;
  }
}

/* PC 端隐藏移动端抽屉专属的登录按钮 */
.header__mobile-login {
  display: none !important;
}

/* ==========================================================================
   移动端响应式 (<= 768px)
   ========================================================================== */
@media only screen and (max-width: 768px) {
  body {
    padding-top: 13.33333333vw !important;
  }

  /* 顶部导航条：固定在视口最上方，高度 13.33vw，z-index 高于一切抽屉内容 */
  .header-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 13.33333333vw !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e8ebf1 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
    z-index: 1002 !important;
  }

  .header-wrap .header {
    width: 100% !important;
    height: 100% !important;
    padding: 0 4.26666667vw !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .header-wrap .header__left {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .header-wrap .header__logo {
    display: block !important;
    width: 26.4vw !important;
    max-width: 120px !important;
    height: 6.93333333vw !important;
    max-height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    background-image: url(https://styd-frontend.styd.cn/images/www/styd/logo-h5.png) !important;
    background-size: contain !important;
    background-position: left center !important;
    background-repeat: no-repeat !important;
  }

  .header-wrap .header__right {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 严禁 PC 端右侧内容在移动端显示，彻底杜绝把登录按钮挤进顶栏 */
  .header-wrap .header__right .header__login,
  .header-wrap .header__right .header__experience,
  .header-wrap .header__right .header__search {
    display: none !important;
  }

  /* 汉堡按钮 / 关闭按钮：在顶部导航条右侧垂直居中 */
  .header-wrap .header__right-menu {
    width: 5.06666667vw !important;
    height: 5.06666667vw !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    background: url(https://styd-frontend.styd.cn/images/www/styd/h5-menu-icon.png) no-repeat center !important;
    background-size: 100% 100% !important;
    display: block !important;
    cursor: pointer !important;
    margin: 0 !important;
    position: static !important;
  }

  .header-wrap .header__right-menu--close {
    background-image: url(https://styd-frontend.styd.cn/images/www/styd/h5-close-icon.png) !important;
  }

  /* 展开状态下：顶部导航条尺寸和定位保持不变，始终为 13.33vw 高度 */
  .header-wrap--show {
    height: 13.33333333vw !important;
    overflow: visible !important;
  }

  .header-wrap--show .header {
    display: flex !important;
    height: 100% !important;
  }

  .header-wrap--show .header__left {
    display: flex !important;
    width: auto !important;
  }

  .header-wrap--show .header__logo {
    display: block !important;
    width: 26.4vw !important;
    max-width: 120px !important;
    height: 6.93333333vw !important;
    max-height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 抽屉菜单内容：作为独立全屏面板精确置于顶栏正下方滚动，无论怎么滑都不会遮挡顶栏 */
  .header-wrap .header__menu {
    display: none !important;
  }

  .header-wrap--show .header__menu {
    display: block !important;
    position: fixed !important;
    top: 13.33333333vw !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(100vh - 13.33333333vw) !important;
    height: calc(100dvh - 13.33333333vw) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #ffffff !important;
    padding: 0 4.26666667vw 25vw 4.26666667vw !important;
    z-index: 1001 !important;
    box-sizing: border-box !important;
  }

  /* 移动端搜索框：精致现代胶囊形态，彻底清除内外部边框污染与双重框 */
  .header-wrap--show .header__mobile-search {
    display: block !important;
    padding: 14px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid #e8ebf1 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
  }

  .header-wrap--show .header__mobile-search-form {
    display: flex !important;
    align-items: center !important;
    background: #f5faff !important;
    border: 1px solid #d4e2f6 !important;
    border-radius: 20px !important;
    padding: 0 4px 0 14px !important;
    height: 40px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .header-wrap--show input[type="search"].header__mobile-search-input,
  .header-wrap--show .header__mobile-search-input {
    flex: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    line-height: 38px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 14px !important;
    color: #333333 !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
  }

  .header-wrap--show .header__mobile-search-input::placeholder {
    color: #999999 !important;
    font-size: 14px !important;
  }

  .header-wrap--show button.header__mobile-search-submit,
  .header-wrap--show .header__mobile-search-submit {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: #3f66f6 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
  }

  .header-wrap--show .header__mobile-search-submit svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    stroke: #3f66f6 !important;
  }

  /* 菜单条目 */
  .header-wrap--show .header__menu-item {
    display: block !important;
    padding: 14px 0 !important;
    font-size: 15px !important;
    line-height: 22px !important;
    border-top: 1px solid #e8ebf1 !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
  }

  .header-wrap--show .header__menu-item:first-of-type {
    border-top: none !important;
  }

  .header-wrap--show .header__menu-item > span,
  .header-wrap--show .header__menu-item > span > a {
    color: #1a1a1a !important;
    text-decoration: none !important;
  }

  .header-wrap--show .header__menu-item:hover > span,
  .header-wrap--show .header__menu-item:hover > span > a,
  .header-wrap--show .header__menu-item:active > span,
  .header-wrap--show .header__menu-item:active > span > a {
    color: #000000 !important;
    text-decoration: none !important;
  }

  .header-wrap--show .header__menu-item:last-child {
    border-bottom: 1px solid #e8ebf1 !important;
  }

  .header-wrap--show .header__menu-item--more::after {
    display: none !important;
  }

  .header-wrap--show .header__menu > #headerEnergize {
    position: relative !important;
    cursor: pointer !important;
  }

  .header-wrap--show .header__menu > #headerEnergize::after {
    content: "" !important;
    position: absolute !important;
    top: 16px !important;
    right: 0 !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    background: url(https://styd-frontend.styd.cn/images/www/styd/h5-arrow-down.png) no-repeat center !important;
    background-size: 100% !important;
    transition: transform 0.2s !important;
  }

  .header-wrap--show .header__menu > #headerEnergize.header__menu-item--energize .header__energize-wrap {
    display: block !important;
    padding-top: 14px !important;
  }

  .header-wrap--show .header__menu > #headerEnergize.header__menu-item--energize::after {
    background-image: url(https://styd-frontend.styd.cn/images/www/styd/h5-arrow-up.png) !important;
  }

  .header-wrap--show .header__energize-wrap {
    display: none;
    position: static !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .header-wrap--show .header__energize {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    box-shadow: none !important;
  }

  .header-wrap--show .header__energize-item {
    flex: none !important;
    width: 50% !important;
    height: 36px !important;
    margin-bottom: 8px !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
  }

  .header-wrap--show .header__energize-info {
    padding-left: 0 !important;
  }

  .header-wrap--show .header__energize-title {
    color: #91959f !important;
    font-weight: 400 !important;
    height: 100% !important;
    line-height: 36px !important;
    padding: 0 6px !important;
    font-size: 13px !important;
    text-decoration: none !important;
  }

  .header-wrap--show .header__energize-title:active,
  .header-wrap--show .header__energize-item--active .header__energize-title {
    color: #3f66f6 !important;
    background: rgba(63, 102, 246, 0.1) !important;
    border-radius: 2px !important;
  }

  .header-wrap--show .header__energize-desc,
  .header-wrap--show .header__energize-img {
    display: none !important;
  }

  /* 移动端抽屉底部的专属登录按钮：排在所有菜单项的最下方 */
  .header-wrap--show .header__mobile-login {
    display: block !important;
    width: 100% !important;
    padding: 24px 0 32px 0 !important;
    margin-top: 12px !important;
  }

  .header-wrap--show .header__mobile-login-item {
    display: flex !important;
    padding: 0 !important;
    width: 240px !important;
    max-width: 80% !important;
    height: 42px !important;
    line-height: 42px !important;
    border-radius: 24px !important;
    margin: 0 auto 16px auto !important;
    border: 1px solid #d0dbed !important;
    justify-content: center !important;
    align-items: center !important;
    color: #3f66f6 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
  }

  .header-wrap--show .header__mobile-login-item:hover,
  .header-wrap--show .header__mobile-login-item:active {
    background: #f5faff !important;
    color: #3f66f6 !important;
    border-color: #3f66f6 !important;
  }
}
