/* ============================================================
   星罗舆情 - 主样式表
   ============================================================ */

:root {
  --primary: #1a6dff;
  --primary-dark: #0d4fc4;
  --primary-light: #4d8eff;
  --accent: #00c9a7;
  --dark: #0a0e1a;
  --dark-2: #111827;
  --gray: #f3f4f6;
  --gray-2: #e5e7eb;
  --text: #1f2937;
  --text-muted: #6b7280;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --font: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 24px; border-radius: 8px; font-size: 15px; font-weight: 600;
  transition: 0.3s; gap: 6px;
}
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 12px rgba(26,109,255,0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }

/* 顶部信息条 */
.top-bar { background: var(--dark); color: rgba(255,255,255,0.7); font-size: 13px; padding: 8px 0; }
.top-bar-inner { display: flex; gap: 24px; justify-content: flex-end; }

/* 导航 */
.navbar {
  position: fixed; top: 37px; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08); transition: 0.3s;
}
/* 顶栏滚出视口后导航贴顶 */
.navbar.scrolled { top: 0; }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.logo-icon { font-size: 24px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a { padding: 6px 14px; border-radius: 6px; font-size: 15px; color: var(--text-muted); font-weight: 500; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: rgba(26,109,255,0.08); }
.nav-cta { margin-left: auto; }
.nav-toggle { display: none; font-size: 22px; color: var(--text); }

/* Hero */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: var(--dark); overflow: hidden; padding-top: 101px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
#particleCanvas { width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 1; max-width: 700px; padding: 60px 24px; }
.hero-title { font-size: clamp(36px, 6vw, 64px); font-weight: 800; color: var(--white); line-height: 1.15; margin-bottom: 20px; }
.gradient-text { background: linear-gradient(135deg, var(--primary-light), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { font-size: 17px; color: rgba(255,255,255,0.6); margin-bottom: 36px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); }
.hero-stat-value { font-size: 32px; font-weight: 800; color: var(--white); }
.hero-stat-value span { color: var(--accent); }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 4px; }

/* Section */
.section { padding: 96px 0; }
.section-dark { background: var(--dark-2); }
.section-gray { background: var(--gray); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag { display: inline-block; background: rgba(26,109,255,0.1); color: var(--primary); font-size: 13px; font-weight: 600; padding: 4px 14px; border-radius: 100px; margin-bottom: 16px; }
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; color: var(--text); margin-bottom: 16px; }
.section-dark .section-title, .section-dark .section-desc { color: var(--white); }
.section-desc { font-size: 16px; color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.section-footer { text-align: center; margin-top: 48px; }

/* 服务 */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.service-card { background: var(--white); border: 1px solid var(--gray-2); border-radius: var(--radius); padding: 28px; transition: 0.3s; }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); border-color: var(--primary); }
.service-icon { font-size: 32px; margin-bottom: 14px; }
.service-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.service-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* 统计 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2px; background: rgba(255,255,255,0.05); border-radius: var(--radius); overflow: hidden; }
.stat-item { text-align: center; padding: 40px 16px; background: rgba(255,255,255,0.03); transition: 0.3s; }
.stat-item:hover { background: rgba(26,109,255,0.1); }
.stat-value { font-size: 42px; font-weight: 900; color: var(--white); }
.stat-value .accent { color: var(--accent); }
.stat-label { font-size: 14px; color: rgba(255,255,255,0.5); margin-top: 8px; }

