.team {
  margin-bottom: 40px;
}

.team__members {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 104px 20px;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: start;
  justify-items: center;
}

@media only screen and (max-width: 1439px) {
  .team__members {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 50px 16px;
  }
}
@media only screen and (max-width: 767px) {
  .team__members.overlay::before {
    position: fixed;
    top: 0;
    right: -40px;
    bottom: 0;
    left: -40px;
    z-index: 2;
    background: #004869;
    opacity: 0.5;
    content: "";
  }
}
@media only screen and (max-width: 767px) {
  .team__members {
    grid-template-columns: repeat(2, 1fr);
    gap: 50px 16px;
  }
}
@media only screen and (max-width: 500px) {
  .team__members {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 48px 10px;
  }
  .team__members.hover::before {
    right: -30px;
    left: -30px;
  }
}
@media only screen and (max-width: 420px) {
  .team__members {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}
.team__member {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 300px;
  text-decoration: none;
}

@media only screen and (max-width: 767px) {
  .team__member:nth-child(even).active .team__member-content {
    right: 0;
    left: auto;
  }
  .team__member:nth-child(even).active .team__member-content::before {
    right: 0;
    left: auto;
  }
}
.team__member .team__member-position,
.team__member .team__member-description {
  color: #FFFFFF;
}

.team__member.a {
  cursor: pointer;
}

.team__member.active {
  z-index: 2;
}

.team__member-content {
  position: static;
}

.team__member-content.expanded {
  position: absolute;
  top: 235px;
  z-index: 1;
  width: 0;
  height: 0;
  opacity: 0;
}

@media only screen and (max-width: 767px) {
  .team__member-content.expanded {
    top: 157px;
  }
}
.team__member-content.expanded::before {
  position: absolute;
  z-index: -1;
  border-radius: 21px;
  opacity: 0;
  -webkit-transition: opacity 0.2s linear;
  transition: opacity 0.2s linear;
  content: "";
}

.team__member-content .team__member-name {
  margin-bottom: 2px;
}

@media only screen and (max-width: 767px) {
  .team__member-content .team__member-name {
    margin-bottom: 4px;
  }
}
.team__member-content .team__member-info {
  height: 0;
  padding-top: 27px;
  overflow: hidden;
  opacity: 0;
  -webkit-transition: opacity 0.2s linear;
  transition: opacity 0.2s linear;
}

@media only screen and (max-width: 767px) {
  .team__member-content .team__member-info {
    padding-top: 20px;
  }
}
.team__member-content .team__member-description {
  margin-bottom: 12px;
}

@media only screen and (max-width: 767px) {
  .team__member-content .team__member-description {
    margin-bottom: 9px;
    font-size: 14px;
  }
}
.team__member-content .team__member-description:last-child {
  margin-bottom: 0;
}

.team__member-image {
  position: relative;
  z-index: 3;
  width: 218px;
  height: 218px;
  margin: 0 auto 17px auto;
  overflow: hidden;
  border-radius: 50%;
}

@media only screen and (max-width: 767px) {
  .team__member-image {
    width: 143px;
    height: 143px;
    margin-bottom: 14px;
  }
}
.team__member-image::before {
  position: absolute;
  opacity: 0;
  -webkit-transition: opacity 0.2s linear;
  transition: opacity 0.2s linear;
  content: "";
}

@media only screen and (max-width: 767px) {
  .team__member-image::before {
    content: none;
  }
}
.team__member-image img {
  height: 100%;
  width: auto;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
}

.team__member-image.active {
  z-index: 2;
}

.team__member-image.active ~ .team__member-content {
  opacity: 0;
}

.team__member-image.active ~ .team__member-content.expanded {
  width: auto;
  height: auto;
  opacity: 1;
}

@media only screen and (max-width: 767px) {
  .team__member-image.active ~ .team__member-content.expanded {
    width: 355px;
    padding-right: 40px;
    padding-left: 40px;
  }
}
@media only screen and (max-width: 420px) {
  .team__member-image.active ~ .team__member-content.expanded {
    right: 0;
    left: 0;
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
  }
}
.team__member-image.active ~ .team__member-content.expanded::before {
  top: -50px;
  right: -50px;
  bottom: -40px;
  left: -50px;
  background: -webkit-gradient(linear, left bottom, left top, color-stop(11.28%, #052332), color-stop(74.09%, #1d4764));
  background: linear-gradient(0deg, #052332 11.28%, #1d4764 74.09%);
  -webkit-box-shadow: 0px 0px 60px rgba(0, 0, 0, 0.15);
          box-shadow: 0px 0px 60px rgba(0, 0, 0, 0.15);
  opacity: 1;
}

@media only screen and (max-width: 1919px) {
  .team__member-image.active ~ .team__member-content.expanded::before {
    right: -32px;
    left: -32px;
  }
}
@media only screen and (max-width: 767px) {
  .team__member-image.active ~ .team__member-content.expanded::before {
    top: -36px;
    bottom: -29px;
    left: 0;
    width: 355px;
  }
}
@media only screen and (max-width: 420px) {
  .team__member-image.active ~ .team__member-content.expanded::before {
    right: 0;
    left: 0;
    width: 100%;
  }
}
.team__member-image.active ~ .team__member-content .team__member-info {
  height: auto;
  opacity: 1;
}

.team__member-image.inactive::before {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #004869;
  opacity: 0.5;
  -webkit-transition: opacity 0.2s linear;
  transition: opacity 0.2s linear;
}