/* Team profiles keep the desktop editorial alignment on narrow screens. */
@media (max-width: 768px) {
  /* Offset the hero grid's extra gutter so its copy aligns with later sections. */
  .team-profile .team-hero-copy {
    margin-inline: -2rem;
  }

  .team-profile .team-hero-copy h1,
  .team-profile .team-hero-copy p,
  .team-profile .justify-body,
  .team-profile .justify-body p {
    text-align: left !important;
  }

  .team-profile .team-hero-copy,
  .team-profile .team-hero-copy p,
  .team-profile .justify-body,
  .team-profile .justify-body p,
  .team-profile .justify-body li {
    -webkit-hyphens: none;
    hyphens: none;
    word-spacing: normal;
  }

  /* These wrappers borrow button styling, not the home page's bottom spacing. */
  .team-profile .emma-booking-cta,
  .team-profile .emily-booking-cta,
  .team-profile .jessica-booking-cta,
  .team-profile .hayden-booking-cta {
    padding-bottom: 0;
  }
}

/* Keep every navigation link reachable on shorter phones and in landscape. */
@media (max-width: 1023px) {
  .team-profile #mobileMenu {
    z-index: 60;
    overflow-y: auto;
    overscroll-behavior: contain;
    justify-content: flex-start;
    padding: 5.5rem 1.5rem 2.5rem;
  }

  .team-profile #mobileMenu > * {
    flex-shrink: 0;
  }

  .team-profile #mobileMenu > a:first-of-type {
    margin-top: auto;
  }

  .team-profile #mobileMenu > a:last-child {
    margin-bottom: auto;
  }

  .team-profile #menuClose {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
}
