/* ===== 全局重置和基础样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  scroll-behavior: smooth;
  /* 防止移动端横向滚动 */
  overflow-x: hidden;
}

/* ===== CSS自定义属性 ===== */
:root {
  --header-height: 70px;
  --primary-color: #EB6630;
  --primary-dark: #D45520;
  --text-color: #333;
  --bg-color: #fff;
  --shadow-light: 0 2px 15px rgba(235, 102, 48, 0.15);
  --shadow-medium: 0 4px 20px rgba(235, 102, 48, 0.3);
  --shadow-heavy: 0 10px 30px rgba(0,0,0,0.3);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 8px;
  --mobile-breakpoint: 768px;
  --phone-breakpoint: 480px;
  /* 用于解决移动端100vh问题 */
  --vh: 1vh;
}

/* ===== 导航栏样式 ===== */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  pointer-events: auto !important;
  /* 强化事件绑定稳定性 */
  transform: translateZ(0);
  will-change: transform;
}

.header.scrolled {
  background: rgba(235, 102, 48, 0.95);
  box-shadow: 0 2px 15px rgba(235, 102, 48, 0.4);
}

/* 移动端滚动时隐藏导航栏 */
.header.mobile-hidden {
  transform: translateY(-100%);
}

/* 确保PC端不受移动端样式影响 */
@media (min-width: 769px) {
  .header.mobile-hidden {
    transform: translateY(0) !important;
  }
}

/* 强化导航栏交互防护 */
.header *, 
.nav *, 
.nav-links *, 
.dropdown *, 
.dropdown-content * {
  pointer-events: auto !important;
}

/* 防止滚动过程中的事件丢失 */
.header:hover,
.header:focus-within,
.nav:hover,
.nav-links:hover,
.dropdown:hover {
  pointer-events: auto !important;
}

.nav {
  max-width: 1680px;
  font-size: 18px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  min-height: var(--header-height);
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFF;
  text-decoration: none;
  flex-shrink: 0;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 40px;
  flex: 1;
  margin: 0 40px;
  list-style: none;
  align-items: center;
  justify-content: center;
  /* 强化事件绑定稳定性 */
  pointer-events: auto !important;
  transform: translateZ(0);
}

.phone-text {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  position: relative;
  padding: 8px 0;
  font-weight: 500;
  transition: all var(--transition-slow);
  display: flex;
  align-items: center;
  /* 强化事件绑定稳定性 */
  pointer-events: auto !important;
  transform: translateZ(0);
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: white;
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.nav-links a:hover::before {
  width: 100%;
}

.nav-links a:hover {
  color: #EDEDED;
  transform: translateY(-2px);
}

/* ===== 下拉菜单样式（仅PC端） ===== */
.dropdown {
  position: relative;
  /* 强化事件绑定稳定性 */
  pointer-events: auto !important;
  transform: translateZ(0);
}

.dropdown-content {
  display: none;
  position: absolute;
  background: var(--bg-color);
  min-width: 200px;
  box-shadow: var(--shadow-light);
  z-index: 1001;
  top: 100%;
  left: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  pointer-events: auto !important;
  /* 增强浏览器兼容性 */
  -webkit-transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  -moz-transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  -ms-transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  /* 强化事件绑定稳定性 */
  transform: translateY(-10px) translateZ(0);
  will-change: opacity, transform, visibility;
}

/* 增强hover效果兼容性 - 强化事件绑定 */
@media (hover: hover) and (pointer: fine) {
  .dropdown:hover .dropdown-content {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

/* 为不支持hover媒体查询的浏览器提供fallback - 强化事件绑定 */
@media (min-width: 769px) {
  .dropdown:hover .dropdown-content {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  
  /* 确保PC端下拉菜单始终可交互 */
  .dropdown-content {
    pointer-events: auto !important;
  }
  
  .nav-links .dropdown {
    pointer-events: auto !important;
  }
}

.dropdown-content a {
  color: var(--text-color) !important;
  padding: 15px 20px;
  text-decoration: none;
  display: block;
  transition: all var(--transition-normal);
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  color: var(--primary-color) !important;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  transform: translateX(5px);
}

/* ===== 汉堡菜单基础样式 ===== */
.mobile-menu {
  display: none;
  position: relative;
  cursor: pointer;
  z-index: 1200;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

/* PC端隐藏汉堡菜单 */
@media (min-width: 769px) {
  .mobile-menu {
    display: none;
  }
}

/* 移动端汉堡菜单统一样式 */
@media (max-width: 768px) {
  .mobile-menu {
    display: flex;
    visibility: visible;
    opacity: 1;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.4);
  }
  
  .mobile-menu span {
    position: absolute;
    width: 22px;
    height: 2px;
    background: white;
    display: block;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 1px;
    transition: all 0.3s ease;
  }
  
  .mobile-menu span:nth-child(1) { top: 15px; }
  .mobile-menu span:nth-child(2) { top: 21px; }
  .mobile-menu span:nth-child(3) { top: 27px; }
  
  .mobile-menu.active span:nth-child(1) {
    transform: translateX(-50%) rotate(45deg);
    top: 21px;
  }
  
  .mobile-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
  }
  
  .mobile-menu.active span:nth-child(3) {
    transform: translateX(-50%) rotate(-45deg);
    top: 21px;
  }
}

/* ===== 页脚样式 ===== */
.footer {
  background: #111827;
  color: #fff;
  padding: 50px 0;
}

.footer-container {
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 80px;
}

.footer-left {
  margin: 20px 30px 20px 0;
}

.footer-links {
  padding-top: 30px;
}

.footer-links h3 {
  margin-bottom: 20px;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color var(--transition-normal);
}

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

.footer-c {
  max-width: 1680px;
  margin: 0 auto; /* 水平居中 */
  border-top: 1px solid #1f2937;
  text-align: center;
  padding: 40px 20px 0; /* 上内边距40px，左右内边距20px */
  margin-bottom: 5px;
  color: #9ca3af;
  font-size: 18px;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-dark), #B8441A);
}

/* ===== 通用动画类 ===== */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 加载状态 ===== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(235, 102, 48, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 移动端样式已迁移到 responsive.css ===== */
/* 所有移动端样式现在统一管理在 assets/css/base/responsive.css 中 */

/* 页脚版权信息通用样式 */
.footer-c {
  font-size: 14px;
  padding: 20px 15px 0;
  margin: 0 auto;
}