.repeater-section > .row {
  padding: 0;
  max-width: 940px;
}

.team-container {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-evenly;
}

.team-member {
  padding: 0;
  max-width: 320px;
  padding-bottom: 100px;
  order: 0;
  color: #000;
  transition: color 0.5s;
}

.team-member.before-even {
  order: 1;
}

.member-info {
  position: relative;
  margin: 0 auto;
}

.member-info::before {
  content: '';
  display: block;
  position: absolute;
  top: 160px;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  z-index: -1;
  width: 0;
}

.member-short-info {
  max-width: none;
  margin: 0 auto;
  transition: margin 0.5s;
  cursor:pointer;
}

.member-photo-wrapper {
  width: 100%;
  max-width: 100vw;
  max-height: 320px;
  text-align: center;
  position: relative;
  cursor: pointer;
}

.member-photo {
  width: 100%;
  filter: grayscale(1);
  transition: filter 0.5s;
  object-fit: contain;
}

.member-photo:hover {
  filter: grayscale(0);
}

@media (pointer: fine) { 
  .member-photo:hover {
    filter: grayscale(0);
  } 
}
/* disable hover on mobile devices*/
@media (pointer: coarse) {
  .member-photo:hover {
    filter: grayscale(1);
  } 
}

@media (-moz-touch-enabled: 0), (pointer: fine) {
  .member-photo-wrapper::after {
    content: '';
    display: block;
    position: absolute;  
    height: 2px;
    width: 0;
    bottom: 0;
    background-color: #fff;
    transition: width 0.5s;
  }
  
  .member-photo-wrapper:hover::after {
    width: 100%;
  }
}

.member-name {
  margin: 25px 0 12px;
  max-width: 100vw;
  font-family: 'Biotif-Bold';
  text-transform: uppercase;
  font-size: 34px;
  text-align: center;
  line-height: 0.85;
}

.uk-ua .member-name {
  line-height: 1;
}

.member-position {
  max-width: 100vw;
}

.member-name .first-name {
  display: block;
}

.member-name .last-name {
  display: inline-block;
  border-bottom: 2px #000 solid;
  padding-bottom: 12px;
}

.member-full-bio,
.member-position {
  font-family: 'Biotif-Regular';
  font-size: 24px;
  line-height: 1.1;
  text-align: center;
}

.member-full-bio {
  line-height: 1.17;
  opacity: 0;
  transition: opacity 0.5s;
  max-height: 0;
  font-size: 15px;
  line-height: 1.5;
  text-align: justify;
  padding: 0 15px;
}

.member-full-bio p {
  display: none;
  margin: 10px 0;
}

.member-close-btn {
  cursor: pointer;
  position: absolute;
  display: block;
  top: 120px;
  right: 20px;
  border: none;
  background: none;
  font-size: 50px;
  height: 20px;
  width: 20px;
  padding: 0;
  opacity: 0;
  transition: opacity 0.5s;
  visibility: hidden;
  z-index: -1;
}

.member-close-btn:hover,
.member-close-btn:focus {
  box-shadow: none;
  outline: none;
}

.member-close-btn {
  transition: transform 0.3s;
}

.member-close-btn span {
  display: none;
  visibility: hidden;
  text-align: center;
  line-height: 20px;
}

.member-close-btn::after,
.member-close-btn::before {
  content: '';
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  height: 2px;
  width: 30px;
  background-color: #000;
}

.member-close-btn::after {
  transform: translate(-50%, -50%) rotate(45deg);
}
.member-close-btn::before {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.team-member.open {
  left: 0;
  z-index: 2;
  max-width: none;
  padding-top: 160px;
  color: #000;
  flex-basis: 100%;
}

.team-member.open .member-photo {
  filter: grayscale(0);
}

@media (hover: none) {
  .team-member:not(.open) .member-photo {
    filter: grayscale(1);
  }
  
  .team-member.open .member-photo {
    filter: grayscale(0);
  }
}

.team-member.open ~ .team-member {
  order: 1;
}

.team-member.open .member-info::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  transform: scale(5, 1);
  height: 100%;
  width: 100%;
  background: #e2e2e2;
  transition: width 0.5s, transform 0.5s, background-color 0.5s;
}

.team-member.open .member-info {
  width: 100%;  
  padding: 160px 0 120px;
}

.team-member.is-closing .member-info::before {
  transition: background-color 0.5s, width 0s 0.5s, transform 0s 0.5s;
  background-color: transparent;
}

.team-member.open .member-short-info {
  margin: 0;
  position: relative;
  
}


.team-member.open:last-child:nth-child(2n-1) {
  padding-bottom: 0;
}

@media (max-width: 767px) {
.team-member.open:last-child {
  padding-bottom: 0;
}
}

.team-member.open:nth-child(2n) .member-short-info {
  margin-left: auto;
}

.team-member.open .member-photo-wrapper {
  position: absolute;
  left: 0;
  top: -345px;
}

.team-member.open .member-photo-wrapper::after {
  width: 100%;
}

.team-member.open .member-name .last-name {
  border-color: rgba(0, 0, 0, 0.4);
}

.team-member.open .member-full-bio {
  opacity: 1;
  max-height: 4000px;
}

.team-member.open .member-full-bio p {
  display: block;
}

.team-member.is-closing .member-full-bio {
  opacity: 0;
}

.team-member.open .member-close-btn {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.team-member.is-closing .member-close-btn {
  opacity: 0;
  transition: opacity 0;
}

@media (max-width: 1024px) {
  .repeater-section > .row {
    padding: 0 20px;
  }
}

@media (max-width: 767px) {
  .team-container {  
    flex-direction: column;
    display: block;
  }
  
  .team-member {
    max-width: none;
  }
  
  .team-member.before-even {
    order: 0;
  }
    
  .team-member.open ~ .team-member {
    order: 0;
  }
  
  .team-member.open {
    padding-bottom: 60px;
  }
  
  .team-member.open .member-short-info {
    margin: 0 auto;
    position: static;
  }
  
  .team-member.open .member-photo-wrapper {
    left: 50%;
    transform: translateX(-50%);
    top: -160px;
  }
    
  
  .team-member.open:nth-child(2n) .member-close-btn,
  .member-close-btn {
    top: 185px;
    left: auto;
  }
  
  .member-full-bio {
    font-size: 14px;
    line-height: normal;
  }
}

@media (max-width: 480px) {
  .member-info {
    max-width: 100vw;
  }
  .member-short-info {
    width: 100%;
    margin: 0 auto !important;
  }
  
  
  .member-full-bio {
    font-size: 14px;
    line-height: normal;
  }
  
  .team-member.open:nth-child(2n) .member-close-btn,
  .team-member.open .member-close-btn {
    top: 175px;
    left: auto;
    right: 0;
  }
}



@media (max-width: 370px) {
  
  .team-member.open {
    padding-top: 0;
  }
  
  .team-member.open .member-info {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 60px;
  }
  .member-name {
    margin-top: 50px;
  }
  
  .team-member.open .member-photo-wrapper,
  .team-member .member-photo-wrapper {
    position: static;
    transform: translateX(0);
  }
  .team-member.open .member-info::before {
    top: 45vw;
    bottom: 0;
    height: auto;
  }  
  
  .team-member.open:nth-child(2n) .member-close-btn,
  .team-member.open .member-close-btn {
    top: 90vw;
    left: auto;
    margin: 15px 0;
  }
}