.main-title {
  position: relative;
  z-index: 1;
  margin: 0 auto 80px;
  width: fit-content;
  font-size: 30px;
  padding: 10px 20px;
  border: 2px solid black;
  text-transform: uppercase;
  transition: var(--main-transition-duration);
}

.main-title:hover {
  color: white;
  border-color: white;
  transition-delay: 0.5s;
}

.main-title::before,
.main-title::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: -1;
  width: 12px;
  height: 12px;
  background-color: var(--main-color);
  border-radius: 50%;
}

.main-title::before {
  left: -30px;
}

.main-title::after {
  right: -30px;
}

.main-title:hover::before {
  animation: left-move 0.5s linear forwards;
}

.main-title:hover::after {
  animation: right-move 0.5s linear forwards;
}

@keyframes left-move {
  50% {
    left: 0;
    width: 12px;
    height: 12px;
  }

  100% {
    left: 0;
    width: 50%;
    height: 100%;
    border-radius: 0;
  }
}

@keyframes right-move {
  50% {
    right: 0;
    width: 12px;
    height: 12px;
  }

  100% {
    right: 0;
    width: 50%;
    height: 100%;
    border-radius: 0;
  }
}