.node {
  $self: &;

  &--content-card-deck {
    padding-bottom: 16px;
    @include marko-web-node-list-border(border-bottom);

    @include media-breakpoint-up(md) {
      padding-top: 16px;
      padding-bottom: 0;
      border-bottom: none;
      @include marko-web-node-list-border(border-top);
    }

    @include media-breakpoint-up(lg) {
      padding-top: 0;
      border-top: none;
    }

    #{ $self } {
      &__title {
        width: 100%;
        @include skin-typography($style: "header-3", $link-style: "primary");
      }

      &__contents {
        flex-direction: row-reverse;
        @include media-breakpoint-up(lg) {
          flex-direction: column;
        }
      }

      $image-size: 112px;
      &__node-image {
        width: $image-size;
        height: $image-size;
        @include media-breakpoint-up(lg) {
          width: 100%;
          height: 100%;
        }
      }

      &__image-inner-wrapper--fluid-3by2 {
        width: $image-size;
        min-width: $image-size;
        height: $image-size;
        @include media-breakpoint-up(lg) {
          width: 100%;
          min-width: 100%;
          height: auto;
        }

        &::before {
          // use bp-down (max-width) instead, since the padding is a calculated % at all widths by default
          @include media-breakpoint-down(md) {
            padding-top: 0;
          }
        }
      }

      &__image-wrapper + #{ $self }__body {
        margin-top: 0;
        margin-right: 15px;
        @include media-breakpoint-up(lg) {
          margin-top: 14px;
          margin-right: 0;
        }
      }

      &__website-section-name {
        @include skin-typography($style: "slug-small", $link-style: "primary");
      }
    }
  }
}

.content-card-deck {
  &__header {
    display: flex;
    align-items: flex-end;
    margin-bottom: 24px;
    justify-content: space-between;
    @include media-breakpoint-up(md) {
      margin-bottom: 30px;
    }
    @include skin-typography($style: "section-header");
  }

  &__header-left {
    display: flex;
    flex-direction: column;
  }

  &__description {
    @include skin-typography($style: "article-text");
    margin-top: 6px;
    display: none;
    @include media-breakpoint-up(md) {
      display: block;
    }
  }

  &__view-more {
    @include skin-typography($style: "view-more", $link-style: "primary");
    line-height: 1.7;
    white-space: nowrap;
    display: none;
    @include media-breakpoint-up(md) {
      display: block;
    }
  }

  &__view-more-bottom {
    @include skin-typography($style: "view-more", $link-style: "primary");
    display: block;
    margin-top: 16px;
    @include media-breakpoint-up(md) {
      display: none;
    }
  }
  .node {
    &__website-section-name {
      @include skin-typography($style: "slug-small", $link-style: "primary");
    }
  }
}

.card-deck-flow {
  $self: &;
  &--content-card-deck {
    #{ $self } {
      &__node {
        margin-bottom: 16px;
        @include media-breakpoint-up(md) {
          margin-bottom: 0;
        }
        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }
}
