/* ============================================================================
   合作客户页 — 全屏蜂巢Logo墙（JavaScript 坐标计算 + absolute 定位 + 完美密铺）
   独立命名空间 .client-honeycomb-* / .client-hex 与首页旧蜂巢隔离
   ============================================================================ */

/* ── 蜂巢墙容器：丰富底层纹理（毛玻璃模糊源） ── */
.client-honeycomb-wall {
  position: relative;
  width: 100%;
  min-height: 75vh;
  padding: 48px 16px 56px;
  overflow: hidden;
  /* 背景层次：光晕 + 密集科技网格 + 深色基，让渐变六边形显现深度 */
  background:
    radial-gradient(ellipse 40% 30% at 12% 18%, rgba(210, 145, 55, 0.20) 0%, transparent 100%),
    radial-gradient(ellipse 45% 38% at 88% 22%, rgba(22, 148, 232, 0.22) 0%, transparent 100%),
    radial-gradient(ellipse 65% 55% at 50% 48%, rgba(15, 88, 160, 0.46) 0%, rgba(8, 42, 85, 0.22) 45%, transparent 100%),
    radial-gradient(ellipse 28% 32% at 22% 78%, rgba(75, 158, 215, 0.12) 0%, transparent 100%),
    radial-gradient(ellipse 28% 32% at 78% 72%, rgba(95, 168, 225, 0.12) 0%, transparent 100%),
    repeating-linear-gradient(45deg, rgba(72, 168, 230, 0.07) 0px, rgba(72, 168, 230, 0.07) 1px, transparent 1px, transparent 14px),
    repeating-linear-gradient(-45deg, rgba(72, 168, 230, 0.07) 0px, rgba(72, 168, 230, 0.07) 1px, transparent 1px, transparent 14px),
    #060e1c;
}

/* ── 蜂巢网格容器：position: relative，JS 设置 width/height ── */
.client-honeycomb-grid {
  --hex-size: 130px;
  --hex-height: calc(var(--hex-size) * 1.1547);

  position: relative;
  margin: 16px auto 0;
  padding: 8px 0 48px;
}

/* ── 六边形基类：position: absolute，JS 设置 left/top/width/height ── */
.client-hex {
  position: absolute;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              z-index 0.01s step-end,
              box-shadow 0.32s ease;
  z-index: 1;
  cursor: default;
}

/* ── 玻璃质感Logo蜂巢（渐变模拟，不依赖 backdrop-filter） ── */
.client-hex.hex-client {
  background:
    linear-gradient(135deg,
      rgba(22, 140, 222, 0.34) 0%,
      rgba(16, 108, 178, 0.26) 40%,
      rgba(8, 62, 128, 0.18) 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(72, 168, 230, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 0 10px rgba(15, 116, 187, 0.07),
    0 2px 8px rgba(0, 0, 0, 0.16);
}

/* 五色轮换 — 不同玻璃色相 */
.client-hex.hex-client.c1 {
  background: linear-gradient(135deg, rgba(22, 148, 230, 0.32) 0%, rgba(16, 112, 185, 0.24) 50%, rgba(8, 58, 132, 0.16) 100%);
}
.client-hex.hex-client.c2 {
  background: linear-gradient(155deg, rgba(18, 130, 215, 0.30) 0%, rgba(14, 100, 170, 0.22) 50%, rgba(6, 50, 125, 0.20) 100%);
}
.client-hex.hex-client.c3 {
  background: linear-gradient(120deg, rgba(20, 135, 220, 0.33) 0%, rgba(14, 105, 175, 0.25) 50%, rgba(8, 55, 130, 0.17) 100%);
}
.client-hex.hex-client.c4 {
  background: linear-gradient(140deg, rgba(16, 125, 210, 0.31) 0%, rgba(12, 95, 165, 0.23) 50%, rgba(6, 48, 122, 0.19) 100%);
}
.client-hex.hex-client.c5 {
  background: linear-gradient(160deg, rgba(24, 142, 225, 0.34) 0%, rgba(16, 110, 180, 0.26) 50%, rgba(8, 60, 128, 0.15) 100%);
}

/* ── Hover: 渐变提亮 + 强发光 ── */
.client-hex.hex-client:hover {
  transform: scale(1.06);
  z-index: 10;
  background:
    linear-gradient(135deg,
      rgba(30, 165, 245, 0.44) 0%,
      rgba(20, 125, 195, 0.34) 40%,
      rgba(10, 72, 142, 0.24) 100%);
  box-shadow:
    inset 0 0 0 2px rgba(72, 200, 240, 0.60),
    inset 0 2px 0 rgba(255, 255, 255, 0.20),
    0 0 30px rgba(15, 130, 205, 0.38),
    0 6px 22px rgba(0, 0, 0, 0.32);
}

.client-hex.hex-client:hover + .client-hex.hex-client {
  transform: translateX(6px);
}

/* ── Logo 内容层 ── */
.hex-logo-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24%; /* 增加内部padding，文字不贴边 */
}

.hex-logo-inner img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  filter: brightness(0.92) contrast(1.06);
  transition: all 0.32s ease;
}

