/* ============================================================
   外贸双语企业官网 - 全局样式（组件层）
   配合 Tailwind 工具类使用；品牌色已在 tailwind.config.js 中定义
   ============================================================ */

:root {
  --brand: #123A63;
  --brand-dark: #0B2440;
  --accent: #2E7CF6;
  --accent-dark: #1B5FD4;
  --accent-light: #E3EEFE;
  --gold: #F5B301;
  --ink: #1C2733;
  --muted: #64748B;
  --cloud: #F5F8FC;
}

html { scroll-behavior: smooth; }
body { background: #fff; }
img { max-width: 100%; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; border-radius: 10px; font-weight: 600; font-size: 14px;
  transition: all .25s ease; cursor: pointer; border: 1px solid transparent; line-height: 1.4;
}
.btn-lg { padding: 13px 30px; font-size: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(46,124,246,.3); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-gold { background: var(--gold); color: #123A63; font-weight: 700; }
.btn-gold:hover { background: #ffc93d; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(245,179,1,.35); }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1EBE5A; transform: translateY(-1px); }

/* ---------- 区块标题 ---------- */
.section-tag {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--accent-light); color: var(--accent-dark);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px;
}
.section-tag.light { background: rgba(255,255,255,.12); color: #9CC5FF; }
.section-title { font-size: 28px; font-weight: 800; color: var(--ink); margin-bottom: 0; line-height: 1.3; }
.section-title.light { color: #fff; }
@media (min-width: 768px) { .section-title { font-size: 34px; } }

/* ---------- 顶部条 ---------- */
.topbar { background: var(--brand-dark); }

/* ---------- 导航 ---------- */
.nav-link {
  position: relative; font-weight: 600; font-size: 15px; color: var(--ink);
  padding: 6px 2px; transition: color .2s;
}
.nav-link:hover { color: var(--accent); }
.nav-link.active { color: var(--accent); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

/* ---------- 内页横幅 ---------- */
.page-hero {
  background: linear-gradient(120deg, #0B2440 0%, #123A63 55%, #1B5FD4 100%);
}

/* ---------- Hero 轮播 ---------- */
.hero-slider { position: relative; height: 560px; overflow: hidden; background: var(--brand-dark); }
@media (max-width: 767px) { .hero-slider { height: 460px; } }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .9s ease, visibility .9s;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 2; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide.active .hero-bg { animation: heroZoom 6.5s ease-out forwards; }
@keyframes heroZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,36,64,.88) 0%, rgba(11,36,64,.55) 55%, rgba(11,36,64,.18) 100%);
}
.hero-content { position: relative; z-index: 3; height: 100%; display: flex; align-items: center; }
.hero-slide.active .hero-content > div { animation: heroUp .8s ease-out .15s backwards; }
@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero-tag {
  display: inline-block; padding: 6px 16px; margin-bottom: 18px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .06em; backdrop-filter: blur(4px);
}
.hero-dots { position: absolute; z-index: 5; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dot {
  width: 10px; height: 10px; border-radius: 999px; background: rgba(255,255,255,.4);
  border: none; cursor: pointer; transition: all .3s; padding: 0;
}
.hero-dot.active { background: var(--gold); width: 26px; }
.hero-arrow {
  position: absolute; z-index: 5; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(11,36,64,.35); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .25s; backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--accent); border-color: var(--accent); }
.hero-arrow.left { left: 22px; } .hero-arrow.right { right: 22px; }
@media (max-width: 767px) { .hero-arrow { display: none; } }

/* ---------- 数据统计 ---------- */
.stat-box { text-align: center; }
.stat-num { font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.stat-box.dark .stat-num { color: var(--gold); }
.stat-label { margin-top: 6px; font-size: 13px; color: var(--muted); }
.stat-box.dark .stat-label { color: rgba(255,255,255,.65); }

/* ---------- 产品/案例/新闻卡片 ---------- */
.card-product, .card-case, .card-news {
  display: block; background: #fff; border-radius: 16px; overflow: hidden;
  border: 1px solid #E9EFF6; box-shadow: 0 2px 10px rgba(15,42,74,.05);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card-product:hover, .card-case:hover, .card-news:hover {
  transform: translateY(-5px); box-shadow: 0 14px 30px rgba(15,42,74,.12);
}
.card-img { position: relative; overflow: hidden; aspect-ratio: 4/3; background: var(--cloud); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-product:hover .card-img img, .card-case:hover .card-img img, .card-news:hover .card-img img { transform: scale(1.06); }
.card-tag {
  position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 999px;
  background: rgba(11,36,64,.78); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(4px);
}

/* ---------- 优势卡片 ---------- */
.card-adv {
  background: #fff; border: 1px solid #E9EFF6; border-radius: 16px; padding: 28px 24px;
  transition: all .3s ease;
}
.card-adv:hover { border-color: var(--accent); box-shadow: 0 14px 30px rgba(46,124,246,.14); transform: translateY(-4px); }
.adv-icon {
  width: 54px; height: 54px; border-radius: 14px; background: var(--accent-light);
  color: var(--accent-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}

/* ---------- 评价卡片 ---------- */
.card-testi {
  background: #fff; border: 1px solid #E9EFF6; border-radius: 16px; padding: 26px 24px;
  box-shadow: 0 2px 10px rgba(15,42,74,.05);
}
.stars { color: var(--gold); letter-spacing: 2px; }

/* ---------- 团队 ---------- */
.card-team { background: #fff; border: 1px solid #E9EFF6; border-radius: 16px; padding: 28px 20px; transition: all .3s; }
.card-team:hover { box-shadow: 0 14px 30px rgba(15,42,74,.12); transform: translateY(-4px); }

/* ---------- 工厂实景 ---------- */
.card-gallery { position: relative; border-radius: 14px; overflow: hidden; margin: 0; }
.card-gallery img { transition: transform .5s ease; }
.card-gallery:hover img { transform: scale(1.06); }
.card-gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 14px 12px;
  background: linear-gradient(transparent, rgba(11,36,64,.85)); color: #fff;
  font-size: 13px; font-weight: 600; text-align: center;
}

/* ---------- CTA 条 ---------- */
.cta-band {
  background:
    radial-gradient(circle at 20% 20%, rgba(46,124,246,.35), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(245,179,1,.22), transparent 45%),
    linear-gradient(120deg, #0B2440, #123A63);
}

/* ---------- 发展历程时间线 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-light));
}
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -26px; top: 4px; width: 14px; height: 14px; border-radius: 999px;
  background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent);
}
.timeline-year {
  display: inline-block; padding: 3px 14px; border-radius: 999px; margin-bottom: 8px;
  background: var(--accent-light); color: var(--accent-dark); font-weight: 700; font-size: 14px;
}
.timeline-body { background: #fff; border: 1px solid #E9EFF6; border-radius: 14px; padding: 18px 20px; }

/* ---------- 侧边分类 / 筛选 ---------- */
.cat-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 10px; color: var(--muted);
  font-size: 14px; font-weight: 500; transition: all .2s;
}
.cat-link:hover { color: var(--accent); background: #fff; }
.cat-link.active { background: var(--accent); color: #fff; }
.filter-pill {
  padding: 9px 22px; border-radius: 999px; border: 1px solid #DCE4EE; background: #fff;
  color: var(--muted); font-size: 14px; font-weight: 600; transition: all .25s;
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 表单 ---------- */
.input {
  width: 100%; padding: 11px 14px; border: 1px solid #CBD5E1; border-radius: 10px;
  font-size: 14px; color: var(--ink); background: #fff; outline: none; transition: all .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,124,246,.14); }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination .current {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid #DCE4EE; background: #fff; color: var(--muted); font-size: 14px; font-weight: 600;
  transition: all .2s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 参数表 ---------- */
.spec-table th, .spec-table td { padding: 12px 16px; text-align: left; }
.spec-table th { background: var(--cloud); color: var(--ink); font-weight: 600; }
.spec-table tr:nth-child(even) td { background: #FAFCFE; }
.spec-table td { color: var(--muted); }

/* ---------- 产品图库缩略图 ---------- */
.thumb {
  width: 84px; height: 84px; border-radius: 12px; overflow: hidden; border: 2px solid transparent;
  background: var(--cloud); cursor: pointer; padding: 0; transition: all .2s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--accent); }

/* ---------- 悬浮按钮 ---------- */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 24px; z-index: 60;
  width: 54px; height: 54px; border-radius: 999px; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(37,211,102,.4);
  transition: transform .25s;
}
.whatsapp-float:hover { transform: scale(1.08); }
.back-top {
  position: fixed; right: 26px; bottom: 92px; z-index: 60;
  width: 42px; height: 42px; border-radius: 999px; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; visibility: hidden; transition: all .3s; border: none;
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--accent); }

/* ---------- 滚动显现动效 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 行数截断（兼容性兜底） ---------- */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
