/* ============================================================
   昱升官网 · 设计系统与公共组件（Stage 1）
   原则：藏青为主、品牌红只做行动指引、哑光金只做资质细节
   间距只用 8 的倍数；字号阶梯 12/14/16/18/20/24/32/40/56
   断点：1440 / 1200 / 992 / 768 / 375
   注意：本文件只服务新版页头/页脚/首页；旧版列表页仍用 style.css
   ============================================================ */

:root {
  /* 色彩 */
  --c-primary: #0B2545;      /* 藏青 主色 */
  --c-primary-2: #123A63;    /* 深蓝 辅色 */
  --c-brand: #C0141C;        /* 品牌红 CTA，占比≤8% */
  --c-gold: #B49A5E;         /* 哑光金 细节 */
  --c-bg: #F5F6F8;
  --c-line: #E6E8EC;
  --c-text: #1F2328;
  --c-text-2: #6B7280;
  --c-white: #FFFFFF;

  /* 字体 */
  --font-sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  /* 间距（8 的倍数） */
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 48px; --sp-6: 64px; --sp-7: 96px;

  /* 形状与阴影 */
  --radius: 4px;
  --shadow-1: 0 1px 2px rgba(11, 37, 69, .06);
  --shadow-2: 0 8px 24px rgba(11, 37, 69, .10);

  /* 布局 */
  --container: 1200px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 240ms;
}

/* ---------- 基础 ---------- */
html { -webkit-text-size-adjust: 100%; }
html, body {
  overflow-x: clip; /* 防止抽屉导航滑出时撑出横向滚动（不支持 clip 的老内核回退 hidden） */
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-white);
  min-width: 0; /* 覆盖旧模板 min-width:1200px */
}
body.bodybj { background: var(--c-white) !important; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color var(--dur) var(--ease); }
ul, ol, dl, dd, dt, h1, h2, h3, h4, p { margin: 0; padding: 0; }
li { list-style: none; }
button { font-family: inherit; }

.ys-wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-3); }
@media (min-width: 1440px) { .ys-wrap { max-width: 1320px; } }

/* 通用按钮：纯色、无渐变无多层阴影 */
.ys-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 var(--sp-4);
  border-radius: 2px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.ys-btn--primary { background: var(--c-brand); color: var(--c-white); }
.ys-btn--primary:hover { background: #A61118; }
.ys-btn--ghost { background: transparent; color: var(--c-white); border-color: rgba(255, 255, 255, .55); }
.ys-btn--ghost:hover { border-color: var(--c-white); }
.ys-btn--navy { background: var(--c-primary); color: var(--c-white); }
.ys-btn--navy:hover { background: var(--c-primary-2); }

/* 区块标题：层级 ≤4 级 */
.ys-sec { padding: var(--sp-7) 0; }
.ys-sec--grey { background: var(--c-bg); }
.ys-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}
.ys-sec-title { font-size: 32px; font-weight: 700; line-height: 1.3; color: var(--c-primary); }
.ys-sec-sub { margin-top: var(--sp-1); font-size: 16px; color: var(--c-text-2); }
.ys-sec-more { font-size: 14px; color: var(--c-text-2); white-space: nowrap; }
.ys-sec-more:hover { color: var(--c-primary); }

/* 入场动效：fade + translateY(12px)，只此一类 */
@media (prefers-reduced-motion: no-preference) {
  .ys-fade { animation: ysFade .36s var(--ease) both; }
  @keyframes ysFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* ---------- 顶部工具条 ---------- */
.ys-topbar {
  background: var(--c-primary);
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1;
}
.ys-topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}
.ys-topbar__items { display: flex; gap: var(--sp-3); align-items: center; min-width: 0; }
.ys-topbar__items span, .ys-topbar__items a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ys-topbar a:hover { color: var(--c-white); }
.ys-topbar__admin { opacity: .6; }
.ys-topbar__admin:hover { opacity: 1; }

/* ---------- 页头 + 主导航 ---------- */
.ys-header { background: var(--c-white); border-bottom: 1px solid var(--c-line); position: relative; z-index: 100; }
.ys-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--sp-4);
}
.ys-logo img { height: 40px; width: auto; display: block; }
.ys-logo--text { font-size: 20px; font-weight: 700; color: var(--c-primary); letter-spacing: .02em; }

.ys-nav { display: flex; align-items: center; gap: var(--sp-1); }
.ys-nav__item { position: relative; }
.ys-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  height: 72px;
  font-size: 15px;
  color: var(--c-text);
  white-space: nowrap;
}
.ys-nav__link:hover, .ys-nav__item:hover > .ys-nav__link { color: var(--c-primary); font-weight: 500; }
.ys-nav__caret { font-size: 10px; color: var(--c-text-2); transform: translateY(1px); }
.ys-nav__drop {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 168px;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  padding: var(--sp-1) 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.ys-nav__item:hover .ys-nav__drop,
.ys-nav__item:focus-within .ys-nav__drop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}
.ys-nav__drop a {
  display: block;
  padding: 10px var(--sp-3);
  font-size: 14px;
  color: var(--c-text);
  white-space: nowrap;
}
.ys-nav__drop a:hover { background: var(--c-bg); color: var(--c-primary); }

