/* ==========================================================================
   多页站页面样式（tools/build-site.js 生成的页面使用）
   与 style.css 共用设计变量；style.css 继续承载首页与全局样式。
   ========================================================================== */

/* ---------------- 导航下拉（产品与方案：分组多列） ---------------- */

.nav-item{position:relative}
.nav-sub{
  position:absolute;left:50%;top:100%;transform:translate(-50%,8px);
  display:flex;align-items:stretch;padding:14px 6px;border-radius:12px;background:#fff;
  border:1px solid var(--line);box-shadow:0 18px 40px rgba(12,29,44,.14);
  opacity:0;visibility:hidden;transition:all .18s ease;
}
.nav-item.has-sub:hover > .nav-sub,
.nav-item.has-sub:focus-within > .nav-sub{opacity:1;visibility:visible;transform:translate(-50%,4px)}
.nav-sub__group{min-width:170px;padding:0 14px}
.nav-sub__group + .nav-sub__group{border-left:1px solid var(--line)}
.nav-sub__title{
  margin:2px 0 6px;padding:0 12px;font-size:11px;font-weight:700;
  letter-spacing:.12em;color:var(--ink-3);
}
.nav-sub__links{display:flex;flex-direction:column}
.nav-sub a{
  display:block;padding:9px 12px;border-radius:8px;color:var(--ink-2);
  font-size:14px;font-weight:500;white-space:nowrap;
}
.nav-sub a:hover{background:var(--brand-050);color:var(--brand-700)}
.site-header.is-scrolled .nav-sub a{color:var(--ink-2)}

/* ≤1160px：抽屉内摊平为竖排，分组标题退化为小标题，去掉分栏边框 */
@media (max-width:1160px){
  .nav-item{position:static}
  .nav-sub{
    position:static;transform:none;opacity:1;visibility:visible;box-shadow:none;
    border:0;background:transparent;padding:0 0 0 12px;display:none;flex-direction:column;
  }
  .nav-item.has-sub.is-open > .nav-sub{display:flex}
  .nav-sub__group{min-width:0;padding:0}
  .nav-sub__group + .nav-sub__group{border-left:0;margin-top:6px}
  .nav-sub__title{margin:6px 0 0;padding:6px 12px 2px}
  .nav-sub a{padding:10px 12px;font-size:14.5px}
}

/* ---------------- 子页首屏与面包屑 ---------------- */

