/* --- ALT HERO ---------------------------------------------------- */
.acf-alt-hero { padding: 0; }

.alt-hero-stage{
  display: grid;
  grid-template-columns: minmax(0, 65fr) minmax(0, 35fr); /* constant ratio */
  align-items: center;
  gap: 0;
  position: relative;
}
.acf-alt-hero.is-flipped .alt-hero-stage{
  grid-template-columns:minmax(0,35fr) minmax(0,65fr);
}

/* Default order: image left (col 1), card right (col 2) */
.alt-hero-image{ grid-column:1; grid-row:1; position:relative; z-index:1; }
.alt-hero-card { grid-column:2; grid-row:1; position:relative; z-index:2; }

/* Flip: just swap columns, stay on row 1 */
.acf-alt-hero.is-flipped .alt-hero-image{ grid-column:2; grid-row:1; }
.acf-alt-hero.is-flipped .alt-hero-card { grid-column:1; grid-row:1; }
/* image */
.alt-hero-image img{
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  display: block;

}

/* card + overlap (default overlaps left over the image) */
.alt-hero-card{
  background: #fff;
  border-radius: 1.75rem;
  padding: 3.6rem 3.6rem 2.6rem;
  max-width: 640px;
  box-shadow: 0 18px 40px rgba(0,0,0,.12);

  /* single overlap pair — no conflicting margins */
  margin-left: -28%;
  margin-right: 20%;
}

/* flipped: mirror the overlap */
.acf-alt-hero.is-flipped .alt-hero-card {
  margin-left: 20%;
  margin-right: -28%;
}

.alt-hero-card h1{ margin: 0 0 .8rem; line-height: 1.05; font-family: 'gotham', sans-serif; font-weight: 800; }
.alt-hero-copy{ margin: 0 0 1.75rem; line-height: 1.6; }
.alt-hero-card .button{ margin-top: .25rem; }

/* ---- ALT HERO: mobile image fix ---- */

/* 1) Don’t force a 100% height on the img */
.alt-hero-image img{
  width: 100%;
  height: auto;          /* was: height: 100% -> causes collapse on mobile */
  max-height: 600px;
  object-fit: cover;
  display: block;
}

/* 2) When stacking, reset the grid and all overlaps */
@media (max-width: 1100px){
  .alt-hero-stage{
    grid-template-columns: 1fr;
    align-items: start;
  }
  .alt-hero-card {
    margin: -3rem 1rem 3rem !important;
        padding: 2.6rem 2rem 1.6rem;

  }
  .alt-hero-image, .alt-hero-card{
    grid-column: auto;
    grid-row: auto;
  }
}

/* Optional: If you want a consistent crop on phones, give the image a ratio */
@media (max-width: 900px){
  .alt-hero-image{
    overflow: hidden;
  }
  .alt-hero-image img{
    width: 100%;
    height: 100%;
    max-height: 300px;
    object-fit: cover;
  }
  .alt-hero-card {
    margin:auto;
  }
  .acf-alt-hero.is-flipped .alt-hero-stage{
    grid-template-columns:1fr;
  }
  .acf-alt-hero.is-flipped .alt-hero-image{ grid-column:1; grid-row:1; }
  .acf-alt-hero.is-flipped .alt-hero-card { grid-column:1; grid-row:2; }
}
