/**********************/
/* Team page */
/********************/

.team-section__row {
  display: flex;
  flex-wrap: wrap;
  column-gap: 3.4rem;
  row-gap: 7.2rem;
  margin-top: 8rem;
}

/* @media only screen and (max-width: 600px) {
  .team-section__row {
    flex-direction: column;
    gap: 2.4rem;

    justify-content: center;
    align-items: center;
  }
} */

.team-card {
  position: relative;
  width: 100%;
  max-width: 30%;
}

@media screen and (max-width: 800px) {
  .team-card {
    max-width: calc(50% - 1.7rem); /* perfect 2 cards with gap */
  }
}

@media screen and (max-width: 500px) {
  .team-card {
    max-width: 100%;
  }
}

.team-card:hover .team-card__front-photo {
  opacity: 0.1;
}
.team-card__front {
  z-index: 1;
}

.team__heading {
  font-size: 6.4rem;
  font-weight: 100;
  text-align: center;
  margin-top: 8rem;
  padding-bottom: 3rem;

  @media only screen and (max-width: 37.5em) {
    font-size: 5.2rem;
  }

  @media only screen and (max-width: 375px) {
    font-size: 4.2rem;
  }
}

.team-card__front-photo-box {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 1rem;
  background-image: linear-gradient(to right, #f8f9fa, #e9ecef);
  position: relative;

  /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);  */
}
.team-card__front-photo-box::after {
  content: "";
  display: block;
  width: 34.3rem;
  height: 8.2rem;
  background-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 20%,
    rgba(0, 0, 0, 0.4) 60%,
    rgba(0, 0, 0, 0)
  );

  position: absolute;
  top: 76%;
  right: 0;
}

.team-card:hover .team-card__front-photo-box::after {
  opacity: 0;
}

@media only screen and (max-width: 800px) {
  .team-card__front-photo-box::after {
    top: 62%;
  }
}

@media only screen and (max-width: 650px) {
  .team-card__front-photo-box::after {
    width: 14.3rem;
    height: 7.2rem;
    top: 58%;
  }
}

@media only screen and (max-width: 600px) {
  .team-card__front-photo-box::after {
    width: 16.3rem;
    height: 8.2rem;
    top: 75%;
  }
}

.team-card__front-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__front-meta {
  position: absolute;
  top: 82%;
  left: 10%;
  z-index: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

@media only screen and (max-width: 800px) {
  .team-card__front-meta {
    top: 68%;
  }
}

@media only screen and (max-width: 650px) {
  .team-card__front-meta {
    top: 62%;
    right: 14%;
  }
}

@media only screen and (max-width: 600px) {
  .team-card__front-meta {
    top: 78%;
    right: 11%;
  }
}

.team-card:hover .team-card__front-meta {
  opacity: 0;
}

.team-card__front-name {
  font-size: 2rem;
  font-family: var(--serif-font);
  color: var(--color-white);
  margin-bottom: 0.8rem;
}

.team-card__front-role {
  font-size: 1.6rem;
  color: var(--color-white);
}

/* Card back */

.team-card__back {
  width: 100%;
  max-width: 45.8rem;
  padding: 4rem;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 1rem;
  /* 
  background-color: rgba(175, 236, 203, 0.5); */

  position: relative;
  transition: all 0.1s;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;

  opacity: 0;
  /* visibility: hidden; */
}

.team-card__back:hover {
  opacity: 1;
}

.team-card__back-socials {
  font-size: 3.2rem;
  color: var(--color-black);
  margin-bottom: 2rem;
}

.team-card__back-description {
  font-size: 1.4rem;
  line-height: 1.6;
  font-family: var(--serif-font);
}

@media only screen and (max-width: 600px) {
  .team-card__back-description {
    font-size: 1.6rem;
  }
}

.team-card__back-meta {
  position: absolute;
  top: 78%;
  right: 12%;
  z-index: 1000;
}

.team-card__back-Name {
  font-size: 2rem;
  font-family: var(--serif-font);

  margin-bottom: 1.2rem;
}

.team-card__back-role {
  font-size: 1.6rem;
}
