/* Decision-ID: pereta-startseite-vollnativ-divi5-20260828 */
body:has(.ap-hero-v5) {
  --ap-header-h: 102px;
  --ap-hero-h: calc(100vh - var(--ap-header-h));
}

@supports (height: 100svh) {
  body:has(.ap-hero-v5) {
    --ap-hero-h: calc(100svh - var(--ap-header-h));
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  body:has(.ap-hero-v5) { --ap-header-h: 72px; }
}

@media (max-width: 640px) {
  body:has(.ap-hero-v5) { --ap-header-h: 69px; }
}

html:has(.ap-hero-v5),
body:has(.ap-hero-v5) {
  background: var(--gcid-c-bg, #fff);
}

.ap-hero-v5 {
  position: relative;
  overflow: hidden;
  height: var(--ap-hero-h);
  min-height: var(--ap-hero-h);
  max-height: var(--ap-hero-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 0;
}

.ap-hero-v5 > .et_pb_row,
.ap-hero-v5 .et_pb_column,
.ap-hero-v5 .ap_hero_media_modul,
.ap-hero-v5 .ap_hero_media_modul .et_pb_module_inner {
  position: static !important;
}

.ap-hero-v5 .et_pb_row {
  box-sizing: border-box !important;
  height: var(--ap-hero-h) !important;
  min-height: var(--ap-hero-h) !important;
  max-height: var(--ap-hero-h) !important;
  padding-top: clamp(.75rem, 2.2svh, 1.75rem) !important;
  padding-bottom: clamp(.75rem, 2.2svh, 1.75rem) !important;
}

.ap-hero-v5 .et_pb_text,
.ap-hero-v5 .et_pb_heading,
.ap-hero-v5 .et_pb_group,
.ap-hero-v5 .et_pb_button_module_wrapper {
  position: relative;
  z-index: 2;
}

.ap-hero-v5 .et_pb_text p {
  text-shadow: 0 1px 12px rgba(4, 6, 11, .95), 0 0 30px rgba(4, 6, 11, .8);
}

.ap-hero-v5 h1 {
  text-shadow: 0 2px 30px rgba(4, 6, 11, .85), 0 1px 10px rgba(4, 6, 11, .95);
}

.ap-hero-v5 .et_pb_group {
  margin-top: clamp(.9rem, 2.1vh, 1.7rem) !important;
}

.hero-v5-media {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: var(--ap-hero-h);
  min-height: var(--ap-hero-h);
  max-height: var(--ap-hero-h);
  overflow: hidden;
  pointer-events: none;
  background: #04060b;
}

.hero-v5-media__poster,
.hero-v5-media__video {
  position: absolute;
  top: 0;
  left: 50%;
  width: auto;
  min-width: 100%;
  height: 100%;
  min-height: var(--ap-hero-h);
  object-fit: cover;
  transform: translateX(-50%);
}

.hero-v5-media__poster {
  z-index: 0;
}

.hero-v5-media__video {
  z-index: 1;
  transition: opacity 700ms ease;
}

.hero-v5-media::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52vh;
  background: linear-gradient(to bottom, rgba(4, 6, 11, 0) 0%, rgba(4, 6, 11, .55) 42%, #04060b 100%);
}

.ap-hero-v5:has(.hero-v5-media__video[data-ended='1']) {
  background: var(--gcid-c-navy-900, #04060b);
}

.ap-hero-v5:has(.hero-v5-media__video[data-ended='1']) .hero-v5-media__video {
  opacity: 0;
}

@media (orientation: portrait) and (max-width: 640px) and (max-height: 767px) {
  .ap-hero-v5.ap-hero-v5.ap-hero-v5 > .et_pb_row.et_pb_row { width: 94% !important; }
  .ap-hero-v5 .ap-hero-sub p { line-height: 1.34em !important; }
  .ap-hero-v5.ap-hero-v5 .et_pb_group {
    margin-top: clamp(.5rem, 1svh, .75rem) !important;
    row-gap: .5rem !important;
  }
  .ap-hero-v5 .et_pb_button {
    box-sizing: border-box !important;
    min-height: 52px !important;
    padding-top: var(--gvid-ap-v2-header-y) !important;
    padding-bottom: var(--gvid-ap-v2-header-y) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .ap-hero-v5 .hero-v5-media__poster,
  .ap-hero-v5 .hero-v5-media__video {
    height: clamp(55svh, calc(var(--ap-hero-h) - 16rem), 67svh) !important;
    min-height: clamp(55svh, calc(var(--ap-hero-h) - 16rem), 67svh) !important;
  }
  .ap-hero-v5 .hero-v5-media__poster { object-position: center top; }
}

@media (orientation: portrait) {
  .ap-hero-v5 .ap-hero-sub p {
    font-size: max(15px, min(var(--gvid-ap-prod-hero-body-v2), 2.6svh)) !important;
  }
}

@media (orientation: portrait) and (max-height: 600px) {
  .ap-hero-v5 .ap-hero-sub p { line-height: 1.3em !important; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .ap-hero-v5.ap-hero-v5.ap-hero-v5 > .et_pb_row.et_pb_row {
    width: 96% !important;
    padding-top: clamp(.5rem, 2svh, .75rem) !important;
    padding-bottom: clamp(.5rem, 2svh, .75rem) !important;
  }
  .ap-hero-v5.ap-hero-v5 .et_pb_column {
    height: calc(var(--ap-hero-h) - clamp(1rem, 4svh, 1.5rem)) !important;
    min-height: calc(var(--ap-hero-h) - clamp(1rem, 4svh, 1.5rem)) !important;
    max-height: calc(var(--ap-hero-h) - clamp(1rem, 4svh, 1.5rem)) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    column-gap: clamp(1rem, 4vw, 3rem);
  }
  .ap-hero-v5 .ap_hero_media_modul {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 0 !important;
    min-height: 0 !important;
  }
  .ap-hero-v5 .ap-hero-kicker { grid-column: 1 / -1; grid-row: 1; }
  .ap-hero-v5 .et_pb_heading { grid-column: 1 / -1; grid-row: 2; }
  .ap-hero-v5 .ap-hero-sub {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
  }
  .ap-hero-v5 .ap-hero-sub p { line-height: 1.42em !important; }
  .ap-hero-v5.ap-hero-v5 .et_pb_group {
    grid-column: 2;
    grid-row: 3;
    align-self: end;
    width: 100% !important;
    margin: 0 !important;
    row-gap: .5rem !important;
  }
  .ap-hero-v5 .et_pb_button {
    box-sizing: border-box !important;
    min-height: 52px !important;
    padding-top: var(--gvid-ap-v2-header-y) !important;
    padding-bottom: var(--gvid-ap-v2-header-y) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-v5-media__video { display: none; transition: none; }
}
