.weilan_visit_photo {
  position: relative;
  background: linear-gradient(180deg,
      rgba(36, 116, 204, 0.34) 0%,
      rgba(36, 116, 204, 0.1) 70%,
      rgba(36, 116, 204, 0.05) 100%);
  overflow: hidden;
  padding: 80px 0;
}

.weilan_visit_photo .visit-photo-bg {
  position: absolute;
  top: 0;
  left: calc(var(--container-spacing) * 0.25);
  width: 100%;
  background-size: cover;
  background-position: top left;
  background-repeat: no-repeat;
  pointer-events: none;
  height: 100%;
}

.weilan_visit_photo .container {
  position: relative;
}

.weilan_visit_photo .visit-photo-info {
  position: absolute;
  top: 4.125rem;
  left: var(--container-spacing);
  max-width: 33rem;
  z-index: 10;
}

.weilan_visit_photo .visit-photo-title {
  font-size: clamp(24px, 1.9vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 30px;
}

.weilan_visit_photo .visit-photo-desc {
  font-size: var(--font-size-lg);
  line-height: 1.67;
  margin-top: .625rem;
  margin-bottom: 3.25rem;
}

.weilan_visit_photo .visit-photo-btn {
  display: inline-flex;
  flex-shrink: 0;
  background: var(--color-primary);
  color: #fff;
  width: 160px;
  height: 50px;
  line-height: 50px;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-top: 20px;
  text-transform: uppercase;
}
.weilan_visit_photo .visit-photo-btn:hover {
    background: none;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}
.weilan_visit_photo .honeycomb-grid {
  --hex-w: 260px;
  --hex-h: calc(var(--hex-w) * 1.1547);
  --sub-col: calc(var(--hex-w) / 2);
  --sub-row: calc(var(--hex-h) / 4);
  --gap: .3125rem;
  display: grid;
  grid-template-columns: repeat(11, var(--sub-col));
  grid-template-rows: repeat(10, var(--sub-row));
  margin-left: auto;
  width: fit-content;
}

/* Row 1: 3 items */
.weilan_visit_photo .hex-item:nth-child(1) {
  grid-column: 5 / 7;
  grid-row: 1 / 5;
}

.weilan_visit_photo .hex-item:nth-child(2) {
  grid-column: 7 / 9;
  grid-row: 1 / 5;
}

.weilan_visit_photo .hex-item:nth-child(3) {
  grid-column: 9 / 11;
  grid-row: 1 / 5;
}

/* Row 2: 4 items */
.weilan_visit_photo .hex-item:nth-child(4) {
  grid-column: 4 / 6;
  grid-row: 4 / 8;
}

.weilan_visit_photo .hex-item:nth-child(5) {
  grid-column: 6 / 8;
  grid-row: 4 / 8;
}

.weilan_visit_photo .hex-item:nth-child(6) {
  grid-column: 8 / 10;
  grid-row: 4 / 8;
}

.weilan_visit_photo .hex-item:nth-child(7) {
  grid-column: 10 / 12;
  grid-row: 4 / 8;
}

/* Row 3: 5 items */
.weilan_visit_photo .hex-item:nth-child(8) {
  grid-column: 1 / 3;
  grid-row: 7 / 11;
}

.weilan_visit_photo .hex-item:nth-child(9) {
  grid-column: 3 / 5;
  grid-row: 7 / 11;
}

.weilan_visit_photo .hex-item:nth-child(10) {
  grid-column: 5 / 7;
  grid-row: 7 / 11;
}

.weilan_visit_photo .hex-item:nth-child(11) {
  grid-column: 7 / 9;
  grid-row: 7 / 11;
}

.weilan_visit_photo .hex-item:nth-child(12) {
  grid-column: 9 / 11;
  grid-row: 7 / 11;
}

/* Hide extra items beyond 12 */
.weilan_visit_photo .hex-item:nth-child(n+13) {
  display: none;
}

/* Hexagon item */
.weilan_visit_photo .hex-item {
  position: relative;
  /* clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); */
  transition: transform 0.3s ease;
}

.weilan_visit_photo .hex-item:hover {
  transform: scale(1.06);
  z-index: 5;
}

.weilan_visit_photo .hex-content {
  position: absolute;
  top: var(--gap);
  left: var(--gap);
  right: var(--gap);
  bottom: var(--gap);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  overflow: hidden;
}

.weilan_visit_photo .hex-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.weilan_visit_photo .hex-item:hover .hex-content img {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1280px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 140px;
  }

  .weilan_visit_photo .visit-photo-info {
    max-width: 540px;
    top: 1.8rem;
  }

  .weilan_visit_photo .visit-photo-title {
    font-size: 28px;
  }
}

