/* ==========================================================
   宁波邦逸科技有限公司官网 - 企业商贸信息展示网站
   公共样式表
   ========================================================== */

:root {
  --primary: #1450a3;
  --primary-dark: #0d3a7a;
  --primary-light: #eaf1fb;
  --accent: #e8912d;
  --accent-dark: #d07d1a;
  --text-main: #2b2f36;
  --text-sub: #5c6470;
  --text-light: #8a93a0;
  --bg: #ffffff;
  --bg-gray: #f4f6fa;
  --border: #e3e8f0;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(20, 80, 163, 0.08);
  --shadow-lg: 0 12px 40px rgba(20, 80, 163, 0.14);
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, "Hiragino Sans GB", sans-serif;
  color: var(--text-main);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

ul { list-style: none; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(20, 80, 163, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
}

.logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, #2f7be0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text strong { font-size: 18px; color: var(--primary-dark); letter-spacing: 1px; }
.logo-text span { font-size: 12px; color: var(--text-light); letter-spacing: 2px; }

.main-nav ul { display: flex; align-items: center; gap: 6px; }

.main-nav a {
  display: block;
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 500;
}

.main-nav a:hover { color: var(--primary); background: var(--primary-light); }
.main-nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text-main); border-radius: 2px; transition: .25s; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 80px;
  background: #12203a;
  color: #9db1cc;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 52px 0 40px;
}

