.zoom-hover {
  overflow: hidden;
}

.zoom-hover img {
  transition: transform 0.4s ease;
}

.zoom-hover img:hover {
  transform: scale(1.05);
}





/* ====== 图片悬浮效果（修正版 v2） ====== */
.wp-block-image.hover-caption {
  position: relative;
}

.wp-block-image.hover-caption img {
  display: block;
  border-radius: 8px;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.wp-block-image.hover-caption:hover img {
  transform: scale(1.08);
  filter: brightness(0.55);
}

.wp-block-image.hover-caption figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
  font-size: 20px;
  text-align: center;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  margin-top: 0;
}

.wp-block-image.hover-caption:hover figcaption {
  transform: translateY(0);
  opacity: 1;
}




/* ====== 只有 project-intro 這張圖片會顯示介紹彈窗 ====== */
.wp-block-image.project-intro figcaption {
  overflow: visible;
}

.wp-block-image.project-intro figcaption a {
  color: #fff;
  text-decoration: none;
}

.wp-block-image.project-intro figcaption a:hover {
  text-decoration: underline;
}

.wp-block-image.project-intro .project-popup {
  display: block;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  width: min(300px, 85vw);
  padding: 16px 18px;
  box-sizing: border-box;
  border-radius: 10px;
  background: rgba(25, 25, 25, 0.96);
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);

  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* 滑鼠移到標題時，顯示介紹 */
.wp-block-image.project-intro figcaption:hover .project-popup {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}






/* 這張指定圖片：滑鼠移到標題時顯示介紹 */
.wp-block-image.project-intro,
.wp-block-image.project-intro figcaption {
  overflow: visible;
}

.wp-block-image.project-intro figcaption::before {
  content: "A virtual heritage initiative using 360° video and VR experiences to document and teach Hong Kong’s ritual culture, festivals, community practices, and intangible cultural heritage. The initiative was also featured in the PolyU Annual Report as one of the University’s highlighted teaching initiatives.";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  width: min(300px, 85vw);
  padding: 16px 18px;
  box-sizing: border-box;
  border-radius: 10px;
  background: rgba(25, 25, 25, 0.96);
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);

  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* 滑鼠移到圖片標題時，顯示說明 */
.wp-block-image.project-intro figcaption:hover::before {
  opacity: 1;
  transform: translate(-50%, 0);
}