/* ========== CSS 变量 ========== */
:root {
  --primary: #0a5c9e;
  --primary-light: #0d7fd4;
  --primary-dark: #074a7e;
  --bg: #f5f7fa;
  --white: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --text-lighter: #999999;
  --border: #e0e6ed;
  --shadow: 0 2px 12px rgba(10,92,158,0.08);
  --shadow-hover: 0 6px 24px rgba(10,92,158,0.15);
  --radius: 8px;
  --transition: all 0.3s ease;
  --font: "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

/* ========== Emoji字体支持 ========== */
.emoji, .card-icon, .advantage-icon, span[style*="font-size:24px"], span[style*="font-size:32px"] {
  font-family: var(--font-emoji) !important;
}

/* ========== Reset ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font-family: var(--font); outline: none; border: none; }

/* ========== 导航栏 ========== */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 0 60px; height: 72px; display: flex; align-items: center; justify-content: space-between;
  transition: background 0.4s, box-shadow 0.4s;
  background: transparent;
}
.header.scrolled { background: var(--white); box-shadow: 0 1px 8px rgba(0,0,0,0.08); }
.header.scrolled .nav a { color: var(--text); }
.header.scrolled .logo { color: var(--primary); }
.logo { font-size: 22px; font-weight: 700; color: var(--white); letter-spacing: 2px; transition: var(--transition); }
.nav { display: flex; gap: 32px; }
.nav a { color: var(--white); font-size: 15px; font-weight: 500; position: relative; padding: 4px 0; }
.nav a::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary-light); transition: width 0.3s; }
.nav a:hover::after, .nav a.active::after { width: 100%; }
.header.scrolled .nav a:hover { color: var(--primary); }

/* 汉堡菜单 */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { width: 24px; height: 2px; background: var(--white); transition: var(--transition); border-radius: 2px; }
.header.scrolled .hamburger span { background: var(--text); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ========== Banner 轮播 ========== */
.banner {
  position: relative; width: 100%; height: 100vh; min-height: 500px; overflow: hidden;
}
.banner-slides { display: flex; height: 100%; transition: transform 0.6s ease; }
.banner-slide {
  min-width: 100%; height: 100%; position: relative;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.banner-overlay {
  position: absolute; inset: 0; background: rgba(10,92,158,0.45);
}
.banner-content {
  position: relative; z-index: 2; text-align: center; color: var(--white); padding: 0 20px;
}
.banner-content h2 { font-size: 48px; font-weight: 700; margin-bottom: 16px; letter-spacing: 4px; }
.banner-content p { font-size: 20px; margin-bottom: 32px; opacity: 0.9; }
.banner-btns { display: flex; gap: 16px; justify-content: center; }
.banner-dots {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 3;
}
.banner-dots span {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5);
  cursor: pointer; transition: var(--transition);
}
.banner-dots span.active { background: var(--white); transform: scale(1.2); }

/* ========== 按钮 ========== */
.btn {
  display: inline-block; padding: 12px 32px; border-radius: 4px; font-size: 15px;
  font-weight: 500; cursor: pointer; transition: var(--transition); text-align: center;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-light); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); transform: translateY(-2px); }

/* ========== 通用板块 ========== */
.section { padding: 80px 60px; }
.section-bg { background: var(--white); }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 32px; color: var(--text); margin-bottom: 12px; }
.section-title p { font-size: 16px; color: var(--text-light); }
.section-title .line { width: 50px; height: 3px; background: var(--primary); margin: 16px auto 0; border-radius: 2px; }

/* ========== 卡片 ========== */
.card {
  background: var(--white); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); transition: var(--transition); position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-icon {
  width: 56px; height: 56px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--white); font-size: 24px;
}
.card h3 { font-size: 18px; margin-bottom: 10px; color: var(--text); }
.card p { font-size: 14px; color: var(--text-light); line-height: 1.8; }
.card .more { display: inline-block; margin-top: 16px; font-size: 14px; color: var(--primary); font-weight: 500; }
.card .more:hover { color: var(--primary-light); }

/* 卡片网格 */
.card-grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ========== 优势列表 ========== */
.advantages-list { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.advantage-item {
  flex: 0 0 calc(20% - 20px); text-align: center; padding: 32px 16px;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); transition: var(--transition);
}
.advantage-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.advantage-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 28px;
}
.advantage-item h4 { font-size: 16px; margin-bottom: 8px; }
.advantage-item p { font-size: 13px; color: var(--text-light); }

/* ========== 案例卡片 ========== */
.case-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: var(--transition); cursor: pointer;
}
.case-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.case-card img { width: 100%; height: 200px; object-fit: cover; }
.case-card .info { padding: 20px; }
.case-card .tag { display: inline-block; font-size: 12px; color: var(--primary); background: rgba(10,92,158,0.08); padding: 2px 10px; border-radius: 3px; margin-bottom: 8px; }
.case-card h3 { font-size: 16px; margin-bottom: 8px; }
.case-card p { font-size: 13px; color: var(--text-light); }

