/* ============================================================
   品牌荣誉墙 · 分页轮播 + 证书大图
   ------------------------------------------------------------
   只作用于首页 #honor。与 honor-gold.css 叠加：
   墙面、镀金牌匾、匾下文字仍由 honor-gold.css 负责，
   本文件只补三件事：
   1. 分组内每页最多 8 个（4 列 × 2 排），超出部分翻页流转。
   2. 翻页箭头浮在牌匾区左右两侧，页码留在分组标题行右端。
   3. 实拍证书可点开大图：悬停放大镜光标，点击全屏查看。

   删掉本文件引用 + assets/honor-wall.js 引用即回退到全铺静态墙。
   类名一律 hw- 前缀，避免与站点已有组件重名。
   ============================================================ */

/* ============================================================
   一、分页舞台
   ============================================================ */
.hw-stage{
  position:relative;
  grid-column:1 / -1;
  min-height:var(--hw-stage-h, 0);
}

.hw-page{
  display:none;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:24px 20px;
  align-items:start;
}
.hw-page.is-on{
  display:grid;
  animation:hw-page-in .3s cubic-bezier(.22,.7,.3,1) both;
}
@keyframes hw-page-in{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}

/* ============================================================
   二、翻页：页码 + 左右浮动按钮
   ============================================================ */
.hw-nav-idx{
  margin-left:auto;
  align-self:center;
  min-width:44px;
  text-align:right;
  font-size:var(--fs-small);
  letter-spacing:.08em;
  font-variant-numeric:tabular-nums;
  color:rgba(255,232,178,.7);
}
/* hidden 要压过 display，否则只有一页的分组也会露出页码 */
.hw-nav-idx[hidden]{display:none}