/* 案例卡片 */
.cases-grid, .cases-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.case-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: 0.3s; border: 1px solid var(--gray-2); }
.case-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.case-cover { width: 100%; height: 180px; object-fit: cover; background: var(--gray-2); }
.case-body { padding: 20px; }
.case-meta { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.case-tag { background: rgba(26,109,255,0.1); color: var(--primary); font-size: 12px; padding: 2px 10px; border-radius: 100px; }
.case-date { font-size: 12px; color: var(--text-light); }
.case-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.case-title a:hover { color: var(--primary); }
.case-summary { font-size: 13px; color: var(--text-muted); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.case-result { font-size: 13px; color: var(--accent); font-weight: 600; }

/* 新闻预览 */
.news-preview-list { display: flex; flex-direction: column; gap: 0; }
.news-preview-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--gray-2); transition: 0.3s; }
.news-preview-item:hover { background: var(--gray); margin: 0 -16px; padding: 16px; border-radius: 8px; }
.news-preview-date { flex-shrink: 0; text-align: center; width: 48px; background: var(--primary); color: var(--white); border-radius: 8px; padding: 6px 4px; }
.news-preview-day { font-size: 20px; font-weight: 800; line-height: 1; }
.news-preview-month { font-size: 10px; opacity: 0.8; }
.news-preview-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.news-preview-title:hover { color: var(--primary); }
.news-preview-summary { font-size: 13px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* 筛选栏 */
.filter-bar { background: var(--white); border-bottom: 1px solid var(--gray-2); padding: 14px 0; position: sticky; top: 101px; z-index: 100; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn { padding: 6px 16px; border-radius: 100px; font-size: 14px; color: var(--text-muted); background: var(--gray); transition: 0.3s; }
.filter-btn:hover { background: var(--gray-2); }
.filter-btn.active { background: var(--primary); color: var(--white); }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.page-btn { width: 38px; height: 38px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-muted); background: var(--gray); display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.page-btn:hover { background: var(--gray-2); }
.page-btn.active { background: var(--primary); color: var(--white); }

/* 页面 Hero */
.page-hero { background: linear-gradient(135deg, var(--dark), var(--dark-2)); padding: 180px 0 64px; text-align: center; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
.breadcrumb a { color: rgba(255,255,255,0.5); }
.breadcrumb a:hover { color: var(--accent); }
.page-hero-title { font-size: clamp(30px, 5vw, 48px); font-weight: 800; color: var(--white); }
.page-hero-desc { font-size: 16px; color: rgba(255,255,255,0.6); margin-top: 12px; }

/* 新闻列表 */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--gray-2); transition: 0.3s; }
.news-item:hover { background: var(--gray); margin: 0 -20px; padding: 24px 20px; border-radius: var(--radius); }
.news-item-img { width: 200px; height: 130px; object-fit: cover; border-radius: 8px; background: var(--gray-2); }
.news-item-body { display: flex; flex-direction: column; justify-content: center; }
.news-item-cat { display: inline-block; background: rgba(26,109,255,0.1); color: var(--primary); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-bottom: 8px; }
.news-item-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.news-item-title:hover { color: var(--primary); }
.news-item-summary { font-size: 13px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Featured 新闻 */
.news-featured { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px; }
.news-featured-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 280px; background: var(--dark-2); }
.news-featured-card:first-child { grid-column: 1 / -1; min-height: 360px; }
.news-featured-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.news-featured-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); }
.news-featured-title { font-size: 18px; font-weight: 700; color: var(--white); line-height: 1.4; }
.news-featured-card:first-child .news-featured-title { font-size: 24px; }

/* CTA */
.cta-section { text-align: center; }
.cta-title { font-size: 32px; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.cta-desc { font-size: 16px; color: rgba(255,255,255,0.6); margin-bottom: 28px; }

/* 页脚 */
.footer { background: var(--dark); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 32px; }
.footer-logo { font-size: 20px; font-weight: 700; color: var(--white); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.7; }
.footer-col-title { font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.5); transition: 0.3s; }
.footer-links a:hover { color: var(--accent); }
.footer-contact li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.3); flex-wrap: wrap; gap: 8px; }

/* 联系表单 */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info { padding: 32px; background: var(--dark-2); border-radius: var(--radius); color: var(--white); }
.contact-info h2 { font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.contact-info p { font-size: 15px; color: rgba(255,255,255,0.6); margin-bottom: 24px; line-height: 1.7; }
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255,255,255,0.7); }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--gray-2); border-radius: 8px;
  font-size: 14px; outline: none; transition: 0.3s; background: var(--white);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,109,255,0.1);
}
.contact-form textarea { resize: vertical; }

/* 关于我们 */
.about-section { padding: 80px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-img { border-radius: var(--radius); width: 100%; height: 400px; object-fit: cover; background: var(--gray-2); }
.about-text h2 { font-size: 28px; font-weight: 800; margin-bottom: 20px; }
.about-text p { font-size: 15px; color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }
.about-text .highlight { color: var(--primary); font-weight: 600; }

/* 团队 */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.team-card { text-align: center; padding: 24px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); transition: 0.3s; }
.team-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.team-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--gray-2); margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.team-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.team-role { font-size: 13px; color: var(--text-muted); }

/* 服务详情 */
.service-detail { padding: 80px 0; }
.service-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 80px; }
.service-detail-grid:nth-child(even) { direction: rtl; }
.service-detail-grid:nth-child(even) > * { direction: ltr; }
.service-detail-text h3 { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.service-detail-text p { font-size: 15px; color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }
.service-detail-text ul { margin-top: 16px; }
.service-detail-text li { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; padding-left: 20px; position: relative; }
.service-detail-text li::before { content: '✓'; color: var(--accent); position: absolute; left: 0; font-weight: 700; }
.service-detail-img { border-radius: var(--radius); width: 100%; height: 300px; object-fit: cover; background: var(--gray-2); }

/* 动画 */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 0; color: var(--text-muted); }
.hidden { display: none !important; }

/* 响应式 */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .navbar.menu-open .nav-links { display: flex; flex-direction: column; position: fixed; top: 101px; left: 0; right: 0; background: var(--white); padding: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
  .navbar.scrolled.menu-open .nav-links { top: 64px; }
  .contact-wrap, .about-grid, .service-detail-grid { grid-template-columns: 1fr; }
  .service-detail-grid:nth-child(even) { direction: ltr; }
  .news-featured { grid-template-columns: 1fr; }
  .news-featured-card:first-child { grid-column: auto; }
  .news-item { grid-template-columns: 1fr; }
  .news-item-img { width: 100%; height: 180px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero-stats { gap: 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