.footer-title { color: #fff; font-size: 16px; margin-bottom: 16px; font-weight: 600; }

.footer-desc { font-size: 13px; line-height: 2; max-width: 380px; }
.footer-links a { display: block; color: #9db1cc; font-size: 14px; padding: 4px 0; }
.footer-links a:hover { color: #fff; }
.footer-contact { font-size: 14px; line-height: 2.1; }
.footer-contact a { color: #9db1cc; }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0;
  font-size: 13px;
  color: #7186a3;
  text-align: center;
}

/* ---------- 通用区块 ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-gray); }

.section-head { text-align: center; margin-bottom: 40px; }

.section-head h2 {
  font-size: 28px;
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: 1px;
}

.section-head .sub {
  color: var(--text-sub);
  font-size: 15px;
  margin-top: 8px;
  letter-spacing: 1px;
}

.section-head .line {
  width: 52px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin: 14px auto 0;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all .25s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 8px 20px rgba(20, 80, 163, 0.3); }

.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }

.btn-light { background: rgba(255, 255, 255, 0.16); color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); }
.btn-light:hover { background: #fff; color: var(--primary); }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-body { padding: 20px 22px; }

.card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.card-title a { color: var(--text-main); }
.card-title a:hover { color: var(--primary); }

.card-desc { font-size: 13.5px; color: var(--text-sub); line-height: 1.8; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(120deg, #0d3a7a 0%, #1450a3 45%, #2f7be0 100%);
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 85% 20%, rgba(255, 255, 255, 0.12), transparent 60%),
    radial-gradient(500px 280px at 10% 90%, rgba(255, 255, 255, 0.08), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding: 88px 0 96px;
  max-width: 760px;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.hero h1 .hl { color: #ffcf8a; }

.hero p { font-size: 16px; color: rgba(255, 255, 255, 0.85); line-height: 1.9; margin-bottom: 32px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 52px;
  padding-top: 28px;
}

.hero-stats .stat { flex: 1; text-align: center; }
.hero-stats .stat strong { display: block; font-size: 26px; color: #ffcf8a; }
.hero-stats .stat span { font-size: 13px; color: rgba(255, 255, 255, 0.75); }

/* ---------- 首页栏目入口 ---------- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.module-card {
  display: flex;
  gap: 22px;
  padding: 30px 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .3s, box-shadow .3s;
}

.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.module-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.module-icon.i1 { background: linear-gradient(135deg, #1450a3, #2f7be0); }
.module-icon.i2 { background: linear-gradient(135deg, #e8912d, #f4b55f); }
.module-icon.i3 { background: linear-gradient(135deg, #1d8a6f, #3fbc9b); }
.module-icon.i4 { background: linear-gradient(135deg, #7a3fe0, #a06bf5); }

.module-card h3 { font-size: 19px; margin-bottom: 8px; color: var(--primary-dark); }
.module-card p { font-size: 13.5px; color: var(--text-sub); margin-bottom: 12px; }
.module-card .more { font-size: 14px; font-weight: 500; }

/* ---------- 网格 ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ---------- 产品卡片 ---------- */
.product-thumb {
  height: 168px;
  background: linear-gradient(135deg, var(--primary-light), #d8e8fa);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
}

.product-thumb svg { color: var(--primary); opacity: .85; }

.product-info { padding: 16px 20px; }
.product-info h3 { font-size: 15.5px; margin-bottom: 6px; }
.product-info p { font-size: 13px; color: var(--text-sub); }

/* ---------- 动态列表 ---------- */
.news-list .news-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 4px;
  border-bottom: 1px dashed var(--border);
}

.news-list .news-item:last-child { border-bottom: none; }

.news-item a.title { flex: 1; color: var(--text-main); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-item a.title:hover { color: var(--primary); }

.news-item .tag {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: 4px;
  white-space: nowrap;
  align-self: center;
}

.news-item time { color: var(--text-light); font-size: 13px; white-space: nowrap; align-self: center; }

/* ---------- 合作项目 ---------- */
.coop-item {
  padding: 22px 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
}

.coop-item h4 { font-size: 15.5px; margin-bottom: 6px; }
.coop-item p { font-size: 13.5px; color: var(--text-sub); }

/* ---------- 供需资讯 ---------- */
.trade-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 28px; }

.trade-tabs button {
  padding: 8px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 14px;
  transition: .2s;
}

.trade-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.trade-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: .2s;
}

.trade-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }

.trade-badge { font-size: 12px; padding: 4px 12px; border-radius: 4px; white-space: nowrap; }
.trade-badge.supply { background: #e6f4ea; color: #1d8a4e; }
.trade-badge.demand { background: #fff1e0; color: #d07d1a; }
.trade-badge.coop { background: var(--primary-light); color: var(--primary); }

.trade-item .info { flex: 1; min-width: 0; }
.trade-item .info h4 { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trade-item .info p { font-size: 12.5px; color: var(--text-light); }

.trade-item time { font-size: 13px; color: var(--text-light); white-space: nowrap; }

/* ---------- 文章详情 ---------- */
.page-banner {
  background: linear-gradient(120deg, #0d3a7a, #2f7be0);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}

.page-banner h1 { font-size: 30px; letter-spacing: 2px; }
.page-banner p { color: rgba(255, 255, 255, 0.8); margin-top: 10px; font-size: 15px; }

.breadcrumb { text-align: center; margin-top: 12px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.breadcrumb a { color: #ffcf8a; }
.breadcrumb a:hover { color: #fff; }

/* ---------- 文章正文 ---------- */
.article { max-width: 860px; margin: 0 auto; }

.article .article-meta {
  display: flex;
  gap: 18px;
  color: var(--text-light);
  font-size: 13px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
}

.article .article-body { font-size: 15px; color: var(--text-main); line-height: 2; }
.article .article-body h2 { font-size: 20px; margin: 28px 0 12px; color: var(--primary-dark); }
.article .article-body h3 { font-size: 17px; margin: 22px 0 10px; color: var(--primary-dark); }
.article .article-body p { margin-bottom: 16px; }
.article .article-body ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.article .article-body ul li { margin-bottom: 8px; }

/* ---------- 关于我们 ---------- */
.about-hero-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px;
  box-shadow: var(--shadow);
}

.about-hero-card h2 { font-size: 22px; color: var(--primary-dark); margin-bottom: 14px; }
.about-hero-card p { color: var(--text-sub); line-height: 2; margin-bottom: 14px; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline li { position: relative; padding: 0 0 24px 18px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
}

.timeline li:last-child { padding-bottom: 0; }
.timeline strong { color: var(--primary-dark); font-size: 15px; }
.timeline span { font-size: 13px; color: var(--text-sub); display: block; }

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; }

.contact-info-card {
  background: linear-gradient(150deg, #1450a3, #2f7be0);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 32px;
}

.contact-info-card h3 { font-size: 20px; margin-bottom: 22px; letter-spacing: 1px; }

.contact-info-card .row {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
  font-size: 14.5px;
}

.contact-info-card .row svg { flex-shrink: 0; margin-top: 2px; }
.contact-info-card .row .label { color: rgba(255, 255, 255, 0.7); font-size: 13px; }
.contact-info-card a { color: #fff; }
.contact-info-card a:hover { color: #ffcf8a; }

.contact-form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 32px;
  box-shadow: var(--shadow);
}

.form-group { margin-bottom: 20px; }

.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--text-main); }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-gray);
  transition: .2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 80, 163, 0.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-tip { font-size: 12px; color: var(--text-light); margin-top: 10px; }

/* ---------- 页面 ---------- */
.text-page { max-width: 880px; margin: 0 auto; }
.text-page h2 { font-size: 20px; color: var(--primary-dark); margin: 30px 0 14px; }
.text-page p { margin-bottom: 14px; color: var(--text-sub); line-height: 2; }
.text-page ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.text-page ul li { margin-bottom: 8px; color: var(--text-sub); }

.updated-date { font-size: 13px; color: var(--text-light); border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 24px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; }
.pagination a, .pagination span {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-sub);
  background: #fff;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(20, 80, 163, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s;
  }
  .main-nav.open { max-height: 480px; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 4px; }
  .main-nav a { padding: 12px 14px; }

  .hero h1 { font-size: 28px; }
  .hero-inner { padding: 56px 0 64px; }
  .module-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats { flex-wrap: wrap; gap: 18px; }
  .hero-stats .stat { min-width: 40%; }
  .trade-item { flex-wrap: wrap; }
  .news-item time { display: none; }
}
