/**
 * ==========================================================================
 * 秋晚权益 - 全局公共样式
 * ==========================================================================
 */

/* --------------------------------------------------------------------------
 * 1. 基础重置与全局
 * -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #ffffff;
  color: #333;
  min-height: 100vh;
}

/* 主题色变量（便于统一维护） */
:root {
  --color-primary: #4A7FFF;
  --color-primary-dark: #3968e6;
  --color-primary-light: #6B8FFF;
  --color-text: #333;
  --color-text-secondary: #666;
  --color-text-muted: #999;
  --color-bg-soft: #f8f9fa;
  --color-footer: #1a1a1a;
  --color-border: #e5e5e5;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 4px 16px rgba(74, 127, 255, 0.15);
}

/* --------------------------------------------------------------------------
 * 2. 布局容器
 * -------------------------------------------------------------------------- */
.site-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --------------------------------------------------------------------------
 * 3. Logo
 * -------------------------------------------------------------------------- */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* --------------------------------------------------------------------------
 * 4. 导航栏（PC 端）
 * -------------------------------------------------------------------------- */
.nav-item {
  padding: 8px 14px;
  color: var(--color-text);
  font-size: 15px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--color-primary);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 14px;
  right: 14px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
 * 5. 子页面通用 Banner（agent / api）
 * -------------------------------------------------------------------------- */
.page-header {
  width: 100%;
  height: 360px;
  position: relative;
  overflow: hidden;
}

.page-header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 无背景图时使用渐变（合并项目不依赖外部 img 资源） */
.page-header-bg--gradient {
  background: linear-gradient(135deg, #e8f1ff 0%, #d6e4ff 50%, #c5d9ff 100%);
}

.page-header-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(240, 245, 255, 0.45) 100%
  );
}

.page-header-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #111;
  padding: 0 40px;
}

.page-header h1 {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 16px;
}

.page-header .subtitle {
  font-size: 16px;
  color: #334155;
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
 * 6. 首页 Hero 区域
 * -------------------------------------------------------------------------- */
.hero-section {
  width: 100%;
  height: 360px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/sy_bj.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(240, 245, 255, 0.5) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 40px;
}

.hero-title {
  font-size: 46px;
  font-weight: 900;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 40%, #6366F1 80%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  line-height: 1.35;
}

.hero-subtitle {
  font-size: 20px;
  color: #334155;
  font-weight: 600;
  max-width: 720px;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --------------------------------------------------------------------------
 * 7. 首页统计数据
 * -------------------------------------------------------------------------- */
.stats-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 38px;
  font-weight: 800;
  background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 50%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 15px;
  color: #1E293B;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
 * 8. 首页内容区块
 * -------------------------------------------------------------------------- */
.section-block {
  padding: 70px 0;
}

.section-block.alt {
  background: var(--color-bg-soft);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-liner {
  font-size: 14px;
  color: var(--color-text-muted);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  color: var(--color-text);
  font-weight: 600;
}

.section-desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-top: 12px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
 * 9. 信息卡片
 * -------------------------------------------------------------------------- */
.info-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid transparent;
  transition: all 0.3s;
}

.info-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

/* 静态卡片：禁用 hover 位移 */
.info-card.static:hover {
  transform: none;
}

.card-base {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid transparent;
  transition: all 0.3s;
  cursor: pointer;
}

.card-base:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

/* --------------------------------------------------------------------------
 * 10. 标签与按钮
 * -------------------------------------------------------------------------- */
.tag-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  background: rgba(74, 127, 255, 0.1);
  color: var(--color-primary);
}

.btn {
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  outline: none;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #4A7FFF 0%, #6B8FFF 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3968e6 0%, #5a7eef 100%);
  box-shadow: 0 4px 12px rgba(74, 127, 255, 0.3);
}

.btn-secondary {
  background: #fff;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
 * 11. 资质证照
 * -------------------------------------------------------------------------- */
.cert-card {
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: #fff;
}

.cert-card img {
  transition: transform 0.3s ease;
}

.cert-card:hover img {
  transform: scale(1.02);
}

.cert-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-soft);
}

/* --------------------------------------------------------------------------
 * 12. 证照灯箱（Lightbox）
 * -------------------------------------------------------------------------- */
#lightbox {
  display: none;
}

#lightbox.show {
  display: flex;
}

.lightbox-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.lightbox-tab {
  padding: 6px 18px;
  border-radius: 4px;
  font-size: 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-tab:hover {
  background: rgba(255, 255, 255, 0.35);
}

.lightbox-tab.active {
  background: var(--color-primary);
}

/* --------------------------------------------------------------------------
 * 13. 页脚
 * -------------------------------------------------------------------------- */
.footer,
.site-footer {
  background: var(--color-footer);
  color: #fff;
  padding: 50px 0 40px;
  margin-top: 20px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-logo img {
  height: 36px;
  width: auto;
}

.footer-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 36px;
}

.footer-feature {
  text-align: center;
}

.footer-icon {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 22px;
  color: #ccc;
}

.footer-feature-text {
  font-size: 14px;
  color: #ccc;
}

.footer-info {
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright,
.footer-icp {
  font-size: 12px;
  color: #666;
  margin: 5px 0;
}

/* --------------------------------------------------------------------------
 * 14. 模态框（客服等）
 * -------------------------------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: var(--color-text);
}

.modal-body {
  padding: 25px;
  word-wrap: break-word;
}

/* --------------------------------------------------------------------------
 * 15. 悬浮按钮（客服 + 返回顶部）
 * -------------------------------------------------------------------------- */
.floating-service-btn {
  position: fixed;
  right: 20px;
  bottom: 200px;
  z-index: 9999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A7FFF 0%, #6B8FFF 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(74, 127, 255, 0.4);
  transition: transform 0.3s;
}

.floating-service-btn:hover {
  transform: scale(1.08);
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 130px;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: opacity 0.3s, transform 0.3s;
  opacity: 0;
  pointer-events: none;
}

.back-to-top img {
  width: 50px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.back-to-top.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
 * 16. 滚动条
 * -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* --------------------------------------------------------------------------
 * 17. 响应式
 * -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .page-header {
    height: 280px;
  }

  .page-header h1 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .site-container,
  .stats-section,
  .footer-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-section,
  .page-header {
    height: 260px;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .stats-grid,
  .footer-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-value {
    font-size: 28px;
  }

  .section-block {
    padding: 48px 0;
  }

  .section-title {
    font-size: 24px;
  }

  .floating-service-btn {
    right: 12px;
    bottom: 170px;
    width: 46px;
    height: 46px;
  }

  .back-to-top {
    right: 12px;
    bottom: 110px;
  }
}

@media (max-width: 480px) {
  .hero-section,
  .page-header {
    height: 220px;
  }

  .footer-features {
    grid-template-columns: 1fr;
  }
}
