/* ==========================================================================
   首页 #culture 企业风采：桌面「悬停放大镜角标 + 点击大图灯箱」
   仅由 index.html 引入（不加 media 属性），但除下面唯一一条 display:block 外，
   全部交互样式都锁在 min-width:1240px 内 —— 移动端行为零变化。

   z-index 层级登记：g-nav 90 / m-toast 90 / skip 200 / lbx(证书灯箱) 9998 / glb(本灯箱) 9999
   ========================================================================== */

/* 唯一一条双端规则：加 <a> 包裹后保持图片原有块级布局，不引入任何交互 */
.gitem__a { display: block; }

@media (min-width: 1240px) {
  #culture .gallery .gitem__a {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
  }
  /* 不移除 :focus-visible，给盒内替代轮廓 */
  #culture .gallery .gitem__a:focus-visible {
    outline: 2px solid var(--tk-c-blue);
    outline-offset: -2px;
  }

  /* 放大镜角标：镜圈 + 手柄，定位在 .gitem__a 内部，pointer-events:none 不挡点击 */
  #culture .gallery .gitem__a::after,
  #culture .gallery .gitem__a::before {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
  }
  #culture .gallery .gitem__a::after {
    right: 10px;
    bottom: 12px;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 2px solid var(--tk-c-white);
    border-radius: var(--tk-r-50pct);
    background: rgba(6, 30, 56, .35);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    transform: scale(.8);
  }
  #culture .gallery .gitem__a::before {
    right: 8px;
    bottom: 10px;
    width: 9px;
    height: 2px;
    background: var(--tk-c-white);
    transform: rotate(45deg) scale(.8);
    transform-origin: right center;
  }
  #culture .gallery .gitem:hover .gitem__a::after,
  #culture .gallery .gitem:focus-within .gitem__a::after {
    opacity: 1;
    transform: scale(1);
  }
  #culture .gallery .gitem:hover .gitem__a::before,
  #culture .gallery .gitem:focus-within .gitem__a::before {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }

  /* 大图灯箱：无 figcaption、无图片说明文字，只有 3 个按钮 + 图 */
  .glb {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 22, 38, .86);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
  }
  .glb.on { opacity: 1; visibility: visible; }
  .glb__fig {
    margin: 0;
    transform: scale(.96);
    transition: transform .22s ease;
  }
  .glb.on .glb__fig { transform: scale(1); }
  .glb__fig img {
    display: block;
    max-width: min(88vw, 1180px);
    max-height: 78vh;
    width: auto;
    height: auto;
    border-radius: var(--tk-r-8);
    background: var(--tk-c-white);
    box-shadow: 0 26px 70px rgba(0, 0, 0, .45);
  }
  .glb__x, .glb__prev, .glb__next {
    position: absolute;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .10);
    color: var(--tk-c-white);
    cursor: pointer;
    border-radius: var(--tk-r-50pct);
    line-height: var(--tk-lh-1);
    padding: 0;
    transition: background-color .2s ease;
  }
  .glb__x { top: 26px; right: 30px; width: 40px; height: 40px; font-size: var(--tk-fs-22); }
  .glb__prev, .glb__next { top: 50%; width: 46px; height: 46px; font-size: var(--tk-fs-30); }
  .glb__prev { left: 3vw; transform: translateY(-50%); }
  .glb__next { right: 3vw; transform: translateY(-50%); }
  .glb__x:hover, .glb__prev:hover, .glb__next:hover { background: rgba(255, 255, 255, .22); }
  .glb__x:focus-visible, .glb__prev:focus-visible, .glb__next:focus-visible {
    outline: 2px solid var(--tk-c-white);
    outline-offset: 3px;
  }
}

/* 双保险：移动端绝不出现桌面灯箱 */
@media (max-width: 1239px) {
  .glb { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  #culture .gallery .gitem__a::after,
  #culture .gallery .gitem__a::before,
  .glb,
  .glb__fig { transition: none; }
}
