/* Erklärvideo auf der Startseite: Vorschaubild mit Play-Knopf und Dialog ({modul=erklaervideo}) */

.cms-video { clear: both; margin: 0 0 22px 0; }

.cms-video-teaser {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: #fdf3f3;
  border: 1px solid #f2dada;
  box-shadow: 0 4px 14px rgba(90, 0, 0, 0.16);
  text-decoration: none;
}

.cms-video-teaser img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.cms-video-teaser:hover img,
.cms-video-teaser:focus-visible img { transform: scale(1.03); }

.cms-video-teaser:focus-visible { outline: 3px solid #9A0000; outline-offset: 3px; }

.cms-video-play {
  /* In der freien Bildmitte des Vorschaubilds zwischen Logo, Abzeichen und
     Figuren; die Größe folgt der Breite, damit es auch schmal passt. */
  position: absolute;
  left: 50%;
  top: 46%;
  width: 14%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #9A0000;
  border: 4px solid #fff;
  box-sizing: border-box;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cms-video-teaser:hover .cms-video-play,
.cms-video-teaser:focus-visible .cms-video-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: #7A0000;
}

.cms-video-play svg { width: 42%; height: 42%; margin-left: 8%; fill: #fff; }

.cms-video-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 30% 10px 14px;
  background: linear-gradient(rgba(42, 0, 0, 0), rgba(42, 0, 0, 0.82));
  color: #fff;
  font-weight: bold;
  font-size: 1.05em;
  text-align: left;
}

.cms-video-dialog {
  width: min(92vw, 1100px);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #000;
  overflow: visible;
}

.cms-video-dialog::backdrop { background: rgba(20, 4, 6, 0.86); }

.cms-video-dialog video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.cms-video-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #9A0000;
  font-size: 28px;
  line-height: 40px;
  cursor: pointer;
}

.cms-video-close:hover { background: #fdf3f3; }

.cms-video-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

@media (max-width: 768px) {
  /* Die Seite gibt Links im Inhalt mobil max-width: 70% und Innenabstand
     (.inhalt a); das Vorschaubild soll trotzdem die volle Breite nutzen. */
  .cms-video .cms-video-teaser { max-width: none; margin: 0; padding: 0; line-height: normal; }
  .cms-video-label { padding-right: 26%; font-size: 1em; }
}

@media (prefers-reduced-motion: reduce) {
  .cms-video-teaser img,
  .cms-video-play { transition: none; }
}
