.profile-cards {
  margin: auto;
}

.profile-cards.with-carousel {
  margin: auto;
}

.profile-cards h2 {
  text-align: center;
}

.profile-cards .carousel-slides {
  align-items: stretch;
}

.profile-cards .card-container {
  display: flex;
  flex-direction: column;
  margin: 0 16px;
  border: 1px solid var(--color-gray-200);
  flex: 1 1 0;
  border-radius: 18px;
  background-color: #f9f9f9;
}

.profile-cards .card-content {
  display: flex;
  padding: 16px 24px;
  flex-direction: column;
  justify-content: space-between;
  flex: 1 0 0;
  align-self: stretch;
}

.profile-cards .cards-wrapper {
  display: flex;
  flex-flow: row nowrap;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  gap: 32px;
}

.profile-cards.with-carousel .cards-wrapper {
  flex-direction: unset;
  margin-bottom: 0;
}

.profile-cards.single .card-container {
  display: flex;
  align-items: flex-start;
}

/* Grid variant styles - Mobile first */
.profile-cards.grid .cards-wrapper {
  display: grid;
  row-gap: 40px;
  column-gap: 23px;
  padding: 32px 16px;

}

.profile-cards.grid .card-container {
  margin: 0;
  height: 100%;
}

.profile-cards.grid .card-image-container {
  height: 213px;
}

/* Grid variants: Mobile - 1 column for all */
.profile-cards.grid.two-up .cards-wrapper,
.profile-cards.grid.three-up .cards-wrapper,
.profile-cards.grid.four-up .cards-wrapper,
.profile-cards.grid.five-up .cards-wrapper {
  grid-template-columns: 1fr;
}

.profile-cards.with-carousel .cards-wrapper .card-container {
  min-width: calc(100% - 34px);
}

.profile-cards .card-container .card-image-container {
  flex: none;
  width: 100%;
  height: 213px;
  position: relative;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

.profile-cards .card-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-cards .card-title {
  font-size: var(--type-body-xs-size);
  line-height: var(--type-body-xs-lh);;
  font-family: var(--body-font-family);
  font-style: normal;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 8px;
}

.profile-cards .card-name {
  margin-top: 0;
  font-size: var(--type-heading-l-size);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  margin-bottom: 14px;
}

.profile-cards .card-desc {
  color: #2C2C2C;
  font-family: var(--body-font-family);
  font-size: var(--type-body-xs-size);
  font-style: normal;
  font-weight: 400;
  line-height: 21px;
  margin-top: 0;
}

.profile-cards .card-social-icons {
  display: flex;
  align-items: flex-end;
  gap: 17px;
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 4px;
}

.profile-cards .card-social-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.profile-cards .card-social-icon a {
  color: var(--color-black);
}

/* Tablet and up */
@media screen and (min-width: 600px) {
  /* Grid variants: Tablet - all variants get 2 columns */
  .profile-cards.grid.two-up .cards-wrapper,
  .profile-cards.grid.three-up .cards-wrapper,
  .profile-cards.grid.four-up .cards-wrapper,
  .profile-cards.grid.five-up .cards-wrapper {
    grid-template-columns: repeat(2, 1fr);
    padding: 40px 16px;
  }
}

/* Desktop and up */
@media screen and (min-width: 900px) {
  .profile-cards h2 {
    margin-top: 13px;
    text-align: center;
    font-size: var(--type-heading-xl-size);
  }
  
  .profile-cards,
  .profile-cards .carousel-wrapper {
    max-width: 1232px;
    margin: auto;
  }

  .profile-cards .cards-wrapper {
    gap: 0;
    flex-direction: row;
    padding: 56px 0;
  }

  .profile-cards .cards-wrapper .card-image-container {
    width: auto;
    height: 306px;
  }

  .profile-cards.with-carousel .cards-wrapper .card-container {
    min-width: 377px;
  }

  .profile-cards.single .cards-wrapper .card-container {
    flex-direction: row;
  }

  .profile-cards.single.reverse .cards-wrapper .card-container {
    flex-direction: row-reverse;
  }

  .profile-cards.single .cards-wrapper .card-image-container {
    width: 50%;
    height: 396px;
    border-radius: 18px 0 0 18px;
  }

  .profile-cards.single.reverse .cards-wrapper .card-image-container {
    border-radius: 0 18px 18px 0;
  }

  .profile-cards.single .cards-wrapper .card-text-container {
    margin-top: 26.5px;
    margin-left: 15px;
  }

  .profile-cards.single .cards-wrapper .card-social-icons {
    margin-left: 15px;
  }

  .profile-cards .carousel-plugin .carousel-previous {
    left: 2px;
  }

  .profile-cards .carousel-plugin .carousel-next {
    right: 2px;
  }

  /* Grid variants: Desktop */
  .profile-cards.grid .cards-wrapper {
    padding: 56px 16px;
  }

  .profile-cards.grid.two-up .cards-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-cards.grid.three-up .cards-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }

  .profile-cards.grid.four-up .cards-wrapper {
    grid-template-columns: repeat(4, 1fr);
  }

  .profile-cards.grid.five-up .cards-wrapper {
    grid-template-columns: repeat(5, 1fr);
  }
}
