.work {
  padding-top: 80px;
  padding-bottom: 100px;
}

.wort__title {
  font-weight: 800;
  font-size: 36px;
  line-height: 46px;
  color: var(--text-color2);
  margin-bottom: 40px;
}

.work__items {
  display: flex;
  flex-wrap: wrap;
  transition: 0.3s;
}

.work__item {
  width: 226px;
  /*   height: 325px; */
  min-height: 325px;
  cursor: pointer;
  padding: 20px;
  border-radius: 5px;
  transition: all 0.3s ease-in;
}

.work__item--key {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  position: relative;
  background-color: transparent;
  transition: all 0.3s ease-in;
}

.work__item--key::after {
  content: "";
  position: absolute;
  width: 290%;
  border-top: 1px solid var(--accent);
  top: 50%;
  left: 100%;
  height: 2px;
  transition: all 0.3s ease-in;
}

.work__item--step {
  background-color: var(--accent);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  line-height: 40px;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--white-color);
  transition: all 0.3s ease-in;
}

.work__item--icon {
  margin-bottom: 10px;
  filter: invert(0);
  transition: all 0.3s ease-in;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.work__item--title {
  font-weight: 700;
  font-size: 20px;
  line-height: 120%;
  color: var(--text-color);
  margin-bottom: 5px;
  transition: all 0.3s ease-in;
}

.work__item--text {
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  color: var(--text-color2);
  width: 186px;
  transition: all 0.3s ease-in;
}

.work__item .work__item--text a {
  font-weight: 600;
}

.work__item .work__item--text a:hover {
  color: var(--text-color2) !important;
}

.header__phone.work__item--text {
  font-weight: 700;
}

.work__item:hover {
  background-color: var(--main-color);
  background-repeat: no-repeat;
  background-position: 32px 162px;
}

.work__item:hover .work__item--key {
  border: 1px solid var(--white-color);
  background-color: var(--main-color);
  position: relative;
  z-index: 10;
}

.work__item:hover .work__item--step {
  background-color: var(--white-color);
  color: var(--main-color);
  box-shadow: 0 0 0 8px var(--main-color);
  z-index: 2;
}

.work__item:hover .work__item--text {
  display: block;
  color: var(--white-color);
}

.work__item:hover .work__item--text a {
  color: var(--white-color);
  font-weight: 600;
}

.work__item:hover .work__item--title {
  color: var(--white-color);
}

.work__item:hover .work__item--icon path {
  fill: var(--white-color);
}

.work__item:hover .work__item--key::before {
  border-top: 1px solid var(--white-color);
  width: 392%;
  z-index: 1;
  content: "";
  position: absolute;
  top: 50%;
  left: -37%;
  height: 2px;
}

.work__item:nth-of-type(1) .work__item--key::before {
  width: 254%;
  left: 100%;
}

.work__item:last-of-type .work__item--key::after {
  display: none;
}

.work__item:last-of-type:hover .work__item--key::before {
  width: 37%;
}

@media (max-width: 1200px) {
  .work__item--key::after {
    display: none;
  }

  .work__item:hover .work__item--key::before {
    display: none;
  }

  .work__items {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .work__item {
    background-color: var(--main-color);
    background-repeat: no-repeat;
    background-position: 32px 162px;
  }

  .work__item--text {
    display: block;
  }

  .work__item--key {
    border: 2px solid var(--white-color);
    background-color: var(--main-color);
  }

  .work__item--step {
    background-color: var(--white-color);
    color: var(--main-color);
  }

  .work__item--title {
    color: var(--white-color);
  }

  .work__item--icon {
    filter: grayscale(1) brightness(1000%);
  }

  .work__items {
    justify-content: space-evenly;
  }

  .work__item--text {
    color: var(--white-color);
  }

  .work__item--text a {
    color: var(--white-color);
  }

  .work {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .wort__title {
    text-align: center;
  }

  .work .container {
    padding: 0px;
  }
}

@media (max-width: 500px) {
  .work__item {
    max-width: 425px;
    width: 100%;
    background-position: 180px 162px;
    padding: 10px;
    height: auto;
    min-height: auto;
  }

  .work .top {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .work .work__item--icon {
    display: none;
  }

  .work__item--text {
    font-size: 14px;
    width: unset;
  }

  .work__item--key {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
  }

  .work {
    padding-top: 40px;
    padding-bottom: 50px;
  }

  .wort__title {
    font-size: 24px;
    line-height: 38px;
    margin-bottom: 30px;
  }
}