.client-hex.hex-client:hover .hex-logo-inner img {
  filter: brightness(1.04) contrast(1.12);
  transform: scale(1.06);
}

/* 首字降级 */
.hex-initial {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary); /* 提高对比度 */
  user-select: none;
  transition: color 0.32s ease;
}

.client-hex.hex-client:hover .hex-initial {
  color: var(--text-primary);
}

/* ── Tooltip ── */
.hex-tooltip {
  position: absolute;
  bottom: -34px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s ease;
  background: rgba(8, 15, 26, 0.92);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(72, 202, 228, 0.2);
}

.client-hex.hex-client:hover .hex-tooltip {
  opacity: 1;
  bottom: -38px;
}

/* ── 中心标题六边形 ── */
.client-hex.hex-center {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(135deg, #0f74bb 0%, #0a5a8f 50%, #084a78 100%);
  box-shadow: inset 0 0 0 1px rgba(72, 168, 230, 0.35),
              0 0 60px rgba(15, 116, 187, 0.32),
              0 2px 20px rgba(0, 0, 0, 0.22);
  z-index: 5;
  cursor: default;
}

.hex-center-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 14%;
}

.hex-center-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.hex-center-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ── 空位六边形 ── */
.client-hex.hex-empty {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: default;
}

.hex-empty-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.hex-empty-plus {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.08);
  line-height: 1;
  transition: color 0.28s ease;
}

.hex-empty-text {
  font-size: 0.54rem;
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: 1px;
  transition: color 0.28s ease;
}

.client-hex.hex-empty:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.client-hex.hex-empty:hover .hex-empty-plus {
  color: rgba(255, 255, 255, 0.2);
}
.client-hex.hex-empty:hover .hex-empty-text {
  color: rgba(255, 255, 255, 0.16);
}

/* ===== 响应式：只改 --hex-size，JS 自动读取 ===== */
@media (max-width: 1024px) {
  .client-honeycomb-grid {
    --hex-size: 110px;
  }
  .hex-center-label { font-size: 0.5rem; letter-spacing: 2px; }
  .hex-center-title { font-size: 1.1rem; }
  .hex-initial { font-size: 1.5rem; }
}

@media (max-width: 768px) {
  .client-honeycomb-wall {
    min-height: auto;
    padding: 32px 8px 40px;
  }
  .client-honeycomb-grid {
    --hex-size: 95px;
    padding: 4px 0 24px;
  }
  .hex-center-label { font-size: 0.45rem; letter-spacing: 2px; }
  .hex-center-title { font-size: 0.95rem; }
  .hex-initial { font-size: 1.3rem; }
  .hex-logo-inner { padding: 22%; }
  .hex-tooltip { font-size: 0.6rem; }
}

@media (max-width: 480px) {
  .client-honeycomb-grid {
    --hex-size: 82px;
    padding: 0;
  }
  .hex-center-label { font-size: 0.4rem; letter-spacing: 1.5px; }
  .hex-center-title { font-size: 0.78rem; letter-spacing: 1px; }
  .hex-initial { font-size: 1.1rem; }
  .hex-logo-inner { padding: 24%; }
  .hex-tooltip { font-size: 0.55rem; }
}

