/* --- Modal Overlay --- */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;        /* <- Vertikal zentriert */
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  z-index: 9999;
  overflow: hidden;
}

/* --- Modal Content --- */
.video-modal-content {
  position: relative;
  width: 75vw;
  max-width: 1200px;
  max-width: calc(92vh - 50px);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;

  transform-origin: center center;
}

/* --- Responsive für Mobile --- */
@media (max-width: 768px) {
  .video-modal-content {
    width: 90vw;
  }
}

/* --- Iframe Container --- */
.video-iframe-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-iframe-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
}

.video-iframe-container iframe.loaded {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* --- Close Button sichtbar und prominent --- */
.video-modal-close {
  position: absolute;
  top: 0px;
  margin-top: -45px;
  right: 5px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;   /* sicherstellen, dass Button oben liegt */
  transition: fill 0.3s;
}


.video-modal-close:hover path {
  fill: #85ffc4;
}
