/* =============================================================================
 *  东途检测官网 · 前台基础样式
 *  ---------------------------------------------------------------------------
 *  配色：青蓝渐变（cyan → blue）。这是 3.3 这一轮整体换的皮肤 ——
 *  从「深蓝商务」换成「青蓝科技感」，主色偏青、渐变的尾端落到亮青，
 *  让页面看起来更亮、更年轻、更有动感。
 *
 *  两套变量并存，别搞混（历史原因，改的时候两边都要管）：
 *    · --primary / --accent / …  ← 本文件用，管页头、页脚、登录、会员中心这些「壳」
 *    · --dt-*                    ← blocks.css 用，管页面正文里的区块组件
 *  后台「主题风格」里改的是 --dt-* 那一套（渲染成一段覆盖 <style>）；
 *  本文件这套是「壳」的默认值，改主题时要一并同步，否则页头与正文会两种颜色。
 *
 *  渐变变量单独拎出来（--grad*），不要在每个规则里重复写 linear-gradient：
 *  以后要换主色调，只改这几个变量就行。
 * ========================================================================== */

:root {
  /* ---- 青蓝主体的三档颜色 ---- */
  --primary: #0b6fa4;          /* 主色：青蓝 */
  --primary-dark: #07496e;     /* 深青蓝：标题、强调文字 */
  --accent: #06b6d4;           /* 亮青：小标签、聚焦态、悬停高亮 */
  --accent-2: #67e8f9;         /* 浅青：渐变的尾端 */

  /* ---- 中性色 ---- */
  --ink: #0f2233;
  --muted: #56707f;
  --line: #d9e8f3;
  --bg: #f1f8fd;
  --white: #ffffff;

  /* ---- 渐变三件套 ---- */
  /* 品牌渐变：主按钮、图标底、强调块 */
  --grad: linear-gradient(118deg, #0b6fa4 0%, #0995c4 46%, #06b6d4 100%);
  /* 深色渐变：CTA 带、页脚、hero 遮罩 —— 深青蓝压到底，比纯黑有层次 */
  --grad-deep: linear-gradient(125deg, #052a41 0%, #07496e 46%, #0b6fa4 100%);
  /* 浅色渐变：卡片图标底、标签底、悬停背景 */
  --grad-soft: linear-gradient(118deg, #e4f5fb 0%, #e7f1fb 100%);
  /* 按钮悬停时用的加深版 */
  --grad-hover: linear-gradient(118deg, #06b6d4 0%, #1d6fd0 100%);

  --shadow: 0 12px 32px rgba(11, 111, 164, 0.10);
  --shadow-lg: 0 20px 48px rgba(11, 111, 164, 0.16);
  --radius: 14px;
  --maxw: 1180px;

  /* 动效曲线：统一用这条，避免每个地方各写一份 cubic-bezier */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.75;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* 页头底部那条青蓝细线：用 background-image 画在 ::after 上而不是 border-bottom，
   这样能吃到渐变，也不会改变盒模型高度（sticky 头的高度被算进 min-height 里）。 */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--grad); opacity: .9;
}
.header-inner {
  /* 顶部导航「绝对居中」：左（品牌）、中（导航）、右（电话+登录）三列，
     左右两列等宽（1fr），导航列按内容自适应（auto）自然落在页头正中央，
     不再受两侧内容宽度不一致影响。 */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 10px;
  height: 72px;
}
.header-left { display: flex; align-items: center; justify-self: start; min-width: 0; }
.header-right { display: flex; align-items: center; justify-self: end; min-width: 0; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { flex-shrink: 0; }
/* 后台「站点信息 → 站点 LOGO」上传的图。高度定死、宽度自适应，
   这样无论上传的是横版还是方版 LOGO，页头高度都不会被撑变形。 */
.brand-logo { height: 42px; width: auto; max-width: 168px; object-fit: contain; border-radius: 6px; }
.brand-text { min-width: 0; }
.brand-text .cn {
  font-size: 19px; font-weight: 700; letter-spacing: 1px; line-height: 1.3;
  white-space: nowrap;
  /* 品牌名走青蓝渐变。渐变文字必须让文字本身透明，再把 background-clip 到文字上；
     WebkitTextFillColor 单独写一份是因为老版 Chrome/Safari 只认带前缀的那个。 */
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
  /* 需求：头部公司简称（东途检测）整体向下移 5px。
     inline 元素上 margin-top 不生效，必须 inline-block 才吃得到。 */
  display: inline-block; margin-top: 5px;
}
.brand-text .en {
  font-size: 11px; color: var(--muted); letter-spacing: 3px; text-transform: uppercase;
  white-space: nowrap;
  /* 需求：公司简称（cn）向公司标语（en/sub）下移 8px */
  margin-top: 8px; display: inline-block;
}
/* 「站点副标题」（中文那句），比英文名稍大一点。
   它是后台随便填的自由文本 —— 不限宽的话一句话副标题能把品牌区撑到换行，
   间接把右边导航挤成两行（导航竖排就是这么来的）。单行省略，装不下就截断。 */
.brand-text .sub {
  font-size: 12.5px; color: var(--muted); letter-spacing: 0.5px; line-height: 1.4;
  max-width: 216px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  /* 需求：公司简称（cn）向公司标语（en/sub）下移 8px */
  margin-top: 8px; display: inline-block;
}
/* 页头业务电话：客户第一眼要能找到号码，所以做成可点的 tel: 链接 */
.header-phone {
  display: inline-flex; align-items: baseline; gap: 7px; margin-right: 14px;
  font-size: 15px; color: var(--primary-dark); white-space: nowrap;
  flex-shrink: 0;
}
.header-phone .lbl { font-size: 12px; color: var(--muted); }
.header-phone b { font-weight: 700; letter-spacing: 0.3px; }
.header-phone:hover b { color: var(--primary); }
/* ---------- 顶部导航：长度自适应 ----------
   菜单项是在后台随便加、随便改名的，页头两侧还摆着品牌和电话，
   「固定间距 + 固定字号」的做法一挤就把文字压成竖排（「首页」断成「首/页」）。
   现在的分层策略：
   ① 每项 white-space:nowrap —— 文字永远单行，这是底线；
   ② 导航占满中间剩余空间并居中（flex:1），项与项的 gap、每项的左右 padding
      都用 clamp() 随窗口宽度收缩 —— 大部分场景到这就够了；
   ③ 还装不下时由 page-render.js 的 fitMainNav() 逐档收紧（.dt-nav-fit-1~3），
      量到哪档加哪档，窗口变大后自动退档；
   ④ 第四档兜底：允许在页头里横向滑动（滚动条隐藏）—— 菜单项特别多的站
      也只是「划一下」，不会再撑破页头。 */
.main-nav {
  display: flex; align-items: center;
  gap: clamp(2px, 0.55vw, 8px);
  /* grid 中列：按内容自适应宽度并居中，左右两侧 1fr 等宽把它顶在正中 */
  justify-self: center; min-width: 0; max-width: 100%;
  /* 不能用 overflow:hidden：会裁剪 position:absolute 的 .nav-sub 二级下拉（top:100% 溢出容器边界）。
     二级菜单「hover 后消失不见」就是这个原因。收窄只靠 fit 档位收紧 padding/gap，不再裁内容。 */
  overflow: visible;
}
.main-nav a {
  position: relative;
  padding: 8px clamp(9px, 1.25vw, 18px); font-size: 15px; color: var(--ink); border-radius: 8px;
  white-space: nowrap; flex-shrink: 0;
  transition: color .22s var(--ease), background .22s var(--ease);
}
/* —— 自动收放档位（fitMainNav() 按需加，从 1 到 4）—— */
.main-nav.dt-nav-fit-1 a { padding-left: 11px; padding-right: 11px; }
.main-nav.dt-nav-fit-2 { gap: 2px; }
.main-nav.dt-nav-fit-2 a { padding-left: 8px; padding-right: 8px; font-size: 14px; }
.main-nav.dt-nav-fit-3 { gap: 0; }
.main-nav.dt-nav-fit-3 a { padding-left: 4px; padding-right: 4px; font-size: 13.5px; }
.main-nav.dt-nav-fit-4 { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.main-nav.dt-nav-fit-4::-webkit-scrollbar { display: none; }
/* 导航项底部那条渐变线：默认 0 宽，悬停 / 选中时从中间向两边展开。
   用 transform:scaleX 而不是 width，动画走合成层、不触发重排。 */
.main-nav > .nav-item > a::after,
.main-nav > a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--grad); border-radius: 2px;
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform .26s var(--ease);
}
.main-nav > .nav-item:hover > a::after,
.main-nav > a:hover::after,
.main-nav > .nav-item > a.active::after,
.main-nav > a.active::after { transform: scaleX(1); }
.main-nav a:hover { color: var(--primary); background: var(--grad-soft); }
.main-nav a.active { color: var(--primary); font-weight: 600; background: var(--grad-soft); }

/* ---------- 二级菜单（下拉） ----------
   结构：.nav-item.has-sub > a.nav-parent + .nav-sub > a
   展开靠 CSS，不用 JS：桌面 hover 或键盘 focus-within 就出来，
   移动端（<=960px）在抽屉里直接平铺成缩进的一列。
   注意 .nav-sub 用 top:100% 而不是 top:calc(100% + 6px)：
   留出缝隙的话鼠标从一级移到二级的途中会「离开」父元素，下拉一闪就没了。 */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-parent { display: inline-flex; align-items: center; gap: 5px; }
.nav-parent .caret {
  width: 0; height: 0; opacity: .6;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.nav-sub {
  display: none; position: absolute; top: 100%; left: 0; z-index: 60;
  min-width: 172px; padding: 6px;
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  /* 下拉本身也带一点「展开」的动势，而不是硬切出来 */
  animation: dt-drop .22s var(--ease);
}
@keyframes dt-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-item.has-sub:hover .nav-sub,
.nav-item.has-sub:focus-within .nav-sub { display: block; }
.nav-sub a { display: block; padding: 9px 12px; border-radius: 7px; white-space: nowrap; }
.nav-sub a + a { margin-top: 2px; }
.nav-sub a:hover { background: var(--grad-soft); color: var(--primary); }
/* 二级项不要继承一级那条底部渐变线 */
.nav-sub a::after { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 8px; border: 1px solid transparent;
  font-size: 15px; cursor: pointer; font-family: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
/* 主按钮：青蓝渐变 + 一层同色晕影。
   background-image 而不是 background，这样 hover 换渐变时不会退化成纯色闪一下。 */
.btn-primary {
  background-image: var(--grad); color: #fff;
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.28);
}
.btn-primary:hover {
  background-image: var(--grad-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(6, 182, 212, 0.38);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--grad-soft); transform: translateY(-2px); }
.btn-ghost { color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--primary); }
.btn-lg { padding: 14px 34px; font-size: 16px; border-radius: 10px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--primary-dark);
  background: var(--grad-soft); padding: 8px 16px; border-radius: 999px; font-weight: 600;
}
.user-chip .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #27ae60; display: inline-block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff;
  min-height: 620px; display: flex; align-items: center;
  /* 遮罩从「深青蓝」渐变到「亮青」，右下角让背景图透出来更多，
     比原来的纯深蓝更有层次、也更透气。 */
  background: linear-gradient(102deg, rgba(5, 42, 65, 0.94) 0%, rgba(7, 73, 110, 0.80) 48%, rgba(6, 182, 212, 0.42) 100%),
    url("../upload/media/hero-lab.jpg") center / cover no-repeat;
}
/* 首屏底部的青蓝光晕：给「科技感」加一点氛围，纯装饰、不挡点击 */
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 180px; pointer-events: none;
  background: linear-gradient(to top, rgba(6, 182, 212, 0.22), transparent);
}
.hero-content { max-width: 720px; padding: 110px 0; position: relative; z-index: 1; }
.hero .kicker {
  display: inline-block; font-size: 14px; letter-spacing: 6px; color: #9ee8f5;
  border: 1px solid rgba(103, 232, 249, 0.5); padding: 6px 18px; border-radius: 999px; margin-bottom: 28px;
  background: rgba(6, 182, 212, 0.10);
  backdrop-filter: blur(2px);
}
.hero h1 { font-size: 46px; line-height: 1.3; font-weight: 700; margin-bottom: 20px; letter-spacing: 2px; }
.hero h1 .en { display: block; font-size: 20px; font-weight: 400; letter-spacing: 8px; color: #9ee8f5; margin-top: 10px; }
.hero p { font-size: 17px; color: #d3ecf5; max-width: 620px; margin-bottom: 38px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.7); color: #fff; background: transparent;
}
.hero .btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section.alt { background: var(--bg); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .sub {
  font-size: 13px; letter-spacing: 4px; text-transform: uppercase; font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.section-head h2 { font-size: 34px; margin: 10px 0 16px; color: var(--primary-dark); letter-spacing: 1px; }
/* 标题下面那条青蓝渐变小横条 —— 全站「区块标题」的统一记号 */
.section-head h2::after {
  content: ""; display: block; width: 54px; height: 3px; margin: 16px auto 0;
  background: var(--grad); border-radius: 2px;
}
.section-head p { color: var(--muted); font-size: 16px; }

/* stats */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.stat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 20px; text-align: center; box-shadow: var(--shadow);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.stat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #bfe6f2; }
.stat-card .num {
  font-size: 42px; font-weight: 700; line-height: 1.1;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.stat-card .num span { font-size: 20px; }
.stat-card .label { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* feature cards */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cards-grid.three { grid-template-columns: repeat(3, 1fr); }
.cards-grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 28px;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #bfe6f2; }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--grad-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  font-size: 24px; color: var(--primary);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
/* 悬停时图标底换成实心渐变、图标转正一点 —— 一个小动作就能让静态卡片「活」起来 */
.card:hover .icon { background: var(--grad); color: #fff; transform: rotate(-6deg) scale(1.06); }
.card h3 { font-size: 19px; color: var(--primary-dark); margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12.5px; color: var(--primary); background: var(--grad-soft);
  padding: 3px 12px; border-radius: 999px;
}

/* split (image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .img-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split h2 { font-size: 30px; color: var(--primary-dark); margin-bottom: 20px; letter-spacing: 1px; }
.split p { color: var(--muted); margin-bottom: 14px; }
.split ul { margin-top: 8px; }
.split ul li {
  position: relative; padding-left: 26px; color: var(--ink); margin-bottom: 10px; font-size: 15px;
}
.split ul li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 14px;
  background: var(--grad); border-radius: 4px; opacity: 0.18;
}
.split ul li::after {
  content: ""; position: absolute; left: 4px; top: 13px; width: 6px; height: 6px;
  background: var(--grad); border-radius: 2px;
}

/* timeline */
.timeline { position: relative; max-width: 900px; margin: 0 auto; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent-2)); border-radius: 2px;
}
.timeline-item { position: relative; padding: 0 0 38px 30px; }
/* 圆点用「渐变外圈 + 白心」做：border 没法吃渐变，所以背景画渐变、
   再用 4px 的白色内阴影把中间掏成白的，效果和原来的 4px 白边一样。 */
.timeline-item::before {
  content: ""; position: absolute; left: -30px; top: 7px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--grad);
  box-shadow: inset 0 0 0 4px #fff;
}
.timeline-item .year {
  font-size: 22px; font-weight: 700; font-family: Georgia, serif;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.timeline-item h4 { font-size: 17px; margin: 4px 0 6px; color: var(--primary-dark); }
.timeline-item p { color: var(--muted); font-size: 14.5px; }

/* certificates */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cert-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--white);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.cert-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); border-color: #bfe6f2; }
.cert-card img { width: 100%; height: 240px; object-fit: cover; object-position: top; transition: transform .5s var(--ease); }
.cert-card:hover img { transform: scale(1.04); }
.cert-card .cap { padding: 16px; text-align: center; font-size: 14.5px; color: var(--ink); font-weight: 600; }

/* equipment */
.equip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.equip-card {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.equip-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.equip-card img { width: 100%; height: 230px; object-fit: cover; transition: transform .5s var(--ease); }
.equip-card:hover img { transform: scale(1.05); }
.equip-card .cap { padding: 18px 20px; }
.equip-card .cap h4 { font-size: 16.5px; color: var(--primary-dark); }
.equip-card .cap span { font-size: 13.5px; color: var(--muted); }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--grad-deep);
  color: #fff; padding: 70px 0; text-align: center;
}
/* 斜切的青蓝光带，纯装饰 —— 让纯色块不再「平」 */
.cta-band::before {
  content: ""; position: absolute; top: -60%; right: -10%; width: 60%; height: 220%;
  background: linear-gradient(118deg, rgba(6, 182, 212, 0.30), transparent 70%);
  transform: rotate(14deg); pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: 30px; margin-bottom: 14px; letter-spacing: 1px; }
.cta-band p { color: #c5e7f2; margin-bottom: 30px; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.info-card {
  background: var(--bg); border-radius: var(--radius); padding: 36px; border: 1px solid var(--line);
}
.info-item { display: flex; gap: 16px; margin-bottom: 28px; }
.info-item:last-child { margin-bottom: 0; }
.info-item .ico {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; background: var(--grad);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px;
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.26);
}
.info-item h4 { font-size: 15.5px; color: var(--primary-dark); margin-bottom: 4px; }
.info-item p { color: var(--muted); font-size: 15px; }

