.referral-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 420px;
  overflow: hidden;
  background: #f8fcff;
}

.referral-hero-photo {
  position: absolute;
  inset: 0 0 0 38%;
  background: url('../assets/images/referral-hero.webp?v=20261019.6') center 48% / cover no-repeat;
}

.referral-hero-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-fade-partial);
}

.referral-hero-inner {
  position: relative;
  z-index: 1;
}

.referral-hero h1 {
  max-width: 610px;
  margin: 22px 0 14px;
  font-size: clamp(41px, 4.9vw, 66px);
  line-height: 1.02;
  letter-spacing: -.02em;
}

.referral-hero em,
.referral-how em,
.referral-fee em {
  color: #0aa0e8;
  font-style: normal;
}

.referral-hero p {
  max-width: 435px;
  margin-bottom: 20px;
  line-height: 1.48;
}

.referral-hero .button {
  min-width: 190px;
}

.referral-how {
  background: #fff;
  text-align: center;
}

.referral-how .section-label {
  justify-content: center;
}

.referral-how h2 {
  margin: 0 0 33px;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.referral-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
}

.referral-timeline::before {
  content: '';
  position: absolute;
  top: 21px;
  left: 16.67%;
  right: 16.67%;
  height: 1px;
  background: #0ca2e7;
}

.referral-step {
  position: relative;
}

.referral-step-number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin-inline: auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(130deg, #0baae9, #087acb);
  font-size: 16px;
  font-weight: 700;
}

.referral-step h3 {
  margin: 17px 0 8px;
  color: #081773;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.referral-step p {
  max-width: 270px;
  margin: 0 auto;
  color: #4e70bb;
  line-height: 1.48;
}

.referral-why {
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, #e3f6ff, #f4fbff);
}

.referral-why-photo {
  position: absolute;
  inset: 0 51% 0 0;
  background: url('../assets/images/referral-guidance.webp?v=20261019.6') center 45% / cover no-repeat;
}

.referral-why-inner {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.referral-why-copy {
  width: 45%;
}

.referral-why .section-label {
  margin-bottom: 11px;
}

.referral-benefit {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}

.referral-benefit + .referral-benefit {
  border-top: 1px solid #a5ceeb;
}

.referral-icon {
  display: grid;
  place-items: center;
  width: 77px;
  height: 77px;
  border-radius: 50%;
  background: #ffffff;
  color: #07157d;
}

.referral-icon svg,.referral-icon img {
  width: 47px;
  height: 47px;
}

.referral-benefit h3 {
  margin: 0 0 5px;
  color: #081773;
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -.02em;
}

.referral-benefit p {
  margin: 0;
  color: #4c70b8;
  line-height: 1.42;
}

.referral-fee {
  position: relative;
  overflow: hidden;
  color: #09285f;
  background: #fff;
}

.referral-fee .section-label.light {
  color: #5274b3;
}

.referral-fee-inner {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.referral-fee-details {
  border-left: 1px solid #b7dceb;
  padding-left: 48px;
}

.referral-fee h2 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.referral-fee p {
  max-width: 600px;
  margin: 0;
  line-height: 1.5;
}

.referral-fee .button {
  margin-top: 20px;
}

.referral-fee .button-outline {
  color: #09285f;
  border-color: #09285f;
}

.referral-fee .button-outline:hover {
  background: #e3f6ff;
}

@media (max-width: 900px) {
  .referral-hero {
    min-height: 460px;
  }

  .referral-hero-photo {
    left: 30%;
  }

  .referral-hero-photo::before {
    background: var(--hero-fade-tablet);
  }

  .referral-hero h1 {
    font-size: clamp(39px, 5vw, 54px);
  }

  .referral-why-photo {
    right: 53%;
  }

  .referral-why-copy {
    width: 44%;
  }

  .referral-benefit {
    grid-template-columns: 61px 1fr;
    gap: 10px;
  }

  .referral-icon {
    width: 58px;
    height: 58px;
  }

  .referral-icon svg,.referral-icon img {
    width: 36px;
    height: 36px;
  }

  .referral-benefit h3 {
    font-size: 18px;
  }

  .referral-fee-inner {
    gap: 28px;
  }

  .referral-fee-details {
    padding-left: 28px;
  }
}

@media (max-width: 650px) {
  .referral-hero {
    min-height: clamp(700px, 165vw, 850px);
    padding-block: 50px;
    align-items: flex-start;
  }

  .referral-hero-photo {
    inset: 0;
    background-image: url('../assets/images/referral-hero-mobile.webp?v=20261019.6');
    background-position: center;
  }

  .referral-hero-photo::before {
    background: var(--hero-fade-mobile);
  }

  .referral-hero h1 {
    font-size: clamp(35px, 9vw, 49px);
  }

  .referral-hero p {
    max-width: 360px;
  }

  .referral-how .section-label {
    justify-content: flex-start;
  }

  .referral-how {
    text-align: left;
  }

  .referral-how h2 {
    margin-bottom: 20px;
  }

  .referral-timeline {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .referral-timeline::before {
    display: none;
  }

  .referral-step {
    text-align: center;
  }

  .referral-step h3 {
    margin: 12px 0 6px;
    font-size: 21px;
  }

  .referral-why {
    display: flex;
    flex-direction: column;
    padding-block: 50px;
  }

  .referral-why-inner {
    order: 1;
    display: block;
  }

  .referral-why-copy {
    width: 100%;
  }

  .referral-why-photo {
    position: relative;
    order: 2;
    inset: auto;
    width: 100%;
    height: 265px;
    margin-top: 30px;
    margin-bottom: -50px;
    background-position: center 43%;
  }

  .referral-benefit {
    grid-template-columns: 61px 1fr;
    gap: 14px;
  }

  .referral-fee-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .referral-fee-details {
    border-left: 0;
    border-top: 1px solid #b7dceb;
    padding: 24px 0 0;
  }
}
