/* =================================
   全局变量和重置样式
================================= */
:root {
  /* ========== 主色系 ========== */
  --primary-color: #ffc107;
  /* 经典金色主色 */
  --primary-hover: #f59e0b;
  /* 金色悬停效果 */
  --primary-light: #ffeb3b;
  /* 浅金色 */

  /* ========== 背景色系 ========== */
  --dark-bg: #1a1a1a;
  /* 深色背景 */
  --dark-blue: #1a1a2e;
  /* 深蓝背景 */
  --light-bg: #f8f9fa;
  /* 浅色背景 */

  /* ========== 文字色系 ========== */
  --text-primary: #333;
  /* 主要文字 */
  --text-gray: #6c757d;
  /* 辅助文字 */
  --text-light: #ccc;
  /* 浅色文字 */

  /* ========== 导航栏专用 ========== */
  --header-height: 100px;
  --header-bg-scrolled: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 235, 59, 0.95));
  --header-hover-bg: rgba(245, 158, 11, 0.9);
  --nav-text-scrolled: #1a1a1a;

  /* ========== 通用样式 ========== */
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 8px 20px rgba(255, 193, 7, 0.2);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  padding-top: var(--header-height);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* =================================
   导航栏样式 - 重新优化设计
================================= */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--dark-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: var(--header-height);
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

/* 滚动后的样式 - 使用渐变背景 */
#header.scrolled {
  background: var(--header-bg-scrolled);
  backdrop-filter: blur(15px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 品牌LOGO区域 */
.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none !important;
  color: var(--primary-color) !important;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
}

.navbar-brand img {
  height: 24px;
  width: auto;
  border-radius: 4px;
  margin-right: 8px;
  object-fit: contain;
}

/* 滚动后品牌颜色变化 */
#header.scrolled .navbar-brand {
  color: var(--nav-text-scrolled) !important;
}

/* 导航菜单容器 */
.navbar-collapse {
  display: flex;
  align-items: center;
}

.navbar-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.nav-item {
  margin: 0 2px;
}

/* 导航链接样式 */
.nav-link {
  display: block;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
  transition: var(--transition);
  border-radius: 4px;
  font-weight: 500;
  font-size: 1.0rem;
  white-space: nowrap;
}

/* 悬停和激活状态 */
.nav-link:hover,
.nav-link.active {
  color: #f0f0f0 !important;
  background: var(--primary-hover) !important;
  transform: translateY(-1px);
}

/* 滚动后导航链接颜色 */
#header.scrolled .nav-link {
  color: var(--nav-text-scrolled) !important;
}

#header.scrolled .nav-link:hover,
#header.scrolled .nav-link.active {
  color: #f0f0f0 !important;
  background: var(--header-hover-bg) !important;
}

/* 移动端菜单按钮 */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.navbar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 滚动后移动端按钮颜色 */
#header.scrolled .navbar-toggle {
  color: var(--nav-text-scrolled);
}

#header.scrolled .navbar-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
}



/* =================================
   二级菜单样式 - 添加到main.css中
================================= */

/* 下拉菜单容器 */
.nav-item.dropdown {
  position: relative;
}

/* 下拉箭头样式 */
.dropdown-toggle i {
  font-size: 0.7rem;
  margin-left: 4px;
  transition: var(--transition);
}

.dropdown:hover .dropdown-toggle i {
  transform: rotate(180deg);
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  border: 1px solid #e9ecef;
}

/* 下拉菜单显示 */
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 下拉菜单项 - 修改这部分 */
.dropdown-item {
  display: block;
  padding: 10px 20px;
  margin: 0 -1px;
  /* 新增：负边距消除边框间隙 */
  color: var(--text-primary) !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border-bottom: none;
  white-space: nowrap;
  border-radius: 0;
  /* 新增：移除圆角确保完全填充 */
}

.dropdown-item:hover {
  background: var(--primary-color);
  color: #1a1a1a !important;
  transform: translateX(5px);
  margin-left: 0;
  /* 新增：悬停时重置左边距 */
  margin-right: 0;
  /* 新增：悬停时重置右边距 */
}

/* 滚动后的下拉菜单样式 */
#header.scrolled .dropdown-menu {
  background: white;
  border-color: rgba(255, 193, 7, 0.2);
}

#header.scrolled .dropdown-item {
  color: var(--text-primary) !important;
}

