/* ==========================================================================
   页头、页脚共用样式
   FreeMarker 页面（首页、标书问答）与 Vue 页面（AppHeader.vue / AppFooter.vue）
   引用同一份文件，两侧页头页脚保持一致。
   变量统一带 --site- 前缀，规则限定在 #site-header / #site-footer 之内，
   公共类统一带 site- 前缀，避免与页面其他样式互相影响。
   ========================================================================== */

:root {
  --site-font: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --site-ink: #172033;
  --site-ink-2: #526071;
  --site-steel: #7C8899;
  --site-muted: #98A2B1;
  --site-blue: #2563EB;
  --site-blue-hover: #1D4ED8;
  --site-blue-deep: #1E40AF;
  --site-blue-light: #EFF6FF;
  --site-blue-lighter: #F5F8FF;
  --site-rule: #DDE2E8;
  --site-rule-soft: #EDF0F3;
  --site-canvas: #F3F5F7;
  --site-soft: #F7F9FC;
  --site-surface: #FFFFFF;
  --site-success: #16835C;
  --site-warning: #A86100;
  --site-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
  --site-shadow-md: 0 2px 4px -1px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --site-shadow-lg: 0 12px 32px -10px rgba(15, 23, 42, 0.18), 0 4px 10px -4px rgba(15, 23, 42, 0.08);
  --site-shadow-xl: 0 30px 70px -30px rgba(15, 23, 42, 0.28), 0 10px 24px -12px rgba(15, 23, 42, 0.12);
  --site-r-sm: 8px;
  --site-r-md: 12px;
  --site-r-lg: 16px;
  --site-r-xl: 22px;
  --site-pill: 999px;
  --site-header-h: 64px;
  --site-max: 1200px;
  --site-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==================== 图标 ==================== */
.site-sprite {
  display: none;
}

.site-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.site-icon-sm {
  width: 15px;
  height: 15px;
}

.site-icon-lg {
  width: 24px;
  height: 24px;
}

/* ==================== 按钮 ==================== */
.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s var(--site-ease),
    border-color 0.2s var(--site-ease),
    transform 0.2s var(--site-ease),
    box-shadow 0.2s var(--site-ease);
}

.site-btn-primary {
  background: var(--site-blue);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.55);
}

.site-btn-primary:hover {
  background: var(--site-blue-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgba(37, 99, 235, 0.6);
}

.site-btn-primary:active {
  transform: translateY(0);
}

.site-btn-secondary {
  background: #fff;
  color: var(--site-ink);
  border-color: var(--site-rule);
}

.site-btn-secondary:hover {
  border-color: #b9c4d4;
  background: #fbfcfe;
  color: var(--site-ink);
}

.site-btn-ghost {
  background: transparent;
  color: var(--site-ink-2);
}

.site-btn-ghost:hover {
  background: var(--site-blue-lighter);
  color: var(--site-blue);
}

.site-btn-sm {
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 14px;
}

.site-btn-light {
  background: #fff;
  color: var(--site-blue-deep);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.4);
}

.site-btn-light:hover {
  background: #f4f8ff;
  color: var(--site-blue-deep);
  transform: translateY(-1px);
}

.site-btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.site-btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.site-btn-block {
  width: 100%;
}

#site-header *,
#site-header *::before,
#site-header *::after,
#site-footer *,
#site-footer *::before,
#site-footer *::after {
  box-sizing: border-box;
}

#site-header :focus-visible,
#site-footer :focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ==================== 页头 ==================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--site-rule-soft);
  font-family: var(--site-font);
  line-height: 1.65;
  color: var(--site-ink);
}

#site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--site-max);
  height: var(--site-header-h);
  margin: 0 auto;
  padding: 0 24px;
}

#site-header .logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

#site-header .logo-img {
  display: block;
  width: 114px;
  height: 32px;
}

#site-header .main-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#site-header .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--site-ink);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.78;
  transition:
    color 0.18s,
    background 0.18s,
    opacity 0.18s;
}

/* 按钮不继承行高，与链接高度不同，与原型一致 */
#site-header button.nav-link {
  line-height: normal;
}

/* 只对已登录用户显示的入口：模板默认隐藏，site.js 认出登录态后在页头写上 data-auth="user" */
#site-header .nav-link.site-auth-only {
  display: none;
}

#site-header[data-auth='user'] .nav-link.site-auth-only {
  display: inline-flex;
}

#site-header .nav-link:hover,
#site-header .nav-link.router-link-exact-active {
  background: var(--site-blue-lighter);
  color: var(--site-blue);
  opacity: 1;
}

#site-header .nav-dropdown {
  position: relative;
}

#site-header .dropdown-arrow {
  transition: transform 0.25s var(--site-ease);
  opacity: 0.55;
}

