/* ============================================================
   Hero – zweite Spalte (Video/Bild) + Lightbox
   Lädt automatisch via module_css_links() wenn das hero-Modul aktiv ist.
   ============================================================ */

.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-media {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--teal-tint);
}

.hero-media-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox-Trigger (Video) */
.hero-media--lightbox {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.hero-media--lightbox:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.hero-media-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.hero-media-play svg { width: 30px; height: 30px; margin-left: 3px; }

.hero-media--lightbox:hover .hero-media-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #fff;
}

/* ---- Lightbox-Overlay ---- */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(10, 26, 31, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base) var(--ease);
}

.video-lightbox.is-open { opacity: 1; visibility: visible; }

.video-lightbox-inner {
  position: relative;
  width: min(1100px, 100%);
  max-height: 86vh;
  aspect-ratio: 16 / 9;
}

.video-lightbox video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow-xl);
}

.video-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--t-fast) var(--ease);
}

.video-lightbox-close:hover { transform: scale(1.08); }
.video-lightbox-close svg { width: 22px; height: 22px; }

@media (max-width: 560px) {
  .video-lightbox-close { top: -8px; right: -8px; width: 42px; height: 42px; }
}

/* ---- Mobile: Medium zuerst, Text darunter ---- */
@media (max-width: 820px) {
  .hero--has-media .hero-grid {
    grid-template-columns: 1fr;
    gap: clamp(28px, 6vw, 40px);
  }
  /* width:100% nötig, da die ≤900px-Regel margin:0 auto setzt und das
     Grid-Item sonst content-basiert (Medien sind absolut) auf 0 kollabiert. */
  .hero--has-media .hero-visual {
    order: -1;
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
  }
  .hero--has-media .hero-content { order: 0; }
}
