.hero-container .hero-wrapper {
  max-width: unset;
  padding: 0;
}

.hero {
  position: relative;
  padding: 40px 24px;
  min-height: 300px;
  height: 487px;
  overflow: hidden;
}

.hero h1 {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  color: var(--background-color);
}

.hero picture {
  position: absolute;
  z-index: -1;
  inset: 0;
  object-fit: cover;
  box-sizing: border-box;
}

.hero img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.hero.auto-height img,
.hero.hero.auto-height picture {
    height: auto;
}

/* Overlay layer */
.hero.hero-overlay .hero-overlay-div {
  position: absolute;
  inset: 0;
  background-color: #666;
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

/* Rounded corners when toggle is enabled */
.hero.rounded-corners picture,
.hero.rounded-corners img {
  border-radius: 40px;
}

@media (width >= 900px) {
  .hero {
    padding: 40px 32px;
  }
}

.hero.white,
.hero.white .hero-sup-heading,
.hero.white .hero-sub-heading,
.hero.white .hero-main-heading{
  color: #fff;
}

.hero.red, 
.hero.red .hero-sup-heading,
.hero.red .hero-sub-heading,
.hero.red .hero-main-heading
{
  color: #E91E1E;
}

.hero.brandcolordark,
.hero.brandcolordark .hero-sup-heading,
.hero.brandcolordark .hero-sub-heading,
.hero.brandcolordark .hero-main-heading{
  /* color: #123257; */
  color: var(--brand-color-midnight-sky);
}

.hero.brandcolorhighlight,
.hero.brandcolorhighlight .hero-sup-heading,
.hero.brandcolorhighlight .hero-sub-heading,
.hero.brandcolorhighlight .hero-main-heading{
  color: #E8F557;
}

.hero .hero-content{
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 0 0 24px;
  z-index: 1;
}

.hero .hero-main-heading{
  text-transform: uppercase;
  margin: 16px 0 0;
}

.hero .hero-sub-heading{
  font-weight: 600;
  font-size: 24px;
  line-height: 29px;
  margin-top: 8px;
  letter-spacing: 0;
}

.hero .hero-sup-heading{
  margin-bottom: 8px;
  margin-top: 0;
}

.hero .hero-content .button{
  border-radius: 4px;
  font-size: 18px;
  font-weight: 400;
  background-color: #fff;
  color: #123257;
}

.hero .hero-content .button.primary{
  background-color: #123257;
  color: #fff;
}

.hero .hero-content .button.secondary{
  /* background-color: #E91E1E; Darkened red to pass accessibility */
  background-color: #E91C1C;
  color: #fff;
  border-color:#E91C1C;
}

@media (width >= 900px){
  .hero{
    height: 503px;
  }

  .hero .hero-content{
    width: 60vw;
  }

  .hero .hero-sup-heading{
    font-size: 18px;
    text-transform: uppercase;
  }

  .hero .hero-main-heading{
    font-size: 84px;
  }
}

@media (width <= 900px){
  .hero .hero-content{
    max-width: 398px;
    margin: auto;
  }

  .hero .hero-sub-heading{
    font-weight: 400;
  }
}

@media (width >= 1920px){
  .hero{
    height: 671px;
  }

  .hero .hero-content{
    bottom: 81px;
    margin: 0 0 0 60px;
  }
}

@media (width >= 1020px){
  .hero .hero-content{
    bottom: 46px;
    margin: 0 0 0 32px;
  }
}

/* Text alignment styles */
.hero.text-center .hero-content {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.hero.text-right .hero-content {
  text-align: right;
  margin-left: auto;
  margin-right: 32px;
  left: auto;
  right: 0;
}

/* Adjust button alignment for centered text */
.hero.text-center .button-container {
  justify-content: center;
}

/* Adjust button alignment for right-aligned text */
.hero.text-right .button-container {
  justify-content: flex-end;
}

/* Mobile adjustments for aligned text */
@media (width <= 900px) {
  .hero.text-center .hero-content {
    margin-left: 24px;
    margin-right: 24px;
    transform: none;
    left: 0;
    right: 0;
  }
  
  .hero.text-right .hero-content {
    margin-right: 24px;
  }
}