/* Portrait slides: separate, maskable photo layers keep faces clear of editable copy. */
.heroSlide.team {
  background-color: #073458 !important;
  background-image: none !important;
}

.heroSlide.family1 {
  background-color: #073458 !important;
  background-image: url("assets/user-supplied/david-rosenblatt-grey-suit-toronto-night-high-resolution.jpg") !important;
  background-position: center 48% !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.heroSlide.family2 {
  background-color: #073458 !important;
  background-image: none !important;
}

.heroSlide.team::before,
.heroSlide.family1::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
}

.heroSlide.family1::before {
  display: none !important;
}

.heroSlide.family2::before {
  content: "";
  position: absolute;
  inset: 0 0 0 28%;
  z-index: 0;
  pointer-events: none;
  background-image: url("assets/david-team-client-meeting-office.jpg");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: auto 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 12%, #000 28%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 12%, #000 28%);
}

.heroSlide.family2::after {
  background: linear-gradient(90deg, rgba(7, 52, 88, 0.98) 0%, rgba(7, 52, 88, 0.94) 27%, rgba(7, 52, 88, 0.66) 40%, rgba(7, 52, 88, 0.2) 51%, rgba(7, 52, 88, 0) 61%) !important;
}

.heroSlide.team::after,
.heroSlide.family1::after {
  z-index: 1;
  pointer-events: none;
}

.heroSlide.team .heroContent,
.heroSlide.family1 .heroContent,
.heroSlide.family2 .heroContent {
  position: relative;
  z-index: 2;
}

.heroCredentialCluster {
  position: absolute;
  z-index: 3;
  right: clamp(24px, 4vw, 68px);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px 10px 10px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 15px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 15px 34px rgba(0, 0, 0, .28);
  backdrop-filter: blur(8px);
}

.heroCredentialCluster .yearsBadge {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.heroCredentialCluster .csBadge {
  width: 205px;
  max-height: 72px;
  object-fit: contain;
}

@media (min-width: 981px) {
  .heroSlide.team::before {
    background-image: url("assets/ril-current-group-photo-hires.webp");
    background-position: right center;
    background-size: contain;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .heroSlide.team::after {
    background: linear-gradient(90deg,
      #073458 0%,
      #073458 30%,
      rgba(7, 52, 88, 0.98) 38%,
      rgba(7, 52, 88, 0.86) 47%,
      rgba(7, 52, 88, 0.58) 57%,
      rgba(7, 52, 88, 0.26) 68%,
      rgba(7, 52, 88, 0.08) 78%,
      rgba(7, 52, 88, 0) 88%) !important;
  }

  .heroSlide.team .heroContent {
    max-width: min(36vw, 470px) !important;
  }

  .heroSlide.team .heroContent h1 {
    max-width: 470px !important;
    font-size: clamp(48px, 4.1vw, 64px) !important;
  }

  .heroSlide.team .heroContent p {
    max-width: 450px !important;
  }

  .heroSlide.family1::after {
    background: linear-gradient(90deg, rgba(7, 52, 88, 0.98) 0%, rgba(7, 52, 88, 0.95) 23%, rgba(7, 52, 88, 0.82) 33%, rgba(7, 52, 88, 0.5) 41%, rgba(7, 52, 88, 0.16) 48%, rgba(7, 52, 88, 0) 55%) !important;
  }

  .heroSlide.family1 .heroContent {
    max-width: min(39vw, 500px) !important;
  }

  .heroSlide.family1 .heroContent h1 {
    max-width: 500px !important;
    font-size: clamp(48px, 4.3vw, 66px) !important;
  }

  .heroSlide.family1 .heroContent p {
    max-width: 470px !important;
  }
}

@media (min-width: 651px) and (max-width: 980px) {
  .heroSlide.team::before {
    background-image: url("assets/ril-current-group-photo-hires.webp");
    background-position: right center;
    background-size: contain;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .heroSlide.team::after {
    background: linear-gradient(90deg,
      #073458 0%,
      rgba(7, 52, 88, 0.98) 30%,
      rgba(7, 52, 88, 0.82) 44%,
      rgba(7, 52, 88, 0.48) 57%,
      rgba(7, 52, 88, 0.14) 70%,
      rgba(7, 52, 88, 0) 84%) !important;
  }

  .heroSlide.family1::after {
    background: linear-gradient(90deg, rgba(7, 52, 88, 0.98) 0%, rgba(7, 52, 88, 0.94) 28%, rgba(7, 52, 88, 0.72) 39%, rgba(7, 52, 88, 0.28) 50%, rgba(7, 52, 88, 0) 61%) !important;
  }

  .heroSlide.team .heroContent,
  .heroSlide.family1 .heroContent {
    max-width: 44vw !important;
  }

  .heroSlide.team .heroContent h1,
  .heroSlide.family1 .heroContent h1 {
    max-width: 44vw !important;
    font-size: clamp(46px, 5.6vw, 58px) !important;
  }

  .heroSlide.team .heroContent p,
  .heroSlide.family1 .heroContent p {
    max-width: 42vw !important;
  }
}

@media (max-width: 650px) {
  .heroSlide.team::before,
  .heroSlide.family1::before {
    background-position: center top;
    background-size: auto 58%;
    -webkit-mask-image: radial-gradient(ellipse 95% 65% at 52% 18%, #000 0 46%, transparent 78%);
    mask-image: radial-gradient(ellipse 95% 65% at 52% 18%, #000 0 46%, transparent 78%);
  }

  .heroSlide.team::before {
    background-image: url("assets/ril-current-group-photo-hires.webp");
  }

  .heroSlide.team::after,
  .heroSlide.family1::after {
    background: linear-gradient(180deg,
      rgba(7, 52, 88, 0.02) 0%,
      rgba(7, 52, 88, 0.12) 34%,
      rgba(7, 52, 88, 0.48) 50%,
      rgba(7, 52, 88, 0.88) 64%,
      #073458 78%) !important;
  }

  .heroSlide.family1 {
    background-position: 61% top !important;
    background-size: auto 58% !important;
  }

  .heroSlide.family2::before {
    inset: 0;
    background-position: center top;
    background-size: auto 58%;
    -webkit-mask-image: radial-gradient(ellipse 110% 67% at 50% 16%, #000 0 48%, transparent 79%);
    mask-image: radial-gradient(ellipse 110% 67% at 50% 16%, #000 0 48%, transparent 79%);
  }

  .heroSlide.family2::after {
    background: radial-gradient(ellipse 125% 78% at 50% 0, rgba(7, 52, 88, 0.02) 0 45%, rgba(7, 52, 88, 0.76) 70%, #073458 100%) !important;
  }

  .heroSlide.family1 .heroContent {
    padding-top: 455px !important;
  }

  .heroCredentialCluster {
    top: 358px;
    right: 14px;
    bottom: auto;
    gap: 7px;
    padding: 6px 9px 6px 6px;
  }

  .heroCredentialCluster .yearsBadge {
    width: 68px;
    height: 68px;
  }

  .heroCredentialCluster .csBadge {
    width: 155px;
    max-height: 56px;
  }
}

/* Keep the Visitor Visas card visually distinct from the PR-card airplane image. */
.goalGrid .goalCard:last-child .goalPhoto {
  background-image: url("assets/pdf-621f3bbd/niagara-falls-twilight.jpg") !important;
  background-position: center 48% !important;
}
