.team {
  margin-bottom: 90px;
}

.team__title.page-title {
  margin-bottom: 50px;
}

.team__wrapper {
  position: relative;
  padding-top: 32px;
  border-top: 2px solid var(--color-coral);
}

.team__company:not(:last-child) {
  margin-bottom: 46px;
}

.team__image {
  filter: brightness(0) invert(1);
}

.team__name {
  margin-top: 55px;
  margin-bottom: 16px;
  font-family: var(--font-family-manrope);
  font-size: 32px;
  font-weight: 400;
  line-height: 120%;
}

.team__role {
  color: var(--color-gray);
}

.team__description {
  margin-top: 28px;
  margin-bottom: 60px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out 0.01s;
}

.team__description p:first-child {
  margin-top: 0;
}

.team__description p:last-child {
  margin-bottom: 0;
}

.team__company {
  max-height: 320px;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.team__company_expanded .team__description {
  opacity: 1;
}

.team__button {
  position: absolute;
  top: 32px;
  right: 8px;
  width: 51px;
  min-width: 48px;
  max-width: 48px;
  height: 50px;
  padding: 0;
  color: inherit;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transform: rotateZ(405deg);
  transition:
    color 0.15s linear,
    transform 0.5s ease-in-out;
  outline: none;
}

.team__company_expanded .team__button {
  transform: rotateZ(0);
}

.team__button:hover {
  color: var(--color-coral);
}

.team__button svg {
  width: 51px;
  height: 50px;
  fill: #ffffff;
}

@media (min-width: 576px) {
  .team__company {
    max-height: 270px;
  }
}

@media (min-width: 768px) {
  .team__wrapper {
    display: flex;
    column-gap: 68px;
  }

  .team__logo {
    width: 220px;
    flex-shrink: 0;
  }

  .team__name {
    margin-top: 0;
    padding-right: 50px;
  }
}

@media (min-width: 992px) {
  .team__title.page-title {
    margin-bottom: 0;
    padding-top: 0;
  }

  .team__company {
    max-height: 260px;
  }

  .team__wrapper {
    margin-left: 300px;
  }

  .team__name {
    margin-bottom: 18px;
    padding-right: 50px;
    font-size: 35px;
  }
}

@media (min-width: 1200px) {
  .team__wrapper {
    margin-left: 345px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team__button {
    transition: none;
  }
}
