/* =============================================
  首页样式
   ============================================= */

/* 导航栏 */
.navbar{background:rgba(255,255,255,0.13) linear-gradient(#405b84,#405b84);border-bottom:1px solid rgba(200,164,90,0.55);box-shadow:inset 0 -10px 20px -10px rgba(0,0,0,0.3)}
.nav-list{display:flex;align-items:center;justify-content:space-evenly;max-width:var(--max-width);margin:0 auto;padding:0 20px;height:50px}
.nav-list>li{position:relative;flex:1;text-align:center;height:100%;display:flex;align-items:center;justify-content:center}
.nav-list>li>a{display:flex;align-items:center;justify-content:center;height:100%;width:100%;padding:0 12px;color:rgba(255,255,255,0.9);font-size:15px;letter-spacing:1px;text-decoration:none;transition:all .3s;position:relative}
.nav-list>li>a::after{content:'';position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:0;height:3px;background:var(--gold);transition:width .3s}
.nav-list>li>a:hover,.nav-list>li.active>a{color:#fff}
.nav-list>li>a:hover::after,.nav-list>li.active>a::after{width:50%}
.nav-list .sub-menu{display:none;position:absolute;top:100%;left:50%;transform:translateX(-50%);background:#fff;box-shadow:0 4px 16px rgba(0,0,0,0.1);min-width:140px;border-radius:0 0 8px 8px;overflow:hidden;z-index:200}
.nav-list>li:hover .sub-menu{display:block}
.sub-menu a{display:block;padding:10px 20px;color:#333;font-size:13px;text-align:center;border-bottom:1px solid #f0f0f0;transition:all .2s}
.sub-menu a:hover{background:#f0f5ff;color:#1a3a6b;padding-left:24px}

/* 顶部信息栏 */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  padding: 6px 0;
}
.top-bar .top-links { display: flex; align-items: center; gap: 8px; }
.top-bar .top-links a { color: rgba(255,255,255,0.8); }
.top-bar .top-links a:hover { color: var(--gold-light); }
.top-bar .split { color: rgba(255,255,255,0.3); }

/* Header */
.header {
  background: var(--white);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-img { height: 50px; }
.logo-text h1 {
  font-size: 22px;
  color: var(--primary);
  font-weight: bold;
  line-height: 1.3;
}
.logo-text p {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.header-actions {
  display: flex;
  gap: 10px;
}

/* 导航栏 */
/* 轮播图 */
.banner {
  position: relative;
  background: #1a3a6b;
}
.swiper-container {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 400px;
  overflow: hidden;
}
/* 左右边缘渐变遮罩，让图片与背景自然融合 */
.swiper-container::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(to right, #1a3a6b 0%, transparent 6%, transparent 94%, #1a3a6b 100%),
    linear-gradient(to bottom, transparent 88%, #1a3a6b 100%);
}
.swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}
.swiper-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d1b3e, #1a3a6b);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.swiper-slide.active {
  opacity: 1;
}
.swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.swiper-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.swiper-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
}
.swiper-dot.active { background: var(--gold); }

/* 服务入口 + 资讯 */
.service-news-section {
  padding: 40px 0;
  background: #fff;
}
.sn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* 服务卡片 */
.service-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.service-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
  background: #fafbfc;
}
.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card-icon {
  width: 64px; height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-blue { background: linear-gradient(135deg, #1a3a6b, #2a5298); color: #fff; }
.icon-gold { background: linear-gradient(135deg, #c8a45a, #e0c878); color: #fff; }
.card-info h3 { font-size: 16px; margin-bottom: 4px; }
.card-info p { font-size: 12px; color: var(--text-light); line-height: 1.6; }
.card-arrow {
  margin-left: auto;
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.3s;
}
.service-card:hover .card-arrow { transform: translateX(4px); color: var(--primary); }

/* 资讯列表（右侧） */
.sn-right .news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sn-right .news-header .section-title { margin-bottom: 0; }

/* 综试区介绍 */
.about-section {
  padding: 50px 0;
  background: linear-gradient(180deg, #f8f9fb 0%, #fff 100%);
  position: relative;
  overflow: hidden;
}
.about-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--primary), var(--gold), transparent);
}
/* 板块标题：比默认 section-title(18px) 大 4 号 */
.about-title {
  font-size: 22px;
}
/* 左图右文卡片 */
.about-card {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
/* 左侧图片区：按图片自然比例完整显示 */
.about-media {
  flex: 0 0 440px;
  background: linear-gradient(135deg, #e8edf5 0%, #dce3ef 100%);
  overflow: hidden;
  position: relative;
}
/* 图片边缘渐变融合：右→文字区、上/下/左轻微暗角，让图片融入卡片 */
.about-media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* 右侧渐变：淡入白色文字区 */
    linear-gradient(to right, transparent 65%, rgba(255,255,255,0.55) 88%, rgba(255,255,255,0.85) 100%),
    /* 上下边缘暗角 */
    linear-gradient(to bottom, rgba(0,0,0,0.12) 0%, transparent 15%, transparent 85%, rgba(0,0,0,0.12) 100%),
    /* 左侧暗角 */
    linear-gradient(to left, transparent 90%, rgba(0,0,0,0.08) 100%);
}
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 右侧文字区 */
.about-text {
  flex: 1;
  min-width: 280px;
  padding: 24px 32px;
}
.about-lead {
  font-size: 14px;
  line-height: 1.75;
  color: var(--primary);
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 3px solid var(--gold);
}
.about-text p {
  margin-bottom: 8px;
  line-height: 1.75;
  color: var(--text-light);
  text-indent: 2em;
}
/* 右侧文字整体加大一号 */
.about-text .about-lead { font-size: 15px; }
.about-text > p { font-size: 15px; }
.about-text .about-vision { font-size: 15px; }
.about-text .feature-item h4 { font-size: 14px; }
.about-text .feature-item p { font-size: 13px; }
/* 特色卡片：无图标，顶部彩色条区分 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 28px 0;
}
.feature-item {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--primary);
  background: #fafbfc;
  transition: all 0.3s;
}
.feature-item:nth-child(1) { border-top-color: #3b82f6; }
.feature-item:nth-child(2) { border-top-color: #10b981; }
.feature-item:nth-child(3) { border-top-color: #f59e0b; }
.feature-item:nth-child(4) { border-top-color: #8b5cf6; }
.feature-item:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.feature-item h4 {
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 2px;
}
.feature-item p {
  font-size: 12px;
  color: var(--text-light);
  text-indent: 0;
  line-height: 1.4;
  margin: 0;
}
.about-subtitle {
  font-size: 18px;
  color: var(--gold-dark);
  text-align: center;
  margin: 16px 0 10px;
}
.about-vision {
  font-size: 14px;
  color: var(--primary);
  font-weight: bold;
  text-align: center;
  padding: 14px;
  background: linear-gradient(135deg, #f0f5ff, #fff7e6);
  border-radius: var(--radius);
  margin-top: 12px;
  text-indent: 0 !important;
}
.about-cta {
  text-align: center;
  margin-top: 20px;
}
/* 移动端：上下堆叠 */
@media (max-width: 768px) {
  .about-card { flex-direction: column; }
  .about-media { flex: 0 0 auto; min-height: 220px; width: 100%; }
  .about-text { padding: 24px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
}

/* 双栏 */
.two-col-section {
  padding: 40px 0;
  background: #fff;
}
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.col-card {
  background: #fafbfc;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}
.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.col-header .section-title { margin-bottom: 0; }

/* 友情链接 */
.links-section {
  padding: 40px 0;
  background: #f5f6f8;
}
.links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
}
.links-grid a {
  padding: 8px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-light);
  font-size: 13px;
  transition: all 0.3s;
}
.links-grid a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.footer-col p { font-size: 13px; line-height: 2; }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  line-height: 2;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .top-bar { display: none; }
  .header { padding: 10px 0; }
  .logo-text h1 { font-size: 14px; }
  .logo-text p { font-size: 9px; }
  .header-actions { gap: 6px; }
  .header-actions .btn { padding: 6px 10px; font-size: 12px; }
  .navbar { overflow-x: auto; }
  .nav-list { justify-content: flex-start; height: 42px; }
  .nav-list > li { flex: none; }
  .nav-list > li > a { padding: 0 14px; font-size: 13px; white-space: nowrap; }
  .swiper-container { height: 200px; }
  .slide-caption h3 { font-size: 18px; }
  .slide-caption p { font-size: 12px; }
  .sn-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .about-lead { font-size: 14px; }
  .about-text p { text-indent: 1.5em; }
}

/* =============================================
   数据大屏 - 首页嵌入式（白色背景）
   ============================================= */
.dashboard-embed-section {
  padding: 40px 0 30px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.dash-embed-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.dash-fullscreen-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 22px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff; font-size: 13px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: all 0.3s ease;
}
.dash-fullscreen-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.4);
}
.dash-embed-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 20px;
}
.dash-embed-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.dash-metric-card {
  background: #fff; border-radius: 14px; padding: 20px 16px;
  text-align: center; position: relative; overflow: hidden;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0; animation: dashCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes dashCardIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.dash-metric-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #60a5fa);
  opacity: 0.8;
}
.dash-metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  border-color: #bfdbfe;
}
.dash-metric-icon {
  width: 36px; height: 36px; margin: 0 auto 10px;
  border-radius: 10px; background: #eff6ff;
  position: relative;
}
.dash-metric-icon.icon-money,
.dash-metric-icon.icon-import,
.dash-metric-icon.icon-export { background: #ecfdf5; }
.dash-metric-icon.icon-enterprise,
.dash-metric-icon.icon-service { background: #fef3c7; }
.dash-metric-icon.icon-customs { background: #fce7f3; }
.dash-metric-icon.icon-tax,
.dash-metric-icon.icon-logistics { background: #f3e8ff; }
.dash-metric-icon::after {
  content: ''; position: absolute; inset: 8px;
  background: #2563eb; border-radius: 4px; opacity: 0.7;
}
.dash-metric-icon.icon-money::after,
.dash-metric-icon.icon-import::after,
.dash-metric-icon.icon-export::after { background: #10b981; }
.dash-metric-icon.icon-enterprise::after,
.dash-metric-icon.icon-service::after { background: #f59e0b; }
.dash-metric-icon.icon-customs::after { background: #ec4899; }
.dash-metric-icon.icon-tax::after,
.dash-metric-icon.icon-logistics::after { background: #8b5cf6; }

.dash-metric-value {
  font-size: 28px; font-weight: 700; color: #0f172a;
  line-height: 1.2; margin-bottom: 4px;
  font-family: 'DIN Alternate', 'Helvetica Neue', sans-serif;
}
.dash-metric-name {
  font-size: 13px; color: #64748b; margin-bottom: 2px;
}
.dash-metric-unit {
  font-size: 11px; color: #94a3b8;
}

.dash-embed-side {
  display: grid; grid-template-rows: 1fr 1fr; gap: 14px;
}
.dash-mini-card {
  background: #fff; border-radius: 14px; padding: 14px 16px;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.dash-mini-card h4 {
  font-size: 13px; color: #64748b; margin: 0 0 8px; font-weight: 600;
}
.dash-mini-chart {
  width: 100%; height: 130px;
}

/* 订单滚动条 */
.dash-embed-orders {
  margin-top: 18px; background: #fff; border-radius: 14px;
  padding: 12px 18px; display: flex; align-items: center; gap: 14px;
  border: 1px solid #eef2f7; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.dash-orders-label {
  flex-shrink: 0; font-size: 13px; font-weight: 600; color: #2563eb;
  padding-right: 14px; border-right: 2px solid #e2e8f0;
}
.dash-orders-marquee {
  flex: 1; overflow: hidden; position: relative; height: 32px;
}
.dash-orders-track {
  display: flex; gap: 30px; position: absolute;
  animation: dashMarquee 60s linear infinite;
  white-space: nowrap;
}
@keyframes dashMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.dash-order-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: #475569;
}
.dash-order-type {
  color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 600;
}
.dash-order-no { color: #64748b; font-family: 'Courier New', monospace; }
.dash-order-name { color: #1e293b; }
.dash-order-value { color: #10b981; font-weight: 600; }
.dash-order-status { font-size: 12px; }

@media (max-width: 992px) {
  .dash-embed-grid { grid-template-columns: 1fr; }
  .dash-embed-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .dash-embed-metrics { grid-template-columns: 1fr; }
  .dash-embed-orders { flex-direction: column; align-items: flex-start; }
  .dash-orders-label { border-right: none; padding-right: 0; padding-bottom: 6px; border-bottom: 2px solid #e2e8f0; width: 100%; }
}