.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow);
}
.form-card h3 { font-size: 21px; color: var(--primary-dark); margin-bottom: 6px; }
.form-card .hint { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field label .req { color: #d64545; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fff;
  transition: border 0.2s ease; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { min-height: 120px; resize: vertical; }
.field .err { color: #d64545; font-size: 13px; margin-top: 5px; min-height: 18px; }
.form-msg { margin-top: 14px; font-size: 14.5px; min-height: 22px; }
.form-msg.ok { color: #1e8e3e; }
.form-msg.bad { color: #d64545; }

/* ---------- Login page ---------- */
.auth-wrap {
  min-height: calc(100vh - 72px - 260px); display: flex; align-items: center; justify-content: center;
  padding: 70px 24px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 440px; background: #fff; border-radius: 18px;
  box-shadow: var(--shadow); border: 1px solid var(--line); padding: 44px 40px;
}
.auth-card h2 { font-size: 24px; color: var(--primary-dark); text-align: center; margin-bottom: 8px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 30px; }
.auth-switch { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); line-height: 1.9; }

/* 登录 / 注册 切换标签 */
.auth-tabs { display: flex; gap: 6px; background: #e9f4fa; border-radius: 10px; padding: 5px; margin-bottom: 26px; }
.auth-tab {
  flex: 1; padding: 10px 0; border: none; border-radius: 7px; background: transparent;
  font-size: 15px; font-family: inherit; color: var(--muted); cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.auth-tab:hover { color: var(--primary); }
.auth-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 2px 6px rgba(11, 111, 164, 0.12); }

/* 表单里的两列布局与灰色提示 */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field label .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* 密码提醒条 */
.pwd-warning {
  background: #fff7e6; border: 1px solid #ffd591; color: #96590d; border-radius: 12px;
  padding: 14px 20px; margin-bottom: 26px; font-size: 14.5px; line-height: 1.7;
}
.pwd-warning a { color: #b26a00; text-decoration: underline; }

/* ---------- Profile ---------- */
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
}
.panel h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 20px; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.28);
}
.meta-row { font-size: 14px; color: var(--muted); margin-bottom: 10px; word-break: break-all; }
.meta-row b { color: var(--ink); font-weight: 600; }
.inquiry-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 14px;
}
.inquiry-item .top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.inquiry-item .top b { color: var(--primary-dark); }
.inquiry-item .top time { color: var(--muted); font-size: 13px; }
.inquiry-item p { font-size: 14.5px; color: var(--muted); }
.file-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; margin-bottom: 10px; font-size: 14px;
}
.file-row a { color: var(--primary); font-weight: 600; }
.empty { color: var(--muted); font-size: 14.5px; padding: 18px 0; }

/* ---------- Footer ---------- */
/* 页脚用「深青蓝」竖渐变，上面比下面略亮一点，与页头的渐变细线呼应 */
.site-footer {
  /* 页脚配色全部由 CSS 变量驱动，后台「主题风格 → 底部区域」可覆盖：
     --dt-footer-bg / --dt-footer-bg-to 是竖渐变两个端点色，
     --dt-footer-text / --dt-footer-muted / --dt-footer-title 是文字三档。
     变量默认值在 css/blocks.css 的 :root 里。 */
  background: linear-gradient(180deg,
    var(--dt-footer-bg, #08344f) 0%,
    var(--dt-footer-bg-to, #05212f) 100%);
  color: var(--dt-footer-text, #a8c6d6); margin-top: 0;
}
.footer-top {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 48px; padding: 64px 0 48px;
}
/* 有友情链接时多一列（快速导航 / 友情链接 / 联系方式）。
   首列给足宽度：公司全称必须一行放下，导航 / 友链列整体靠右。 */
.footer-top.has-links { grid-template-columns: 1.7fr 1fr 1fr 1fr; }
.footer-admin { white-space: nowrap; }
.footer-top h4 { position: relative; color: var(--dt-footer-title, #fff); font-size: 16px; margin-bottom: 18px; letter-spacing: 1px; padding-bottom: 12px; }
/* 页脚小标题下面那条渐变的短线，和正文区块标题同一套语言 */
.footer-top h4::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px;
  background: var(--grad); border-radius: 2px;
}
.footer-top p, .footer-top li { font-size: 14px; line-height: 2; }
.footer-top a { transition: color .2s var(--ease); }
.footer-top a:hover { color: #67e8f9; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.footer-brand img { height: 44px; border-radius: 6px; }
/* 公司全称一行显示：15 个字的字号下首列宽度已给足，再兜一道 nowrap；
   英文名换行是品牌排版，不参与 nowrap。手机端 320px 也量过放得下。 */
.footer-brand .cn { color: var(--dt-footer-title, #fff); font-size: 17px; font-weight: 700; white-space: nowrap; }
.footer-brand .en { color: var(--dt-footer-muted, #6f8ba0); font-size: 11px; letter-spacing: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 20px 0; font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
/* 页脚右侧那一串：备案号（能点进备案管理系统）+ 尾部信息 + 资质说明。
   用 flex + 中点分隔，窄屏自动换行。 */
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.footer-meta > * { position: relative; }
.footer-meta > * + *::before {
  content: "·"; position: absolute; left: -9px; color: rgba(168, 188, 203, 0.45);
}
.footer-link { color: var(--dt-footer-muted, #a8bccb); }
.footer-link:hover { color: var(--dt-footer-title, #fff); }

/* ---------- 图片灯箱：卡片网格「大图在上」、图片组点击放大 ----------
   单例浮层，点背景 / 关闭按钮 / Esc 收起。图片本身加个可点的光标提示。 */
[data-dt-lightbox] { cursor: zoom-in; }
.dt-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw;
  opacity: 0; visibility: hidden; transition: opacity .22s var(--ease), visibility .22s;
}
.dt-lightbox.is-open { opacity: 1; visibility: visible; }
.dt-lightbox-bg { position: absolute; inset: 0; background: rgba(5, 16, 24, 0.92); }
.dt-lightbox-close {
  position: absolute; top: 20px; right: 26px; z-index: 2;
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.dt-lightbox-close:hover { background: rgba(255, 255, 255, 0.24); transform: rotate(90deg); }
.dt-lightbox-fig {
  position: relative; z-index: 1; max-width: 92vw; max-height: 88vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0;
}
.dt-lightbox-img {
  max-width: 92vw; max-height: 80vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.dt-lightbox-cap { color: #cfe0ea; font-size: 14px; letter-spacing: 0.5px; text-align: center; }
.dt-lightbox-cap:empty { display: none; }
.dt-lb-open { overflow: hidden; }

/* responsive */
/* 页头最挤的一档（960px 抽屉断点之上）：先牺牲业务电话 —— 号码在页脚
   和联系页都有，没必要让它在 1000~1180px 这段跟导航抢宽度，
   导航「自动增加长度」第一步就是把它让出去。 */
@media (max-width: 1180px) and (min-width: 961px) {
  .header-phone { display: none; }
}
/* ---------- 移动端折叠菜单 ----------
   之前这里只有一个 `.main-nav { display: none }`，却没有「展开时怎么办」的规则：
   nav-toggle 点下去只是切了个 .is-open 类，CSS 里根本没有这个选择器 ——
   手机上点汉堡按钮等于什么都没发生，整站导航点不开。
   下面把两半补齐：桌面隐藏按钮，窄屏隐藏菜单、点开才以抽屉形式落下。 */
.nav-toggle {
  display: none;
  width: 42px; height: 38px;
  padding: 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--primary-dark); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .stats-grid, .cards-grid, .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid.three, .equip-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid, .profile-grid { grid-template-columns: 1fr; }
  /* 页脚手机端必须单列：上面 .footer-top.has-links 的特异度（0,2,0）比
     .footer-top（0,1,0）高，只写 .footer-top 压不住它，四列会在 375px
     仍挤在一行、每列只剩十几像素宽，内容全部叠在一起（踩过）。 */
  .footer-top, .footer-top.has-links { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-meta { max-width: 100%; }
  .hero h1 { font-size: 34px; }
  .header-inner { height: 64px; }

  /* 移动端退回 flex：品牌左、右侧（登录 + 汉堡）靠右，导航收进抽屉。
     grid 三列是桌面「绝对居中」用的，窄屏再用会把汉堡按钮顶到中间。 */
  .header-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
  }
  .header-left { flex: 0 1 auto; justify-self: auto; }
  .header-right { margin-left: auto; justify-self: auto; }
  /* 移动端隐藏「登录/注册」按钮（抽屉里已经有登录入口），只留汉堡 */
  .header-actions { display: none; }

  /* 页头挤不下时先牺牲电话（号码页脚还有），副标题缩小但保留 ——
     直接 display:none 会把品牌名下面那行 <br> 留成空行，反而更难看。 */
  .header-phone { display: none; }
  .brand-text .sub { font-size: 11px; }
  .brand-text .cn { font-size: 17px; }
  .brand-logo { height: 36px; max-width: 130px; }

  .nav-toggle { display: flex; }
  /* .site-header 是 sticky，天然就是绝对定位的参照物，
     所以抽屉从头部下沿（top:100%）铺开即可。
     桌面那套「占满中间 + 居中 + 收放档位」是给横向导航用的，抽屉里全部退回默认：
     flex / justify-content / overflow 不重置的话，抽屉会被垂直居中、
     档位类的紧凑 padding 也会一路漏进来。 */
  .main-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex: 0 0 auto; justify-content: flex-start;
    gap: 0; min-width: 0;
    overflow: visible;
    flex-direction: column; align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    max-height: 70vh; overflow-y: auto;
    animation: dt-drop .22s var(--ease);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 13px 24px; border-radius: 0; font-size: 15.5px; }
  .main-nav a.active { background: var(--grad-soft); }
  /* 移动端抽屉里那条底部渐变线改到左侧，竖着更好看 */
  .main-nav > .nav-item > a::after,
  .main-nav > a::after {
    left: 10px; right: auto; top: 12px; bottom: 12px;
    width: 3px; height: auto;
    transform: scaleY(0); transform-origin: 50% 50%;
  }
  .main-nav > .nav-item:hover > a::after,
  .main-nav > a:hover::after,
  .main-nav > .nav-item > a.active::after,
  .main-nav > a.active::after { transform: scaleY(1); }

  /* 移动端抽屉里没有「悬停」这回事，二级菜单直接平铺成缩进的一列 */
  .nav-item { display: block; }
  .nav-parent { display: flex; justify-content: space-between; }
  .nav-sub {
    position: static; display: block; min-width: 0;
    padding: 0; background: #f1f8fd;
    border: 0; border-radius: 0; box-shadow: none;
  }
  .nav-sub a { padding: 11px 24px 11px 38px; font-size: 14.5px; }
  .nav-sub a + a { margin-top: 0; }
}
@media (max-width: 560px) {
  .stats-grid, .cards-grid, .cards-grid.three, .cert-grid, .equip-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { min-height: 520px; }
  .hero h1 { font-size: 28px; }
}

/* ---------- 资讯 ---------- */
.news-card { display: block; padding: 0; overflow: hidden; cursor: pointer; }
.news-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.news-meta time { color: var(--muted); }
.news-more { display: inline-block; margin-top: 14px; color: var(--primary); font-size: 14px; font-weight: 600; }
.news-card:hover .news-more { text-decoration: underline; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(10, 25, 40, 0.62);
  display: none; align-items: center; justify-content: center; z-index: 300; padding: 24px;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff; border-radius: 16px; max-width: 820px; width: 100%;
  max-height: 86vh; overflow: auto; padding: 46px 48px; position: relative;
  box-shadow: 0 30px 70px rgba(8, 30, 50, 0.35);
}
.modal h2 { font-size: 25px; color: var(--primary-dark); margin-bottom: 12px; line-height: 1.45; }
.modal .article-meta { color: var(--muted); font-size: 14px; margin-bottom: 24px; display: flex; gap: 12px; align-items: center; }
.modal .article-body p { margin-bottom: 16px; color: var(--ink); }
.modal .modal-close {
  position: absolute; top: 16px; right: 20px; font-size: 28px; line-height: 1;
  background: none; border: none; cursor: pointer; color: var(--muted);
}
.modal .modal-close:hover { color: var(--primary); }
@media (max-width: 560px) { .modal { padding: 32px 22px; } }
