.card-item {
  display: block;
  position: relative;

  & .card-content * {
    max-width: 100%;
  }

  & .card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-top: var(--wp--preset--spacing--30);
    margin-bottom: 0;
  }

  & p {
    font-size: 0.85rem;
    margin-block: 0;
  }

  & * {
    color: currentColor;
  }

  & .roles {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 15px;
  }

  & .role {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 4px;
    padding: 2px 5px;
    width: fit-content;
    max-width: 100%;
    margin-top: 0;
    max-width: 100%;
  }

  & .role.serviceLead {
    color: var(--wp--preset--color--cyan);
  }

  & .role.board {
    color: var(--wp--preset--color--pink);
  }

}


@media (max-width: 767px) {
  .card-item {
    display: flex;
    align-items: center;
    color: var(--wp--preset--color--dark);
  }
  .card-item .img-mask {
    position: relative;
    height: 0;
    width: calc(25% - 10px);
    padding-bottom: calc(25% - 10px);
    background: #000;
    box-shadow: 0 30px 70px 0px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100%;
    margin-right: 20px;
    flex-shrink: 0;
  }
  .card-item .img-mask img {
    border-radius: 100%;
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }
  .card-item .img-mask .card-img.hover {
    opacity: 0;
    animation: fadeInOutLoop 8s ease-out infinite;
  }
  .card-item .role {
    padding:0; 
    backdrop-filter: none;
    background: transparent;    
  }
}

@media (min-width: 768px) {
  .card-item {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000;
    position: relative;
    display: block;
    min-height: 200px;
    min-height: 100%;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backface-visibility: hidden;
  }

  .card-item * {
      color: var(--wp--preset--color--white);
  }  
  .card-content {
    position: relative;
    padding: var(--wp--preset--spacing--20);
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 280px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  }
  .img-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 1;
    overflow: hidden;
    &:after {
      content: "";
      display: block;
      height: 50%;
      width: 100%;
      position: absolute;
      bottom: 0;
      left: 0;
      background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent);
    }
    & img {
      display: block;
      object-fit: cover;
      height: 100%;
      width: 100%;      
      transition: all 0.4s ease-out !important;
    }
    & .card-img:not(.hover) {
      transform-origin: 50% 50%;
    }
    & .card-img.hover {
      opacity: 0;
      transform: scale(1.1);
      position: absolute;
      top: 0;
      left: 0;
    }
  }
  .card-item:hover, .card-item:focus,
  .hover {
    color: initial;
  }
  .card-item:hover .card-img:not(.hover), .card-item:focus .card-img:not(.hover),
  .hover .card-img:not(.hover) {
    transform: scale(1.1);
    opacity: 0;
  }
  .card-item:hover .card-img.hover, .card-item:focus .card-img.hover,
  .hover .card-img.hover {
    transform: scale(1);
    opacity: 1;
  }
  .card-item:hover {
    opacity: 1 !important;
  }
}

.single-services .is-service-lead .role.serviceLead {
  display: block !important;
}