*::before,
*::after {
}

.staff {
  position: relative;
  padding: 60px 0 0 0;
  margin-top: 102px;
}

.staff * {
  position: relative;
}

.staff-selector {
  flex-direction: column;
  gap: 20px;
  align-items: center;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 320px));
  max-width: 1000px;
  justify-content: center;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: content-box;
}

.staff-selector-item {
  /* width: min(320px, 85.33vw); */
  height: 50px;
  border-radius: 25px;
  border: 1px solid #707070;
  font-weight: 500;
  font-size: 14px;
  line-height: 50px;
  text-align: center;
  color: #000;
  background-color: #fff;
}

.staff-selector-item.active {
  background-color: #fc9300;
  color: #fff;
  border: 1px solid #fc9300;
}

.staff-selector-item:nth-child(2) {
  font-size: min(14px, 4vw);
}

.staff-wrapper {
  width: 100%;
}

.staff-card-wrapper {
  display: block;
  width: 100%;
  padding: 80px min(27px, max(16px, calc(27px + 50vw - 180px)));
}

.staff-card-wrapper:nth-child(even) {
  background-color: #fff;
}

.staff-card {
  display: block;
  position: relative;
  padding: 56px 17px 20px;
  border-radius: 40px;
  background-color: #fff;
  max-width: 540px;
  margin: 0 auto;
  color: #000;
}

.staff-card-wrapper:nth-child(odd) .staff-card {
  filter: drop-shadow(0px 0px 6px rgba(0, 0, 0, 0.16));
}

.staff-card__title {
  position: absolute;
  top: -50px;
}

.service-tags {
  display: flex;
  flex-direction: column;
  margin: 10px auto 0;
  gap: 8px;
}

.service-tags__tag {
  font-family: "M PLUS Rounded 1c", sans-serif;
  padding: 4px 16px;
  border: 1px solid #707070;
  border-radius: 2px;
  color: #707070;
  width: fit-content;
  font-size: min(18px, 4.8vw);
  line-height: 24px;
  max-width: 280px;
  background-color: #fff;
}

.profile__name {
  font-size: 24px;
  line-height: 34px;
  margin-top: 20px;
}

.staff-title {
  position: relative;
  width: fit-content;
  height: fit-content;
  z-index: 2;
  width: calc(100% - 10px);
  top: -5px;
  max-width: 520px;
  margin: 0 auto;
}

.staff-title__text {
  position: relative;
  color: #000;
  font-size: 18px;
  line-height: 24px;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 700;
}
.staff-title__text {
  --a: 46deg;
  --h: 35px;
  --p: 50%;
  --b: 5px;
  --c: 0;
  padding: 20px;
  clip-path: polygon(
    0 100%,
    0 0,
    100% 0,
    100% 100%,
    min(100%, var(--p) + var(--h) * tan(var(--a) / 2)) 100%,
    var(--p) calc(100% + var(--h)),
    max(0%, var(--p) - var(--h) * tan(var(--a) / 2)) 100%
  );

  border-image: fill 0 //var(--h) 0
    conic-gradient(#2dbe95 0 0);

  position: relative;
}

.staff-title__text:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: var(--b) 0;
  clip-path: polygon(
    0 100%,
    0 0,
    100% 0,
    100% 100%,
    min(
        100% - var(--b),
        var(--p) + var(--h) * tan(var(--a) / 2) - var(--b) *
          tan(45deg - var(--a) / 4)
      )
      100%,
    var(--p) calc(100% + var(--h) + var(--b) * (1 - 1 / sin(var(--a) / 2))),
    max(
        var(--b),
        var(--p) - var(--h) * tan(var(--a) / 2) + var(--b) *
          tan(45deg - var(--a) / 4)
      )
      100%
  );
  border-image: fill 0/0 var(--b) / var(--h) 0 conic-gradient(#fff 0 0);
}

.staff-title__shadow {
  -moz-box-sizing: unset;
  -webkit-box-sizing: unset;
  box-sizing: unset;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: -1;
  color: #fff;
  width: calc(100% - 38px);
  height: calc(100% - 38px);
}
.staff-title__shadow {
  --b: 2em;
  --h: 35px;
  --p: 50%;
  padding: 1em;
  clip-path: polygon(
    0 100%,
    0 0,
    100% 0,
    100% 100%,
    min(100%, var(--p) + var(--b) / 2) 100%,
    var(--p) calc(100% + var(--h)),
    max(0%, var(--p) - var(--b) / 2) 100%
  );
  border-image: fill 0 //var(--h)
    conic-gradient(#2dbe95 0 0);
}

.profile__image-container {
  width: 200px;
  height: 199px;
  margin: 0 auto;
}

.profile__image {
  display: block;
  width: 100%;
  margin: 0 auto;
  height: 100%;
  object-fit: cover;
  clip-path: url(#clip-shape);
  -webkit-clip-path: url(#clip-shape);
  object-position: center;
  position: relative;
}

.details {
  margin-top: 10px;
}

.details__item {
  display: flex;
}

@media (min-width: 540px) {
  .profile {
    display: flex;
    flex-direction: row;
    gap: clamp(15px, 2.78vw, 25px);
    justify-content: center;
  }

  @media (max-width: 767px) {
    .staff-title__text {
      --p: 25%;
    }

    .service-tags__tag {
      font-size: 16px;
      letter-spacing: -1px;
    }

    .staff-title__shadow {
      --p: 25%;
    }

    .profile__image-container {
      margin: 0;
    }
  }
}

.details__label {
  white-space: nowrap;
}

.no-posts {
  padding: 80px 0;
}

@media (min-width: 768px) {
  .staff {
    margin-top: 198px;
  }

  .staff-card-wrapper {
    width: 100%;
    padding: 75px 27px 120px;
  }

  .staff-card-wrapper:first-child {
    padding-top: 50px;
  }
  .staff-card-wrapper:nth-child(even) .profile {
    flex-direction: row-reverse;
  }

  .staff-selector-item {
    cursor: pointer;
  }

  .staff-title__text {
    font-size: 20px;
    line-height: 32px;
    padding: 36px 16px;
  }

  .staff-title {
    max-width: 660px;
    top: 45px;
  }

  .staff-card {
    position: relative;
    padding: 100px 20px 40px;
    max-width: 830px;
  }

  .staff-card-wrapper:nth-child(even) .staff-card {
    padding: 100px 20px 40px;
    max-width: 670px;
  }

  .profile {
    gap: 22px;
    max-width: 670px;
    margin: 0 auto;
  }

  .profile__image-container {
    zoom: 1.5;
    margin: 0;
  }

  .profile__info {
    width: 45%;
  }

  .staff-title__text {
    --p: 25%;
  }

  .staff-title__shadow {
    --p: 25%;
  }

  .staff-card-wrapper:nth-child(even) .staff-title__text {
    --p: 75%;
  }

  .staff-card-wrapper:nth-child(even) .staff-title__shadow {
    --p: 75%;
  }

  .service-tags__tag {
    max-width: none;
  }

  @media (min-width: 864px) {
    .service-tags__tag span {
      white-space: nowrap;
    }
  }
}