/* ===== 进场动画：按 item 索引 stagger ===== */
@keyframes clientHexFadeIn {
  0%   { opacity: 0; transform: translateY(16px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.client-hex {
  animation: clientHexFadeIn 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.client-hex:nth-child(1)  { animation-delay: 0.01s; }
.client-hex:nth-child(2)  { animation-delay: 0.04s; }
.client-hex:nth-child(3)  { animation-delay: 0.07s; }
.client-hex:nth-child(4)  { animation-delay: 0.10s; }
.client-hex:nth-child(5)  { animation-delay: 0.13s; }
.client-hex:nth-child(6)  { animation-delay: 0.16s; }
.client-hex:nth-child(7)  { animation-delay: 0.19s; }
.client-hex:nth-child(8)  { animation-delay: 0.22s; }
.client-hex:nth-child(9)  { animation-delay: 0.25s; }
.client-hex:nth-child(10) { animation-delay: 0.28s; }
.client-hex:nth-child(11) { animation-delay: 0.31s; }
.client-hex:nth-child(12) { animation-delay: 0.34s; }
.client-hex:nth-child(13) { animation-delay: 0.37s; }
.client-hex:nth-child(14) { animation-delay: 0.40s; }
.client-hex:nth-child(15) { animation-delay: 0.43s; }
.client-hex:nth-child(n+16) { animation-delay: 0.46s; }

/* ============================================================================
   首页旧蜂巢样式（保留兼容 .hex-wall / .honeycomb-*）
   ============================================================================ */

.hex-wall {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: var(--sp-16) auto;
  padding: var(--sp-10) 0;
  background: rgba(255,255,255,0.015);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-default);
}

.honeycomb-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 850px;
  margin: 0 auto;
  padding: var(--sp-4);
  gap: 0;
}

.honeycomb-row { display: flex; justify-content: center; margin-bottom: -14px; }

.honeycomb-cell {
  position: relative;
  width: 110px; height: 126px;
  margin: 0 2px;
  flex-shrink: 0;
}

.hex-shape {
  position: absolute; inset: 0;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

.hex-logo {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.06);
}
.hex-logo:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(15,116,187,0.3);
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(15,116,187,0.15);
  z-index: 2;
}
.hex-logo img {
  max-width: 60%; max-height: 55%;
  object-fit: contain;
  filter: grayscale(0.2) brightness(0.95);
  transition: all 0.4s ease;
}
.hex-logo:hover img { filter: grayscale(0) brightness(1.05); transform: scale(1.08); }

.hex-center {
  background: linear-gradient(135deg, #0f74bb, #0a5a8f);
  border: 2px solid rgba(15,116,187,0.4);
  box-shadow: 0 0 40px rgba(15,116,187,0.2), inset 0 0 30px rgba(15,116,187,0.1);
  z-index: 3;
}
.hex-center .center-content {
  text-align: center; color: #fff;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px;
}
.center-title {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 800; letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.center-subtitle {
  font-family: var(--font-mono);
  font-size: 0.6rem; font-weight: 500; letter-spacing: 3px;
  text-transform: uppercase; opacity: 0.7;
}

.hex-empty-legacy {
  background: transparent;
  border: 1.5px dashed rgba(255,255,255,0.08);
  cursor: default;
}
.hex-empty-legacy .empty-icon { font-size: 0.85rem; color: rgba(255,255,255,0.15); }
.hex-empty-legacy .empty-text-legacy {
  position: absolute; bottom: -24px; font-size: 0.65rem;
  color: rgba(255,255,255,0.1); letter-spacing: 1px;
  opacity: 0; transition: all 0.3s ease; white-space: nowrap;
}
.hex-empty-legacy:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.02); }
.hex-empty-legacy:hover .empty-icon { color: rgba(255,255,255,0.35); }
.hex-empty-legacy:hover .empty-text-legacy { opacity: 1; color: rgba(255,255,255,0.5); }

.honeycomb-cell { animation: hexFadeIn 0.6s cubic-bezier(0.16,1,0.3,1) both; }
@keyframes hexFadeIn {
  0% { opacity: 0; transform: translateY(16px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.hex-caption {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; color: var(--text-tertiary);
  white-space: nowrap; text-align: center; opacity: 0;
  transition: all 0.3s ease; pointer-events: none;
}
.honeycomb-cell:hover .hex-caption { opacity: 1; bottom: -22px; }

@media (max-width: 1024px) {
  .honeycomb-cell { width: 95px; height: 109px; }
  .hex-center .center-title { font-size: 1.05rem; letter-spacing: 1px; }
  .center-subtitle { font-size: 0.55rem; }
}
@media (max-width: 768px) {
  .hex-wall { padding: var(--sp-6) 0; }
  .honeycomb-grid { max-width: 500px; }
  .honeycomb-cell { width: 85px; height: 98px; margin: 0 1px; }
  .honeycomb-row { margin-bottom: -12px; }
  .hex-center .center-title { font-size: 0.9rem; }
  .center-subtitle { font-size: 0.5rem; }
  .hex-logo img { max-width: 50%; max-height: 45%; }
}
@media (max-width: 480px) {
  .honeycomb-cell { width: 72px; height: 83px; margin: 0 0.5px; }
  .honeycomb-row { margin-bottom: -10px; }
  .hex-center .center-title { font-size: 0.78rem; }
  .hex-empty-legacy .empty-text-legacy { font-size: 0.55rem; }
}