/* ============ 中顺泰建材 H5 ============ */
:root {
  --primary: #0e5aa7;
  --primary-dark: #0a3f78;
  --accent: #2aa06a;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1d2530;
  --text-2: #5b6774;
  --line: #e6eaf0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 40, 80, .08);
  --max-w: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: env(safe-area-inset-top);
  background: rgba(10, 63, 120, .0);
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto;
  height: 56px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: baseline; gap: 8px; color: #fff; transition: color .3s; }
.brand-logo {
  font-size: 20px; font-weight: 800; letter-spacing: 2px;
}
.brand-name { font-size: 12px; letter-spacing: 1px; opacity: .85; }
.site-header.scrolled .brand { color: var(--primary-dark); }
.lang-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .55);
  color: #fff; font-size: 13px; font-weight: 600;
  transition: all .3s;
}
.site-header.scrolled .lang-btn { border-color: var(--primary); color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("../assets/images/hero.jpg") center/cover no-repeat;
  transform: scale(1.05);
}
.hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 34, 66, .55) 0%, rgba(8, 34, 66, .35) 45%, rgba(8, 34, 66, .75) 100%);
}
.hero-content {
  position: relative; z-index: 1; text-align: center;
  padding: 0 24px; color: #fff; max-width: var(--max-w);
}
.hero-tag {
  display: inline-block; font-size: 13px; letter-spacing: 3px;
  padding: 6px 16px; border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 20px; margin-bottom: 22px; opacity: .95;
}
.hero-title { font-size: 30px; font-weight: 800; letter-spacing: 2px; line-height: 1.4; margin-bottom: 14px; }
.hero-sub { font-size: 15px; opacity: .88; letter-spacing: 1px; margin-bottom: 34px; }
.hero-btn {
  display: inline-block; padding: 12px 42px;
  background: linear-gradient(135deg, var(--accent), #1f8a56);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 2px;
  border-radius: 26px; box-shadow: 0 8px 20px rgba(42, 160, 106, .4);
  transition: transform .2s;
}
.hero-btn:active { transform: scale(.96); }
.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 2px solid rgba(255, 255, 255, .6);
  border-radius: 14px; z-index: 1;
}
.hero-scroll span {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 4px; background: #fff;
  animation: scrollHint 1.6s ease infinite;
}
@keyframes scrollHint {
  0% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 0; transform: translate(-50%, 12px); }
  100% { opacity: 0; }
}

/* ---------- Sections ---------- */
.section { max-width: var(--max-w); margin: 0 auto; padding: 56px 16px 44px; }
.section-gray { background: var(--bg); }
.section-dark {
  max-width: none;
  background: linear-gradient(160deg, #0a3f78 0%, #0e5aa7 60%, #1272c4 100%);
  color: #fff;
}
.section-dark .section-sub { color: rgba(255, 255, 255, .6); }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: 24px; font-weight: 800; letter-spacing: 2px; }
.section-sub {
  font-size: 12px; color: var(--text-2); letter-spacing: 4px;
  text-transform: uppercase; margin-top: 6px;
}

/* ---------- Video ---------- */
.video-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-wrap video { width: 100%; display: block; background: #000; aspect-ratio: auto; max-height: 80vh; object-fit: contain; }

/* ---------- About ---------- */
.about-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.about-text { padding: 20px 18px 6px; font-size: 14.5px; color: var(--text-2); text-align: justify; }
.about-nums {
  display: flex; padding: 18px 8px 20px;
}
.num-item { flex: 1; text-align: center; }
.num-item strong { display: block; font-size: 26px; color: var(--primary); font-weight: 800; }
.num-item span { font-size: 12px; color: var(--text-2); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; padding: 8px 16px; border-radius: 18px;
  background: #fff; color: var(--text-2); font-size: 13px;
  border: 1px solid var(--line); transition: all .25s;
}
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ---------- Products ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.product-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 3px 14px rgba(15, 40, 80, .06);
  transition: transform .2s; position: relative;
}
.product-card:active { transform: scale(.97); }
.product-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.pc-video {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(42, 160, 106, .94); color: #fff;
  font-size: 10px; font-weight: 600; letter-spacing: .5px;
  pointer-events: none;
}
.pc-info { padding: 10px 12px 14px; }
.pc-cat {
  display: inline-block; font-size: 10px; color: var(--accent);
  border: 1px solid currentColor; border-radius: 4px;
  padding: 1px 6px; margin-bottom: 6px; letter-spacing: 1px;
}
.pc-name {
  font-size: 13.5px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 38px;
}
.pc-more {
  display: flex; align-items: center; gap: 3px;
  margin-top: 8px; font-size: 12px; color: var(--primary); font-weight: 600;
}
.pc-more svg { width: 12px; height: 12px; }

