/* ============================================================
   COMMON.CSS — 全站共用样式
   包含：变量、重置、排版、容器、按钮、返回顶部、导航、页脚
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --green: #1D7A4A;
  --green-dark: #0F3D24;
  --green-light: #E6F2EB;
  --green-bg: #0F3D24;
  --gray-50: #F8FAF9;
  --gray-100: #F0F3F1;
  --gray-200: #E2E8E4;
  --gray-300: #C4CDC6;
  --gray-400: #9AADA2;
  --gray-500: #6B7F73;
  --gray-600: #4A5F52;
  --gray-700: #2A3A30;
  --gray-800: #1A2A20;
  --gray-900: #0F1A14;
  --white: #FFFFFF;
  --shadow: 0 2px 16px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.07);
  --radius: 14px;
}

/* ---------- 重置 & 基础排版 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--white);
  color: var(--gray-700);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 3.2rem; font-weight: 300; letter-spacing: -0.02em; }
h2 { font-size: 2.2rem; font-weight: 300; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 500; }
h4 { font-size: 1rem; font-weight: 500; }
p { font-size: 0.95rem; color: var(--gray-500); line-height: 1.8; }
a { text-decoration: none; color: inherit; }

/* ---------- 容器 ---------- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

/* ---------- 按钮 ---------- */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 12px 34px;
  border-radius: 60px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(29,122,74,0.25);
}

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
  padding: 10px 28px;
  border-radius: 60px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: 0.2s;
  background: transparent;
  cursor: pointer;
}
.btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
}

/* ---------- 通用 section 标题 ---------- */
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-weight: 300; }
.section-title p { color: var(--gray-400); margin-top: 2px; font-size: 1rem; }