.ys-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--c-line);
  border-radius: 2px;
  overflow: hidden;
  height: 36px;
  background: var(--c-bg);
}
.ys-search input {
  border: 0;
  outline: 0;
  background: transparent;
  height: 34px;
  line-height: 34px;
  width: 168px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--c-text);
}
.ys-search button {
  border: 0;
  background: var(--c-primary);
  color: var(--c-white);
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  cursor: pointer;
}
.ys-search button:hover { background: var(--c-primary-2); }

/* 移动端汉堡 */
.ys-burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.ys-burger span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--c-primary);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.ys-burger span:nth-child(1) { top: 14px; }
.ys-burger span:nth-child(2) { top: 21px; }
.ys-burger span:nth-child(3) { top: 28px; }
.ys-nav--open .ys-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ys-nav--open .ys-burger span:nth-child(2) { opacity: 0; }
.ys-nav--open .ys-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 首屏主视觉 ---------- */
/* 全页唯一渐变：hero 图片压暗遮罩 */
.ys-hero {
  position: relative;
  background: var(--c-primary);
  overflow: hidden;
  min-height: 680px;
  max-height: 820px;
  height: 72vh;
  display: flex;
  align-items: center;
}
.ys-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.ys-hero__mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(11, 37, 69, .92) 30%, rgba(11, 37, 69, .55) 100%);
}
.ys-hero__in { position: relative; z-index: 2; color: var(--c-white); max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-3); width: 100%; }
.ys-hero__rule { width: 40px; height: 3px; background: var(--c-gold); margin-bottom: var(--sp-3); } /* 全页唯一金线 */
.ys-hero__title { font-size: 56px; font-weight: 700; line-height: 1.25; letter-spacing: .01em; }
.ys-hero__sub { margin-top: var(--sp-2); font-size: 20px; font-weight: 400; color: rgba(255, 255, 255, .82); line-height: 1.6; }
.ys-hero__actions { margin-top: var(--sp-5); display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ---------- 服务矩阵 ---------- */
.ys-svc {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}
.ys-svc__card {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.ys-svc__card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.ys-svc__card--main {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: var(--sp-4);
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.ys-svc__card--main .ys-svc__name,
.ys-svc__card--main .ys-svc__desc { color: var(--c-white); }
.ys-svc__card--main .ys-svc__desc { color: rgba(255, 255, 255, .75); }
.ys-svc__icon { width: 44px; height: 44px; object-fit: contain; flex: none; }
.ys-svc__name { font-size: 20px; font-weight: 500; color: var(--c-primary); }
.ys-svc__desc { font-size: 14px; color: var(--c-text-2); line-height: 1.6; }
.ys-svc__go { margin-top: auto; font-size: 14px; color: var(--c-primary); }
.ys-svc__card--main .ys-svc__go { color: var(--c-gold); }
.ys-svc__card:hover .ys-svc__go { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 信息双栏（政策法规 / 招标公告） ---------- */
.ys-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}
.ys-list li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
}
.ys-list li:last-child { border-bottom: 0; }
.ys-list__tag {
  flex: none;
  font-size: 12px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 2px;
  background: rgba(11, 37, 69, .06);
  color: var(--c-primary);
  transform: translateY(-1px);
}
.ys-list__title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ys-list li a:hover .ys-list__title { color: var(--c-primary); }
.ys-list__date { flex: none; font-size: 14px; color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.ys-list__empty { justify-content: center; color: var(--c-text-2); font-size: 14px; padding: 28px 0; }

/* ---------- 服务流程 ---------- */
.ys-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4) var(--sp-5);
  counter-reset: step;
}
.ys-flow__item { position: relative; padding-left: 0; }
.ys-flow__no {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-primary);
  opacity: .28;
  font-variant-numeric: tabular-nums;
}
.ys-flow__name { margin-top: var(--sp-1); font-size: 16px; font-weight: 500; color: var(--c-text); }
.ys-flow__item::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 44px;
  right: 0;
  height: 1px;
  background: var(--c-line);
}
.ys-flow__item:nth-child(4n)::after { display: none; }