#site-header .dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  min-width: 172px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--site-rule);
  border-radius: 12px;
  box-shadow: var(--site-shadow-lg);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(6px);
  transition:
    opacity 0.2s var(--site-ease),
    visibility 0.2s,
    transform 0.2s var(--site-ease);
}

#site-header .dropdown-menu a,
#site-header .dropdown-menu .qr-tip {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
}

#site-header .dropdown-menu a {
  font-size: 14px;
  color: var(--site-ink);
  text-decoration: none;
}

#site-header .dropdown-menu a:hover {
  background: var(--site-blue-lighter);
  color: var(--site-blue);
}

#site-header .dropdown-menu .qr-tip {
  width: 220px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--site-ink-2);
}

#site-header .dropdown-menu--qr {
  min-width: 0;
  text-align: center;
}

#site-header .nav-qr-img {
  display: block;
  width: 140px;
  max-width: none;
  height: 140px;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

#site-header .nav-qr-tip {
  display: block;
  padding: 9px 12px 6px;
  font-size: 12.5px;
  color: var(--site-ink-2);
}

@media (hover: hover) {
  #site-header .nav-dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  #site-header .nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
  }
}

/* 触屏点按按钮后聚焦展开，不需要 JS */
#site-header .nav-dropdown:focus-within .dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#site-header .nav-dropdown:focus-within .dropdown-arrow {
  transform: rotate(180deg);
}

#site-header .header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 单页应用的全局样式给所有 a 标签指定了颜色（a:not(.nav-item)...），这里用 id 作用域固定页头按钮的配色 */
#site-header .site-btn-ghost {
  color: var(--site-ink-2);
}

#site-header .site-btn-ghost:hover {
  color: var(--site-blue);
}

#site-header .site-btn-primary,
#site-header .site-btn-primary:hover {
  color: #fff;
}

/* 移动端菜单开关：复选框放在 header 下、导航之前，样式靠兄弟选择器控制导航显隐 */
#site-header .site-menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

#site-header .menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--site-rule);
  border-radius: 9px;
  background: #fff;
  color: var(--site-ink);
  cursor: pointer;
}

#site-header .menu-toggle:hover {
  border-color: #b9c4d4;
}

#site-header .site-menu-toggle:focus-visible ~ .header-inner .menu-toggle {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  #site-header .main-nav {
    gap: 0;
  }

  #site-header .nav-link {
    padding: 8px;
    font-size: 13.5px;
  }
}

@media (max-width: 1080px) {
  #site-header .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 20px;
    background: #fff;
    border-bottom: 1px solid var(--site-rule);
    box-shadow: var(--site-shadow-md);
  }

  #site-header .site-menu-toggle:checked ~ .header-inner .main-nav {
    display: flex;
  }

  #site-header .menu-toggle {
    display: inline-flex;
  }

  #site-header .nav-link {
    justify-content: space-between;
    padding: 12px 10px;
    font-size: 15px;
    opacity: 1;
  }

  #site-header .nav-dropdown {
    width: 100%;
  }

  #site-header .nav-dropdown .dropdown-menu {
    position: static;
    display: none;
    min-width: 0;
    padding: 0 0 6px 18px;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  #site-header .nav-dropdown:focus-within .dropdown-menu {
    display: block;
  }

  #site-header .dropdown-menu .qr-tip {
    width: auto;
  }

  #site-header .header-actions .site-btn-ghost {
    display: none;
  }

  /* 触屏点按聚焦展开不显示焦点框；键盘聚焦仍保留焦点环 */
  #site-header .nav-dropdown-trigger:focus {
    outline: none;
  }

  #site-header .nav-dropdown-trigger:focus-visible {
    outline: 2px solid var(--site-blue);
  }
}

@media (max-width: 720px) {
  #site-header .header-inner {
    gap: 10px;
    padding: 0 16px;
  }

  #site-header .logo-img {
    width: 100px;
    height: 28px;
  }
}

/* ==================== 页脚 ==================== */
#site-footer {
  background: linear-gradient(180deg, #1a1f2e 0%, #141824 100%);
  font-family: var(--site-font);
  font-size: 14px;
  line-height: 1.65;
  color: #c2c8d6;
}

#site-footer p,
#site-footer h4,
#site-footer ul {
  margin: 0;
}

#site-footer ul {
  padding: 0;
  list-style: none;
}

#site-footer a {
  text-decoration: none;
}

#site-footer .footer-main {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr 0.9fr 1.25fr;
  gap: 52px;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 56px 24px 40px;
}

#site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

#site-footer .footer-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-radius: 11px;
  box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.9);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

#site-footer .footer-word {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

#site-footer .footer-word small {
  display: block;
  margin-top: 2px;
  color: #8b93a7;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

#site-footer .footer-about .footer-company {
  margin-bottom: 10px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.6;
}

#site-footer .footer-about p {
  max-width: 340px;
  margin-bottom: 18px;
  color: #8b93a7;
  font-size: 13px;
  line-height: 1.85;
}

