/* ==========================================================================
   page-home.css · 首页（index.html）
   --------------------------------------------------------------------------
   作用域：body.page-home
   页面结构：Hero → 关键数据带 → 五大科目 → 报考流程 → 证书效力
             → 组织架构 → 常见问题 → 页脚
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero 区 · 首屏
   唯一目标：把「立即报考」推到第一眼。
   左列（1.25fr）承接标题与主 CTA，右列（0.95fr）是报考信息面板。
   -------------------------------------------------------------------------- */

.hero {
  background: var(--paper);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
/* 右上角一枚极淡的径向光晕，只是为了不空，不用渐变抢视线 */
.hero::before {
  content: "";
  position: absolute;
  right: -120px; top: -160px;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(27, 87, 165, .09), transparent 68%);
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: var(--sp-8);
  padding-top: var(--sp-9);
  padding-bottom: var(--sp-9);
  align-items: start;
}
/* 栅格子项禁止把列撑宽（min-content 兜底）：
   右列倒计时的 min-width 曾把整页撑出横向滚动，此处是根治守卫 */
.hero .wrap > * { min-width: 0; }

/* --- 标题下的关键事实条（报考期 / 考试日 / 科目数）--- */
.hero-meta {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
  margin: var(--sp-6) 0;
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-meta div { display: flex; flex-direction: column; gap: 2px; }
.hero-meta dt { font-size: var(--fs-xs); color: var(--ink-400); }
.hero-meta dd { margin: 0; font-family: var(--ff-mono); font-size: 16px; font-weight: 700; color: var(--navy-900); }

.hero-cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }

/* --------------------------------------------------------------------------
   报考信息面板（Hero 右列）· 含实时倒计时
   --------------------------------------------------------------------------
   倒计时由 assets/js/page-home.js 驱动：
     · 秒格常驻红色（.cd-unit--alert，定义在 components.css）
     · 剩余不足 3 天时容器加 .is-finalsprint，「天」格也转为红色
   -------------------------------------------------------------------------- */

.countdown.is-finalsprint .cd-unit:first-child {
  background: var(--red-600);
  animation: finalsprint 1.6s var(--ease) infinite;
}
.countdown.is-finalsprint .cd-unit:first-child .cd-lab { color: #FFFFFF; }

@keyframes finalsprint {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, .34); }
  50%      { box-shadow: 0 0 0 6px rgba(200, 16, 46, 0); }
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  overflow: hidden;
}
.panel-head {
  background: var(--navy-900);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
}
.panel-head b { color: #fff; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .03em; }
.panel-body { padding: var(--sp-5); }
.panel-foot {
  border-top: 1px solid var(--line);
  padding: var(--sp-4) var(--sp-5);
  background: var(--navy-50);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--ink-500);
}

/* 报考要点矩阵：用 1px 缝隙做分隔，比画边框干净 */
.fact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-top: var(--sp-4);
}
.fact-list div { background: var(--paper); padding: 12px 14px; }
.fact-list dt { font-size: var(--fs-micro); color: var(--ink-400); letter-spacing: .06em; }
.fact-list dd { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--navy-900); }
.fact-list dd.mono { font-family: var(--ff-mono); }

/* --------------------------------------------------------------------------
   关键数据带（深蓝横条）
   -------------------------------------------------------------------------- */