/* ---------- 荣誉资质（证书墙） ---------- */
.ys-honor {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}
.ys-honor__item {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--sp-2);
  cursor: zoom-in;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.ys-honor__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.ys-honor__frame {
  background: var(--c-white);
  border: 1px solid var(--c-gold);
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-1);
}
/* 证书必须完整可读：contain 不裁切，留白由白底承载 */
.ys-honor__frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ys-honor__name {
  margin-top: var(--sp-2);
  font-size: 14px;
  color: var(--c-text-2);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 证书查看器（纯图，无验证码） */
.ys-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(11, 37, 69, .88);
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.ys-viewer--open { display: flex; }
.ys-viewer img { max-width: min(1080px, 92vw); max-height: 86vh; object-fit: contain; background: var(--c-white); border-radius: var(--radius); }
.ys-viewer__close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: var(--c-white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.ys-viewer__close:hover { background: rgba(255, 255, 255, .3); }

/* ---------- 公司动态 + 联系方式 ---------- */
.ys-contact {
  background: var(--c-primary);
  color: var(--c-white);
  border-radius: var(--radius);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  font-size: 16px;
}
.ys-contact__title { font-size: 24px; font-weight: 700; }
.ys-contact p { color: rgba(255, 255, 255, .8); font-size: 14px; line-height: 1.8; }
.ys-contact strong { color: var(--c-white); font-weight: 500; font-size: 16px; }

/* ---------- 页脚 ---------- */
.ys-footer { background: var(--c-primary); color: rgba(255, 255, 255, .72); margin-top: var(--sp-7); }
.ys-footer__top {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-6) 0 var(--sp-5);
  flex-wrap: wrap;
}
.ys-footer__brand { max-width: 460px; }
.ys-footer__name { color: var(--c-white); font-size: 20px; font-weight: 700; margin-bottom: var(--sp-2); }
.ys-footer__brand p { font-size: 14px; line-height: 1.8; }
.ys-footer__links { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.ys-footer__col h4 { color: var(--c-white); font-size: 14px; font-weight: 500; margin-bottom: var(--sp-2); }
.ys-footer__col a { display: block; font-size: 13px; padding: 5px 0; color: rgba(255, 255, 255, .62); }
.ys-footer__col a:hover { color: var(--c-white); }
.ys-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: var(--sp-3) 0;
  font-size: 12px;
}
.ys-footer__bar-in {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.ys-footer__bar a { color: rgba(255, 255, 255, .72); }
.ys-footer__bar a:hover { color: var(--c-white); }
.ys-footer__bar img { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1299px) {
  /* 中屏：导航放不下搜索框，隐藏之（导航约 9 项仍可单行放下） */
  .ys-search { display: none; }
}

@media (max-width: 1199px) {
  .ys-hero__title { font-size: 40px; }
  .ys-sec { padding: var(--sp-6) 0; }
  .ys-svc { grid-template-columns: repeat(3, 1fr); }
  .ys-svc__card--main { grid-column: span 2; }
  .ys-honor { grid-template-columns: repeat(3, 1fr); }
  .ys-flow { grid-template-columns: repeat(2, 1fr); }
  .ys-flow__item:nth-child(2n)::after { display: none; }
}

@media (max-width: 1199px) {
  /* 中屏起改用抽屉式导航 */
  .ys-topbar__items span { display: none; }
  .ys-header__in { height: 60px; }
  .ys-logo img { height: 34px; }

  /* 抽屉式导航 */
  .ys-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 84vw;
    background: var(--c-white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-4) var(--sp-3);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    z-index: 200;
    box-shadow: var(--shadow-2);
  }
  .ys-nav--open .ys-nav { transform: translateX(0); }
  .ys-burger { display: block; z-index: 210; }
  .ys-nav__mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 37, 69, .4);
    z-index: 150;
  }
  .ys-nav--open ~ .ys-nav__mask, .ys-nav__mask--show { display: block; }
  .ys-nav__link { height: 52px; width: 100%; justify-content: space-between; font-size: 16px; padding: 0; }
  .ys-nav__drop {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--c-line);
    border-radius: 0;
    margin: 0 0 var(--sp-1) var(--sp-2);
    padding: 0;
    display: none;
  }
  .ys-nav__item--open .ys-nav__drop { display: block; }
  .ys-nav__drop a { padding: 10px 0 10px 12px; }

  .ys-hero { min-height: 520px; height: auto; padding: var(--sp-6) 0; }
  .ys-hero__title { font-size: 32px; }
  .ys-hero__sub { font-size: 16px; }
  .ys-dual { grid-template-columns: 1fr; gap: var(--sp-5); }
  .ys-svc { grid-template-columns: repeat(2, 1fr); }
  .ys-svc__card--main { grid-column: span 2; flex-direction: column; align-items: flex-start; }
  .ys-honor { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
  .ys-sec { padding: var(--sp-5) 0; }
  .ys-sec-head { margin-bottom: var(--sp-4); }
  .ys-sec-title { font-size: 24px; }
  .ys-hero { min-height: 460px; }
  .ys-hero__title { font-size: 28px; }
  .ys-hero__actions .ys-btn { flex: 1 1 100%; }
  .ys-svc { grid-template-columns: 1fr; }
  .ys-svc__card--main { grid-column: span 1; }
  .ys-honor { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .ys-flow { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .ys-list__title { font-size: 15px; }
  .ys-footer__top { flex-direction: column; gap: var(--sp-4); }
}

@media (max-width: 374px) {
  .ys-honor { grid-template-columns: 1fr; }
}
