/* =========================================================
   common.css
   全站公共样式：基础样式、顶部导航、底部、通用按钮
   页面内容样式请写到各自独立 CSS 中
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: #222;
  background: #f5f5f5;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   全站导航栏：清华式透明渐变导航
   本体透明，只有上深下透的黑色渐变蒙层
========================================================= */

.site-header {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;

  width: 100%;
  height: 104px;
  padding: 0 9.5%;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;

  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;

  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  transition:
    height 0.35s ease,
    background 0.35s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.66) 32%,
    rgba(0, 0, 0, 0.34) 70%,
    rgba(0, 0, 0, 0.00) 100%
  );

  pointer-events: none;
  transition:
    opacity 0.35s ease,
    background 0.35s ease;
}

.site-header.is-scrolled {
  height: 88px;
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

.site-header.is-scrolled::before {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.72) 38%,
    rgba(0, 0, 0, 0.40) 76%,
    rgba(0, 0, 0, 0.00) 100%
  );
}

@media (min-width: 769px) {
  body .site-header::before {
    background: linear-gradient(
      180deg,
      rgba(8, 34, 28, 0.82) 0%,
      rgba(10, 48, 39, 0.60) 34%,
      rgba(12, 58, 47, 0.30) 72%,
      rgba(12, 58, 47, 0.00) 100%
    ) !important;
  }

  body .site-header.is-scrolled::before {
    background: linear-gradient(
      180deg,
      rgba(7, 31, 25, 0.88) 0%,
      rgba(9, 46, 37, 0.68) 38%,
      rgba(11, 55, 44, 0.36) 76%,
      rgba(11, 55, 44, 0.00) 100%
    ) !important;
  }
}

.site-logo {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.site-logo-icon {
  width: 58px !important;
  height: 58px !important;
  border-radius: 16px !important;

  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.26) !important;
  box-shadow: none !important;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 28px !important;
  font-weight: 900 !important;

  transition: all 0.35s ease;
}

.site-header.is-scrolled .site-logo-icon {
  width: 52px !important;
  height: 52px !important;
}

.site-logo-text h1 {
  margin: 0;
  color: #ffffff !important;
  font-size: 30px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}

.site-logo-text p {
  margin: 7px 0 0 !important;
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
  white-space: nowrap;
}

.site-nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 30px;
  white-space: nowrap;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 4px;

  color: rgba(255, 255, 255, 0.94) !important;
  background: transparent !important;

  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: 0.4px;
  text-decoration: none;

  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.site-nav a:hover {
  color: #ffffff !important;
  background: transparent !important;
  transform: translateY(-1px);
}

.site-nav a.is-active,
.site-nav a.nav-product.is-active {
  color: #ffffff !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
}

.site-nav a.nav-product {
  color: rgba(255, 255, 255, 0.94) !important;
}

.site-nav a.nav-product::before {
  display: none !important;
  content: none !important;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #ffffff !important;
  opacity: 0.95;
  transition: width 0.25s ease;
}

.site-nav a.is-active::after,
.site-nav a:hover::after {
  width: 28px !important;
}

.site-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 42px;
  min-width: 118px;
  padding: 0 22px;
  border-radius: 999px;

  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  box-shadow: none !important;

  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 0.4px;
  text-decoration: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.36);
  flex-shrink: 0;

  transition: all 0.25s ease;
}

.site-lang:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

@media (max-width: 1180px) {
  .site-header {
    height: 86px;
    padding: 0 24px !important;
  }

  .site-header.is-scrolled {
    height: 78px;
  }

  .site-logo-icon {
    width: 50px !important;
    height: 50px !important;
    border-radius: 14px !important;
  }

  .site-logo-text h1 {
    font-size: 24px !important;
  }

  .site-logo-text p {
    font-size: 12px !important;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 13px !important;
  }

  .site-lang {
    min-width: 92px;
    padding: 0 16px;
    font-size: 13px !important;
  }
}

@media (max-width: 768px) {
  .site-header {
    height: 70px;
    padding: 0 18px !important;
  }

  .site-header::before {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.58) 0%,
      rgba(0, 0, 0, 0.36) 68%,
      rgba(0, 0, 0, 0.00) 100%
    );
  }

  .site-header.is-scrolled {
    height: 66px;
  }

  .site-header.is-scrolled::before {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.66) 0%,
      rgba(0, 0, 0, 0.42) 72%,
      rgba(0, 0, 0, 0.00) 100%
    );
  }

  .site-logo-icon {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
  }

  .site-logo-text h1 {
    font-size: 22px !important;
  }

  .site-logo-text p {
    font-size: 12px !important;
    white-space: normal;
  }

  .site-nav,
  .site-lang {
    display: none !important;
  }
}

/* Shared vector brand mark. The fixed desktop slot preserves nav alignment. */
.site-logo.site-logo-brand {
  width: 395px;
  flex: 0 0 395px;
  justify-content: flex-start;
  gap: 4px;
  transform: translateY(-5px);
}

.site-brand-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin-right: -8px;
}

