/* ===== Header styles ===== */
header {
  background-color: transparent;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background-color: var(--bg-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  height: 36px;
  margin-right: 12px;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ===== PC 导航 ===== */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  margin-right: 90px;
}

.nav-links li {
  margin-left: 35px;
}

.nav-links li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  padding: 5px 15px;
  border-radius: 404px;
  transition: all 0.3s ease;
  font-weight: 400;
  white-space: nowrap;
}

.nav-links li a:hover,
.nav-links li a.active {
  background-color: #fff;
  color: var(--primary-color);
}

/* ===== 咨询热线 ===== */
.hotline {
  color: #ffffff;
  font-size: 14px;
  display: flex;
  align-items: center;
  font-weight: 500;
  flex-shrink: 0;
}

.hotline img {
  height: 14px;
  margin-right: 6px;
}

/* ===== 移动端菜单按钮 ===== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== 移动端抽屉遮罩 ===== */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: flex-start;
  align-items: stretch;
}

.mobile-nav-overlay.open {
  display: flex;
}

/* ===== 移动端抽屉 ===== */
.mobile-nav-drawer {
  width: 300px;
  max-width: calc(100vw - 48px);
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  animation: slideRight 0.3s ease-out;
  box-sizing: border-box;
}

.drawer-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-header .logo img {
  height: 30px;
}

.drawer-close-btn {
  font-size: 32px;
  color: #999;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-nav-links {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.mobile-nav-link {
  display: block;
  padding: 15px 25px;
  font-size: 16px;
  color: #333;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary-color);
  background: #f0fbfc;
  border-left-color: var(--primary-color);
}

.mobile-hotline {
  display: flex;
  align-items: center;
  padding: 15px 25px;
  margin-top: 20px;
  border-top: 1px solid #eee;
  color: var(--text-gray);
  font-size: 14px;
  font-weight: 500;
}

.mobile-hotline img {
  width: 14px;
  margin-right: 8px;
}

/* ===== 抽屉滑入动画 ===== */
@keyframes slideRight {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* ===== Footer styles ===== */
footer {
  background-color: var(--bg-dark);
  padding: 55px 0 0 0;
  color: #ffffff;
}

.footer-content {
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: 2fr 2fr 1.5fr 1.5fr;
  gap: 45px;
}

.footer-logo {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.footer-logo img {
  height: 107px;
  margin-right: 14px;
  object-fit: cover;
}

.footer-logo-text {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 10px;
  display: flex;
  align-items: start;
  color: white;
}

.footer-img-log {
  margin-right: 10px;
  width: 15px;
}

.footer-img-log2 {
  margin-top: 4px;
  margin-right: 10px;
  width: 3px;
}

.footer-logo-text2 {
  margin-top: 10px;
  display: flex;
  align-items: top;
}

.footer-logo-text2-img {
  margin-top: 6px;
  margin-right: 10px;
  width: 15px;
  height: max-content;
}

.footer-col h4 {
  font-size: 15px;
  color: #fff;
  font-weight: 400;
}

.dibucaid {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

.footer-col p {
  font-size: 10px;
  color: #c5cbd0;
  line-height: 1.3;
}

.footer-col .phone {
  margin-left: 24px;
  font-size: 20px;
  color: #fff;
}

.footer-col .qrcode {
  width: 95px;
  height: 95px;
  margin-top: 10px;
  border-radius: 6px;
}

.copyright {
  text-align: center;
  padding: 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 10px;
  /* margin-top: 20px; */
}

/* ===== Sidebar styles (统一) ===== */
.sidebar-icons {
  position: fixed;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.sidebar-icons .sidebar-item {
  padding-top: 5px;
  width: 58px;
  height: 58px;
  background-color: #24a8b6;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3), -1px -1px 4px rgba(255, 255, 255, 0.1);
  position: relative;
  color: #ffffff;
}

.sidebar-icons .sidebar-item img {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}

.sidebar-icons .sidebar-item span {
  font-size: 9px;
  font-weight: 100;
}

.sidebar-icons .sidebar-item:hover {
  background-color: var(--primary-dark);
  box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.4), -1px -1px 6px rgba(255, 255, 255, 0.15);
  transform: translateX(-2px);
}

.qrcode-popup {
  position: absolute;
  right: 68px;
  top: 134%;
  transform: translateY(-50%);
  background-color: #ffffff;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.2), -2px -2px 8px rgba(0, 0, 0, 0.05);
  display: none;
  z-index: 1001;
  text-align: left;
  border: 1px solid #e0e0e0;
  flex-direction: column;
  align-items: center;
}

.qrcode-popup::after {
  content: "";
  position: absolute;
  right: -10px;
  border-style: solid;
  border-color: transparent transparent transparent #ffffff;
  border-width: 8px 0 8px 10px;
}

.qrcode-popup-img {
  width: 100px !important;
  height: 100px !important;
  border-radius: 4px;
  float: left;
}

.qrcode-popup p {
  font-size: 12px;
  color: #333333;
  margin: 0;
  line-height: 1.6;
}

.qrcode-popup p:first-of-type {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.qrcode-popup p:last-of-type {
  font-size: 11px;
  color: #999999;
  margin-top: 5px;
}

.sidebar-icons .sidebar-item:hover .qrcode-popup {
  display: flex;
}

.sidebar-icons .sidebar-item img[alt="返回顶部"] {
  width: 18px !important;
  height: 23px !important;
  object-fit: contain;
}

/* ===== Responsive - 移动端适配 ===== */
@media (max-width: 900px) {
  .nav-menu,
  .header-content .hotline {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 768px) {
  header {
    height: var(--header-height-mobile);
  }

  .logo img {
    height: 26px;
  }

  .mobile-menu-btn {
    gap: 4px;
    padding: 6px;
  }

  .mobile-menu-btn span {
    width: 20px;
    height: 2px;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .mobile-nav-link {
    padding: 14px 22px;
    font-size: 15px;
  }

  .drawer-header .logo img {
    height: 26px;
  }

  .drawer-close-btn {
    font-size: 28px;
  }

  /* 页脚移动端 */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-logo-text {
    justify-content: center;
  }

  .footer-logo-text2 {
    justify-content: center;
  }

  .footer-col .phone {
    margin-left: 0;
  }

  .sidebar-icons {
    display: none;
  }
}
