/* ====== 全局样式 ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* 修改：为 body 增加 padding-top: 70px，防止 fixed 导航栏遮挡顶部内容 */
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; line-height: 1.6; color: #333; background-color: #f9f9f9; padding-top: 70px; }

/* ====== 导航栏 (Fixed + 自动隐藏) ====== */
/* 修改：使用 fixed 定位，增加宽度和过渡动画 */
nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: white; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); padding: 0 5%; transition: transform 0.3s ease-in-out; }
/* 新增：隐藏导航栏的类（通过JS触发） */
nav.nav-hidden { transform: translateY(-100%); }

nav .container { display: flex; justify-content: space-between; align-items: center; height: 70px; max-width: 1400px; margin: 0 auto; }
.logo { font-size: 18px; font-weight: 700; color: #0066cc; text-decoration: none; display: flex; flex-direction: column; line-height: 1.2; }
.logo-main { font-size: 16px; font-weight: 700; }
.logo-sub { font-size: 11px; color: #666; }
nav ul { display: flex; list-style: none; gap: 40px; align-items: center; }
nav ul li { position: relative; } /* 为下拉菜单定位提供基准 */
nav a { text-decoration: none; color: #333; font-weight: 500; font-size: 14px; transition: color 0.3s; }
nav a:hover, nav a.active { color: #0066cc; }

/* ====== 下拉菜单样式 ====== */
.dropdown-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background-color: #ffffff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); border-radius: 8px; padding: 10px 0; min-width: 200px; z-index: 1000; list-style: none; margin-top: 15px; }
.dropdown-menu::before { content: ""; position: absolute; top: -15px; left: 0; width: 100%; height: 15px; background: transparent; }
.dropdown-menu li { display: block; margin: 0; width: 100%; }
.dropdown-menu li a { display: block; padding: 12px 20px; color: #333333; font-size: 15px; text-align: center; transition: background-color 0.3s ease, color 0.3s ease; text-decoration: none; }
.dropdown-menu li a:hover { background-color: #f4f7fc; color: #0066cc; }
.dropdown:hover .dropdown-menu { display: block; }

/* ====== 容器与通用 ====== */
.container { max-width: 1400px; margin: 0 auto; padding: 0 5%; }
.section-title { font-size: 36px; font-weight: 700; text-align: center; margin: 60px 0 20px; color: #1a1a1a; }
.section-subtitle { font-size: 16px; text-align: center; color: #666; margin-bottom: 60px; }

/* ====== Hero 区 ====== */
.hero { background: linear-gradient(135deg, #0066cc 0%, #004a99 100%); color: white; padding: 100px 5%; text-align: center; }
.hero h1 { font-size: 48px; font-weight: 700; margin-bottom: 20px; line-height: 1.3; }
.hero p { font-size: 18px; margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.btn { padding: 12px 32px; font-size: 16px; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; text-decoration: none; transition: all 0.3s; display: inline-block; }
.btn-primary { background-color: white; color: #0066cc; }
.btn-primary:hover { background-color: #f0f0f0; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); }
.btn-secondary { background-color: transparent; color: white; border: 2px solid white; }
.btn-secondary:hover { background-color: white; color: #0066cc; transform: translateY(-2px); }

/* ====== 核心优势卡片 ====== */
.advantages { padding: 80px 5%; background: white; }
.advantages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; max-width: 1400px; margin: 0 auto; }
.advantage-card { padding: 40px; border-radius: 12px; background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%); border: 1px solid #e0e0e0; transition: all 0.3s; text-align: center; }
.advantage-card:hover { transform: translateY(-8px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1); border-color: #0066cc; }
.advantage-icon { font-size: 40px; margin-bottom: 20px; }
.advantage-card h3 { font-size: 20px; margin-bottom: 15px; color: #1a1a1a; }
.advantage-card p { color: #666; line-height: 1.7; }

/* ====== 服务卡片网格 ====== */
.services-section { padding: 80px 5%; background: white; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; max-width: 1400px; margin: 0 auto; }
.service-card { border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); transition: all 0.3s; background: white; }
.service-card:hover { transform: translateY(-12px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15); }
.service-card-header { height: 180px; background: linear-gradient(135deg, #0066cc 0%, #004a99 100%); display: flex; align-items: center; justify-content: center; color: white; font-size: 50px; }
.service-card-body { padding: 30px; }
.service-card h3 { font-size: 22px; margin-bottom: 12px; color: #1a1a1a; }
.service-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.tag { display: inline-block; padding: 4px 12px; background-color: #e8f0ff; color: #0066cc; border-radius: 20px; font-size: 12px; font-weight: 600; }
.service-card p { color: #666; font-size: 14px; line-height: 1.7; margin-bottom: 20px; min-height: 70px; }
.service-buttons { display: flex; gap: 10px; }
.btn-small { padding: 8px 16px; font-size: 14px; border-radius: 6px; border: none; cursor: pointer; text-decoration: none; transition: all 0.3s; flex: 1; text-align: center; }
.btn-small-primary { background-color: #0066cc; color: white; }
.btn-small-primary:hover { background-color: #0052a3; }
.btn-small-secondary { background-color: #f0f0f0; color: #0066cc; border: 1px solid #0066cc; }
.btn-small-secondary:hover { background-color: #e8f0ff; }

/* ====== 公司动态 (News) ====== */
.news-section { padding: 80px 5%; background: #f9f9f9; }
.news-list { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.news-item { background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); text-decoration: none; display: block; color: inherit; transition: all 0.3s; border-left: 4px solid transparent; }
.news-item:hover { transform: translateX(8px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); border-left-color: #0066cc; }
.news-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.news-title { font-size: 20px; font-weight: 700; color: #1a1a1a; margin: 0; }
.news-date { font-size: 14px; color: #0066cc; font-weight: 600; }
.news-desc { color: #666; font-size: 15px; margin: 0; line-height: 1.6; }

/* ====== CTA 区 ====== */
.cta-banner { background: linear-gradient(135deg, #0066cc 0%, #004a99 100%); color: white; padding: 80px 5%; text-align: center; margin: 80px 0; }
.cta-banner h2 { font-size: 36px; margin-bottom: 20px; font-weight: 700; }
.cta-banner p { font-size: 18px; margin-bottom: 40px; line-height: 1.6; }

/* ====== 页脚 ====== */
footer { background-color: #1a1a1a; color: white; padding: 60px 5%; }
footer .container { max-width: 1400px; margin: 0 auto; }
footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
footer h4 { font-size: 16px; margin-bottom: 20px; font-weight: 700; }
footer p, footer a { color: #ccc; font-size: 14px; line-height: 1.8; text-decoration: none; transition: color 0.3s; }
footer a:hover { color: white; }
footer-bottom { border-top: 1px solid #333; padding-top: 30px; text-align: center; color: #999; font-size: 13px; display: block; }

/* ====== 页面内容区 (子页面) ====== */
.page-content { min-height: calc(100vh - 200px); padding: 60px 5%; background: white; }
.page-header { text-align: center; margin-bottom: 60px; }
.page-header h1 { font-size: 42px; font-weight: 700; margin-bottom: 15px; color: #1a1a1a; }
.page-header p { font-size: 16px; color: #666; max-width: 600px; margin: 0 auto; line-height: 1.7; }

/* ====== 响应式 ====== */
@media (max-width: 768px) {
    nav ul { gap: 15px; flex-wrap: wrap; justify-content: center; }
    nav a { font-size: 13px; }
    
    /* 移动端下拉菜单适配 */
    .dropdown:hover .dropdown-menu { position: static; transform: none; box-shadow: none; background: #f4f7fc; padding: 0; min-width: 100%; border-radius: 4px; margin-top: 5px; }
    .dropdown-menu li a { padding: 8px 10px; font-size: 13px; text-align: center; }
    
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; }
    .section-title { font-size: 28px; }
    .services-grid { grid-template-columns: 1fr; }
    .news-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ====== 隐藏类（用于SPA页面切换） ====== */
.hidden { display: none; }
.visible { display: block; }