/* ---------- 返回顶部按钮 ---------- */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(29,122,74,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: 0.3s ease;
  z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover {
  background: var(--green-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(29,122,74,0.45);
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: 0.35s ease;
  padding: 16px 0;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 28px rgba(0,0,0,0.06);
  border-bottom: 1px solid var(--gray-200);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
}
.navbar-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.logo {
  font-size: 1.1rem;
  font-weight: 500;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: 0.3s;
}
.logo img { height: 32px; width: auto; filter: brightness(0) invert(1); transition: 0.3s; }
.navbar.scrolled .logo { color: var(--gray-800); }
.navbar.scrolled .logo img { filter: none; }

.nav-center { display: flex; align-items: center; gap: 0; list-style: none; }
.nav-center > li { position: relative; }
.nav-center > li > a {
  color: #FFFFFF;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 450;
  transition: 0.15s;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.navbar.scrolled .nav-center > li > a { color: var(--gray-800); }
.nav-center > li > a:hover { color: #FFFFFF; border-bottom-color: var(--green); }
.navbar.scrolled .nav-center > li > a:hover { color: var(--green); border-bottom-color: var(--green); }

/* 下拉菜单 */
.dropdown {
  position: absolute;
  top: 130%; left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 210px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  border: 1px solid var(--gray-200);
  z-index: 100;
}
.nav-center > li:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown li { list-style: none; position: relative; }
.dropdown li > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 22px;
  font-size: 0.85rem;
  color: var(--gray-700);
  font-weight: 400;
  transition: 0.1s;
  white-space: nowrap;
}
.dropdown li > a:hover { background: var(--gray-100); color: var(--green); }
.dropdown li > a i { font-size: 0.5rem; color: var(--gray-400); margin-left: 12px; }

.dropdown-sub {
  position: absolute;
  top: 0; left: 100%;
  min-width: 210px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  border: 1px solid var(--gray-200);
  z-index: 101;
}
.dropdown li:hover .dropdown-sub { opacity: 1; visibility: visible; }
.dropdown-sub li a {
  display: block;
  padding: 7px 22px;
  font-size: 0.85rem;
  color: var(--gray-700);
  font-weight: 400;
  transition: 0.1s;
  white-space: nowrap;
}
.dropdown-sub li a:hover { background: var(--gray-100); color: var(--green); }

.no-submenu > a i.fa-chevron-right { display: none; }

/* 导航右侧 */
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border-radius: 40px;
  padding: 4px 4px 4px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: 0.25s;
}
.navbar.scrolled .search-box { background: var(--gray-100); border-color: var(--gray-300); }
.search-box input {
  background: none;
  border: none;
  padding: 6px 0;
  font-size: 0.82rem;
  color: #FFFFFF;
  width: 120px;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}
.search-box input::placeholder { color: rgba(255,255,255,0.5); font-weight: 300; }
.navbar.scrolled .search-box input { color: var(--gray-700); }
.navbar.scrolled .search-box input::placeholder { color: var(--gray-400); }
.search-box button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  padding: 6px 10px 6px 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: 0.15s;
}
.navbar.scrolled .search-box button { color: var(--gray-500); }
.search-box button:hover { color: var(--green); }
.search-box:focus-within { border-color: var(--green); background: rgba(255,255,255,0.25); }
.navbar.scrolled .search-box:focus-within {
  background: white;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29,122,74,0.1);
}
.search-box:focus-within input { color: #FFFFFF; }
.navbar.scrolled .search-box:focus-within input { color: var(--gray-700); }

/* 语言切换（桌面） */
.lang-wrap { position: relative; cursor: pointer; z-index: 20; }
.lang-btn {
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 400;
}
.navbar.scrolled .lang-btn {
  color: var(--gray-700);
  border-color: var(--gray-300);
  background: var(--gray-100);
}
.lang-btn:hover { color: #FFFFFF; border-color: var(--green); background: rgba(255,255,255,0.15); }
.navbar.scrolled .lang-btn:hover {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-light);
}

.lang-dropdown {
  position: absolute;
  top: 130%; right: 0;
  min-width: 120px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  padding: 4px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.2s;
  border: 1px solid var(--gray-200);
  z-index: 30;
}
.lang-wrap:hover .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown a {
  display: block;
  padding: 7px 20px;
  font-size: 0.82rem;
  color: var(--gray-700);
  font-weight: 400;
  transition: 0.1s;
}
.lang-dropdown a:hover { background: var(--gray-100); color: var(--green); }
.lang-dropdown a.active { color: var(--green); font-weight: 500; background: var(--green-light); }

/* 语言切换（移动） */
.lang-wrap-mobile { display: none; position: relative; cursor: pointer; z-index: 25; flex-shrink: 0; }
.lang-wrap-mobile .lang-btn {
  color: rgba(255,255,255,0.9);
  font-size: 0.7rem;
  padding: 2px 10px 2px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 400;
  display: none;
}
.navbar.scrolled .lang-wrap-mobile .lang-btn {
  color: var(--gray-700);
  border-color: var(--gray-300);
  background: var(--gray-100);
  display: none;
}
.lang-wrap-mobile .lang-dropdown {
  position: absolute;
  top: 130%; right: 0;
  min-width: 100px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  padding: 4px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.2s;
  border: 1px solid var(--gray-200);
  z-index: 30;
}
.lang-wrap-mobile:hover .lang-dropdown,
.lang-wrap-mobile.active .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-wrap-mobile .lang-dropdown a {
  display: block;
  padding: 7px 20px;
  font-size: 0.82rem;
  color: var(--gray-700);
  font-weight: 400;
  transition: 0.1s;
}
.lang-wrap-mobile .lang-dropdown a:hover { background: var(--gray-100); color: var(--green); }
.lang-wrap-mobile .lang-dropdown a.active {
  color: var(--green);
  font-weight: 500;
  background: var(--green-light);
}

/* 移动端汉堡按钮 */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  transition: 0.3s;
  flex-shrink: 0;
}
.navbar.scrolled .mobile-toggle { color: var(--gray-700); }

    /* ============================================================
       CTA
    ============================================================ */
    .section-cta { padding: 72px 0; background: var(--green-bg); text-align: center; }
    .section-cta h2 { color: white; font-weight: 300; letter-spacing: 0.3px; }
    .section-cta p { color: rgba(255,255,255,0.5); font-size: 1.05rem; margin: 8px 0 28px; max-width: 100%; }
    .section-cta .btn-primary { background: white; color: var(--green-dark); }
    .section-cta .btn-primary:hover { background: var(--green-light); color: var(--green-dark); }

