/* AM HORIZONT Redesign Manager 0.44.34
 * Final public visual contract.
 * Loaded after the complete public CSS cascade, including master-experience.css.
 * Purpose: protect media visibility, image focus, hero breathing room and text contrast without changing content.
 */

/* Startseite: Video deutlich sichtbar, Text links klar lesbar, mehr vertikale Ruhe. */
body.amh-rm-master-preview--startseite .amh-master-hero{
  min-height:clamp(720px,78svh,820px)!important;
  align-items:center!important;
}
body.amh-rm-master-preview--startseite .amh-master-hero__inner{
  padding-top:112px!important;
  padding-bottom:104px!important;
}
body.amh-rm-master-preview--startseite .amh-master-hero__video{
  filter:saturate(1.0) contrast(1.02) brightness(1.06)!important;
  transform:scale(1.004)!important;
  object-fit:cover!important;
  object-position:center center!important;
}
body.amh-rm-master-preview--startseite .amh-master-hero__scrim{
  background:
    linear-gradient(90deg,rgba(8,27,23,.32) 0%,rgba(8,27,23,.22) 30%,rgba(8,27,23,.07) 58%,rgba(8,27,23,0) 78%),
    linear-gradient(0deg,rgba(8,27,23,.08) 0%,rgba(8,27,23,0) 42%,rgba(8,27,23,.04) 100%)!important;
}
body.amh-rm-master-preview--startseite .amh-master-hero__copy{
  max-width:700px!important;
}
body.amh-rm-master-preview--startseite .amh-master-hero h1{
  text-shadow:0 3px 20px rgba(0,0,0,.24)!important;
}

/* Die Bildzentrale bleibt die einzige Quelle für Ausschnitt und Spiegelung.
   Keine spätere Layoutregel darf den gespeicherten Fokus ersetzen. */
body.amh-rm-master-preview img.amh-rm-managed-image.amh-rm-managed-image{
  object-position:var(--amh-img-x,50%) var(--amh-img-y,50%)!important;
}
@media (min-width:768px) and (max-width:1024px){
  body.amh-rm-master-preview img.amh-rm-managed-image.amh-rm-managed-image{
    object-position:var(--amh-img-x-tablet,var(--amh-img-x,50%)) var(--amh-img-y-tablet,var(--amh-img-y,50%))!important;
  }
}
@media (max-width:767px){
  body.amh-rm-master-preview img.amh-rm-managed-image.amh-rm-managed-image{
    object-position:var(--amh-img-x-mobile,var(--amh-img-x,50%)) var(--amh-img-y-mobile,var(--amh-img-y,50%))!important;
  }
}
body.amh-rm-master-preview img.amh-rm-managed-image{
  display:block;
  max-width:100%;
}

/* Besondere Medien: Video und Standbild behalten dieselbe Bühne. */
body.amh-rm-master-preview .amh-rm-managed-media{
  max-width:100%;
}
body.amh-rm-master-preview video.amh-rm-managed-media{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16/9;
  object-fit:cover;
  object-position:center center;
  background:#102e28;
}

/* Große Bildbühnen: keine unerwünschte Eigenhöhe aus dem Bild heraus. */
body.amh-rm-master-preview :is(.amh-grief-video__media,.amh-method-video__media) > :is(img,video).amh-rm-managed-media{
  width:100%;
}

/* Helle Karten: Pflichttexte und kleine Hinweise bleiben sichtbar. */
body.amh-rm-master-preview :is(
  .amh-rollout-photo-band__card,
  .amh-master-booking-value article,
  .amh-counselling-value__grid article,
  .amh-counselling-compare__grid article,
  .amh-rollout-support__grid article,
  .amh-family-situation__rows article,
  .amh-family-together__grid article,
  .amh-family-topics__list article
) :is(p,small){
  opacity:1!important;
}

/* Interaktive Elemente erhalten einen eindeutigen Tastaturfokus. */
body.amh-rm-master-preview a:focus-visible,
body.amh-rm-master-preview button:focus-visible,
body.amh-rm-master-preview summary:focus-visible{
  outline:3px solid #c99845!important;
  outline-offset:3px!important;
}

/* Mobile: links bleibt der Text geschützt, rechts darf das Video sichtbar bleiben. */
@media(max-width:767px){
  body.amh-rm-master-preview--startseite .amh-master-hero{
    min-height:680px!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero__inner{
    padding-top:82px!important;
    padding-bottom:74px!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero__video{
    filter:saturate(.98) contrast(1.02) brightness(1.03)!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero__scrim{
    background:
      linear-gradient(90deg,rgba(8,27,23,.54) 0%,rgba(8,27,23,.38) 48%,rgba(8,27,23,.16) 82%,rgba(8,27,23,.04) 100%),
      linear-gradient(0deg,rgba(8,27,23,.12),rgba(8,27,23,0) 62%)!important;
  }
}

@media(prefers-reduced-motion:reduce){
  body.amh-rm-master-preview--startseite .amh-master-hero__video{
    transform:none!important;
  }
}

/* 0.44.34 · Hero Endabnahme: Video als sichtbare Buehne, ruhigerer Textblock. */

@media (min-width:768px){
  body.amh-rm-master-preview--startseite .amh-master-hero{
    min-height:clamp(720px,78svh,820px)!important;
    height:auto!important;
    max-height:none!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero__inner{
    padding-top:clamp(126px,13svh,150px)!important;
    padding-bottom:clamp(118px,12svh,142px)!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero__copy{
    max-width:650px!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero h1{
    max-width:12.5ch!important;
    font-size:clamp(48px,5vw,68px)!important;
    line-height:1.045!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero__lead{
    max-width:620px!important;
    font-size:clamp(18px,1.45vw,21px)!important;
    line-height:1.62!important;
  }
}

/* Das Video bleibt als echtes Leitmotiv sichtbar. Die Abdunklung endet frueh hinter dem Textbereich. */
body.amh-rm-master-preview--startseite .amh-master-hero__video{
  filter:saturate(1.05) contrast(.98) brightness(1.07)!important;
  opacity:1!important;
  transform:scale(1.002)!important;
  object-position:54% center!important;
}

body.amh-rm-master-preview--startseite .amh-master-hero__scrim{
  background:linear-gradient(90deg,rgba(8,27,23,.27) 0%,rgba(8,27,23,.19) 24%,rgba(8,27,23,.09) 42%,rgba(8,27,23,.025) 55%,rgba(8,27,23,0) 63%)!important;
}

body.amh-rm-master-preview--startseite .amh-master-hero h1,
body.amh-rm-master-preview--startseite .amh-master-hero__lead{
  text-shadow:0 3px 20px rgba(0,0,0,.30)!important;
}

@media (max-width:767px){
  body.amh-rm-master-preview--startseite .amh-master-hero{
    min-height:700px!important;
    height:auto!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero__inner{
    padding-top:86px!important;
    padding-bottom:82px!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero__video{
    filter:saturate(1.02) contrast(.99) brightness(1.04)!important;
    object-position:54% center!important;
  }
  body.amh-rm-master-preview--startseite .amh-master-hero__scrim{
    background:linear-gradient(90deg,rgba(8,27,23,.50) 0%,rgba(8,27,23,.34) 48%,rgba(8,27,23,.14) 78%,rgba(8,27,23,.03) 100%)!important;
  }
}
