.vimeo-preview {
  position: relative;
  cursor: pointer;
  max-width: 950px;
  margin: 2rem auto;
  display: inline-block;
}

.vimeo-preview img {
  width: 100%;
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.vimeo-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.vimeo-play-icon::before {
  content: '▶';
  transform: translate(10%, -5%);
  display: inline-block;
}

.vimeo-modal {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vimeo-modal.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.vimeo-modal-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  aspect-ratio: 16 / 9;
  background-color: transparent;
}

.vimeo-iframe-wrapper {
  width: 100%;
  height: 100%;
}

.vimeo-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 5px;
}


.vimeo-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 3.5rem;
  color: white;
  cursor: pointer;
}

.vimeo-preview img {
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}

.vimeo-preview:hover img {
  filter: grayscale(0%);
}

.vimeo-image-wrapper {
  position: relative;
  display: inline-block;
}


@media (max-width: 768px) {
  .vimeo-modal {
    padding: 1rem;
  }

  .vimeo-modal-content {
    margin-top: 30px;
    /* Space for close button */
  }

  .vimeo-play-icon {
    width: 60px;
    height: 60px;
    font-size: 3rem;
  }

  .vimeo-close {
    top: -35px;
    right: 0;
    /* Keep it inside */
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.5);
    /* Background for visibility */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: normal;
  }
}