/* ==========================================================================
   VIGOHOME — One-Stop Building Material Solution Provider
   Brand: tree green #8FBE43 · ink #141615 · sage #8EA659 · paper #FAFBF7
   ========================================================================== */
:root {
  --green: #8fbe43;
  --green-dark: #6e9a2f;
  --green-deep: #37501f;
  --ink: #141615;
  --ink-soft: #3c443c;
  --muted: #66705f;
  --paper: #fafbf7;
  --card: #ffffff;
  --line: #e3e8da;
  --sage: #8ea659;
  --danger: #a8382b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 22, 21, 0.08);
  --shadow-sm: 0 4px 14px rgba(20, 22, 21, 0.06);
  --wrap: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  display: flex; align-items: center; gap: 28px;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
/* object-fit: contain —— 761~1020px 区间横向导航会挤压 logo 的宽度，
   若只锁死 height 会被拉伸变形；contain 让图像按原始比例缩放填充盒子，
   既不改变盒子尺寸（不影响导航布局），也不产生形变。 */
.brand img { height: 46px; width: auto; object-fit: contain; }
.brand .brand-name {
  font-weight: 800; letter-spacing: 0.12em; font-size: 1.05rem; color: var(--ink);
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
  padding: 9px 13px; border-radius: 9px;
}
.nav a:hover { background: #f0f4e8; text-decoration: none; color: var(--green-deep); }
.nav a[aria-current="page"] { color: var(--green-deep); background: #eef4e2; }
.nav .nav-cta { background: var(--green); color: #fff; margin-left: 8px; }
.nav .nav-cta:hover { background: var(--green-dark); color: #fff; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff;
  background: var(--ink);
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.55;
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10, 14, 8, 0.88) 8%, rgba(10, 14, 8, 0.45) 55%, rgba(10, 14, 8, 0.25));
}
.hero-in { position: relative; padding-block: 108px 96px; max-width: 780px; }
.hero .kicker { color: #cfe6a8; }
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.12; margin: 14px 0 18px;
  font-weight: 800; letter-spacing: -0.01em;
}
.hero p.lead { font-size: 1.14rem; color: #e8eee0; max-width: 640px; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; }
.hero-pills a {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42); color: #fff;
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  background: rgba(10, 14, 8, 0.28); transition: 0.15s ease;
}
.hero-pills a:hover { background: var(--green); border-color: var(--green); color: #fff; }
a.card { color: inherit; text-decoration: none; }
a.card:hover h3 { color: var(--green-deep); }

.kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.78rem; font-weight: 700; color: var(--green-dark);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px;
  font-weight: 700; font-size: 0.98rem; border: 2px solid transparent;
  cursor: pointer; transition: 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { background: var(--green-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.65); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn-outline { border-color: var(--green); color: var(--green-deep); }
.btn-outline:hover { background: #f2f7e8; }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section.tight { padding: 56px 0; }
.section.alt { background: #f2f5ec; }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2;
  margin: 10px 0 14px; font-weight: 800; letter-spacing: -0.01em;
}
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- stat band ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.stat { background: var(--card); padding: 26px 22px; text-align: center; }
.stat b { display: block; font-size: 1.9rem; font-weight: 800; color: var(--green-deep); }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .card-media { aspect-ratio: 4 / 3; overflow: hidden; background: #eef1e6; }
.card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: 20px 22px 24px; }
.card h3 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 750; }
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.card .card-link { margin-top: 14px; font-weight: 700; color: var(--green-dark); display: inline-block; }
.card.tall .card-media { aspect-ratio: 16 / 10; }

.icon-chip {
  width: 46px; height: 46px; border-radius: 12px; background: #eef4e2;
  display: grid; place-items: center; margin-bottom: 14px;
}
.icon-chip svg { width: 24px; height: 24px; stroke: var(--green-deep); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-size: 2rem; font-weight: 800; color: var(--green); opacity: 0.9;
  display: block; margin-bottom: 6px; letter-spacing: -0.02em;
}
.step h3 { margin: 0 0 8px; font-size: 1.08rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
table.spec th, table.spec td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec th { background: #f4f7ec; font-weight: 700; color: var(--green-deep); white-space: nowrap; }
table.spec tr:last-child td { border-bottom: 0; }
table.spec td:first-child { font-weight: 600; white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 20px; box-shadow: var(--shadow-sm);
}
.faq details[open] { border-color: var(--sage); }
.faq summary {
  cursor: pointer; font-weight: 700; padding: 17px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--green-dark); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-a { padding: 0 0 18px; color: var(--ink-soft); }
.faq .faq-a p { margin: 0 0 10px; }

/* ---------- key-facts (GEO summary block) ---------- */
.keyfacts {
  background: #f4f8ea; border: 1px solid #d8e5bd; border-radius: var(--radius);
  padding: 22px 26px; margin: 0 0 34px;
}
.keyfacts h2 { margin: 0 0 10px; font-size: 1.02rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--green-deep); }
.keyfacts ul { margin: 0; padding-left: 20px; columns: 2; column-gap: 40px; }
.keyfacts li { margin-bottom: 7px; break-inside: avoid; }

/* ---------- split feature ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.split .media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 10px 0 16px; font-weight: 800; letter-spacing: -0.01em; }
.split p { color: var(--ink-soft); }
.tick-list { list-style: none; padding: 0; margin: 18px 0 0; }
.tick-list li { padding: 7px 0 7px 32px; position: relative; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 18px; height: 18px;
  background: var(--green); border-radius: 50%;
  -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 6 9 17l-5-5"/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 6 9 17l-5-5"/></svg>') center/contain no-repeat;
}

/* ---------- products 页分类区块：整块可点击 ---------- */
.cat-block { position: relative; }
/* 标题即链接，用 ::after 把点击区铺满整个区块（图片、文字与空白都可点） */
.cat-block .cat-link { color: inherit; }
.cat-block .cat-link::after { content: ""; position: absolute; inset: 0; }
.cat-block .cat-link:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.cat-block .media img { transition: transform 0.25s ease; }
.cat-block:hover .media img { transform: scale(1.03); }

/* ---------- breadcrumb ---------- */
.breadcrumb { padding: 18px 0 0; font-size: 0.88rem; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: #b9c2ab; }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- page hero (subpages) ---------- */
.page-hero { background: var(--green-deep); color: #fff; padding: 64px 0 58px; position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -80px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(closest-side, rgba(143, 190, 67, 0.5), transparent);
}
.page-hero h1 { margin: 10px 0 12px; font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.01em; position: relative; }
.page-hero p { margin: 0; max-width: 720px; color: #e2ecd2; font-size: 1.06rem; position: relative; }
.page-hero .kicker { color: #cfe6a8; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--green-deep); color: #fff; border-radius: 20px; padding: 54px 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -140px; width: 380px; height: 380px; background: radial-gradient(closest-side, rgba(143, 190, 67, 0.55), transparent); pointer-events: none; }
/* h2 / p / 按钮需要压过装饰光晕（::after 按绘制顺序在其之上），故显式抬升层级 */
.cta-band h2 { margin: 0 0 8px; font-size: 1.7rem; font-weight: 800; position: relative; z-index: 1; }
.cta-band p { margin: 0; color: #dce8c8; position: relative; z-index: 1; }
.cta-band .btn { position: relative; z-index: 1; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: 0.92rem; display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-note.is-ok { color: var(--green-deep); font-weight: 600; }
.form-note.is-error { color: var(--danger); font-weight: 600; }
/* anti-spam honeypot — out of the visual flow but present in the DOM for bots */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

/* ---------- footer ---------- */
.site-footer { background: #18200f; color: #c9d3b8; margin-top: 90px; }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 64px 0 40px; }
.site-footer h3 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #c9d3b8; }
.site-footer a:hover { color: #fff; }
.footer-brand img { height: 52px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 0.94rem; max-width: 300px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 20px 0;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 0.86rem; color: #93a17e;
}
.address { font-style: normal; line-height: 1.7; }

/* ---------- reveal animation (progressive: hidden only when JS is active) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.reveal { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .keyfacts ul { columns: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 28px; }
  .section { padding: 60px 0; }
  .hero-in { padding-block: 76px 66px; }

  /* mobile nav */
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 18px 18px; gap: 2px;
    box-shadow: var(--shadow);
  }
  .nav a { padding: 12px 10px; }
  .nav .nav-cta { margin: 10px 0 0; text-align: center; }
  .nav.open { display: flex; }
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle svg { width: 22px; height: 22px; stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr; gap: 30px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- video gallery (data/videos.js + assets/js/videos.js) ---------- */
.video-filters,
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.chip {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 0.92rem; font-weight: 600;
  cursor: pointer; transition: 0.15s ease;
}
.chip:hover { border-color: var(--green); }
.chip.active { background: var(--green); border-color: var(--green); color: #fff; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.video-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); font: inherit; color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.video-card:hover, .video-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow); }
.video-card:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e7ebdd; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.video-card:hover .video-thumb img { transform: scale(1.04); }
.play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(20, 22, 21, 0.78); display: grid; place-items: center;
  transition: 0.15s ease; pointer-events: none;
}
.play-badge svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.video-card:hover .play-badge { background: var(--green); }
.vcat {
  position: absolute; left: 12px; bottom: 12px; padding: 4px 12px; border-radius: 999px;
  background: rgba(20, 22, 21, 0.72); color: #fff; font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; pointer-events: none;
}
.video-info { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; }
.vtitle { font-weight: 750; font-size: 1.05rem; line-height: 1.35; }
.vdesc { color: var(--muted); font-size: 0.93rem; }
.vmeta { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.02em; }
.video-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card); }

body.modal-open { overflow: hidden; }


/* ---------- image galleries + lightbox (assets/js/lightbox.js) ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.gallery-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-grid.masonry-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-grid.wall { grid-template-columns: repeat(6, 1fr); gap: 14px; }
.gallery-grid.natural .gallery-item img { aspect-ratio: auto; }
.gallery-item {
  position: relative; display: block; margin: 0; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); background: var(--card);
  box-shadow: var(--shadow-sm); cursor: zoom-in;
}
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform 0.25s ease; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.05); }
.gallery-item:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.gallery-item .gcap {
  position: absolute; left: 0; right: 0; bottom: 0; display: block; padding: 26px 14px 10px;
  background: linear-gradient(transparent, rgba(10, 12, 8, 0.8));
  color: #fff; font-size: 0.85rem; line-height: 1.4; pointer-events: none;
}
.gallery-item .zoom-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(20, 22, 21, 0.72); display: grid; place-items: center;
  opacity: 0; transition: 0.15s ease; pointer-events: none;
}
.gallery-item:hover .zoom-badge, .gallery-item:focus-visible .zoom-badge { opacity: 1; background: var(--green); }
.gallery-item .zoom-badge svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; }

.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 8, 0.85); }
.lightbox-box { position: relative; width: min(1100px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.lightbox-stage { position: relative; display: grid; place-items: center; min-height: 120px; }
.lightbox-stage img {
  max-width: 100%; max-height: calc(100vh - 150px); border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); display: block;
}
.lightbox-stage.loading img { opacity: 0.35; }
.lightbox-stage.loading::after {
  content: ""; position: absolute; width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: lb-spin 0.8s linear infinite;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lightbox-bar { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: center; padding: 14px 8px 0; color: #eef1e6; }
.lightbox-count { color: #b9c2ad; font-size: 0.85rem; }
.lightbox-cap { font-size: 0.95rem; text-align: center; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 42px; height: 42px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(20, 22, 21, 0.75); display: grid; place-items: center; transition: 0.15s ease;
}
.lightbox-close svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; }
.lightbox-close:hover { background: var(--green); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(20, 22, 21, 0.75); display: grid; place-items: center; transition: 0.15s ease;
}
.lightbox-nav svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-nav:hover { background: var(--green); }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }
.lightbox-nav[hidden] { display: none; }

@media (max-width: 720px) {
  .gallery-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid.wall { grid-template-columns: repeat(3, 1fr); }
  .lightbox-nav.prev { left: 2px; }
  .lightbox-nav.next { right: 2px; }
}
@media (max-width: 460px) {
  .gallery-grid.cols-3, .gallery-grid.masonry-2 { grid-template-columns: 1fr; }
  .gallery-grid.wall { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 2026-09-21 ported from demo: social entries + video library ===== */
/* ---------- video hub: social entry bar, external links, placeholder thumbs ---------- */
.hero-video-entry {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 24px;
  padding: 10px 20px 10px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff; transition: 0.16s ease;
}
.hero-video-entry:hover { background: rgba(255, 255, 255, 0.2); text-decoration: none; }
.hero-video-entry .hv-play {
  width: 42px; height: 42px; border-radius: 50%; background: var(--green);
  display: grid; place-items: center; flex: none;
}
.hero-video-entry .hv-play svg { width: 17px; height: 17px; fill: #fff; margin-left: 3px; }
.hero-video-entry b { display: block; font-size: 0.96rem; font-weight: 750; }
.hero-video-entry i { display: block; font-style: normal; font-size: 0.82rem; color: #cfe0b4; }

.social-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 28px; }
.social-link {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  color: var(--ink); font-size: 0.93rem; line-height: 1.25; transition: 0.16s ease;
}
.social-link svg { width: 20px; height: 20px; flex: none; }
.social-link b { display: block; font-weight: 750; }
.social-link i { display: block; font-style: normal; font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.social-link:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: var(--shadow-sm); text-decoration: none; }
.social-link.is-pending { border-style: dashed; color: var(--muted); }
.social-link.is-pending svg { opacity: 0.5; }
.social-link.is-pending i { color: #9aa38c; }

.video-thumb.is-placeholder {
  background: linear-gradient(135deg, #37501f 0%, #6e9a2f 55%, #9cc757 100%);
  display: grid; place-items: center;
}
.video-thumb.is-placeholder .vph { text-align: center; color: rgba(255, 255, 255, 0.92); }
.video-thumb.is-placeholder .vph i { display: block; font-style: normal; font-weight: 800; letter-spacing: 0.28em; font-size: 0.76rem; }
.video-thumb.is-placeholder .vph b { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: 0.1em; opacity: 0.45; }

.vplatform {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 7px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.94);
  font-size: 0.72rem; font-weight: 750; letter-spacing: 0.03em; pointer-events: none;
}
.vplatform svg { width: 15px; height: 15px; flex: none; }

a.video-card { text-decoration: none; color: inherit; }
.video-card.is-external .play-badge { background: rgba(20, 22, 21, 0.55); }
.vgo {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green-dark); font-weight: 700; font-size: 0.86rem;
}
.vgo svg { width: 14px; height: 14px; flex: none; }
.vgo.is-pending { color: var(--muted); font-weight: 600; }

/* ---------- inline video player in a card (assets/js/videos.js) ----------
   直链视频（.mp4/.webm/.mov）的卡片直接内嵌一个 <video>，就地播放、不弹层。 */
.video-thumb video.video-embed {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: contain; background: #000;
}
/* 无 poster 时保留品牌渐变占位块，让透明的 <video> 叠在上面 */
.video-thumb.is-placeholder video.video-embed { background: transparent; }
/* 卡片是个播放器，不再是链接：去掉手型光标与悬浮上浮，避免操作控件时抖动 */
.video-card.is-inline { cursor: default; }
.video-card.is-inline:hover { transform: none; box-shadow: var(--shadow-sm); }
/* 原生控件占用视频底部，分类胶囊挪到右上角，避免与控件重叠 */
.video-card.is-inline .vcat { left: auto; right: 12px; }

/* ---------- in-page video player (assets/js/videos.js) ----------
   外壳复用图片灯箱的 .lightbox / .lightbox-backdrop / .lightbox-box，
   这里只定义播放窗自身的标题栏与播放舞台。 */
.vplayer-box {
  background: #0f120c; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.vplayer-head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.vplayer-title {
  flex: 1 1 auto; min-width: 0; color: #eef1e6;
  font-weight: 700; font-size: 0.98rem; line-height: 1.35;
}
.vplayer-ext { flex: none; color: var(--green); font-weight: 700; font-size: 0.85rem; }
.vplayer-ext:hover { color: #fff; text-decoration: none; }
.vplayer-close {
  flex: none; width: 38px; height: 38px; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center;
  transition: background 0.15s ease;
}
.vplayer-close:hover { background: var(--green); }
.vplayer-close svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round;
}
.vplayer-stage {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  max-height: calc(100vh - 140px);   /* 矮屏时收窄高度，避免播放器被裁掉 */
}
.vplayer-stage iframe,
.vplayer-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
/* HLS 加载失败 / 浏览器不支持时的提示（居中的舞台文字） */
.vplayer-message {
  position: absolute; inset: 0; margin: 0; padding: 24px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; font-weight: 600; font-size: 0.95rem;
}

/* ---------- video library page (videos.html) ---------- */
.hero.compact .hero-in { padding-block: 76px 66px; }
.hero.compact h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }

.video-toolbar,
.blog-toolbar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  justify-content: space-between; margin-bottom: 20px;
}
.video-toolbar .video-filters,
.blog-toolbar .blog-filters { margin: 0; flex: 1 1 auto; }
.video-search,
.blog-search { position: relative; flex: 0 1 320px; min-width: 220px; }
.video-search input,
.blog-search input {
  width: 100%; padding: 11px 18px 11px 42px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); font: inherit;
  font-size: 0.95rem; color: var(--ink);
}
.video-search input::-webkit-search-cancel-button,
.blog-search input::-webkit-search-cancel-button { cursor: pointer; }
.video-search input:focus,
.blog-search input:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(143, 190, 67, 0.25);
}
.video-search svg,
.blog-search svg {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; stroke: var(--muted); fill: none;
  stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.video-result,
.blog-result { color: var(--muted); font-size: 0.9rem; font-weight: 600; margin: 0 0 24px; }
.video-result b,
.blog-result b { color: var(--green-deep); }

@media (max-width: 760px) {
  .video-toolbar { flex-direction: column; align-items: stretch; }
  .video-search { flex: 1 1 auto; max-width: none; }
}

/* ===== Products submenu (promoted from the products page "Category index") ===== */
/* 关键：桌面端让触发项撑满整个头部高度，下拉框贴齐头部底边 —— 触发项与菜单之间
   没有任何空隙，鼠标从 Products 移向菜单时 hover 不会中断（原先是 20px 死区导致菜单秒消失）。 */
.nav-sub { position: relative; display: flex; align-items: center; }
.nav-sub > a { display: inline-flex; align-items: center; gap: 6px; }
.nav-caret {
  width: 13px; height: 13px; flex: none; fill: none;
  stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.18s ease;
}
.nav-sub:hover .nav-caret,
.nav-sub.open .nav-caret { transform: rotate(180deg); }
.subnav {
  position: absolute; top: 100%; left: 0; z-index: 120;
  display: none; flex-direction: column; min-width: 246px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
}
/* 显隐由 :hover + JS 的 .open 控制。
   刻意不用 :focus-within —— 否则焦点留在触发项上时 CSS 会强制显示菜单，
   导致按 Escape 关不掉（Esc 关闭后焦点要回到触发项）。键盘可达性由 main.js 的 focusin/focusout 负责。 */
.nav-sub:hover > .subnav,
.nav-sub.open > .subnav { display: flex; }
.subnav a {
  padding: 9px 12px; border-radius: 9px; white-space: nowrap;
  font-size: 0.9rem; font-weight: 600; color: var(--ink-soft);
}
.subnav a:hover { background: #f0f4e8; color: var(--green-deep); text-decoration: none; }
.subnav a[aria-current="page"] { color: var(--green-deep); background: #eef4e2; }
.subnav a.subnav-all {
  color: var(--green-deep); font-weight: 700;
  border-bottom: 1px solid var(--line); border-radius: 9px 9px 0 0; margin-bottom: 6px;
}

/* ---------- 产品下拉：三行 × 8 列的 mega menu ----------
   24 个分类用单列太长，改成贴合头部宽度的三行网格。
   .nav-sub-products 设为 static，使绝对定位的 .subnav 相对 .site-header 铺满整行，
   内层 .subnav-inner 再按 --wrap 居中，避免从 Products 项向右溢出屏幕。 */
.nav-sub-products { position: static; }
.subnav-products {
  left: 0; right: 0; min-width: 0; padding: 0;
  border-radius: 0 0 14px 14px;
}
.nav-sub:hover > .subnav-products,
.nav-sub.open > .subnav-products { display: block; }
.subnav-products .subnav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 22px 16px;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px 10px;
}
.subnav-products a { white-space: normal; font-size: 0.86rem; }
.subnav-products .subnav-all { grid-column: 1 / -1; margin-bottom: 8px; }

/* 中等宽度（平板 / 小笔记本）一屏放不下 8 列，退成 4 列 6 行 */
@media (max-width: 1080px) and (min-width: 761px) {
  .subnav-products .subnav-inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 桌面端：导航与 Products 项都拉伸到头部满高（配合上面的 top:100%，实现零死区） */
@media (min-width: 761px) {
  .nav { align-self: stretch; }
  .nav-sub { align-self: stretch; }
}

/* in-page anchors must clear the sticky header */
html { scroll-padding-top: 92px; }

@media (max-width: 760px) {
  .nav-sub { position: static; display: block; width: 100%; }
  .nav-caret { display: none; }
  .subnav {
    position: static; display: flex; min-width: 0;
    margin: 2px 0 8px 12px; padding: 2px 0 2px 10px;
    background: transparent; border: 0; border-left: 2px solid var(--line);
    border-radius: 0; box-shadow: none;
  }
  .subnav a { padding: 9px 10px; font-size: 0.88rem; }
  .subnav a.subnav-all { border-bottom: 0; border-radius: 9px; margin-bottom: 0; }
  /* 手机端：产品 mega menu 退回单列手风琴，沿用上面的 .subnav 移动端样式 */
  .subnav-products { padding: 2px 0 2px 10px; }
  .subnav-products .subnav-inner { display: block; max-width: none; padding: 0; }
  .subnav-products a { white-space: nowrap; font-size: 0.88rem; }
}

/* ---------- link pending card (entry has no social url yet) ---------- */
.video-card.is-pending { cursor: default; }
.video-card.is-pending:hover { transform: none; box-shadow: var(--shadow-sm); }
.video-card.is-pending .video-thumb img { filter: grayscale(0.6) brightness(0.95); }
.video-card.is-pending:hover .video-thumb img { transform: none; }
.vplatform.is-pending {
  border: 1px dashed rgba(0, 0, 0, 0.18); background: rgba(255, 255, 255, 0.9);
  color: #5d6653; font-weight: 700;
}
.video-card.is-pending .vcat { opacity: 0.75; }

/* ---------- homepage video module: themed narrative rows ----------
   Three labelled rows instead of the library's category filter — the
   homepage tells the trust story, the videos page does the finding. */
.video-row + .video-row { margin-top: 44px; }
.video-row-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
  padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--line);
}
.video-row-head h3 { margin: 0; font-size: 1.12rem; font-weight: 750; letter-spacing: -0.01em; }
.video-row-head p { margin: 0; flex: 1 1 300px; color: var(--muted); font-size: 0.93rem; }
.video-row-more { font-size: 0.86rem; font-weight: 700; color: var(--green-dark); white-space: nowrap; }
.video-row-more:hover { color: var(--green-deep); text-decoration: none; }
.video-row-more::after { content: " \2192"; }

@media (max-width: 760px) {
  .video-row + .video-row { margin-top: 34px; }
  .video-row-head { gap: 4px 12px; }
}

/* ---------- blog index (assets/js/blog.js) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.post-card:hover, a.post-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow); }
a.post-card:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.post-cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e7ebdd; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
a.post-card:hover .post-cover img { transform: scale(1.04); }
.post-cover.is-placeholder {
  background: linear-gradient(135deg, #37501f 0%, #6e9a2f 55%, #9cc757 100%);
  display: grid; place-items: center;
}
.post-cover.is-placeholder .pph { text-align: center; color: rgba(255, 255, 255, 0.92); }
.post-cover.is-placeholder .pph i { display: block; font-style: normal; font-weight: 800; letter-spacing: 0.28em; font-size: 0.76rem; }
.post-cover.is-placeholder .pph b { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: 0.1em; opacity: 0.45; }
.post-cat {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.94);
  color: var(--green-deep); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.03em;
}
.post-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.post-title { font-weight: 750; font-size: 1.08rem; line-height: 1.35; }
.post-excerpt { color: var(--muted); font-size: 0.93rem; }
.post-more { display: inline-flex; align-items: center; gap: 6px; color: var(--green-dark); font-weight: 700; font-size: 0.86rem; margin-top: 2px; }
.post-more svg { width: 14px; height: 14px; flex: none; }
.post-more.is-pending { color: var(--muted); font-weight: 600; }
.post-card.is-pending { cursor: default; }
.post-card.is-pending:hover { transform: none; box-shadow: var(--shadow-sm); }
.post-card.is-pending .post-cover img { filter: grayscale(0.6) brightness(0.95); }
