/* ============================================================
   Ningchuan Water Treatment — Website Stylesheet
   ============================================================ */
:root {
  --navy: #0b3954;
  --navy-2: #134074;
  --teal: #0e9594;
  --teal-light: #e6f7f6;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f7fa;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(15, 40, 70, 0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #cfe3ee; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; padding: 6px 0; flex-wrap: wrap; gap: 4px; }
.topbar a { color: #fff; }

/* ---------- Navigation ---------- */
header.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; }
.brand .name { font-size: 20px; font-weight: 700; color: var(--navy); line-height: 1.15; }
.brand .name small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .12em; }
nav.menu { display: flex; align-items: center; gap: 26px; }
nav.menu a { font-weight: 600; font-size: 15px; color: var(--ink); padding: 8px 2px; border-bottom: 2px solid transparent; }
nav.menu a:hover, nav.menu a.active { color: var(--teal); border-bottom-color: var(--teal); }
.nav-cta { background: var(--teal); color: #fff !important; padding: 10px 18px !important; border-radius: 8px; border: none; }
.nav-cta:hover { background: #0b7c7b; }
.menu-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 520px;
  display: flex; align-items: center;
  background: var(--navy); /* 轮播图加载前的底色 */
  color: #fff; overflow: hidden;
}
.hero-slides, .hero-slide, .hero-overlay { position: absolute; inset: 0; }
.hero-slide {
  background: center/cover no-repeat;
  opacity: 0; transition: opacity 1.2s ease;
  will-change: opacity;
}
.hero-slide.active { opacity: 1; }
/* 白底产品图：完整显示，不裁切 */
.hero-slide--contain {
  background-size: contain; background-repeat: no-repeat;
  background-position: right center; background-color: #0a2c44;
}
.hero-overlay { background: linear-gradient(rgba(8, 38, 60, 0.55), rgba(8, 38, 60, 0.65)); }
.hero-content { position: relative; z-index: 2; max-width: 640px; padding: 80px 0; }
.hero-dots {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; z-index: 3;
}
.hero-dots button {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .9);
  background: transparent; cursor: pointer; padding: 0;
  transition: background .3s;
}
.hero-dots button.active { background: #fff; }
.hero h1 { font-size: 42px; line-height: 1.2; font-weight: 800; margin-bottom: 16px; }
.hero p { font-size: 18px; color: #dbeaf2; margin-bottom: 30px; }
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 8px;
  font-weight: 700; font-size: 15px; transition: .2s;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #0b7c7b; }
.btn-ghost { border: 2px solid rgba(255,255,255,.7); color: #fff; margin-left: 12px; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head .kicker { color: var(--teal); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.section-head h2 { font-size: 32px; color: var(--navy); margin: 8px 0 12px; }
.section-head p { color: var(--muted); }
.alt { background: var(--bg); }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 26px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .25s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.card .thumb { height: 200px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 14px; }
.card .thumb img { max-height: 100%; object-fit: contain; }
.card .body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 16.5px; color: var(--navy); margin-bottom: 8px; line-height: 1.4; }
.card p { font-size: 13.5px; color: var(--muted); flex: 1; }
.card .more { color: var(--teal); font-weight: 700; font-size: 13.5px; margin-top: 14px; }
.center { text-align: center; margin-top: 44px; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.feature { background: #fff; border-radius: var(--radius); padding: 30px 24px; border: 1px solid var(--line); text-align: center; }
.feature .ico { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 14px; background: var(--teal-light); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.feature h3 { font-size: 16.5px; color: var(--navy); margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--muted); }

/* ---------- About split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.split img, .split video.about-video { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); background: #000; }
.split h2 { font-size: 30px; color: var(--navy); margin: 8px 0 16px; }
.split p { color: var(--muted); margin-bottom: 14px; font-size: 15px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; text-align: center; }
.contact-card .ico { font-size: 28px; margin-bottom: 12px; }
.contact-card h3 { font-size: 15px; color: var(--navy); margin-bottom: 6px; }
.contact-card p { font-size: 14px; color: var(--muted); word-break: break-word; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(rgba(11,57,84,.82), rgba(11,57,84,.86)), url("assets/img/factory-banner.jpg") center/cover no-repeat; color: #fff; padding: 64px 0; }
.page-hero h1 { font-size: 34px; }
.page-hero p { color: #cfe3ee; margin-top: 8px; }

/* ---------- Categories ---------- */
.cat-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.cat-row button {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; transition: .2s;
}
.cat-row button:hover, .cat-row button.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- Product spec table ---------- */
.spec-wrap { margin-top: 46px; }
.spec-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); font-size: 14.5px;
}
.spec-table caption {
  caption-side: top; text-align: left; font-weight: 700; color: var(--navy);
  font-size: 17px; padding: 0 0 12px;
}
.spec-table th, .spec-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec-table th { width: 34%; background: #f4f8fb; color: var(--navy); font-weight: 600; white-space: nowrap; }
.spec-table td { color: var(--muted); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-note { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 20px; margin-bottom: 12px;
}
.faq details[open] { border-color: var(--teal); box-shadow: var(--shadow); }
.faq summary {
  font-weight: 700; color: var(--navy); font-size: 16px;
  cursor: pointer; list-style: none; position: relative; padding-right: 26px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: -2px;
  color: var(--teal); font-size: 22px; font-weight: 700; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); font-size: 14.5px; margin-top: 10px; }

/* ---------- Rich text list (landing pages) ---------- */
.tick-list { margin: 16px 0 24px; }
.tick-list li { color: var(--muted); font-size: 15px; padding-left: 26px; position: relative; margin-bottom: 9px; }
.tick-list li::before { content: "✔"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }

/* ---------- 404 ---------- */
.err-wrap { text-align: center; padding: 90px 0 110px; }
.err-wrap .code { font-size: 84px; font-weight: 800; color: var(--teal); line-height: 1; }
.err-wrap h1 { font-size: 28px; color: var(--navy); margin: 14px 0 10px; }
.err-wrap p { color: var(--muted); margin-bottom: 26px; }

/* ---------- Footer ---------- */
footer { background: var(--navy); color: #b9cfdd; padding: 52px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 38px; }
.footer-grid h4 { color: #fff; font-size: 15.5px; margin-bottom: 14px; }
.footer-grid img { height: 44px; width: auto; margin-bottom: 14px; }
.footer-grid a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; text-align: center; font-size: 13px; color: #8fb0c4; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 14px 5%; gap: 4px; box-shadow: 0 8px 18px rgba(0,0,0,.1); }
  .menu.open { display: flex; }
  .menu-toggle { display: block; }
  .split { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
}
