/* ============================================
   厦门越界商贸有限公司 - 企业官网样式
   ============================================ */

:root {
  --primary: #1a56db;
  --primary-dark: #12409e;
  --primary-light: #e8effc;
  --dark: #101828;
  --text: #344054;
  --text-light: #667085;
  --bg-gray: #f5f7fa;
  --white: #ffffff;
  --border: #e4e7ec;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
  --container: 1140px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-text strong {
  font-size: 17px;
  color: var(--dark);
}

.brand-text small {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 0.4px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 15px;
  color: var(--text);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== 首页横幅 ===== */
.hero {
  position: relative;
  padding: 180px 0 140px;
  background: linear-gradient(135deg, #0b1f4d 0%, var(--primary) 55%, #2f7bfa 100%);
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -160px;
  left: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 18px;
  letter-spacing: 2px;
}

.hero-sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* ===== 快速数据 ===== */
.stats {
  background: var(--white);
  position: relative;
  margin-top: -64px;
  z-index: 3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.stat {
  padding: 32px 20px;
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat span {
  font-size: 14px;
  color: var(--text-light);
}

/* ===== 通用区块 ===== */
.section {
  padding: 96px 0;
}

.section-gray {
  background: var(--bg-gray);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-label {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: 34px;
  color: var(--dark);
  margin-bottom: 16px;
}

.section-head p:last-child {
  color: var(--text-light);
  font-size: 15px;
}

/* ===== 关于我们 ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.about-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.about-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-card h3 {
  font-size: 18px;
  color: var(--dark);
  margin-bottom: 10px;
}

.about-card p {
  font-size: 14px;
  color: var(--text-light);
}

/* ===== 业务范围 ===== */
.business-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.business-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: all 0.3s;
}

.business-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.b-no {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.business-item h3 {
  font-size: 16px;
  color: var(--dark);
  margin-bottom: 2px;
}

.business-item p {
  font-size: 13px;
  color: var(--text-light);
}

/* ===== 产品领域 ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.product-thumb svg {
  width: 72px;
  height: 72px;
  opacity: 0.95;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.thumb-1 {
  background-image: linear-gradient(135deg, #5b8def, #1a56db);
}

.thumb-2 {
  background-image: linear-gradient(135deg, #f59e0b, #ea580c);
}

.thumb-3 {
  background-image: linear-gradient(135deg, #10b981, #047857);
}

.thumb-4 {
  background-image: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.product-info {
  padding: 20px 24px 24px;
}

.product-info h3 {
  font-size: 17px;
  color: var(--dark);
  margin-bottom: 8px;
}

.product-info p {
  font-size: 13px;
  color: var(--text-light);
}

/* ===== 联系我们 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-item {
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  border-left: 4px solid var(--primary);
}

.contact-item h3 {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 16px;
  color: var(--dark);
  font-weight: 500;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: 20px;
  color: var(--dark);
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 14px;
  transition: border-color 0.3s;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--primary);
  text-align: center;
  display: none;
}

.form-tip.show {
  display: block;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--dark);
  color: #98a2b3;
  padding-top: 64px;
  font-size: 14px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 14px;
}

.footer-brand p {
  color: #98a2b3;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact p {
  margin-bottom: 6px;
  line-height: 1.8;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: #667085;
}

/* ===== 返回顶部 ===== */
.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  box-shadow: var(--shadow-lg);
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--primary-dark);
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 0 24px;
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s;
  }

  .nav-links.open {
    max-height: 320px;
    padding: 12px 24px 20px;
  }

  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 140px 0 120px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(odd) {
    border-left: none;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .business-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 576px) {
  .about-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero h1 {
    font-size: 26px;
  }
}
