/* ==========================================================================
   上海程瀚资质站群公共基础样式 (v3.0)
   1. 4 套政企明亮高信任配色预设 (blue_gold / navy_tech / teal_orange / indigo_red)
   2. Lucide 开源图标 SVG Sprite (.ic / .hc-ic) 与隐藏定义容器 (.hc-sprite-defs)
   3. .st-adaptive-grid[data-count="0".."6"] 动态自适应防孤卡网格
   4. .footer-trust-bar 底部纯展示权威信任徽章矩阵
   5. .table-wrap 移动端宽表格防溢出容器 & 无障碍辅助类
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background-color: var(--hc-bg, #F4F7FB);
  color: var(--hc-ink, #1E293B);
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--hc-accent, #C89B3C);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--hc-primary, #0F3D7A);
  color: #FFFFFF;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
}

.hc-sprite-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.hc-hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.hc-mt-1 { margin-top: 10px; }
.hc-mt-2 { margin-top: 16px; }
.hc-mt-3 { margin-top: 24px; }
.hc-mb-1 { margin-bottom: 12px; }
.hc-mb-2 { margin-bottom: 18px; }
.hc-mb-3 { margin-bottom: 24px; }
.hc-w-full { width: 100%; }

/* --------------------------------------------------------------------------
   1. 4 套政企明亮配色预设（严禁黑色 / 暗调大块）
   -------------------------------------------------------------------------- */
