%card-title {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: .025em;
}

.card {
  width: 100%;
  max-width: 760px;
  background-color: $white;
  box-shadow: $box-shadow;
  display: flex;
  flex-direction: column;
  margin: 0 auto;

  &__content {
    padding: 20px;
    text-align: left;
    @include mq($from: tablet) {
      padding: 30px;
    }
    @include mq($from: wide) {
      padding: 50px;
    }

    & p {
      line-height: 1.5em;
      margin: 0 0 30px;

      &:last-of-type {
        margin: 0;
      }

      & a {
        color: $primary-color;

        &:hover {
          border-color: $primary-color;
        }
      }
    }
  }

  &__title {
    @extend %card-title;

    &--header {
      margin: 0;
    }

    &--with-badge {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    & a {
      color: $nearly-black;

      &:hover {
        border-color: $grey-dark;
      }
    }
  }

  &__image {
    line-height: 0;

    &--with-badge {
      position: relative;
    }

    & img {
      width: 100%;
    }

    & a {
      border: 0;
    }
  }

  &__footer {
    margin-top: auto;
    padding: 20px;
    text-align: left;
    background-color: $grey-lightest;
    display: flex;
    @include mq($from: tablet) {
      padding: 20px 50px;
    }
  }

  &__header {
    padding: 20px;
    text-align: left;
    background-color: $grey-lightest;
    display: flex;

    &--with-badge {
      justify-content: space-between;
      align-items: center;
    }
  }
}

.card__image + .card__content {
  /*If there is an image before content*/
  @include mq($from: tablet) {
    padding-top: 30px;
  }
}

.card__title + .author {
  /*If author comes after title*/
  margin-top: -15px;
}

.author--card + .date {
  /*If date comes after author*/
  margin-top: -15px;
}
