/* 双层导航：顶栏 Logo+电话 + 全宽红色导航条；滚动后仅导航条吸顶 */
:root {
  --hl-header-top-h: 92px;
  --hl-header-logo-pad: 10px;
  --hl-header-nav-inner-h: 52px;
  --hl-header-nav-pad: 10px;
  --hl-header-nav-h: calc(var(--hl-header-nav-inner-h) + var(--hl-header-nav-pad) * 2);
  --hl-header-total-h: calc(var(--hl-header-top-h) + var(--hl-header-nav-h));
}

.headerbox {
  position: relative;
  z-index: 35;
}

.bocweb-header {
  position: relative !important;
  width: 100%;
  height: auto !important;
  line-height: normal !important;
  top: auto !important;
  left: auto !important;
  background: transparent;
}

/* 首页 Banner 上：未吸顶前整体浮在 Banner 上 */
body.white .bocweb-header:not(.nav-sticky) {
  position: absolute !important;
  top: 0;
  left: 0;
}

/* 二级栏目 Banner 上：未吸顶前浮在 Banner 上 */
body.active .bocweb-header:not(.nav-sticky) {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 35;
}

.bocweb-header .header-top {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #eee;
  transition: background 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

body.white .bocweb-header:not(.nav-sticky):not(.on) .header-top {
  background: transparent;
  border-bottom-color: transparent;
}

.bocweb-header.on:not(.nav-sticky) .header-top {
  background: #fff;
  border-bottom-color: #eee;
}

.bocweb-header.nav-sticky .header-top {
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden;
  opacity: 0;
  padding: 0 !important;
  margin: 0;
  border: none;
  pointer-events: none;
}

.bocweb-header .header-top-inner {
  width: 100%;
  max-width: none;
  padding: 0px 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.bocweb-header .header-phone {
  position: static;
  top: auto;
  right: auto;
  font-size: 20px;
  font-weight: bold;
  color: #e70012;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.bocweb-header .header-phone img {
  margin-right: 8px;
  vertical-align: middle;
}

.bocweb-header .header-nav-bar {
  width: 100%;
  padding: var(--hl-header-nav-pad) 0;
  line-height: normal;
  background: linear-gradient(90deg, #e70012 0%, #d40010 100%) !important;
  box-sizing: border-box;
  transition: box-shadow 0.3s ease;
}

/* 吸顶：仅导航条固定 */
.bocweb-header .header-nav-bar.is-sticky {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.bocweb-header.nav-sticky::after {
  content: "";
  display: block;
  height: var(--hl-header-nav-h);
}

.bocweb-header .bocweb-nav {
  float: none;
  width: 100%;
}

.bocweb-header .nav-box {
  position: relative;
  width: 100%;
  padding: 0 0 0 1.5rem;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  box-sizing: border-box;
}

.bocweb-header .nav-menu {
  display: flex;
  flex: 1;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
}

.bocweb-header .nav-li {
  padding: 0;
  font-size: 16px;
  position: relative;
  flex: 0 0 auto;
}

.bocweb-header .nav-li .nav-top {
  color: #fff !important;
  font-size: 16px;
  line-height: var(--hl-header-nav-inner-h);
  padding: 0 1.35rem;
  display: block;
  position: relative;
  transition: background 0.3s ease, color 0.3s ease;
}

.bocweb-header .nav-li .nav-top:after {
  top: auto;
  bottom: 0;
  height: 3px;
  background: #fff;
  opacity: 0;
}

.bocweb-header .nav-li:hover .nav-top,
.bocweb-header .nav-li.active .nav-top,
.bocweb-header .nav-li .nav-top.active {
  color: #fff !important;
  background: rgba(0, 0, 0, 0.12);
}

.bocweb-header .nav-li:hover .nav-top:after,
.bocweb-header .nav-li.active .nav-top:after,
.bocweb-header .nav-li .nav-top.active:after {
  opacity: 1;
}

.bocweb-header.on .nav-li .nav-top,
.bocweb-header.on .nav-li .nav-top:hover,
.bocweb-header.on .nav-li .nav-top.active,
body.active .bocweb-header .nav-li .nav-top,
body.active .bocweb-header .nav-li .nav-top:hover,
body.white .bocweb-header .nav-li .nav-top,
body.white .bocweb-header.on .nav-li .nav-top {
  color: #fff !important;
}

.bocweb-header .nav-li .nav-bot {
  top: 100% !important;
  left: 0 !important;
  right: auto;
  width: auto;
  min-width: 100%;
  max-width: 16rem;
  margin: 0;
  padding: 0;
  border: 1px solid #e5e5e5;
  border-top: 3px solid #e70012;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 210;
  box-sizing: border-box;
}

.bocweb-header .nav-li .nav-bot a,
.bocweb-header .nav-li .nav-bot .li {
  display: block;
  color: #666 !important;
  background: #fff !important;
  font-size: 14px;
  line-height: 1.35;
  padding: 0.55rem 1rem;
  white-space: nowrap;
  border-bottom: 1px solid #e5e5e5;
  transition: background 0.2s ease, color 0.2s ease;
}

.bocweb-header .nav-li .nav-bot a:last-child,
.bocweb-header .nav-li .nav-bot .li:last-child {
  border-bottom: none;
}

.bocweb-header .nav-li .nav-bot a:hover,
.bocweb-header .nav-li .nav-bot a.active,
.bocweb-header .nav-li .nav-bot .li:hover,
.bocweb-header .nav-li .nav-bot .li.active {
  background-color: #e70012 !important;
  color: #fff !important;
}

.bocweb-header .nav-li.active .nav-top:after {
  opacity: 0;
}

.bocweb-header .header-nav-search.top-form {
  position: relative;
  top: auto;
  right: auto;
  width: 15rem;
  min-width: 200px;
  max-width: 280px;
  height: var(--hl-header-nav-inner-h);
  padding: 0 12px 0 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.bocweb-header .header-nav-search .form {
  position: relative;
  width: 100%;
  height: 36px;
  top: auto;
  right: auto;
  border: none;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.bocweb-header .header-nav-search .form input[type="text"] {
  position: relative;
  width: 100%;
  height: 36px;
  line-height: 36px;
  padding: 0 2rem 0 1rem;
  font-size: 14px;
  color: #333;
  border: none;
  background: transparent;
  box-sizing: border-box;
}

.bocweb-header .header-nav-search .form input[type="submit"] {
  position: absolute;
  right: 12px;
  top: 0;
  bottom: 0;
  margin: auto;
}

.bocweb-header .bocweb-logo {
  width: auto;
  max-width: 210px;
  padding-top: var(--hl-header-logo-pad);
  padding-bottom: var(--hl-header-logo-pad);
  box-sizing: content-box;
}

.services-active,
.con-banner + .services-active {
  padding-top: var(--hl-header-total-h);
}

body.nav-is-sticky .services-active {
  padding-top: calc(var(--hl-header-total-h) - var(--hl-header-top-h) + var(--hl-header-nav-h));
}

@media (max-width: 1200px) {
  .bocweb-header .nav-li .nav-top {
    padding: 0 0.85rem;
    font-size: 15px;
  }

  .bocweb-header .header-nav-search.top-form {
    width: 12rem;
    min-width: 160px;
  }
}

@media (max-width: 1023px) {
  .bocweb-header .header-top-inner {
    padding: 12px 1rem;
  }
}