:root,
[data-theme="blue_gold"],
.theme-blue_gold {
  --hc-primary: #0F3D7A;
  --hc-primary-dark: #0A2C59;
  --hc-primary-light: #1D56A3;
  --hc-primary-soft: #EBF2FC;

  --hc-accent: #C89B3C;
  --hc-accent-ink: #7D5B12;
  --hc-accent-hover: #B08429;
  --hc-accent-soft: #FBF5E6;

  --hc-bg: #F4F7FB;
  --hc-surface: #FFFFFF;
  --hc-surface-alt: #EDF2F8;

  --hc-ink: #1E293B;
  --hc-ink-secondary: #334155;
  --hc-muted: #52637A;

  --hc-border: #DCE4F0;
  --hc-border-strong: #C3D1E6;

  --hc-hero-grad: linear-gradient(135deg, #F4F7FB 0%, #E7EFFA 55%, #FBF7EC 100%);
  --hc-brand-grad: linear-gradient(135deg, #0F3D7A 0%, #1D56A3 100%);
  --hc-shadow-sm: 0 2px 8px rgba(15, 61, 122, 0.06);
  --hc-shadow-md: 0 10px 28px rgba(15, 61, 122, 0.09);
  --hc-radius: 12px;
  --hc-radius-lg: 16px;
}

[data-theme="navy_tech"],
.theme-navy_tech {
  --hc-primary: #164E87;
  --hc-primary-dark: #103A66;
  --hc-primary-light: #1E63AB;
  --hc-primary-soft: #EAF2FB;

  --hc-accent: #2563EB;
  --hc-accent-ink: #1D4ED8;
  --hc-accent-hover: #1D4ED8;
  --hc-accent-soft: #EFF6FF;

  --hc-bg: #F8FAFC;
  --hc-surface: #FFFFFF;
  --hc-surface-alt: #F1F5F9;

  --hc-ink: #1E293B;
  --hc-ink-secondary: #334155;
  --hc-muted: #52637A;

  --hc-border: #DCE5F2;
  --hc-border-strong: #C2D2EA;

  --hc-hero-grad: linear-gradient(135deg, #F8FAFC 0%, #E8F1FC 60%, #EFF6FF 100%);
  --hc-brand-grad: linear-gradient(135deg, #164E87 0%, #2563EB 100%);
  --hc-shadow-sm: 0 2px 8px rgba(22, 78, 135, 0.06);
  --hc-shadow-md: 0 10px 28px rgba(22, 78, 135, 0.09);
  --hc-radius: 12px;
  --hc-radius-lg: 16px;
}

[data-theme="teal_orange"],
.theme-teal_orange {
  --hc-primary: #0E5A6D;
  --hc-primary-dark: #094251;
  --hc-primary-light: #16768E;
  --hc-primary-soft: #E8F4F7;

  --hc-accent: #EA580C;
  --hc-accent-ink: #C2410C;
  --hc-accent-hover: #C2410C;
  --hc-accent-soft: #FFF3EB;

  --hc-bg: #F3F8F9;
  --hc-surface: #FFFFFF;
  --hc-surface-alt: #E9F1F3;

  --hc-ink: #1E293B;
  --hc-ink-secondary: #334155;
  --hc-muted: #4E5E6C;

  --hc-border: #D5E4E8;
  --hc-border-strong: #B8D0D7;

  --hc-hero-grad: linear-gradient(135deg, #F3F8F9 0%, #E4F2F5 60%, #FFF6F0 100%);
  --hc-brand-grad: linear-gradient(135deg, #0E5A6D 0%, #16768E 100%);
  --hc-shadow-sm: 0 2px 8px rgba(14, 90, 109, 0.06);
  --hc-shadow-md: 0 10px 28px rgba(14, 90, 109, 0.09);
  --hc-radius: 12px;
  --hc-radius-lg: 16px;
}

[data-theme="indigo_red"],
.theme-indigo_red {
  --hc-primary: #1E3A8A;
  --hc-primary-dark: #172B69;
  --hc-primary-light: #2A4FB0;
  --hc-primary-soft: #ECEFFD;

  --hc-accent: #DC2626;
  --hc-accent-ink: #B91C1C;
  --hc-accent-hover: #B91C1C;
  --hc-accent-soft: #FEF2F2;

  --hc-bg: #F5F6FA;
  --hc-surface: #FFFFFF;
  --hc-surface-alt: #ECEFF6;

  --hc-ink: #1E293B;
  --hc-ink-secondary: #334155;
  --hc-muted: #52637A;

  --hc-border: #DCE1EE;
  --hc-border-strong: #C2CAE0;

  --hc-hero-grad: linear-gradient(135deg, #F5F6FA 0%, #EAEFFA 60%, #FEF5F5 100%);
  --hc-brand-grad: linear-gradient(135deg, #1E3A8A 0%, #2A4FB0 100%);
  --hc-shadow-sm: 0 2px 8px rgba(30, 58, 138, 0.06);
  --hc-shadow-md: 0 10px 28px rgba(30, 58, 138, 0.09);
  --hc-radius: 12px;
  --hc-radius-lg: 16px;
}

/* --------------------------------------------------------------------------
   2. Lucide SVG Sprite 图标基础样式 (.ic / .hc-ic)
   -------------------------------------------------------------------------- */
.ic,
.hc-ic {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   3. .st-adaptive-grid[data-count] 动态自适应防孤卡网格
   -------------------------------------------------------------------------- */
.st-adaptive-section[data-count="0"],
.st-adaptive-grid[data-count="0"],
.st-adaptive-grid[data-count=""] {
  display: none !important;
}

.st-adaptive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.st-adaptive-grid > * {
  min-width: 0;
}

.st-adaptive-grid[data-count="1"] {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.st-adaptive-grid[data-count="2"],
.st-adaptive-grid[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.st-adaptive-grid[data-count="3"],
.st-adaptive-grid[data-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.st-adaptive-grid[data-count="5"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.st-adaptive-grid[data-count="5"] > :nth-child(1),
.st-adaptive-grid[data-count="5"] > :nth-child(2),
.st-adaptive-grid[data-count="5"] > :nth-child(3) {
  grid-column: span 2;
}

.st-adaptive-grid[data-count="5"] > :nth-child(4),
.st-adaptive-grid[data-count="5"] > :nth-child(5) {
  grid-column: span 3;
}

@media (max-width: 960px) {
  .st-adaptive-grid,
  .st-adaptive-grid[data-count="5"],
  .st-adaptive-grid[data-count="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .st-adaptive-grid[data-count="5"] > :nth-child(n) {
    grid-column: span 1;
  }

  .st-adaptive-grid[data-count="5"] > :nth-child(5) {
    grid-column: span 2;
  }

  .st-adaptive-grid[data-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .st-adaptive-grid,
  .st-adaptive-grid[data-count="1"],
  .st-adaptive-grid[data-count="2"],
  .st-adaptive-grid[data-count="3"],
  .st-adaptive-grid[data-count="4"],
  .st-adaptive-grid[data-count="5"],
  .st-adaptive-grid[data-count="6"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .st-adaptive-grid[data-count="5"] > :nth-child(n) {
    grid-column: auto;
  }
}

/* --------------------------------------------------------------------------
   4. .footer-trust-bar 底部纯展示权威信任徽章条（无外链、政企精细描边）
   -------------------------------------------------------------------------- */
.footer-trust-bar {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--hc-border, #DCE4F0);
}

.footer-trust-bar__list,
.footer-trust-bar--flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 10px 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--hc-surface, #FFFFFF);
  border: 1px solid var(--hc-border, #DCE4F0);
  border-radius: 8px;
  color: var(--hc-ink-secondary, #334155);
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 1px 3px rgba(15, 61, 122, 0.04);
  user-select: text;
}

.footer-trust-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--hc-primary-soft, #EBF2FC);
  color: var(--hc-primary, #0F3D7A);
  flex-shrink: 0;
}

.footer-trust-badge__icon .ic,
.footer-trust-badge__icon svg {
  width: 15px;
  height: 15px;
}

.footer-trust-badge__text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.footer-trust-badge__title {
  font-weight: 600;
  color: var(--hc-ink, #1E293B);
  font-size: 12px;
}

.footer-trust-badge__sub {
  font-size: 11px;
  color: var(--hc-muted, #52637A);
}

@media (max-width: 768px) {
  .footer-trust-bar__list,
  .footer-trust-bar--flex {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .footer-trust-badge {
    padding: 8px 10px;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .footer-trust-bar__list,
  .footer-trust-bar--flex {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   5. .table-wrap 移动端宽表格防溢出样式
   -------------------------------------------------------------------------- */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--hc-surface, #FFFFFF);
  border: 1px solid var(--hc-border, #DCE4F0);
  border-radius: var(--hc-radius, 12px);
  box-shadow: var(--hc-shadow-sm, 0 2px 8px rgba(15, 61, 122, 0.06));
}

.table-wrap table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
  color: var(--hc-ink-secondary, #334155);
  text-align: left;
}

.table-wrap caption {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 15px;
  color: var(--hc-primary, #0F3D7A);
  background: var(--hc-surface-alt, #EDF2F8);
  border-bottom: 1px solid var(--hc-border, #DCE4F0);
  text-align: left;
}

.table-wrap thead th {
  background: var(--hc-primary-soft, #EBF2FC);
  color: var(--hc-primary, #0F3D7A);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 2px solid var(--hc-border-strong, #C3D1E6);
  white-space: nowrap;
}

.table-wrap tbody th,
.table-wrap tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--hc-border, #DCE4F0);
  vertical-align: top;
}

.table-wrap tbody th {
  font-weight: 600;
  color: var(--hc-ink, #1E293B);
  background: rgba(244, 247, 251, 0.65);
}

.table-wrap tbody tr:nth-child(even) td {
  background: var(--hc-bg, #F4F7FB);
}

.table-wrap tbody tr:last-child th,
.table-wrap tbody tr:last-child td {
  border-bottom: none;
}