/* ---------- Certs ---------- */
.cert-grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 16px;
}
.cert-item {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px; padding: 18px 8px; text-align: center;
  backdrop-filter: blur(4px);
}
.cert-item .ci-icon { font-size: 22px; margin-bottom: 8px; }
.cert-item .ci-name { font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.cert-item .ci-desc { font-size: 11px; color: rgba(255, 255, 255, .65); margin-top: 4px; }

/* ---------- Footer ---------- */
.footer {
  text-align: center; padding: 44px 24px calc(34px + env(safe-area-inset-bottom));
  background: #0b2239; color: rgba(255, 255, 255, .75);
}
.footer-brand { font-size: 22px; font-weight: 800; letter-spacing: 4px; color: #fff; }
.footer-brand span { font-size: 11px; letter-spacing: 3px; opacity: .6; margin-left: 8px; font-weight: 400; }
.footer-name { margin-top: 12px; font-size: 14px; }
.footer-addr { margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.footer-note { margin-top: 14px; font-size: 11px; color: rgba(255, 255, 255, .4); }
.footer-copy { margin-top: 6px; font-size: 11px; color: rgba(255, 255, 255, .35); }
.footer-beian { margin-top: 10px; font-size: 11px; }
.footer-beian a { color: rgba(255, 255, 255, .5); text-decoration: none; }
.footer-beian a:active { color: rgba(255, 255, 255, .7); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-mask {
  position: absolute; inset: 0; background: rgba(10, 20, 35, .55);
  opacity: 0; transition: opacity .3s;
}
.modal.open .modal-mask { opacity: 1; }
.modal-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 20px 20px 0 0;
  max-height: 88vh; overflow-y: auto;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.32, .72, .28, 1);
  -webkit-overflow-scrolling: touch;
}
.modal.open .modal-sheet { transform: translateY(0); }
.modal-handle { width: 36px; height: 4px; background: #d9dee6; border-radius: 4px; margin: 10px auto 0; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, .35); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.modal-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.modal-body { padding: 18px 18px 34px; }
.modal-body h3 { font-size: 19px; font-weight: 800; line-height: 1.4; padding-right: 30px; }
.modal-spec { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.modal-tags span {
  font-size: 11px; color: var(--primary); background: rgba(14, 90, 167, .08);
  padding: 4px 10px; border-radius: 12px;
}
.modal-block { margin-top: 18px; }
.modal-block h4 {
  font-size: 14px; color: var(--primary); font-weight: 700; margin-bottom: 6px;
  padding-left: 10px; border-left: 3px solid var(--accent);
}
.modal-block p { font-size: 14px; color: var(--text-2); text-align: justify; }
.modal-video { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.modal-video video { width: 100%; display: block; background: #000; max-height: 70vh; }

/* ---------- Honors & Certificates ---------- */
.honor-grid {
  max-width: var(--max-w); margin: 24px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.honor-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column;
}
.honor-card:active { transform: scale(.98); }
@media (hover: hover) {
  .honor-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(15, 40, 80, .14); }
  .honor-card:hover .honor-thumb img { transform: scale(1.05); }
}
.honor-thumb {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background: linear-gradient(160deg, #eef3f9, #e2e9f2);
}
.honor-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.honor-badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  padding: 3px 9px; border-radius: 20px;
  background: rgba(14, 90, 167, .92); color: #fff;
  font-size: 10.5px; font-weight: 600; letter-spacing: .5px;
}
.honor-zoom {
  position: absolute; right: 8px; bottom: 8px; z-index: 1;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(10, 34, 57, .68); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.honor-info { padding: 10px 12px 12px; }
.honor-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
.honor-meta { margin-top: 4px; font-size: 11px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.honor-meta .pages { color: var(--primary); font-weight: 600; }

@media (min-width: 760px) {
  .honor-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .honor-name { font-size: 14px; }
}

/* ---------- Certificate Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 14, 26, .94);
  -webkit-user-select: none; user-select: none;
}
.lb[hidden] { display: none; }
.lb-mask { position: absolute; inset: 0; }
.lb-img {
  position: relative; z-index: 1;
  max-width: 92vw; max-height: 76vh;
  border-radius: 8px; box-shadow: 0 10px 50px rgba(0, 0, 0, .5);
  background: #fff; touch-action: pan-y;
}
.lb-close {
  position: absolute; top: calc(env(safe-area-inset-top) + 14px); right: 16px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-nav[hidden] { display: none; }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 18px); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: rgba(255, 255, 255, .92); text-align: center; padding: 0 70px;
}
.lb-title { font-size: 14px; font-weight: 600; }
.lb-count {
  font-size: 12px; padding: 2px 12px; border-radius: 20px;
  background: rgba(255, 255, 255, .14);
}
@media (min-width: 760px) {
  .lb-img { max-width: 60vw; max-height: 82vh; }
  .lb-prev { left: max(18px, calc(50vw - 420px)); }
  .lb-next { right: max(18px, calc(50vw - 420px)); }
}

/* ---------- Desktop adaptation (PC browse) ---------- */
@media (min-width: 760px) {
  .hero-title { font-size: 40px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cert-grid { grid-template-columns: repeat(6, 1fr); }
  .modal-sheet { max-width: 560px; left: 50%; transform: translate(-50%, 100%); }
  .modal.open .modal-sheet { transform: translate(-50%, 0); }
}