@media (max-width: 1024px) {
  .weilan_visit_photo {
    padding: 40px 0;
  }

  .weilan_visit_photo .visit-photo-info {
    position: relative;
    top: auto;
    left: auto;
    max-width: 100%;
    margin-bottom: 30px;
    height: 100%;
  }

  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 120px;
    margin: 0 auto;
  }
}


@media (max-width: 768px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 100px;
  }

  .weilan_visit_photo .visit-photo-title {
    font-size: 24px;
  }

  .weilan_visit_photo .visit-photo-desc {
    font-size: 14px;
  }
}

@media (max-width: 680px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 80px;
  }
}

@media (max-width: 576px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 73px;
    --gap: 2px;
  }
}

@media (max-width: 480px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 65px;
  }

  .weilan_visit_photo .visit-photo-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .weilan_visit_photo .visit-photo-desc {
    font-size: 13px;
    margin-bottom: 20px;
  }
}

@media (max-width: 429px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 55px;
    --gap: 1px;
  }
}

@media (max-width: 374px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 50px;
  }
}
/* 桌面端定位（只在 >820px 生效） */
@media (min-width: 821px) {
  .weilan_visit_photo .hex-item:nth-child(1) { grid-column: 5 / 7; grid-row: 1 / 5; }
  .weilan_visit_photo .hex-item:nth-child(2) { grid-column: 7 / 9; grid-row: 1 / 5; }
  .weilan_visit_photo .hex-item:nth-child(3) { grid-column: 9 / 11; grid-row: 1 / 5; }
  .weilan_visit_photo .hex-item:nth-child(4) { grid-column: 4 / 6; grid-row: 4 / 8; }
  .weilan_visit_photo .hex-item:nth-child(5) { grid-column: 6 / 8; grid-row: 4 / 8; }
  .weilan_visit_photo .hex-item:nth-child(6) { grid-column: 8 / 10; grid-row: 4 / 8; }
  .weilan_visit_photo .hex-item:nth-child(7) { grid-column: 10 / 12; grid-row: 4 / 8; }
  .weilan_visit_photo .hex-item:nth-child(8) { grid-column: 1 / 3; grid-row: 7 / 11; }
  .weilan_visit_photo .hex-item:nth-child(9) { grid-column: 3 / 5; grid-row: 7 / 11; }
  .weilan_visit_photo .hex-item:nth-child(10) { grid-column: 5 / 7; grid-row: 7 / 11; }
  .weilan_visit_photo .hex-item:nth-child(11) { grid-column: 7 / 9; grid-row: 7 / 11; }
  .weilan_visit_photo .hex-item:nth-child(12) { grid-column: 9 / 11; grid-row: 7 / 11; }
}

/* 所有断点都隐藏多余项 */
.weilan_visit_photo .hex-item:nth-child(n+13) { display: none; }

/* ============================================== */
/* ✅ 关键：≤820px 强制重置为 4列×3行，解决重叠 */
/* ============================================== */
@media (max-width: 820px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 100px; /* 可根据需要调整大小 */
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* 强制4列 */
    grid-template-rows: auto !important;
    gap: 12px !important; /* 六边形之间的间距，调大一点避免视觉重叠 */
    margin: 0 auto !important;
    width: 100% !important;
    padding: 10px !important;
    height: 100%;
  }

  /* 强制清除所有桌面端定位 */
  .weilan_visit_photo .hex-item {
    grid-column: unset !important;
    grid-row: unset !important;
    width: 100% !important;
    height: 180px !important;
    margin: 0 !important;
  }

 .weilan_visit_photo .hex-item {
    clip-path: border-box;
  }

  .weilan_visit_photo .hex-content {
    clip-path: none;
}

  /* 保证hover层级不导致重叠遮挡 */
  .weilan_visit_photo .hex-item:hover {
    z-index: 10 !important;
  }
}

/* 下面这些小屏断点里，不要再写任何 grid-column/grid-row 相关的代码！ */
@media (max-width: 768px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 85px;
  }
}

@media (max-width: 680px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 75px;
  }
}

@media (max-width: 576px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 65px;
    --gap: 2px;
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .weilan_visit_photo .hex-item {
    grid-column: unset !important;
    grid-row: unset !important;
    width: 100% !important;
    height: 100px !important;
    margin: 0 !important;
  };
}

@media (max-width: 480px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 55px;
  }
}

@media (max-width: 429px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 50px;
  }
}

@media (max-width: 374px) {
  .weilan_visit_photo .honeycomb-grid {
    --hex-w: 45px;
  }
}