/* ============================================================
   页脚
   ============================================================ */
.footer { background: var(--gray-900); color: #AEC4B7; padding: 44px 0 18px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.footer-col h5 {
  color: white;
  font-weight: 400;
  font-size: 0.85rem;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin: 4px 0; }
.footer-col ul li a { font-size: 0.8rem; color: #AEC4B7; transition: 0.15s; }
.footer-col ul li a:hover { color: var(--green); }
.footer-col p {
  font-size: 0.8rem;
  color: #AEC4B7;
  margin: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-col p i { color: var(--green); width: 18px; opacity: 0.6; }
.social { display: flex; gap: 8px; margin-top: 12px; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  color: #AEC4B7;
  font-size: 0.85rem;
  transition: 0.2s;
}
.social a:hover { background: var(--green); color: white; }
.footer-bottom {
  text-align: center;
  font-size: 0.72rem;
  color: #5A7A69;
  padding-top: 18px;
}
.footer-bottom a { color: #5A7A69; }
.footer-bottom a:hover { color: var(--green); }

/* ============================================================
   COMMON 响应式
   ============================================================ */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .navbar .container { flex-wrap: wrap; position: relative; gap: 8px; }
  .navbar-left { display: flex; align-items: center; gap: 8px; flex: 1; }
  .lang-wrap-mobile { display: block; }
  .nav-right .lang-wrap { display: none; }
  .mobile-toggle { display: block; z-index: 5; flex-shrink: 0; }

  .nav-center {
    display: none;
    width: 100%;
    flex-direction: column;
    background: white;
    padding: 16px;
    border-radius: 16px;
    margin-top: 6px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--gray-200);
    gap: 2px;
    order: 10;
  }
  .nav-center.open { display: flex; }
  .nav-center > li > a {
    color: var(--gray-700) !important;
    padding: 10px 12px;
    width: 100%;
    font-weight: 450;
    border-bottom: none;
    border-radius: 6px;
    transition: background 0.2s;
  }
  .nav-center > li > a:hover {
    background: var(--gray-100);
    color: var(--green) !important;
    border-bottom-color: transparent;
  }
  .navbar.scrolled .nav-center > li > a { color: var(--gray-700) !important; }
  .nav-center > li > a .dropdown-arrow {
    margin-left: auto;
    transition: transform 0.25s;
    font-size: 0.5rem;
  }
  .nav-center > li > a .dropdown-arrow.rotated { transform: rotate(180deg); }

  .dropdown {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    border: none;
    background: var(--gray-100);
    border-radius: 8px;
    margin: 4px auto 6px auto !important;
    padding: 6px 0;
    display: none;
    width: 92%;
    max-width: 320px;
    min-width: 0 !important;
    text-align: center;
    left: auto !important;
    right: auto !important;
  }
  .dropdown.open { display: block; }
  .nav-center > li:hover .dropdown { display: none; }
  .nav-center > li:hover .dropdown.open { display: block; }

  .dropdown li > a {
    justify-content: center !important;
    text-align: center;
    padding: 8px 12px;
    width: 100%;
    display: flex;
  }
  .dropdown li > a i { display: none !important; }
  .dropdown-sub { display: none !important; }

  .search-box {
    order: 11;
    width: 100%;
    margin-top: 4px;
    background: rgba(255,255,255,0.7);
    border-color: var(--gray-300);
  }
  .search-box input { width: 100%; color: var(--gray-700); }
  .search-box input::placeholder { color: var(--gray-400); }
  .search-box button { color: var(--gray-500); }
  .navbar.scrolled .search-box { background: var(--gray-100); }

  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section-title h2 { font-size: 1.6rem; }
  .lang-wrap-mobile .lang-btn {
    font-size: 0.6rem;
    padding: 1px 8px 1px 10px;
    display: none;
  }
  .logo img { height: 28px; }
}