/* ========== 全局基础样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", sans-serif;
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  overflow-x: hidden; /* 禁止横向滚动 */
  -webkit-overflow-scrolling: touch; /* iOS顺滑滚动 */
}

body {
  min-height: 100vh;
  background: #fff;
}

/* ========== 全局链接重置（最精简、最强兼容） ========== */
a {
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
}

/* ========== 全局变量 ========== */
:root {
  --main-green: #2E7D32;
  --light-green: #81C784;
  --white: #ffffff;
  --gray: #f5f5f5;
  --dark-text: #333333;
  --light-text: #666666;
  --border-color: #e5e5e5;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

/* ========== 导航栏 ========== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--white);
  padding: 12px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  z-index: 999;
  box-sizing: border-box;
}

/* Logo 区域 */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--main-green);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo span {
  color: var(--dark-text);
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.logo-main {
  font-size: 20px;
  font-weight: bold;
  color: var(--main-green);
}
.logo-sub {
  font-size: 12px;
  color: var(--dark-text);
}

/* 导航链接 */
.nav-links {
  display: flex;
  gap: 25px;
}
.nav-links a {
  color: var(--dark-text);
  font-weight: 500;
  transition: var(--transition);
  font-size: 15px;
}
.nav-links a.active,
.nav-links a:hover {
  color: var(--main-green);
}

/* ========== Logo 图片布局（独立优化版） ========== */
.logo-box {
  display: flex;
  align-items: center;
  text-decoration: none !important;
}
.logo-img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  margin-right: 10px;
}

/* ========== 移动端汉堡菜单按钮 ========== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.mobile-menu-btn span {
  width: 26px;
  height: 2px;
  background: var(--dark-text);
  transition: all 0.3s ease;
}
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ========== 移动端导航菜单 ========== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  flex-direction: column;
  padding: 15px 0;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}
.mobile-nav a {
  padding: 12px 5%;
  color: var(--dark-text);
  font-size: 16px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}
.mobile-nav a:last-child {
  border-bottom: none;
}
.mobile-nav a.active,
.mobile-nav a:hover {
  color: var(--main-green);
  background: var(--gray);
}
.mobile-nav.show {
  display: flex !important;
}

/* ========== 响应式导航栏 ========== */
@media (max-width: 768px) {
  .navbar {
    padding: 10px 3%;
    width: 100%;
    overflow-x: hidden;
  }
  .logo {
    gap: 8px;
  }
  .logo-img {
    width: 38px;
    height: 38px;
    margin-right: 8px;
  }
  .logo-main {
    font-size: 16px;
  }
  .logo-sub {
    font-size: 10px;
  }
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}