/* ============================================================
   经典案例 板块样式（独立文件，仅案例页引入）
   ============================================================ */

/* 分类标签 */
.cases-tabs { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 46px; }
.cases-tabs .tab {
  padding: 10px 28px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--text-mute); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.cases-tabs .tab:hover { color: var(--blue); border-color: #cfe0ff; }
.cases-tabs .tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* 面板 */
.case-panel { display: none; }
.case-panel.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 案例卡片网格 */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .case-grid { grid-template-columns: 1fr; } }

.case-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: all .25s;
}
.case-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #cfe0ff; }
.case-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; }
.case-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.case-card:hover .case-thumb img { transform: scale(1.04); }
.case-thumb .ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-mute); font-size: 14px; text-align: center; padding: 16px;
  background: repeating-linear-gradient(45deg, #f5f8fc, #f5f8fc 12px, #eef3fa 12px, #eef3fa 24px);
}
.case-badge {
  position: absolute; top: 12px; left: 12px; background: rgba(10, 37, 64, .82);
  color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 999px; backdrop-filter: blur(2px);
}
.case-body { padding: 20px 22px 24px; }
.case-body h3 { font-size: 18px; color: var(--navy); margin-bottom: 8px; }
.case-body p { font-size: 14px; color: var(--text-mute); line-height: 1.6; }
.case-more { margin-top: 14px; font-size: 13px; color: var(--blue); font-weight: 600; }

.case-empty { text-align: center; color: var(--text-mute); padding: 64px 0; font-size: 15px; }
.case-error { text-align: center; color: #b91c1c; padding: 64px 0; font-size: 15px; }

/* 弹层（网站内嵌 / 图片灯箱） */
.case-modal {
  position: fixed; inset: 0; background: rgba(10, 37, 64, .72);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px;
}
.case-modal.open { display: flex; }
.case-modal .box {
  background: #fff; border-radius: 16px; width: min(1100px, 94vw); max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
}
/* 图片类：外框自适应图片尺寸（不撑满固定宽度） */
.case-modal .box.mode-img { width: fit-content; max-width: 94vw; }
.case-modal .box.mode-web { width: min(1100px, 94vw); }
/* 最大化：铺满视口 */
.case-modal .iconbtn {
  border: none; background: #eef2f7; width: 34px; height: 34px; border-radius: 8px;
  font-size: 18px; line-height: 1; cursor: pointer; color: var(--text); margin-right: 8px;
}
.case-modal .iconbtn:hover { background: #dfe6ef; }
.case-modal.maximized { padding: 0; }
.case-modal.maximized .box { width: 100vw !important; height: 100vh; max-height: none; border-radius: 0; }
.case-modal.maximized .gallery .g-stage { height: calc(100vh - 56px); min-height: 0; }
.case-modal.maximized .gallery .g-stage img { max-height: 100%; }
.case-modal.maximized iframe { height: calc(100vh - 56px); }
.case-modal .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.case-modal .bar h4 { color: var(--navy); font-size: 17px; }
.case-modal .bar .acts { display: flex; gap: 10px; align-items: center; }
.case-modal .bar a.btn-mini {
  font-size: 13px; color: #fff; background: var(--blue); padding: 7px 14px;
  border-radius: 8px; text-decoration: none;
}
.case-modal .bar a.btn-mini:hover { background: var(--navy); }
.case-modal .close {
  border: none; background: #eef2f7; width: 34px; height: 34px; border-radius: 8px;
  font-size: 20px; line-height: 1; cursor: pointer; color: var(--text);
}
.case-modal .close:hover { background: #dfe6ef; }
.case-modal .stage { flex: 1; overflow: auto; background: #0a2540; }
.case-modal iframe { width: 100%; height: 78vh; border: none; background: #fff; display: block; }
.case-modal .imgwrap { padding: 16px; text-align: center; background: #0a2540; }
.case-modal .imgwrap img { max-width: 100%; max-height: 78vh; margin: 0 auto; border-radius: 8px; }

/* 图片集（多图切换） */
.gallery { position: relative; background: #0a2540; }
.gallery .g-stage { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 12px; }
.gallery .g-stage img { max-width: 100%; max-height: 78vh; border-radius: 8px; display: block; animation: gFade .3s ease; }
@keyframes gFade { from { opacity: .4; } to { opacity: 1; } }
.gallery .g-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
  background: rgba(10, 37, 64, .72); color: #fff; font-size: 30px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
  transition: background .2s, transform .15s, box-shadow .2s; z-index: 3;
}
.gallery .g-nav:hover { background: var(--blue); transform: translateY(-50%) scale(1.08); box-shadow: 0 6px 22px rgba(0, 0, 0, .5); }
.gallery .g-nav:active { transform: translateY(-50%) scale(.96); }
.gallery .g-prev { left: 18px; }
.gallery .g-next { right: 18px; }
@media (max-width: 640px) {
  .gallery .g-nav { width: 46px; height: 46px; font-size: 24px; }
  .gallery .g-prev { left: 8px; }
  .gallery .g-next { right: 8px; }
}
.gallery .g-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px 16px; background: rgba(10, 37, 64, .9);
}
.gallery .g-dots { display: flex; gap: 9px; }
.gallery .g-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .3); cursor: pointer; transition: all .2s; }
.gallery .g-dot.active { background: #fff; transform: scale(1.25); }
.gallery .g-counter { color: #cdd9ea; font-size: 13px; font-variant-numeric: tabular-nums; }

/* 维护入口提示 */
.case-admin-link { text-align: center; margin-top: 40px; font-size: 13px; color: var(--text-mute); }
.case-admin-link a { color: var(--blue); }
