/* Shared banner height and alignment. The original homepage stays independent. */
@media (min-width: 901px) {
  body main .compact-hero.compact-hero {
    min-height: 40rem;
    display: flex;
    align-items: center;
  }
  body main .compact-hero.compact-hero > .wrap {
    flex-shrink: 0;
    margin-top: 0;
    margin-bottom: 0;
  }
}
body main .compact-hero.compact-hero :is(.dc-grid, .hero-grid) {
  align-items: start;
}
body main .compact-hero.compact-hero [data-hero-copy],
body main .compact-hero.compact-hero .hero-visual {
  min-width: 0;
}
/* The older Auto/Santé/Habitation/Emprunteur template uses the same title
   scale and upper spacing as the Prévoyance banner. This selector deliberately
   outranks the old product-specific 60px title rules. */
body main .compact-hero.auto-hero {
  padding-top: 22px;
  padding-bottom: 34px;
}
body main .compact-hero.auto-hero .breadcrumb {
  margin-bottom: 16px;
}
body main .compact-hero.auto-hero .hero-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
}
body main .compact-hero.auto-hero h1 {
  font-size: clamp(31px, 3.25vw, 46px);
  line-height: 1.13;
  letter-spacing: -.035em;
  margin-bottom: 16px;
}
@media (min-width: 801px) and (max-width: 900px) {
  body main .compact-hero.compact-hero :is(.dc-grid, .hero-grid, .blog-index-hero-grid) {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}
@media (max-width: 800px) {
  body main .compact-hero.auto-hero .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}
@media (max-width: 700px) {
  body main .compact-hero.auto-hero {
    padding-top: 18px;
    padding-bottom: 28px;
  }
  body main .compact-hero.auto-hero h1 {
    font-size: clamp(29px, 7vw, 38px);
  }
}
@media (max-width: 600px) {
  /* Keep the primary questionnaire action easy to find on a phone. */
  body main .compact-hero.compact-hero [data-hero-copy] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  body main .compact-hero.compact-hero [data-hero-copy] > * { order: 3; }
  body main .compact-hero.compact-hero [data-hero-copy] > :is(.eyebrow, .dc-label) { order: 0; }
  body main .compact-hero.compact-hero [data-hero-copy] > h1 { order: 1; }
  body main .compact-hero.compact-hero [data-hero-copy] > [data-hero-primary] { order: 2; }
}

/* Mobile product banners: title, illustration, then questionnaire action. */
@media (max-width: 800px) {
  body main .compact-hero.mobile-product-hero {
    padding-top: 12px;
    padding-bottom: 24px;
  }
  body main .compact-hero.mobile-product-hero :is(.breadcrumb, .dc-crumb) {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.35;
  }
  body main .compact-hero.mobile-product-hero :is(.dc-grid, .hero-grid) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  body main .compact-hero.mobile-product-hero :is([data-hero-copy], .hero-visual) {
    display: contents;
  }
  body main .compact-hero.mobile-product-hero [data-hero-copy] > *,
  body main .compact-hero.mobile-product-hero .hero-subnav {
    order: 4;
  }
  body main .compact-hero.mobile-product-hero [data-hero-copy] > :is(.eyebrow, .dc-label) {
    display: none;
  }
  body main .compact-hero.mobile-product-hero [data-hero-copy] > h1 {
    order: 1;
    font-size: clamp(27px, calc(3.25vw - 4px), 42px);
    line-height: 1.13;
    margin-bottom: 0;
  }
  body.consumer-products main .compact-hero.mobile-product-hero [data-hero-copy] > h1,
  body.five-pages main .compact-hero.mobile-product-hero [data-hero-copy] > h1 {
    font-size: clamp(26px, calc(3vw - 4px), 39px);
  }
  body main .compact-hero.mobile-product-hero [data-hero-copy] > [data-hero-primary] {
    order: 3;
    align-self: stretch;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.3;
    margin: 0;
    text-align: center;
  }
  body main .compact-hero.mobile-product-hero :is(.dc-grid, .hero-grid) > figure,
  body main .compact-hero.mobile-product-hero .hero-visual > :is(figure, .mobile-hero-media) {
    order: 2;
    position: relative;
    width: 100%;
    min-width: 0;
    height: clamp(80px, calc(100svh - 430px), 190px);
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
    overflow: hidden;
    border-radius: 14px 36px 14px 14px;
  }
  body main .compact-hero.mobile-product-hero :is(figure, .mobile-hero-media) > img {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    border-radius: inherit;
  }
  body main .compact-hero.mobile-product-hero :is(figcaption, .image-caption) {
    display: none;
  }
}
@media (max-width: 700px) {
  body main .compact-hero.mobile-product-hero [data-hero-copy] > h1 {
    font-size: clamp(25px, calc(7vw - 4px), 34px);
  }
  body.consumer-products main .compact-hero.mobile-product-hero [data-hero-copy] > h1 {
    font-size: clamp(26px, calc(3vw - 4px), 39px);
  }
}