/* ========== 资讯列表 ========== */
.news-item {
  display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--border); transition: var(--transition);
}
.news-item:hover { padding-left: 8px; }
.news-item img { width: 180px; height: 120px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.news-item .info { flex: 1; }
.news-item .date { font-size: 13px; color: var(--text-lighter); margin-bottom: 6px; }
.news-item h3 { font-size: 16px; margin-bottom: 8px; }
.news-item h3 a { color: var(--text); }
.news-item h3 a:hover { color: var(--primary); }
.news-item p { font-size: 14px; color: var(--text-light); }

/* ========== Tabs ========== */
.tabs { display: flex; gap: 8px; margin-bottom: 32px; justify-content: center; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 24px; border-radius: 20px; font-size: 14px; cursor: pointer;
  background: var(--white); color: var(--text-light); border: 1px solid var(--border); transition: var(--transition);
}
.tab-btn:hover, .tab-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ========== 分页 ========== */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; border-radius: 4px; font-size: 14px;
  background: var(--white); color: var(--text); border: 1px solid var(--border); transition: var(--transition);
}
.pagination a:hover, .pagination span.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ========== 面包屑 ========== */
.breadcrumb { padding: 100px 60px 20px; font-size: 14px; color: var(--text-light); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ========== 页面顶部横幅 ========== */
.page-banner {
  padding: 120px 60px 60px; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white); text-align: center;
}
.page-banner h1 { font-size: 36px; margin-bottom: 12px; }
.page-banner p { font-size: 16px; opacity: 0.85; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; color: var(--text); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 14px; transition: var(--transition); background: var(--white);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,92,158,0.1); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ========== Footer ========== */
.footer {
  background: #1a2332; color: rgba(255,255,255,0.7); padding: 60px 60px 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { color: var(--white); font-size: 16px; margin-bottom: 16px; }
.footer p { font-size: 14px; line-height: 2; }
.footer a { color: rgba(255,255,255,0.7); font-size: 14px; display: block; line-height: 2; }
.footer a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; }

/* ========== 返回顶部 ========== */
.back-to-top {
  position: fixed; bottom: 40px; right: 40px; width: 44px; height: 44px;
  border-radius: 50%; background: var(--primary); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  cursor: pointer; opacity: 0; visibility: hidden; transition: var(--transition);
  box-shadow: 0 2px 8px rgba(10,92,158,0.3); z-index: 999;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-light); transform: translateY(-3px); }

/* ========== 滚动渐入动画 ========== */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ========== 模态框 ========== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius); max-width: 700px; width: 100%;
  max-height: 80vh; overflow-y: auto; padding: 32px; position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 16px; font-size: 24px; cursor: pointer;
  color: var(--text-lighter); background: none; line-height: 1;
}

/* ========== 后台管理 ========== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; background: #1a2332; color: var(--white); padding: 20px 0;
  flex-shrink: 0; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .logo { padding: 0 20px 24px; font-size: 18px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-sidebar nav a {
  display: block; padding: 12px 24px; color: rgba(255,255,255,0.7); font-size: 14px;
  transition: var(--transition);
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: var(--primary); color: var(--white); }
.admin-main { flex: 1; margin-left: 220px; padding: 24px; background: var(--bg); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h2 { font-size: 20px; }
.admin-content { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }

/* 后台表格 */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table th { background: var(--bg); font-weight: 600; color: var(--text-light); }
.admin-table tr:hover td { background: rgba(10,92,158,0.02); }

/* 登录页 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.login-box { background: var(--white); border-radius: var(--radius); padding: 48px; width: 400px; box-shadow: var(--shadow-hover); }
.login-box h2 { text-align: center; margin-bottom: 32px; color: var(--primary); }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .section { padding: 60px 30px; }
  .header { padding: 0 30px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .advantage-item { flex: 0 0 calc(33.33% - 16px); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .banner-content h2 { font-size: 36px; }
}

@media (max-width: 768px) {
  .section { padding: 40px 16px; }
  .header { padding: 0 16px; }
  .hamburger { display: flex; }
  .nav {
    position: fixed; top: 72px; left: 0; width: 100%; background: var(--white);
    flex-direction: column; padding: 16px; gap: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-100%); opacity: 0; transition: var(--transition); pointer-events: none;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { color: var(--text); padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .advantage-item { flex: 0 0 calc(50% - 12px); }
  .banner-content h2 { font-size: 28px; }
  .banner-content p { font-size: 16px; }
  .banner-btns { flex-direction: column; align-items: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .news-item { flex-direction: column; }
  .news-item img { width: 100%; height: 180px; }
  .page-banner { padding: 100px 16px 40px; }
  .page-banner h1 { font-size: 28px; }
  .breadcrumb { padding: 90px 16px 16px; }
  .admin-sidebar { width: 180px; }
  .admin-main { margin-left: 180px; }
}

@media (max-width: 480px) {
  .advantage-item { flex: 0 0 100%; }
  .section-title h2 { font-size: 24px; }
}