#site-footer .footer-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#site-footer .footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: #6b7490;
  font-size: 11px;
}

#site-footer .footer-badge .site-icon {
  width: 12px;
  height: 12px;
  color: #4f8cff;
}

#site-footer h4 {
  position: relative;
  margin-bottom: 18px;
  padding-bottom: 10px;
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

#site-footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2.5px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  border-radius: 2px;
}

#site-footer .footer-links li {
  margin-bottom: 11px;
}

#site-footer .footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: #8b93a7;
  font-size: 13px;
  background: none;
  border: 0;
  cursor: pointer;
  transition:
    color 0.2s,
    padding-left 0.2s;
}

#site-footer .footer-links a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4f5d78;
  transition: background 0.2s;
}

#site-footer .footer-links a:hover {
  padding-left: 3px;
  color: #7ea8ff;
}

#site-footer .footer-links a:hover::before {
  background: #7ea8ff;
}

#site-footer .footer-hotline {
  display: block;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(79, 140, 255, 0.08);
  border: 1px solid rgba(79, 140, 255, 0.15);
  border-radius: 10px;
  color: #c2c8d6;
}

#site-footer .footer-hotline:hover {
  background: rgba(79, 140, 255, 0.14);
}

#site-footer .footer-hotline span {
  display: block;
  margin-bottom: 3px;
  color: #6b7490;
  font-size: 11px;
}

#site-footer .footer-hotline b {
  display: block;
  color: #4f8cff;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

#site-footer .footer-hotline small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: #6b7490;
  font-size: 11px;
}

#site-footer .footer-contact-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  color: #c2c8d6;
  font-size: 12.5px;
}

#site-footer a.footer-contact-row:hover,
#site-footer .footer-contact-row--qr:hover,
#site-footer .footer-contact-row--qr:focus {
  border-color: rgba(127, 168, 255, 0.35);
  color: #fff;
}

#site-footer .footer-contact-row .ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(79, 140, 255, 0.08);
  border: 1px solid rgba(79, 140, 255, 0.15);
  border-radius: 7px;
  color: #4f8cff;
}

#site-footer .footer-contact-row .ico .site-icon {
  width: 15px;
  height: 15px;
}

#site-footer .footer-contact-row .row-hint {
  margin-left: auto;
  color: #6b7490;
  font-size: 11px;
}

/* 二维码浮层：悬停或聚焦时在行左侧展开，不需要 JS */
#site-footer .footer-qr {
  position: absolute;
  right: calc(100% + 10px);
  bottom: 0;
  z-index: 10;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(6px);
  transition:
    opacity 0.2s,
    visibility 0.2s,
    transform 0.2s;
}

#site-footer .footer-contact-row:hover .footer-qr,
#site-footer .footer-contact-row--qr:focus .footer-qr {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

#site-footer .footer-qr img {
  display: block;
  width: 140px;
  max-width: none;
  height: 140px;
  border-radius: 6px;
  object-fit: cover;
}

#site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #555d72;
  font-size: 11.5px;
}

#site-footer .footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

#site-footer .footer-bottom-links a {
  color: #6b7490;
  font-size: 11.5px;
}

#site-footer .footer-bottom-links a:hover {
  color: #7ea8ff;
}

/* 底部版权一行：版权文字、分隔线、备案号（链接到工信部备案系统） */
#site-footer .footer-copyright {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

#site-footer .footer-bottom-sep {
  color: #3d4559;
}

#site-footer .footer-icp {
  color: #6b7490;
  font-size: 11.5px;
}

#site-footer .footer-icp:hover {
  color: #7ea8ff;
}

@media (max-width: 1120px) {
  #site-footer .footer-main {
    grid-template-columns: 1.4fr 0.9fr 0.9fr;
    gap: 36px;
  }

  #site-footer .footer-main .footer-contact {
    grid-column: 1 / -1;
  }

  /* 宽屏下联系方式的两组内容上下排列，与原型一致；1120px 以下分两列 */
  #site-footer .footer-contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }
}

@media (max-width: 720px) {
  #site-footer .footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 44px 20px 32px;
  }

  #site-footer .footer-main .footer-contact {
    grid-column: auto;
  }

  #site-footer .footer-contact-inner {
    grid-template-columns: 1fr;
  }

  #site-footer .footer-about p {
    max-width: none;
  }

  /* 窄屏时浮层改到行下方，最后两行改到上方，避免超出屏幕 */
  #site-footer .footer-qr {
    top: calc(100% + 8px);
    right: 11px;
    bottom: auto;
    transform: translateY(-6px);
  }

  #site-footer .footer-contact-row:nth-last-child(-n + 2) .footer-qr {
    top: auto;
    bottom: calc(100% + 8px);
  }

  #site-footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
  }
}
