/* --- Make captions overlay the image and appear only on hover --- */
.wp-block-image {
  position: relative;
  overflow: hidden; /* keeps text inside rounded corners */
}

/* Hide the caption by default */
.wp-block-image figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.65); /* translucent black overlay */
  color: #fff;
  padding: 12px 15px;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.35s ease-in-out;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.4;
  border-bottom-left-radius: 20px; /* matches your image radius */
  border-bottom-right-radius: 20px;
}

/* On hover – bring caption into view */
.wp-block-image:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* Optional: add a subtle zoom on hover for polish */
.wp-block-image:hover img {
  transform: scale(1.03);
  transition: transform 0.4s ease;
}