.hw-side{
  position:absolute;
  top:50%;
  z-index:3;
  width:46px;height:46px;
  display:inline-flex;align-items:center;justify-content:center;
  padding:0;
  border:1px solid rgba(240,206,126,.62);
  border-radius:50%;
  cursor:pointer;
  color:#ffe9b0;
  background:linear-gradient(180deg,rgba(34,50,74,.92) 0%,rgba(15,26,42,.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,240,200,.22),
    0 1px 0 rgba(0,0,0,.4),
    0 14px 26px -14px rgba(0,0,0,.85),
    0 0 28px -12px rgba(255,206,110,.45);
  transform:translateY(-50%);
  transition:color .2s ease, border-color .2s ease, background .2s ease,
             box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}
.hw-side[hidden]{display:none}
.hw-side svg{display:block;pointer-events:none}

.hw-side--prev{
  left:-62px;
}
.hw-side--next{
  right:-62px;
}

.hw-side:hover:not(:disabled){
  color:#fff8e2;
  border-color:rgba(255,224,158,.98);
  background:linear-gradient(180deg,rgba(52,72,102,.95) 0%,rgba(24,38,58,.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,246,216,.3),
    0 0 0 5px rgba(255,214,122,.07),
    0 16px 30px -16px rgba(0,0,0,.9),
    0 0 40px -10px rgba(255,206,110,.6);
  transform:translateY(-50%) scale(1.05);
}
.hw-side:active:not(:disabled){
  transform:translateY(-50%) scale(.97);
  background:linear-gradient(180deg,rgba(60,82,114,.96) 0%,rgba(30,46,68,.96) 100%);
}
.hw-side:focus-visible{
  outline:none;
  border-color:#ffe9b0;
  box-shadow:
    0 0 0 3px rgba(255,233,176,.4),
    0 14px 26px -14px rgba(0,0,0,.85);
}
.hw-side:disabled{
  opacity:.34;
  cursor:default;
  color:#d9c390;
  border-color:rgba(240,206,126,.3);
  background:linear-gradient(180deg,rgba(26,38,58,.8) 0%,rgba(14,24,38,.8) 100%);
  box-shadow:inset 0 1px 0 rgba(255,240,200,.1);
}

/* ============================================================
   三、实拍证书：4 列下放大牌面 + 放大镜光标
   ============================================================ */
.honor .hw-page .photo-card .plaque{
  height:auto;
  aspect-ratio:1.06;
  padding:12px;
  cursor:zoom-in;
}
.honor .hw-page .photo-card .plaque img{
  transition:transform .3s cubic-bezier(.22,.7,.3,1);
}
.honor .hw-page .photo-card:hover .plaque img{
  transform:scale(1.04);
}

/* ============================================================
   四、大图查看
   ============================================================ */
.hw-lb{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:4vh 4vw;
  background:rgba(5,10,18,.93);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}
.hw-lb.is-on{display:flex;animation:hw-lb-in .2s ease both}
@keyframes hw-lb-in{from{opacity:0}to{opacity:1}}

.hw-lb-fig{
  margin:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
  max-width:100%;
}
.hw-lb-img{
  display:block;
  height:auto;
  border-radius:6px;
  background:#fff;
  box-shadow:
    0 0 0 1px rgba(255,214,122,.24),
    0 30px 70px -30px rgba(0,0,0,.95),
    0 0 100px -34px rgba(255,206,110,.34);
}
.hw-lb-cap{
  font-size:var(--fs-note);
  line-height:1.7;
  letter-spacing:.02em;
  color:rgba(255,246,226,.94);
  text-align:center;
  max-width:640px;
}
.hw-lb-cap span{
  display:block;
  margin-top:3px;
  font-size:var(--fs-small);
  color:rgba(255,224,160,.62);
}

.hw-lb-close{
  position:absolute;
  top:max(18px,3vh);
  right:max(18px,3vw);
  width:46px;height:46px;
  display:inline-flex;align-items:center;justify-content:center;
  padding:0;
  border:1px solid rgba(240,206,126,.62);
  border-radius:50%;
  cursor:pointer;
  color:#ffe9b0;
  background:linear-gradient(180deg,rgba(34,50,74,.92) 0%,rgba(15,26,42,.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,240,200,.22),
    0 1px 0 rgba(0,0,0,.4),
    0 14px 26px -14px rgba(0,0,0,.85),
    0 0 28px -12px rgba(255,206,110,.45);
  transition:color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.hw-lb-close:hover{
  color:#fff8e2;
  border-color:rgba(255,224,158,.98);
  background:linear-gradient(180deg,rgba(52,72,102,.95) 0%,rgba(24,38,58,.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,246,216,.3),
    0 16px 30px -16px rgba(0,0,0,.9),
    0 0 40px -10px rgba(255,206,110,.6);
  transform:scale(1.06);
}
.hw-lb-close:focus-visible{
  outline:none;
  border-color:#ffe9b0;
  box-shadow:0 0 0 3px rgba(255,233,176,.4);
}
.hw-lb-close svg{display:block;pointer-events:none}

body.hw-lb-open{overflow:hidden}

/* ============================================================
   五、窄屏
   ============================================================ */
@media (max-width:1000px){
  .hw-page{grid-template-columns:repeat(3, minmax(0, 1fr));gap:20px 16px}
  .hw-side{width:38px;height:38px}
  .hw-side--prev{left:-20px}
  .hw-side--next{right:-20px}
  .hw-nav-idx{min-width:40px;font-size:var(--fs-small)}
}

@media (max-width:620px){
  .hw-page{grid-template-columns:repeat(2, minmax(0, 1fr));gap:20px 12px}
  .hw-side{width:34px;height:34px}
  .hw-side--prev{left:-18px}
  .hw-side--next{right:-18px}
  .hw-lb{padding:3vh 3vw}
  .hw-lb-close{width:42px;height:42px;top:14px;right:14px}
  .hw-lb-cap{font-size:var(--fs-small)}
}

@media (prefers-reduced-motion:reduce){
  .hw-page.is-on,.hw-lb.is-on{animation:none}
  .hw-side,.hw-lb-close,.honor .hw-page .photo-card .plaque img{transition:none}
  .honor .hw-page .photo-card:hover .plaque img{transform:none}
}


/* 大图可缩放：滚轮放大、放大后拖动平移（2026-11-24） */
.hw-lb-img{
  cursor:grab;
  transform-origin:center center;
  -webkit-user-drag:none;
  user-select:none;
  touch-action:none;
}
.hw-lb-fig:active .hw-lb-img{cursor:grabbing}

/* 放大后允许滚动查看：flex 居中在内容溢出时会裁掉顶部，
   改用 margin:auto 居中 —— 小于容器时居中，大于容器时可完整滚动 */
.hw-lb{overflow:auto}
.hw-lb-fig{margin:auto}

/* 舞台高度跟随当前页，翻页时平滑过渡（不然最后一页会空一整行） */
.hw-page{transition:min-height .26s ease}
