.block-profiles {
  --avatar-size: 6.5rem;
  --avatar-size-large: 11rem;
  --profile-gap: 2rem;
  --number-of-coordinators: 1;
}

.block-profiles .item-heading {
  margin-bottom: 2rem;
}

.block-profiles .block-profiles-wrapper {
  display: grid;
  grid-template-columns:
			calc(
				var(--number-of-coordinators) * var(--avatar-size-large) + var(--profile-gap) *
					(var(--number-of-coordinators) - 1)
			)
			1fr;
  gap: 4rem;
}

.block-profiles .block-profiles-wrapper.division {
  --number-of-coordinators: 2;
}

.block-profiles .profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, var(--avatar-size));
  gap: var(--profile-gap);
  align-items: flex-start;
}

.block-profiles .profiles.profiles-large {
  --avatar-size: 11rem;
  justify-content: center;
}

.block-profiles .profiles.profiles-large .profile {
  width: var(--avatar-size);
  text-align: center;
}

.block-profiles .profiles.profiles-large .profile .avatar {
  margin-bottom: 1rem;
  margin-left: auto;
  margin-right: auto;
}

.block-profiles .profiles.profiles-small {
  flex: 1;
  grid-template-columns: 1fr 1fr;
}

.block-profiles .profiles.profiles-small .profile {
  display: flex;
  gap: 0.5rem;
}

.block-profiles .profiles .profile .avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  flex-shrink: 0;
}

.block-profiles .profiles .profile .avatar img {
  width: inherit;
  height: inherit;
}

@media only screen and (max-width: 1024px) {
  .block-profiles .profiles.profiles-small {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media only screen and (max-width: 768px) {
  .block-profiles .block-profiles-wrapper {
    grid-template-columns: 1fr;
  }

  .block-profiles .profiles.profiles-large {
    grid-template-columns: 1fr 1fr;
  }

  .block-profiles .profiles.profiles-large .profile {
    margin-left: auto;
    margin-right: auto;
    width: auto;
  }

  .block-profiles .profiles.profiles-small {
    grid-template-columns: 1fr 1fr;
    gap: var(--profile-gap);
  }

  .block-profiles .profiles.profiles-small .profile {
    flex-direction: column;
    align-items: center;
  }

  .block-profiles .profiles.profiles-small .profile .info {
    text-align: center;
  }
}

@media only screen and (max-width: 600px) {
  .block-profiles {
    --profile-gap: 1.5rem
  }

  .block-profiles .profiles {
    --avatar-size: 4rem;
  }

  .block-profiles .profiles.profiles-large {
    --avatar-size: 6rem;
  }
}

@media only screen and (max-width: 480px) {
  .block-profiles .block-profiles-wrapper {
    gap: 2.5rem;
  }

  .block-profiles .profiles.profiles-large {
    grid-template-columns: 1fr;
  }
}
