.card-flex {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
}

.card-item {
  margin-top: 32px;
  margin-bottom: 23px;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  height: 100%;
  transition: transform 0.2s linear;
  position: relative;
  position: relative;
  background: var(--white);
  border: 1px solid #dfe6f0;
  padding: 40px 31px 40px;
  font-weight: normal;
}

.card-flex.border .card,
.card-flex.with-bg .card {
  &.card--link:hover {
    background-color: var(--blue);
  }

  &.card--link:hover :is(.card__title, .card__desciptions, .btn, .card__img) {
    color: #fff !important;
  }

  &.card--link:hover .card__cta .btn::after {
    right: 22px;
  }
}

.card:hover .card__img.is-predefined-icons i {
  color: #41c0c0 !important;
}

.card--link:hover .card__img.is-predefined-icons i {
  color: #ffffff !important;
}

.card-flex.with-bg .card {
  background-color: var(--blue);

  & :is(.btn) {
    color: #fff !important;
  }
}

.card-flex.no-bg .card {
  background: transparent;
  border: none;

  &.card--link:hover .card__cta .btn::after {
    right: 22px;
  }
}

.card-flex.border .card {
  /* background: transparent; */
  border-color: #dfe6f0;
}

.card__img {
  padding-bottom: 16px;
  font-size: 42px;
  line-height: 1em;
  color: var(--white);
}

.card-flex:not(.with-bg) .card__img {
  color: var(--blue);
}

.card__img.is-custom {
  max-width: 43px;
  width: 100%;
}

.card__title {
  color: #fff;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.6em;
  margin-bottom: 20px;
}

.card-flex:not(.with-bg) .card__title {
  color: #192846;
}

.card__desciptions {
  line-height: 1.375em;
  color: #fff;
  font-size: 16px;
}

.card-flex:not(.with-bg) .card__desciptions {
  color: #616773;
}

.card__cta {
  padding-top: 20px;
  margin-top: auto;
  text-align: center;
}

/* .card-flex.no-bg .card__cta {
    visibility: hidden;
    opacity: 0;
    transform: 1s;
} */

/* .card-flex.no-bg .card__cta .btn {
    padding: 0px 65px 0px 0px;
    background: transparent;
    font-size: 18px;
} */

.card-flex.no-bg .card__cta {
  bottom: 0px;
}

.card-flex.no-bg .card:hover .card__cta,
.card-flex.no-bg .card:focus .card__cta,
.card-flex.no-bg .card:active .card__cta {
  visibility: visible;
  opacity: 1;
  animation: moveFromBottom 0.4s ease-in-out 0.2s forwards;
  -webkit-animation: moveFromBottom 0.4s ease-in-out 0.2s forwards;
}

.card__cta .btn {
  color: #25507b;
  background-color: transparent;
  line-height: 1.375em;
  padding: 0;
  transition: all ease-in-out 0.3s;

  &:hover {
    background-color: transparent;
  }

  &::after {
    transition: all ease-in-out 0.3s;
  }
}

.card--static {
  padding-bottom: 32px;
}

.cards--survey .card-item {
  margin-bottom: 0;
}

.text-cta {
  z-index: 2;
}

.text-cta + section {
  z-index: 1;
}

/* Keep elements in their original position */
.card__img,
.card__title,
.card__desciptions {
  position: relative;
  display: block;
  text-align: center;
}

.card__details {
  text-align: center;
}

@media (min-width: 768px) {
  .card {
    padding-bottom: 20px;
  }

  .card--static {
    padding-bottom: 32px;
  }
}

@media (min-width: 1200px) {
  /* .card {
        padding-bottom: 55px;
        padding-left: 32px;
        padding-right: 32px;
    } */

  /* On hover, trigger animations */
  .card--link:hover .card__img {
    animation: moveFromBottom 0.6s ease-in-out 0.6s forwards;
    -webkit-animation: moveFromBottom 0.6s ease-in-out 0.6s forwards;
  }

  .card--link:hover .card__title {
    animation: moveFromLeft 0.6s ease-in-out 0.6s forwards;
    -webkit-animation: moveFromLeft 0.6s ease-in-out 0.6s forwards;
  }

  .card--link:hover .card__desciptions {
    animation: moveFromRight 0.6s ease-in-out 0.6s forwards;
    -webkit-animation: moveFromRight 0.6s ease-in-out 0.6s forwards;
  }

  .card--static {
    padding-bottom: 32px;
  }

  .card--link:hover {
    background: var(--blue);
  }

  .card--link:hover .card__cta .btn:hover {
    background: var(--lightblue--hover);
  }

  .card--link:hover .card__img,
  .card--link:hover .card__title,
  .card--link:hover .card__desciptions {
    color: var(--white);
  }

  .card-flex:not(.with-bg) .card--link:hover .card__img,
  .card-flex:not(.with-bg) .card--link:hover .card__title {
    color: var(--blue);
  }

  .card-flex:not(.with-bg) .card--link:hover .card__desciptions {
    color: #616773;
  }
  .card__cta .btn {
    padding: 13px 72px 13px 32px;
  }
}

/* Keyframes for animations */
/* Move from bottom */
/* @-webkit-keyframes moveFromBottom {
    from {
        -webkit-transform: translateY(20px);
        opacity: 0;
    }
    to {
        -webkit-transform: translateY(0);
        opacity: 1;
    }
}

@-moz-keyframes moveFromBottom {
    from {
        -moz-transform: translateY(20px);
        opacity: 0;
    }
    to {
        -moz-transform: translateY(0);
        opacity: 1;
    }
}

@keyframes moveFromBottom {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
} */

/* Move from left */
/* @-webkit-keyframes moveFromLeft {
    from {
        -webkit-transform: translateX(-20px);
        opacity: 0;
    }
    to {
        -webkit-transform: translateX(0);
        opacity: 1;
    }
}

@-moz-keyframes moveFromLeft {
    from {
        -moz-transform: translateX(-20px);
        opacity: 0;
    }
    to {
        -moz-transform: translateX(0);
        opacity: 1;
    }
} */

/* @keyframes moveFromLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
} */

/* Move from right */
/* @-webkit-keyframes moveFromRight {
    from {
        -webkit-transform: translateX(20px);
        opacity: 0;
    }
    to {
        -webkit-transform: translateX(0);
        opacity: 1;
    }
}

@-moz-keyframes moveFromRight {
    from {
        -moz-transform: translateX(20px);
        opacity: 0;
    }
    to {
        -moz-transform: translateX(0);
        opacity: 1;
    }
}

@keyframes moveFromRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
} */
