/* Landing hero refinement for the homepage, affiliates and businesses pages.
   Every rule is scoped to .hero-refine, the hero container on each page. */

/* Desktop and large tablet (992px and up): wider text column, headline and lead sized so the
   copy wraps to a few lines and the hero stays close in height to its image. */
@media (min-width: 992px) {
  .hero-refine .hero-text {
    flex: 0 0 auto;
    width: 58%;
    max-width: 58%;
  }
  .hero-refine .hero-media {
    flex: 0 0 auto;
    width: 42%;
    max-width: 42%;
  }
  .hero-refine h1 {
    font-size: 2.1rem !important;
    line-height: 1.18;
  }
  .hero-refine p.lead {
    font-size: 0.9rem !important;
    line-height: 1.6;
  }
}

/* Headline and lead line breaks: balance the headline so no single word is left alone on a line,
   and avoid a short last line in the description. Both are progressive enhancements. */
.hero-refine h1 {
  text-wrap: balance;
}
.hero-refine p.lead {
  text-wrap: pretty;
}

/* Below 992px: the CTA row wraps, each button stays inside the viewport, and the hero image is
   capped and centred so it does not fill a tablet screen above the text. */
@media (max-width: 991.98px) {
  .hero-refine .hero-media {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-refine .hero-actions {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .hero-refine .hero-actions .btn {
    max-width: 100%;
    white-space: normal;
  }
}

/* Phones: comfortable lead size and CTA padding that fits a 360px viewport. */
@media (max-width: 575.98px) {
  .hero-refine p.lead {
    font-size: 0.9rem !important;
    line-height: 1.6;
  }
  .hero-refine .hero-actions .btn {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}