.metrics { background: var(--navy-900); padding: var(--sp-6) 0; }
.metrics .wrap {
  display: grid;
  /* minmax(0,1fr) 而非 1fr：禁止内容把列撑到超过可用宽度（移动端防溢出关键） */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
}
.metric { border-left: 2px solid rgba(255, 255, 255, .18); padding-left: var(--sp-4); }
.metric b { display: block; font-family: var(--ff-mono); font-size: 32px; font-weight: 700; color: #fff; line-height: 1.1; }
.metric span { font-size: var(--fs-xs); color: #9FB4D4; display: block; margin-top: 6px; }
.metric em { font-style: normal; font-size: 14px; color: #8FA6C7; margin-left: 3px; }

/* --------------------------------------------------------------------------
   五大科目卡片（.subj-idx 已提升为通用组件，见 components.css §13）
   -------------------------------------------------------------------------- */

.subj-card { display: flex; flex-direction: column; }

/* --------------------------------------------------------------------------
   报考流程（5 步横向带状图，箭头连接）
   -------------------------------------------------------------------------- */

.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.flow-item { background: var(--paper); padding: var(--sp-5) var(--sp-4); position: relative; }
    .flow-item b {
        display: block;
        font-family: var(--ff-mono);
        font-size: 26px;
        color: #9ba2ab;
        font-weight: 700;
        line-height: 1;
        margin-bottom: var(--sp-3);
    }
.flow-item h4 { margin: 0 0 8px; }
.flow-item p { font-size: var(--fs-xs); color: var(--ink-500); margin: 0; }
/* 步骤之间的箭头：用旋转 45° 的方块与底色同色，模拟"咬合" */
.flow-item::after {
  content: "";
  position: absolute;
  right: -6px; top: 50%;
  width: 11px; height: 11px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
  z-index: 2;
}
.flow-item:last-child::after { display: none; }

/* --------------------------------------------------------------------------
   证书效力区
   -------------------------------------------------------------------------- */

.cert { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: center; }

/* 证书样张：铜金圆环装饰呼应"荣誉色"的定位 */
.cert-card {
  
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  color: #DCE6F5;
  position: relative;
  overflow: hidden;
}
.cert-card::after {
  content: "";
  position: absolute;
  right: -60px; bottom: -70px;
  width: 230px; height: 230px;
  border-radius: 50%;
  border: 1px solid rgba(168, 124, 61, .42);
  box-shadow: 0 0 0 26px rgba(168, 124, 61, .07);
}

/* 证书样张 · 错落叠放（2026-10-12）：navy 卡面当「桌面」，五张样张 2-2-1
   三层散落叠放、各自微旋转。交互纯 CSS、无 JS：
   悬停 / 键盘聚焦（figure tabindex=0）把该张抬到最前并放大摆正，其余微暗。
   摆放位置用百分比（随卡宽等比缩放）；移动端退化为单列静态叠放。 */
.cert-fan {
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  aspect-ratio: 16 / 9;                            /* 卡面高度：让第三层完整露出来 */
}
.cert-fan::after { display: none; }                  /* 装饰圆环让位给图片 */

.cert-piece {
  position: absolute;
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .38);
  transition: transform .28s ease, opacity .28s ease, box-shadow .28s ease;
  cursor: zoom-in;
}
.cert-piece img {
  display: block;
  width: 100%;
  height: auto;
}

/* 三层错落：后 2 张（单证/归类）→ 中 2 张（加贸保税/口岸）→ 前 1 张（跨境电商） */
.cert-piece--1 { left: 5%;  top: 3%;   width: 46%; transform: rotate(-6deg); z-index: 1; }
.cert-piece--2 { left: 47%; top: 8%;   width: 46%; transform: rotate(5deg);  z-index: 2; }
.cert-piece--3 { left: 0;   top: 26%;  width: 54%; transform: rotate(3deg);  z-index: 3; }
.cert-piece--4 { left: 44%; top: 31%; width: 54%; transform: rotate(-4deg); z-index: 4; }
.cert-piece--5 { left: 22%; top: 16%;  width: 60%; transform: rotate(-2deg);  z-index: 5; }

/* 抬到最前：摆正 + 放大 + 提阴影；容器内其它张微暗（聚焦同待遇） */
.cert-piece:hover,
.cert-piece:focus {
  z-index: 20;
  transform: rotate(0deg) scale(1.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.cert-piece:focus { outline: none; }
.cert-piece:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cert-fan:hover .cert-piece:not(:hover),
.cert-fan:focus-within .cert-piece:not(:focus) { opacity: .72; }

.cert-fan-hint {
  position: absolute;
  right: var(--sp-3);
  bottom: var(--sp-2);
  margin: 0;
  font-size: 12px;
  letter-spacing: .04em;
  color: #9FB4D4;
  z-index: 6;
}

/* 窄屏：绝对定位的错落会互相压得看不清 → 单列静态摆放，保留轻微旋转的「散落感」 */
@media (max-width: 640px) {
  .cert-fan { aspect-ratio: auto; display: flex; flex-direction: column; gap: var(--sp-4); }
  .cert-piece { position: static; width: 88%; transform: rotate(-2deg); }
  .cert-piece:nth-child(even) { align-self: flex-end; transform: rotate(2deg); }
  .cert-piece:hover, .cert-piece:focus { transform: rotate(0deg) scale(1.03); }
  .cert-fan-hint { position: static; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .cert-piece { transition: none; }
}

/* --------------------------------------------------------------------------
   组织架构表
   -------------------------------------------------------------------------- */

.org {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.org div { background: var(--paper); padding: var(--sp-4) var(--sp-5); display: flex; gap: var(--sp-4); align-items: baseline; }
.org dt { font-size: var(--fs-sm); font-weight: 700; color: var(--navy-800); flex: 0 0 190px; }
.org dd { margin: 0; font-size: var(--fs-sm); color: var(--ink-500); }

/* --------------------------------------------------------------------------
   常见问题（原生 details，零 JS）
   -------------------------------------------------------------------------- */

.faq {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq details { background: var(--paper); }
.faq summary {
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-900);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--ff-mono); color: var(--navy-600); font-size: 17px; font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { background: var(--navy-50); }
.faq details p {
  padding: 0 var(--sp-5) var(--sp-5);
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-500);
  max-width: 88ch;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: var(--sp-7); padding-bottom: var(--sp-7); }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow-item::after { display: none; }
  .metrics .wrap { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  .cert { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  /* 手机单列终档 */
  .flow { grid-template-columns: 1fr; }
  .metrics { padding: var(--sp-5) 0; }
  .metrics .wrap { gap: var(--sp-4) var(--sp-5); }
  .metric b { font-size: 26px; }
  .hero-meta { gap: var(--sp-3) var(--sp-5); margin: var(--sp-5) 0; }
  .hero-meta dd { font-size: 15px; }
  .hero-cta .btn { flex: 1 1 auto; }          /* 主按钮占满行，触屏更易点中 */
}