.page-hero{
  padding:158px 0 54px;
  background:linear-gradient(160deg,var(--brand-800),var(--brand-600));
  color:#fff;
}
.page-hero__title{margin:14px 0 0;font-size:40px;line-height:1.2;letter-spacing:-.02em}
.page-hero__lead{margin:16px 0 0;max-width:760px;color:rgba(255,255,255,.86);font-size:16px;line-height:1.75}
.crumbs{font-size:13.5px;color:rgba(255,255,255,.72)}
.crumbs a{color:rgba(255,255,255,.86);text-decoration:none}
.crumbs a:hover{color:#fff;text-decoration:underline}
.crumb-sep{margin:0 8px;opacity:.55}

@media (max-width:820px){
  .page-hero{padding:132px 0 40px}
  .page-hero__title{font-size:30px}
}

/* ---------------- 页内锚点导航 ---------------- */

.anchor-nav{
  display:flex;flex-wrap:wrap;gap:10px;margin-bottom:44px;
  padding-bottom:20px;border-bottom:1px solid var(--line);
}
.anchor-nav a{
  padding:9px 16px;border-radius:999px;background:#fff;border:1px solid var(--line);
  color:var(--ink-2);font-size:14px;font-weight:500;text-decoration:none;
  transition:all .18s ease;
}
.anchor-nav a:hover{border-color:var(--brand-300,var(--brand-100));color:var(--brand-700);background:var(--brand-050)}

/* ---------------- 方案分节 ---------------- */

.seg{padding:0 0 40px;margin-bottom:40px;border-bottom:1px solid var(--line)}
.seg:last-of-type{border-bottom:0;margin-bottom:24px}
.seg h2{margin:10px 0 14px;font-size:26px;letter-spacing:-.01em}
.seg > p{margin:0 0 18px;color:var(--ink-2);line-height:1.85;max-width:820px;text-indent:2em}
.seg > p.seg__meta{text-indent:0}
.seg .feature-list{margin:0 0 18px}
.seg__meta{
  margin:0;font-size:14.5px;color:var(--ink-2);background:#fff;
  border:1px solid var(--line);border-left:3px solid var(--brand-500,var(--brand-600));
  border-radius:10px;padding:14px 18px;
}
.ph-row{display:flex;flex-wrap:wrap;gap:6px;align-items:baseline}

/* ---------------- 空态 ---------------- */

.empty-state{
  border:1px dashed var(--line-2);border-radius:var(--radius);background:#fff;
  padding:40px 24px;text-align:center;color:var(--ink-3);
}
.empty-state p{margin:0}

/* ---------------- 文章（新闻详情 / 隐私政策） ---------------- */

.article{max-width:860px;margin:0 auto}
.article__title{margin:0 0 12px;font-size:30px;line-height:1.35;letter-spacing:-.01em}
.article__meta{margin:0 0 26px;font-size:13.5px;color:var(--brand-600);font-weight:600}
.article__body{color:var(--ink-2);line-height:1.9;font-size:16px}
.article__body h3{margin:32px 0 12px;font-size:19px;color:var(--ink)}
.article__body p{margin:0 0 16px}
.article-nav{margin-top:40px;display:flex;gap:12px;flex-wrap:wrap}

@media (max-width:820px){
  .article__title{font-size:24px}
}

/* ---------------- 时间线 ---------------- */

.timeline{margin:34px 0 0;padding:0;list-style:none}
.timeline li{display:flex;gap:20px;padding:0 0 26px;position:relative}
.timeline li::before{
  content:"";position:absolute;left:74px;top:26px;bottom:0;width:1px;background:var(--line);
}
.timeline li:last-child::before{display:none}
.timeline__year{
  flex:0 0 62px;font-weight:700;color:var(--brand-700);font-size:15px;text-align:right;
}
.timeline h3{margin:0 0 6px;font-size:17px}
.timeline p{margin:0;color:var(--ink-2)}

/* ---------------- 卡片内联 CTA ---------------- */

.cta--inline{
  margin-top:44px;display:flex;flex-wrap:wrap;gap:20px;align-items:center;
  justify-content:space-between;text-align:left;
}
.cta--inline h3{margin:0 0 6px;font-size:22px}
.cta--inline p{margin:0;color:rgba(255,255,255,.86)}
.cta--inline .btn{flex:0 0 auto}

/* ---------------- 案例照片封面 ---------------- */

/* 封面比例统一为 4:3（比例定义在 style.css 的 .case__cover），此处只保证照片铺满封面 */
.case__cover--photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
/* ---------------- 智能家居产品卡片（无图版式） ---------------- */

.pcards{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.pcard{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm)}
.pcard__body{padding:26px 24px}
.pcard__body h3{margin:0 0 10px;font-size:18px}
.pcard__body p{margin:0;color:var(--ink-2);line-height:1.75}

@media (max-width:980px){
  .pcards{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:560px){
  .pcards{grid-template-columns:1fr}
  .timeline__year{flex-basis:52px}
  .timeline li::before{left:64px}
}

/* ---------------- 产品详情（/products/<slug>/） ---------------- */

.pdetail{display:grid;grid-template-columns:1.02fr .98fr;gap:38px;align-items:start}
.pdetail__media{display:grid;gap:12px}
.pd-shot{
  margin:0;border-radius:var(--radius-lg);border:1px solid var(--line);background:var(--bg-alt);
  overflow:hidden;display:grid;
}
.pd-shot img{width:100%;height:auto;aspect-ratio:4 / 3;object-fit:cover;display:block}
.pd-shot figcaption{padding:10px 16px;font-size:12.5px;color:var(--ink-3);background:#fff;border-top:1px solid var(--line)}
/* 产品图为竖版实拍：按原始比例整幅居中显示，不套 .pd-shot 默认的 4:3 裁切；限高避免图片把左栏拉得过高 */
.pdetail .pd-shot img{aspect-ratio:auto;object-fit:contain;max-height:520px}

.pd-shot--empty{
  min-height:300px;place-content:center;place-items:center;gap:10px;text-align:center;
  padding:26px;color:var(--brand-500);font-size:13.5px;
}
.pdetail__thumbs{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.pdetail__thumbs:empty{display:none}
.pd-thumb{
  padding:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff;
  transition:border-color .18s ease,box-shadow .18s ease;
}
.pd-thumb img{width:100%;height:auto;aspect-ratio:1 / 1;object-fit:cover;display:block}
.pd-thumb:hover{border-color:var(--brand-200)}
.pd-thumb.is-active{border-color:var(--brand-500);box-shadow:0 0 0 2px rgba(10,143,214,.18)}

.pdetail__intro{display:grid;gap:14px;align-content:start}
.pdetail__line{
  display:inline-flex;width:fit-content;align-items:center;padding:5px 12px;border-radius:999px;
  background:var(--brand-050);border:1px solid var(--brand-100);color:var(--ink-3);font-size:12.5px;
}
.pdetail__line b{color:var(--brand-700)}
.pdetail__title{font-size:28px;line-height:1.3}
.pdetail__summary{margin:0;color:var(--ink-2);line-height:1.85}
.pdetail__features{
  display:grid;gap:10px;margin:4px 0 0;padding:18px 20px;border-radius:var(--radius);
  background:var(--bg-alt);border:1px solid var(--line);
}
.pdetail__features li{display:flex;gap:10px;align-items:flex-start;font-size:14.5px;color:var(--ink-2)}
.pdetail__features svg{flex:0 0 auto;margin-top:4px;color:var(--brand-500)}
.pdetail__actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:6px}
.pd-specs{display:grid;grid-template-columns:repeat(2,1fr);gap:0 34px;border-top:1px solid var(--line);margin:0}
.pd-specs--single{grid-template-columns:1fr}
.pd-spec{
  display:grid;grid-template-columns:150px 1fr;gap:14px;padding:14px 0;
  border-bottom:1px solid var(--line);align-items:baseline;
}
.pd-spec dt{font-size:13px;color:var(--ink-3);line-height:1.6}
.pd-spec dd{margin:0;font-size:14.5px;color:var(--ink);line-height:1.7}
/* 规格表：窄屏收成单列，避免「标签 + 值」两列把容器撑破（手机端横向溢出）
   1160px 与顶部导航折叠断点一致；单列在 320px 宽也可读 */
@media (max-width:1160px){
  .pd-specs{grid-template-columns:1fr}
}
@media (max-width:560px){
  .pd-spec{grid-template-columns:1fr;gap:3px;align-items:start}
}

/* 产品卡片上的「查看详情」入口（与 .news__more 同款） */
.pcard__body h3 a{color:var(--ink)}
.pcard__body h3 a:hover{color:var(--brand-700)}
.pcard__more{display:inline-block;margin-top:14px;color:var(--brand-700);font-size:14px;font-weight:600;white-space:nowrap}
.pcard__more::after{content:" →"}
.pcard__more:hover{text-decoration:underline}

/* ---------------- 华玉智能体平台页内嵌入（/huayu-agent/） ---------------- */

.agent-embed{margin-top:24px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
.agent-embed iframe{display:block;width:100%;height:clamp(420px,68vh,660px);border:0}
.agent-embed__note{margin:0;padding:10px 14px;border-top:1px solid var(--line);font-size:12px;color:var(--ink-3);line-height:1.6}
.agent-embed__note a{color:var(--brand-700)}
/* ---------------- 打印 ---------------- */

@media print{
  .site-header,.site-footer,.to-top,.anchor-nav,.article-nav{display:none !important}
  .page-hero{background:#fff;color:#000;padding-top:0}
  .page-hero__title,.page-hero__lead,.crumbs{color:#000}
}

/* ---------------- 新闻列表与资质证书卡片 ---------------- */

.news__item h3{margin:0 0 10px;font-size:18px;line-height:1.5}
.news__item h3 a{color:var(--ink);text-decoration:none}
.news__item h3 a:hover{color:var(--brand-700)}
.news__item p{margin:0 0 14px;color:var(--ink-2);line-height:1.75}
.news__more{color:var(--brand-700);font-size:14px;font-weight:600;text-decoration:none;white-space:nowrap}
.news__more::after{content:" →"}
.news__more:hover{text-decoration:underline}

.cert--card{display:flex;flex-direction:column;gap:12px;text-align:left;padding:18px}
.cert__img{width:100%;height:auto;border-radius:8px;display:block;border:1px solid var(--line)}
.cert figcaption{display:flex;flex-direction:column;gap:4px}
.cert figcaption b{color:var(--ink);font-size:15px}
.cert__issuer{font-size:13px;color:var(--ink-3)}
.cert__no{font-size:12.5px;color:var(--ink-3);word-break:break-all}

/* ---------------- 水利监测现场图集（/water-monitoring/） ---------------- */

/* 竖版实拍：限制单张宽度并居中，避免两列铺满容器后图片过高 */
.wgallery{display:grid;grid-template-columns:repeat(2,minmax(0,380px));gap:24px;justify-content:center}
.wgallery .pd-shot{background:#fff}
.wgallery .pd-shot img{aspect-ratio:3 / 4}
.wgallery figcaption{color:var(--ink-2)}

@media (max-width:820px){
  .wgallery{grid-template-columns:minmax(0,1fr)}
  .wgallery .pd-shot{max-width:340px;margin-inline:auto}
}

/* ---------------- 无人机反制：设备与资料（/counter-drone/） ---------------- */

.dgallery{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);gap:34px;align-items:start}
.dgallery .pd-shot{background:#fff}
/* 设备图是竖版实拍，按原始比例整幅显示，不套 .pd-shot 默认的 4:3 裁切 */
.dgallery .pd-shot img{aspect-ratio:auto;object-fit:contain}
.dgallery__body{display:grid;gap:14px;align-content:start}
.dgallery__body h3{font-size:17px;margin:0}
.dgallery__body h3:not(:first-child){margin-top:8px}
.dgallery__body .feature-list li{font-size:14.5px}
.dgallery__body .pdetail__features{margin:0}
.dgallery__note{margin:0;font-size:14px;color:var(--ink-3);line-height:1.75}
/* 太阳能供电系列：4 张资料图在左栏按 2×2 平铺，细线分隔 */
.dgallery .pd-shot--grid{display:grid;grid-template-columns:repeat(2,1fr);gap:2px;background:var(--line)}
.dgallery .pd-shot--grid img{width:100%;height:auto;aspect-ratio:1 / 1;object-fit:contain;background:#fff}
.dgallery .pd-shot--grid figcaption{grid-column:1 / -1}

@media (max-width:820px){
  .dgallery{grid-template-columns:minmax(0,1fr);gap:24px}
  .dgallery .pd-shot{max-width:340px}
}

/* ---------------- 无人机反制：设备型号网格（/counter-drone/） ---------------- */

/* 设备实拍多为竖版、白底：媒体区用 1:1 + contain，保证整机完整可见不被裁切 */
.cd-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
.cd-card{
  display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm);
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
.cd-card:hover{transform:translateY(-6px);box-shadow:var(--shadow);border-color:var(--line-2)}
.cd-card__media{
  aspect-ratio:1 / 1;display:grid;place-content:center;justify-items:center;gap:10px;
  background:#fff;border-bottom:1px dashed var(--line-2);color:var(--brand-500);font-size:13px;
}
.cd-card__media img{width:100%;height:100%;object-fit:contain;padding:12px;display:block}
.cd-card__body{padding:16px 18px 20px;display:flex;flex-direction:column;gap:8px;flex:1 1 auto}
.cd-card__model{
  align-self:flex-start;font-size:12px;font-weight:700;color:var(--brand-700);
  background:var(--brand-050);border:1px solid var(--brand-100);padding:2px 9px;border-radius:6px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.cd-card__body h3{font-size:16px;margin:0;line-height:1.45}
.cd-card__body h3 a{color:inherit}
.cd-card__body h3 a:hover{color:var(--brand-700)}
.cd-card__body p{margin:0;font-size:13.5px;color:var(--ink-2);line-height:1.7}
.cd-card .pcard__tags{margin-top:auto}
.cd-card .pcard__more{margin-top:4px}

/* 产品详情页标题前的型号角标 */
.pd-model{
  display:inline-block;margin-right:10px;vertical-align:middle;font-size:13px;font-weight:700;
  color:var(--brand-700);background:var(--brand-050);border:1px solid var(--brand-100);
  padding:3px 10px;border-radius:6px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

@media (max-width:1180px){.cd-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:820px){.cd-grid{grid-template-columns:repeat(2,1fr);gap:16px}}
@media (max-width:520px){.cd-grid{grid-template-columns:1fr}}

/* ---------------- 智能家居：米家系列型号与生态产品（/smarthome/） ---------------- */

/* 列表卡片改成整幅显示，避免把开关面板裁掉（仅智能家居产品卡使用 .pcards） */
.pcard__media img{object-fit:contain;padding:14px}

.sm-series{display:grid;grid-template-columns:repeat(2,1fr);gap:22px;margin-top:6px}
.sm-series__item{
  display:flex;flex-direction:column;gap:14px;background:#fff;border:1px solid var(--line);
  border-radius:var(--radius);padding:18px;box-shadow:var(--shadow-sm);
}
.sm-series__head{display:grid;gap:5px}
.sm-series__item h3{margin:0;font-size:16px}
.sm-series__meta{margin:0;font-size:13px;color:var(--ink-3);line-height:1.7}
.sm-shots{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.sm-series__item,.sm-eco__item{min-width:0}
.sm-series__meta,.sm-models li,.sm-eco__body h3,.sm-eco__body p{overflow-wrap:anywhere}
/* 白色半透明底产品图必须配浅蓝底，否则在页面上几乎看不见 */
.sm-tile{
  margin:0;display:grid;border:1px solid var(--line);border-radius:12px;overflow:hidden;
  background:linear-gradient(150deg,#EAF4FB,#DBEDF8);
}
.sm-tile img{width:100%;height:auto;aspect-ratio:1 / 1;object-fit:contain;padding:8px;display:block}
.sm-tile figcaption{padding:5px 6px;font-size:12px;color:var(--ink-2);background:#fff;border-top:1px solid var(--line);text-align:center}
.sm-models{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,1fr);gap:7px 14px;font-size:12.5px;color:var(--ink-2);line-height:1.6}
.sm-models li{display:flex;gap:7px;align-items:flex-start}
.sm-models li::before{content:"";flex:none;width:5px;height:5px;margin-top:6px;border-radius:50%;background:var(--brand-200)}
.sm-note{margin:26px 0 0;font-size:13px;color:var(--ink-3);text-align:center}

.sm-subtitle{margin:54px 0 8px;font-size:20px}
.sm-subnote{margin:0 0 22px;font-size:14px;color:var(--ink-3);line-height:1.75}
.sm-eco{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.sm-eco__item{
  display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm);
}
.sm-eco__media{
  position:relative;
  aspect-ratio:4 / 3;display:grid;place-content:center;justify-items:center;gap:8px;
  background:linear-gradient(150deg,#EAF4FB,#DBEDF8);border-bottom:1px dashed var(--line-2);
  color:var(--brand-500);font-size:12.5px;text-align:center;
}


.sm-eco__badge{
  position:absolute;top:10px;right:10px;z-index:2;
  padding:3px 9px;border-radius:999px;
  background:rgba(11,42,66,.72);color:#fff;
  font-size:11.5px;line-height:1.45;letter-spacing:.02em;white-space:nowrap;
}
.sm-eco__media img{width:100%;height:100%;object-fit:contain;padding:12px;display:block}
.sm-eco__body{padding:14px 16px 16px;display:grid;gap:6px}
.sm-eco__body h3{margin:0;font-size:14.5px}
.sm-eco__body p{margin:0;font-size:12.5px;color:var(--ink-3);line-height:1.7}
.sm-eco__body p b{color:var(--ink-2);font-weight:600}

/* 产品详情：透明底产品图（开关面板等）放在浅蓝底上才看得清 */
.pd-shot--tint{background:linear-gradient(150deg,#EAF4FB,#DBEDF8)}
.pd-thumb--tint{background:linear-gradient(150deg,#EAF4FB,#DBEDF8)}
.pd-thumb--tint img{object-fit:contain;padding:6px}

@media (max-width:1080px){
  .sm-series{grid-template-columns:1fr}
  .sm-eco{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:820px){
  .sm-eco{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:560px){
  .sm-shots{grid-template-columns:repeat(2,1fr)}
  .sm-models{grid-template-columns:1fr}
  .sm-eco{grid-template-columns:1fr}
}

/* ---------------- 华玉储能：太阳能供电系列安装形式 ---------------- */
.dgallery__body .pd-shot--trio{max-width:none;display:grid;grid-template-columns:repeat(3,1fr);gap:2px;background:var(--line)}
.dgallery__body .pd-shot--trio img{width:100%;height:auto;aspect-ratio:1 / 1;object-fit:contain;background:#fff}
.dgallery__body .pd-shot--trio figcaption{grid-column:1 / -1}
.pd-figure{position:relative}
.pd-badge{
  position:absolute;top:10px;right:10px;z-index:2;
  padding:3px 9px;border-radius:999px;
  background:rgba(11,42,66,.72);color:#fff;
  font-size:11.5px;line-height:1.45;letter-spacing:.02em;white-space:nowrap;
}
.xref{display:grid;gap:22px;margin-top:44px}
.xref__block{display:grid;gap:9px;align-content:start}
.xref__title{font-size:16px;margin:0}
.xref .pd-specs{margin:0;gap:0 32px}
.xref .pd-spec{grid-template-columns:1fr;gap:3px;padding:9px 0;align-items:start}
.xref .pd-spec dt{font-size:12.5px;font-weight:600;color:var(--ink);letter-spacing:.01em}
.xref .pd-spec dd{font-size:13.5px;line-height:1.6;color:var(--ink-2)}
.xref .pd-specs--trio{grid-template-columns:repeat(3,1fr)}
.xref .pd-specs--power{grid-template-columns:repeat(3,1fr);gap:0 22px}
.xref .pd-specs--power .pd-spec{grid-template-columns:minmax(0,1fr) auto;gap:1px 5px;padding:6px 0;align-items:baseline}
.xref .pd-specs--power dt{font-size:12px;letter-spacing:0}
.xref .pd-specs--power dd{font-size:12px;text-align:right;white-space:nowrap}
@media (max-width:1160px){
  .xref .pd-specs--power{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:820px){
  .xref .pd-specs--power{grid-template-columns:1fr}
}
@media (max-width:430px){
  .xref .pd-specs--power .pd-spec{grid-template-columns:1fr;gap:1px}
  .xref .pd-specs--power dd{text-align:left;white-space:normal}
}
@media (max-width:980px){
  .xref .pd-specs--trio{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:560px){
  .dgallery__body .pd-shot--trio{grid-template-columns:repeat(2,1fr)}
  .xref .pd-specs--trio{grid-template-columns:1fr}
  .xref .pd-specs--power{grid-template-columns:1fr}
}