/* ========== 全局基础样式 ========== */
* {
  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;
}


/* 全新居中横排友情链接样式 */
.footer-friendly-links-row {
    width: 100%;
    max-width: 1200px; /* 保持与你网页主容器宽度一致 */
    margin: 30px auto 10px auto; /* 上下间距，让它与上面的三大列拉开距离 */
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* 加一条淡淡的分割线，更显高级 */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; /* 核心：整体内容水平居中 */
    flex-wrap: wrap; /* 核心：手机端自动换行 */
    box-sizing: border-box;
}

/* 终极全屏水平居中友情链接样式 */
.footer-friendly-links-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important; /* 核心：强制整行在网页最中央对齐 */
    flex-wrap: wrap !important;
    
    /* 强行打破原有的 Flex/Grid 容器限制 */
    grid-column: 1 / -1 !important; 
    width: 100% !important;
    clear: both !important;
    
    /* 上下间距调整 */
    margin: 40px auto 20px auto !important; 
    padding: 20px 0 0 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important; /* 淡淡的顶部分割线 */
    box-sizing: border-box !important;
}

/* “Friendly Links:” 文字标签样式 */
.friendly-links-title {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-right: 20px !important;
    white-space: nowrap !important;
    display: inline-block !important;
}

/* 链接包裹容器：确保里面的链接横向排开且居中 */
.friendly-links-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important; /* 核心：让链接横向居中 */
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 25px !important; /* 链接之间的间距 */
}

/* 每个单体友情链接的文字样式 */
.friendly-links-container a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    transition: color 0.3s ease !important;
    display: inline-block !important;
}

/* 鼠标悬停动效 */
.friendly-links-container a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* 移动端（手机）完美适配响应式 */
@media (max-width: 768px) {
    .footer-friendly-links-row {
        flex-direction: column !important; /* 手机端变成垂直流，但依然整体居中 */
        gap: 12px !important;
        text-align: center !important;
        margin-top: 25px !important;
    }
    .friendly-links-title {
        margin-right: 0 !important;
        margin-bottom: 5px !important;
    }
    .friendly-links-container {
        gap: 10px 15px !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;
  }
}

