/* ============================================================
   SEGMENT-VIDEO (Text + Video)
   ============================================================ */
.segment-video {
  padding: 0;
}

.segment-video .segment-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
}

/* Textseite */
.segment-video .text-left {
  flex: 1 1 50%;
  padding: 5em var(--global-gutter);
  box-sizing: border-box;
  background: #f5f6f7;
}

/* Videoseite */
.segment-video .video-wrapper {
  position: relative;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Vorschaubild */
.segment-video-thumbnail,
.segment-video .segment-image-shadow {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #000;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  border: 0;
  display: block;
}

/* Der Playbutton bleibt immer mittig über dem Bild */
.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%); /* leicht eingerückt nach unten */
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 3rem;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 5;                /* über dem Thumbnail */
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play-button:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Eingebettetes Video */
.segment-video iframe {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border: 0;
  display: block;
  background: #000;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.segment-image-shadow.segment-video-thumbnail {
  object-fit: contain !important;
  height: auto !important;
}

/* Responsive */
@media (max-width: 768px) {
  .segment-video .segment-inner {
    flex-direction: column;
  }

  .segment-video .text-left,
  .segment-video .video-wrapper {
    flex: 1 1 100%;
    padding: 2em var(--global-gutter);
  }

  .video-play-button {
    font-size: 2.4rem;
    width: 70px;
    height: 70px;
  }
}
.video-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  line-height: 0;
  overflow: visible; /* Schatten darf überstehen */
  z-index: 0; /* Playbutton bleibt darüber */
}
/* ============================================================
   FIX: Trennung Standard-YouTube-Segments vs. segment-video
   ============================================================ */

/* Standard-Segmente (YouTube in ctls_render_segment) */
.segment:not(.segment-video) .segment-video-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;          /* YouTube-Format */
  height: auto !important;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  display: block;
  margin-bottom: 2em;
}

/* Standard-Segmente: iframe */
.segment:not(.segment-video) .video-wrapper iframe {
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  border-radius: 10px;
  display: block;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  background: #000;
}

/* segment-video bleibt unverändert (contain statt cover) */
.segment-video .segment-video-thumbnail {
  aspect-ratio: auto;          /* kein erzwungenes Format */
  object-fit: contain !important;
  height: auto !important;
}