/* ============================================================
   凤翼雄安 — 图片灯箱样式 (Lightbox)
   独立文件，不依赖 Bootstrap 或 style.css
   ============================================================ */

/* 遮罩层 */
#lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 半透明背景 */
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

/* 关闭按钮 */
.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: Arial, sans-serif;
  padding: 0;
}
.lb-close:hover,
.lb-close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  outline: none;
}

/* 左右箭头 */
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
  padding: 0;
  font-family: Georgia, serif;
}
.lb-arrow:hover,
.lb-arrow:focus-visible {
  background: rgba(255, 255, 255, 0.25);
  outline: none;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Loading 动画 */
.lb-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gold, #c9a962);
  border-radius: 50%;
  animation: lb-spin 0.8s linear infinite;
}
@keyframes lb-spin {
  to { transform: rotate(360deg); }
}

/* 图片容器 */
.lb-img-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 85vh;
}
.lb-img-wrapper img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.25s ease;
}

/* 底部标题栏 */
.lb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: #fff;
  font-size: 0.95rem;
}
.lb-title {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 16px;
}
.lb-counter {
  flex-shrink: 0;
  font-size: 0.85rem;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

/* ========== 移动端响应式 ========== */
@media (max-width: 768px) {
  .lb-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }
  .lb-arrow {
    width: 40px;
    height: 40px;
    font-size: 26px;
  }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-caption {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  .lb-img-wrapper {
    max-width: 95vw;
    max-height: 80vh;
  }
  .lb-img-wrapper img {
    max-width: 95vw;
    max-height: 80vh;
  }
}

/* ========== 可点击缩略图通用光标 ========== */
.gallery-thumb {
  cursor: zoom-in;
}
