/* Banner Gradient color assignment */
.banner-container.amber-orange {
  --gradient-color: var(--brand-amber-orange);
}

.banner-container.green {
  --gradient-color: var(--brand-apple-green);
}

.banner-container.tangerine-hero {
  --gradient-color: var(--brand-tangerine);
}

.banner-container.poseidon {
  --gradient-color: var(--brand-poseidon);
}

.banner-container.midnight-blue {
  --gradient-color: var(--brand-midnight-blue);
}

.banner-container.blue-ivy {
  --gradient-color: var(--brand-blue-ivy);
}

.banner-container.fuego {
  --gradient-color: var(--brand-fuego);
}

.banner-container.cerulean-blue {
  --gradient-color: var(--brand-cerulean-blue);
}

.banner-container.deep-sky-blue {
  --gradient-color: var(--brand-deep-sky-blue);
}

.banner-container.cerulean-blue {
  --gradient-color: var(--brand-cerulean-blue);
}

.banner-container.picton-blue {
  --gradient-color: var(--brand-picton-blue);
}
/* End of Banner Gradient color assignment */

/* Gradient position on mobile: which end the solid color and content sit at.
   The image is anchored to the opposite end so its visible part isn't covered. */
.banner-container {
  --gradient-direction: to bottom;
  --image-position: bottom center;
  --gradient-start: 36.07%;
  --gradient-end: 53.57%;
}

/* Bottom: the content usually runs long on mobile, so the colour fades in
   over a taller area to keep the text readable above the solid part. */
.banner-container.gradient-bottom {
  --gradient-direction: to top;
  --image-position: top center;
  --gradient-start: 20%;
  --gradient-end: 75%;
  align-items: end;
}
/* End of Gradient position */

.banner-container .section-title {
  margin-bottom: 0 !important;
}

.banner-container .section-title__heading {
  /* Added a 20px mb to add to the 20px gap, to make a 40px space between the title and description */
  margin-bottom: 1.25rem !important;
}

.banner-container .white .section-title__subtitle,
.banner-container .white .section-title__heading,
.banner-container .white .section-description {
  color: var(--brand-off-white);
}

.banner-container {
  min-height: 45rem;
  display: flex;
  align-items: start;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

.banner-container.lg {
  min-height: 52.5rem;
}

.banner-container img.banner {
  z-index: 1;
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--image-position);
}

.banner-container::before {
  z-index: 2;
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(var(--gradient-direction), var(--gradient-color) var(--gradient-start), transparent var(--gradient-end));
}

.banner-container::after {
  z-index: 3;
  content: '';
  position: absolute;
  background-size: cover;
  background-position: top right;
}

.banner-container .section-title-container {
  z-index: 4;
  position: relative;
  width: 100%;
}

.banner-container .button-link {
  margin-top: 1.25rem;
}

.center-on-mobile {
  align-items: center;
  text-align: center;
}

.banner-container.partner-with-us-accent::after {
  background-image: url('../../images/accents/partner-with-us-accent.svg');
  height: 213px;
  width: 770px;
  bottom: 0;
  right: -2.5rem;
}

/* About size: rounded bottom, description pushed to the bottom on desktop */
.banner-container.about {
  min-height: 52.5rem;
  border-radius: 0 0 2.5rem 2.5rem;
}

.banner-container.about .section-title__heading {
  margin-bottom: 2rem !important;
}

.banner-container.about.partner-with-us-accent::after {
  height: 191px;
  width: 820px;
  bottom: 0;
  right: -11.25rem;
}
/* End of About size */

@media (min-width: 500px) {
  .banner-container img.banner {
    --image-position: center
  }
}

@media (min-width: 768px) {
  .banner-container,
  .banner-container.gradient-bottom {
    --gradient-direction: to right;
    --image-position: 75% center;
    --gradient-start: 36.07%;
    --gradient-end: 53.57%;
    align-items: center;
  }

  .banner-container.about {
    min-height: 40rem;
  }

  .banner-container.about .section-title-container {
    display: flex;
    flex-direction: column;
    min-height: 40rem;
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .banner-container.about .section-title {
    flex: 1;
  }

  .banner-container.about .section-title__heading {
    margin-bottom: auto !important;
  }

  .banner-container.about.partner-with-us-accent::after {
    height: 261px;
    width: 70rem;
    bottom: -30px;
    right: 0;
  }

  .center-on-mobile {
    align-items: start;
    text-align: left;
  }

  .banner-container.partner-with-us-accent::after {
    height: 261px;
    width: 80rem;
    bottom: 0;
    right: -30px;
  }
}

@media (min-width: 1600px) {
  .banner-container,
  .banner-container.gradient-bottom {
    --image-position: center right;
  }
}