#header.scrolled .dropdown-item:hover {
  background: var(--primary-color);
  color: #1a1a1a !important;
}

/* =================================
   移动端下拉菜单样式
================================= */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .dropdown.mobile-open .dropdown-menu {
    max-height: 200px;
  }

  .dropdown-item {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8) !important;
  }

  .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color) !important;
    transform: none;
  }

  /* 移动端滚动后样式 */
  #header.scrolled .dropdown-item {
    border-bottom-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary) !important;
  }

  #header.scrolled .dropdown-item:hover {
    background: rgba(255, 193, 7, 0.1);
    color: var(--primary-color) !important;
  }
}



/* =================================
   页脚样式
================================= */
.footer-section {
  background: var(--dark-bg);
  color: white;
  position: relative;
  overflow: hidden;
  padding: 60px 0 20px;
}

.footer-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(26, 26, 26, 0.8), rgba(26, 26, 26, 0.9)),
    url('../images/footer-bg.jpg');
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.footer-content {
  position: relative;
  z-index: 2;
}

.footer-company h3 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-info p {
  margin-bottom: 10px;
  color: var(--text-light);
  line-height: 1.6;
}

.footer-info a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.footer-info a:hover {
  color: var(--primary-hover);
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary-color);
  color: #000;
  transform: scale(1.1);
}

.footer-links h4 {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 8px;
}

.footer-links ul li a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  line-height: 1.5;
}

.footer-links ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-bottom p {
  color: var(--text-light);
  margin: 0;
}

.footer-bottom a {
  color: var(--primary-color);
  text-decoration: none;
}

/* =================================
   通用区域样式
================================= */
section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  margin: 0 auto 20px;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* =================================
   动画效果
================================= */
.animate-fade-in {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.loaded {
  opacity: 1;
}

/* =================================
   工具类
================================= */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

/* =================================
   响应式设计 - 全局部分
================================= */
@media (max-width: 1200px) {
  .navbar-container {
    max-width: 100%;
    padding: 0 15px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}

@media (max-width: 991px) {
  .navbar-brand span {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 55px;
  }

  body {
    padding-top: var(--header-height);
  }

  .navbar-container {
    padding: 0 15px;
  }

  .navbar-toggle {
    display: block;
  }

  .navbar-collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
  }

  .navbar-collapse.show {
    display: block;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-item {
    margin: 5px 0;
  }

  .nav-link {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* 移动端滚动后的样式调整 */
  #header.scrolled .navbar-collapse {
    background: var(--header-bg-scrolled);
  }

  #header.scrolled .nav-link {
    border-bottom-color: rgba(0, 0, 0, 0.1);
  }

  .section-title {
    font-size: 2rem;
  }

  .footer-company,
  .footer-links {
    margin-bottom: 30px;
  }
}

@media (max-width: 576px) {
  .navbar-brand span {
    font-size: 0.8rem;
  }

  .navbar-brand img {
    height: 20px;
    width: auto;
  }

  section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

/* 触摸设备优化 */
@media (hover: none) {
  .touch-active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}

.scroll-to-top {
  display: none;
}


.wechat-qr-trigger {
  position: relative;
  cursor: pointer;
  color: var(--primary-color);
  text-decoration: underline;
}

.wechat-qr-trigger:hover {
  position: relative;
  cursor: pointer;
  color: #fff;
  text-decoration: underline;
}

.wechat-qr-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: auto;
  background: white;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  margin-bottom: 10px;
}

.wechat-qr-trigger:hover .wechat-qr-popup {
  opacity: 1;
  visibility: visible;
}

/* 确保微信按钮有足够的相对定位空间 */
.wechat-support-btn {
  position: relative;
  overflow: visible;
}

/* WhatsApp 二维码样式 */
.whatsapp-qr-trigger {
  position: relative;
  cursor: pointer;
  color: #25D366;
  /* WhatsApp 绿色 */
  text-decoration: underline;
  font-weight: 600;
}

.whatsapp-qr-trigger:hover {
  position: relative;
  cursor: pointer;
  color: #fff;
  text-decoration: underline;
}

.whatsapp-qr-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: auto;
  background: white;
  border: 2px solid #25D366;
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  margin-bottom: 10px;
}

.whatsapp-qr-trigger:hover .whatsapp-qr-popup {
  opacity: 1;
  visibility: visible;
}