.site-brand-logo {
  display: block;
  width: 170px;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
  filter: none;
  transform: translateX(-30px) translateY(-4px) scale(1.18);
  transform-origin: left center;
}

.site-brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  transform: translateX(8px);
}

.site-brand-copy strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

.site-brand-copy span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13.5px;
  line-height: 1.2;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .site-logo.site-logo-brand {
    width: 312px;
    flex-basis: 312px;
  }

  .site-brand-logo {
    width: 132px;
    max-height: 38px;
  }

  .site-brand-copy strong {
    font-size: 15px;
  }

  .site-brand-copy span {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .site-logo.site-logo-brand {
    width: auto;
    gap: 0;
  }

  .site-brand-logo {
    width: 165px;
    max-height: 46px;
  }

  .site-brand-copy {
    display: none;
  }
}

.common-btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: bold;
  transition: 0.2s;
}

.common-btn-primary {
  background: #00a86b;
  color: #fff;
}

.common-btn-primary:hover {
  background: #078c5b;
}

.common-btn-light {
  background: #fff;
  color: #00a86b;
}

.common-btn-light:hover {
  background: #eef8f4;
}

.site-footer {
  padding: 24px 10px;
  background: #2b2b2b;
  color: #ddd;
  text-align: center;
  font-size: 15px;
}

@media (max-width: 1200px) {
  .site-header {
    padding: 14px 5%;
    flex-wrap: wrap;
  }

  .site-nav {
    height: auto;
    gap: 4px;
    font-size: 15px;
  }

  .site-nav a {
    padding: 12px 12px;
  }

  .site-nav a::after {
    left: 12px;
    right: 12px;
    bottom: -8px;
    height: 3px;
  }
}

@media (max-width: 768px) {
  .site-header {
    height: auto;
    padding: 18px 5%;
    flex-direction: column;
  }

  .site-logo-text p {
    white-space: normal;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    height: auto;
  }

  .site-nav a {
    padding: 10px 12px;
    border-radius: 8px;
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:hover,
  .site-nav a.is-active {
    background: #F3FAF5;
    color: #2F6F4E;
  }

  .site-lang {
    display: none;
  }
}


/* ================================
   返回顶部按钮
================================ */

.back-to-top {
  position: fixed;
  right: 34px;
  bottom: 38px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(210, 215, 222, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #5f6670;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.22s ease;
  z-index: 999;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.back-to-top.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-arrow {
  height: 16px;
  line-height: 14px;
  font-size: 22px;
  font-weight: 500;
  transform: translateY(1px);
}

.back-to-top-text {
  margin-top: 1px;
  line-height: 1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.back-to-top:hover {
  color: #2f6f4e;
  border-color: rgba(78, 159, 122, 0.45);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(47, 111, 78, 0.14);
}

.back-to-top:active {
  transform: translateY(1px);
}

@media (max-width: 768px) {
  .back-to-top {
    right: 18px;
    bottom: 24px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .back-to-top-arrow {
    font-size: 20px;
  }

  .back-to-top-text {
    font-size: 8px;
  }
}


/* =========================================================
   手机端响应式导航：仅补充导航栏，不改变页面主体布局
========================================================= */
.mobile-nav-toggle {
  display: none;
}

@media (max-width: 768px) {
  .site-header {
    height: 72px !important;
    min-height: 72px !important;
    padding: 0 18px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
  }

  .site-header::before {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.86) 0%,
      rgba(0, 0, 0, 0.68) 54%,
      rgba(0, 0, 0, 0.00) 100%
    ) !important;
  }

  .site-header.is-scrolled {
    height: 68px !important;
    min-height: 68px !important;
  }

  .site-logo {
    height: 72px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    gap: 10px !important;
  }

  .site-logo-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
    font-size: 22px !important;
    flex: 0 0 auto !important;
  }

  .site-logo-text {
    min-width: 0 !important;
  }

  .site-logo-text h1 {
    font-size: 21px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .site-logo-text p {
    margin-top: 4px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 170px !important;
  }

  .mobile-nav-toggle {
    position: relative;
    z-index: 1002;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .site-header.mobile-nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.mobile-nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.mobile-nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: absolute !important;
    left: 16px !important;
    right: 16px !important;
    top: 74px !important;
    z-index: 1001 !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(100vh - 96px) !important;
    overflow-y: auto !important;
    padding: 14px !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    background: rgba(8, 30, 24, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-10px) !important;
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease !important;
  }

  .site-header.mobile-nav-open .site-nav {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .site-nav a {
    width: 100% !important;
    height: 44px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    color: rgba(255, 255, 255, 0.92) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    text-shadow: none !important;
    transform: none !important;
  }

  .site-nav a::before,
  .site-nav a::after {
    display: none !important;
    content: none !important;
  }

  .site-nav a:hover,
  .site-nav a.is-active,
  .site-nav a.nav-product.is-active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(77, 159, 122, 0.44), rgba(54, 183, 166, 0.28)) !important;
  }

  .site-lang {
    display: none !important;
  }
}
