@import "src/assets/_vars";

.implementations {
  margin-top: 40px;
  margin-bottom: 40px;

  @media screen and (width >= $sm) {
    margin-top: 92px;
    margin-bottom: 92px;
  }

  @media screen and (width >= $lg) {
    margin-top: 128px;
    margin-bottom: 128px;
  }
}

.implementations-section {
  margin-top: 60px;
}

.implementations-list {
  display: grid;
  gap: 32px;
  margin-top: 32px;

  @media screen and (width >= $sm) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media screen and (width >= $lg) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.implementations-card {
  display: block;
  position: relative;
  background-color: var(--cl-neutral-50);
  border-radius: 12px;
  padding: 12px 32px;
  text-decoration: none;
  color: inherit;

  --first-color: rgb(var(--color-dye-pink));
  --second-color: var(--cl-neutral-200);

  &:hover {
    --first-color: rgb(var(--color-dye-pink));
    --second-color: rgb(var(--color-dye-blue));
  }

  &::after {
    content: "";
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    display: block;
    background: linear-gradient(
      45deg,
      var(--first-color),
      var(--second-color),
      var(--first-color)
    );
    background-size: 200% 100%;
    position: absolute;
    left: -2px;
    top: -2px;
    z-index: -1;
    border-radius: 0.85rem;
    opacity: 0.3;
    animation: border-anim 5s infinite;
    transition: opacity 0.3s;
  }

  &:hover::after {
    opacity: 1;
  }
}

@keyframes border-anim {
  0% {
    background-position-x: 0;
  }
  50% {
    background-position-x: 100%;
  }
  100% {
    background-position-x: 0;
  }
}
