/* RAVENTA V605 – Korrektur Mobile-Hero/Content-Uebergang, ohne Button- oder Desktop-Umbau.
 * 320px: 288px sichtbare Bildhoehe fuer 3-zeilige Titel; 390px: 305.5px.
 * Ab ~433px bleibt die bisherige 73vw-Responsive-Kurve erhalten.
 * Bei Stellenlisten bleiben Hero-Buttons/Notizen im bestehenden Mobile-Flow.
 */
@media (max-width:620px) {
  html body:not(.rv154-jobs) main > #rv283-mobile-hero#rv283-mobile-hero#rv283-mobile-hero,
  html body main > #rv292-hero#rv292-hero#rv292-hero {
    --rv605-hero-image: max(73vw, calc(25vw + 208px));
    box-sizing:border-box !important;
    height:var(--rv605-hero-image) !important;
    min-height:var(--rv605-hero-image) !important;
    max-height:var(--rv605-hero-image) !important;
  }
  /* Image and container must end at the same Y-coordinate. Only images that
     already belong to the relevant hero are affected. Responsive sources stay. */
  html body:not(.rv154-jobs) main > #rv283-mobile-hero#rv283-mobile-hero#rv283-mobile-hero > img,
  html body main > #rv292-hero#rv292-hero#rv292-hero > img {
    height:100% !important;
    min-height:100% !important;
    max-height:100% !important;
    object-fit:cover;
  }
  /* Remove old negative margins that placed next sections on top of heroes;
     the target is the hero's immediate next sibling, NOT arbitrary content. */
  html body:not(.rv154-jobs) main > #rv283-mobile-hero#rv283-mobile-hero#rv283-mobile-hero + *,
  html body main > #rv292-hero#rv292-hero#rv292-hero + * {
    margin-top:0 !important;
  }
}
/* Smooth tablet edge: 620px -> 452.6px, 621px -> 450px instead of -> 406.5px.
   At 768px and 1024px previous 480px/512px sizes stay unchanged. */
@media (min-width:621px) and (max-width:768px) {
  html body main > #rv283-mobile-hero#rv283-mobile-hero#rv283-mobile-hero,
  html body main > #rv292-hero#rv292-hero#rv292-hero {
    --rv603-hero-size:max(450px, min(512px, calc(50vw + 96px)));
  }
}
/* Contact: the existing mobile lead is absolutely positioned 318px from hero
   top. Reserve sufficient space for it BEFORE the contact form heading, rather
   than hiding text or placing it on top of the heading. */
@media (max-width:430px) {
  html body main > #rv283-mobile-hero#rv283-mobile-hero.rv-master-hero + .contact-form-section {
    padding-top:clamp(39px, calc(245.2px - 48vw), 92px) !important;
  }
}
/* Contact heading at 320px: no orphaned final letter from Kontaktaufnahme. */
@media (max-width:360px) {
  html body main > #rv283-mobile-hero#rv283-mobile-hero + .contact-form-section h2 {
    font-size:24px !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
  }
}
