/* ============================================================
   无锡立信染整机械有限公司官网 — 全站样式
   主题色：深蓝 #0d2b52 / 品牌蓝 #1e4d8c / 强调绿 #1a7a4a
           辅黄 #f4a020 / 正文 #333 / 背景 #fff / 浅灰 #f5f7fa
   风格：工业风、现代、响应式
   ============================================================ */

:root {
  --deep-blue: #0d2b52;
  --brand-blue: #1e4d8c;
  --accent-green: #1a7a4a;
  --accent-yellow: #f4a020;
  --text: #333333;
  --bg: #ffffff;
  --bg-light: #f5f7fa;
  --border: #dde3ec;
  --white: #ffffff;
  --shadow: 0 4px 16px rgba(13, 43, 82, 0.10);
  --radius: 6px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

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

a {
  color: var(--brand-blue);
  text-decoration: none;
}

a:hover {
  color: var(--deep-blue);
}

/* ---------- 语言切换（纯 CSS 控制，JS 只切 <html lang>） ---------- */
html[lang="zh"] .en {
  display: none !important;
}

html[lang="en"] .zh {
  display: none !important;
}

/* ---------- 顶栏导航（sticky） ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deep-blue);
  color: var(--white);
  box-shadow: var(--shadow);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

.navbar .brand .brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--brand-blue), var(--accent-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 4px;
  color: #d7e2f2;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* 语言切换按钮 */
#lang-toggle {
  margin-left: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  background: transparent;
  color: var(--white);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#lang-toggle:hover {
  background: var(--white);
  color: var(--deep-blue);
}

/* 移动端导航开关按钮 */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(135deg, var(--deep-blue) 0%, var(--brand-blue) 100%);
  padding: 96px 24px 88px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(244, 160, 32, 0.12);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: 42px;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.hero .hero-sub {
  font-size: 18px;
  color: #c9d8ee;
  max-width: 640px;
  margin-bottom: 28px;
}

.hero .hero-img {
  margin-top: 32px;
  max-width: 900px;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ---------- 通用区块 ---------- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
}

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

.section .section-title {
  font-size: 28px;
  color: var(--deep-blue);
  text-align: center;
  margin-bottom: 8px;
}

.section .section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--accent-green);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section .section-desc {
  text-align: center;
  color: #666;
  margin: 14px auto 36px;
  max-width: 720px;
}

/* ---------- 卡片网格 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(13, 43, 82, 0.06);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.card .card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card .card-body {
  padding: 18px 20px 22px;
}

.card .card-title {
  font-size: 18px;
  color: var(--deep-blue);
  margin-bottom: 8px;
}

.card .card-text {
  color: #555;
  font-size: 14px;
  margin-bottom: 14px;
}

/* ---------- 锚点定位：预留 sticky 导航高度 ---------- */
section[id] {
  scroll-margin-top: 84px;
}

/* ---------- 产品分区 ---------- */
.product-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.product-block:last-of-type {
  border-bottom: none;
}

.product-block .product-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 分辨率较低的实拍图限制显示宽度，避免放大模糊 */
.product-block .product-img.img-small {
  max-width: 420px;
}

.product-block .product-info h3 {
  font-size: 22px;
  color: var(--deep-blue);
  margin-bottom: 12px;
}

.product-block .product-info p {
  color: #555;
  margin-bottom: 10px;
}

.product-block .product-info ul {
  margin: 10px 0 0 20px;
  color: #555;
}

.product-block .product-info li {
  margin-bottom: 6px;
}

/* ---------- 中样系列单机图网格 ---------- */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0 8px;
}

.sample-grid figure {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sample-grid figure img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: var(--white);
}

.sample-grid figcaption {
  padding: 8px 10px;
  font-size: 13px;
  color: #555;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ---------- 规格表格（斑马纹） ---------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 8px;
  font-size: 14px;
}

.spec-table th,
.spec-table td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
}

.spec-table th {
  background: var(--brand-blue);
  color: var(--white);
  font-weight: 600;
}

.spec-table tbody tr:nth-child(even) {
  background: var(--bg-light);
}

.spec-table tbody tr:hover {
  background: #eef3fa;
}

/* ---------- 价值主张三卡片 ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent-green);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.value-card .value-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(26, 122, 74, 0.12);
  color: var(--accent-green);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-card .value-title {
  font-size: 18px;
  color: var(--deep-blue);
  margin-bottom: 8px;
}

.value-card .value-text {
  color: #555;
  font-size: 14px;
}

/* ---------- CTA 区块 / 按钮 ---------- */
.cta {
  background: linear-gradient(120deg, var(--deep-blue), var(--brand-blue));
  color: var(--white);
  text-align: center;
  padding: 72px 24px;
}

.cta h2 {
  font-size: 30px;
  margin-bottom: 12px;
}

.cta p {
  color: #c9d8ee;
  margin-bottom: 28px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

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

.btn-primary:hover {
  background: #14643d;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26, 122, 74, 0.4);
}

.btn-secondary {
  background: var(--accent-yellow);
  color: var(--deep-blue);
}

.btn-secondary:hover {
  background: #e09100;
  color: var(--deep-blue);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--deep-blue);
}

/* ---------- 联系表单 ---------- */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.contact-form .form-group {
  margin-bottom: 18px;
}

.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--deep-blue);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(30, 77, 140, 0.15);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-tip {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 4px;
  background: rgba(26, 122, 74, 0.1);
  border: 1px solid rgba(26, 122, 74, 0.35);
  color: var(--accent-green);
  font-size: 14px;
}

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

/* ---------- 页脚 ---------- */
.footer {
  background: #081c36;
  color: #b9c7dd;
  font-size: 14px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 12px;
  font-size: 15px;
}

.footer a {
  color: #b9c7dd;
}

.footer a:hover {
  color: var(--accent-yellow);
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 16px 24px;
  font-size: 13px;
  color: #7f92ad;
}

/* ---------- 其他工具类 ---------- */
.text-center {
  text-align: center;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

/* ---------- 响应式：移动端 ≤768px 单列 ---------- */
@media (max-width: 768px) {
  .navbar-inner {
    height: 56px;
    padding: 0 16px;
  }

  .nav-toggle {
    display: block;
    order: 3;
  }

  .nav-links {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--deep-blue);
    padding: 8px 16px 16px;
    display: none;
    gap: 2px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 10px;
    border-radius: 4px;
  }

  #lang-toggle {
    margin-left: auto;
    margin-right: 8px;
  }

  .hero {
    padding: 56px 20px 48px;
  }

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

  .hero .hero-sub {
    font-size: 16px;
  }

  .section {
    padding: 44px 20px;
  }

  .section .section-title {
    font-size: 22px;
  }

  .product-block {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .sample-grid figure img {
    height: 140px;
  }

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

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

  .contact-form {
    padding: 22px 18px;
  }

  .cta {
    padding: 48px 20px;
  }

  .cta h2 {
    font-size: 24px;
  }
}
