.balance-page {
  background-color: #ffffff;
  overflow-x: clip;
}

.balance-page main {
  overflow-x: clip;
}

.service-hero {
  position: relative;
  box-sizing: border-box;
  min-height: 650px;
  padding-top: calc(var(--header-height) + var(--header-hero-gap));
  padding-bottom: clamp(4.5rem, 9vh, 7rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: #ffffff;
  background-image: url("../img/service1bg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  margin-top:18px;
}

.service-hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: calc(var(--header-height) + var(--header-hero-gap));
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffffff 44%,
    rgba(255, 255, 255, 0.92) 54%,
    rgba(255, 255, 255, 0.55) 64%,
    rgba(255, 255, 255, 0.15) 78%,
    transparent 92%
  );
}

.service-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(94vw, 780px);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 6vw, 5rem)
    clamp(5.5rem, 12vw, 8rem);
  color: #006d5b;
}

.service-hero__line {
  display: block;
}

.service-hero__title {
  font-family: "Elms Sans", sans-serif;
  font-size: clamp(1.62rem, 3.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.22;
  margin-bottom: clamp(0.75rem, 1.8vw, 1.15rem);
}

.service-hero__text {
  font-family: "Poppins", sans-serif;
  font-size: clamp(0.92rem, 1.55vw, 1.08rem);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -0.02em;
  word-spacing: -0.06em;
  max-width: 52ch;
  margin-bottom: clamp(1.1rem, 2.2vw, 1.55rem);
  color: #006d5b;
}

@media (min-width: 993px) {
  .service-hero__content {
    margin-left: clamp(3rem, 12vw, 8rem);
    margin-top: 0;
    margin-bottom: clamp(2rem, 6vh, 4rem);
    padding-top: clamp(2rem, 4vw, 3rem);
  }

  .service-hero__title .service-hero__line {
    white-space: nowrap;
  }

  .service-hero__title {
    max-width: none;
  }
}

.service-hero__btn {
  display: inline-block;
  padding: clamp(0.95rem, 2vw, 1.15rem) clamp(2rem, 4.5vw, 2.75rem);
  background-color: #006d5b;
  color: #ffffff;
  font-family: "Elms Sans", sans-serif;
  font-size: clamp(0.72rem, 1.1vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.service-hero__btn:hover,
.service-hero__btn:focus-visible {
  background-color: #005a4b;
  transform: translateY(-1px);
}

@media (max-width: 992px) {
  .service-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100svh - var(--header-height));
    padding-top: calc(var(--header-height) + var(--header-hero-gap, 0px));
    padding-bottom: clamp(2.5rem, 6vh, 3.5rem);
    background-image: url("../img/service1bg.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
  }

  /* No overlap with the hero on small screens */
  .balance-page .class-offerings {
    margin-top: 0;
  }

  .service-hero::before {
    display: none;
  }

  /* Light overlay so the teal text stays readable over the photo */
  .service-hero__fade {
    display: block;
    position: absolute;
    inset: 0;
    top: calc(var(--header-height) + var(--header-hero-gap, 0px));
    z-index: 0;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.82) 0%,
      rgba(255, 255, 255, 0.62) 45%,
      rgba(255, 255, 255, 0.72) 100%
    );
  }

  .service-hero__content {
    position: relative;
    z-index: 1;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: clamp(2rem, 6vw, 3rem) clamp(1rem, 4vw, 1.25rem);
    text-align: center;
    box-sizing: border-box;
  }

  .service-hero__title {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
    line-height: 1.24;
  }

  .service-hero__title .service-hero__line {
    white-space: normal;
  }

  .service-hero__text {
    max-width: 34ch;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(0.88rem, 3.6vw, 1rem);
    line-height: 1.45;
  }

  .service-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .service-hero__text {
    max-width: none;
    font-size: clamp(0.86rem, 3.8vw, 0.98rem);
  }
}

@media (max-width: 480px) {
  .service-hero {
    padding-bottom: clamp(1.75rem, 4vh, 2.25rem);
  }

  .service-hero__content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .service-hero__title {
    font-size: clamp(1.28rem, 6.5vw, 1.55rem);
    line-height: 1.22;
  }

  .service-hero__btn {
    width: 100%;
    max-width: 18rem;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) and (orientation: landscape) and (max-height: 520px) {
  .service-hero {
    padding-bottom: 1rem;
  }

  .service-hero__content {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .service-hero__text {
    font-size: 0.84rem;
  }

  .service-hero__btn {
    width: auto;
    max-width: none;
  }
}
