
/* ============================================================
   V154 — REAL iOS SAFARI MOBILE HERO FIX
   Avoid native sticky viewport jitter. Keep the same animation,
   but pin the frame with fixed positioning while the outer hero
   supplies the scroll runway.
============================================================ */
@media(max-width:767px){
  body.v4-home .v4-opening{
    position:relative!important;
    height:215lvh!important;
    min-height:215lvh!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    background:var(--v4-cream)!important;
    z-index:2!important;
  }

  body.v4-home .v4-opening .v4-pin{
    position:absolute!important;
    top:0!important;
    left:0!important;
    right:0!important;
    bottom:auto!important;
    width:100%!important;
    height:100lvh!important;
    min-height:100lvh!important;
    max-height:100lvh!important;
    overflow:hidden!important;
    z-index:5!important;
    transform:none!important;
    backface-visibility:hidden!important;
    -webkit-backface-visibility:hidden!important;
  }

  body.v4-home .v4-opening.v154-active .v4-pin{
    position:fixed!important;
    top:0!important;
    bottom:auto!important;
  }

  body.v4-home .v4-opening.v154-ended .v4-pin{
    position:absolute!important;
    top:auto!important;
    bottom:0!important;
  }

  /* The following section is ordinary flow content. No negative
     margins, transforms or raised stacking that can ride over hero. */
  body.v4-home .now-enrolling-bar{
    position:relative!important;
    z-index:1!important;
    margin:0!important;
    margin-top:0!important;
    transform:none!important;
    translate:none!important;
    clear:both!important;
  }

  body.v4-home .now-enrolling-bar::before{
    display:none!important;
    content:none!important;
  }
}


/* ============================================================
   V155 — KEEP NOW ENROLLING BELOW FINAL HERO BUTTONS
   Preserve V154 iPhone Safari stability.
============================================================ */
@media(max-width:767px){
  /* Hero always visually owns the viewport while pinned. */
  body.v4-home .v4-opening{
    isolation:isolate!important;
    z-index:20!important;
  }

  body.v4-home .v4-opening .v4-pin{
    z-index:21!important;
  }

  /* Banner remains behind hero until the pin has fully released. */
  body.v4-home .now-enrolling-bar{
    z-index:1!important;
    position:relative!important;
    margin-top:0!important;
    transform:none!important;
  }

  /* Prevent the banner edge from becoming visible over the final CTA row. */
  body.v4-home .v4-opening.v154-active + .now-enrolling-bar,
  body.v4-home .v4-opening.v154-before + .now-enrolling-bar{
    visibility:hidden!important;
  }

  body.v4-home .v4-opening.v154-ended + .now-enrolling-bar{
    visibility:visible!important;
  }
}


/* ============================================================
   V156 — FINAL HERO CTA CLEARANCE
   Keep the iPhone Safari no-shake pin system.
   Give the final hero CTA row breathing room before NOW ENROLLING.
============================================================ */
@media(max-width:767px){
  /* Add real document-flow space after the pinned hero, rather than
     allowing the following banner to arrive against the CTA row. */
  body.v4-home .v4-opening{
    margin-bottom:32px!important;
  }

  body.v4-home .now-enrolling-bar{
    margin-top:0!important;
  }
}

@media(max-width:479px){
  body.v4-home .v4-opening{
    margin-bottom:28px!important;
  }
}


/* ============================================================
   V157 — SHOW FULL FINAL HERO TOUR BUTTON
   Keep V156 Safari handoff exactly as-is.
   Move only the revealed hero copy/CTA block slightly upward so
   the outlined Schedule a Tour button is fully inside the frame.
============================================================ */
@media(max-width:767px){
  body.v4-home .v4-opening .v4-bloom-copy{
    transform:translateY(-14px)!important;
  }
}

@media(max-width:430px){
  body.v4-home .v4-opening .v4-bloom-copy{
    transform:translateY(-18px)!important;
  }
}
