.two-cards {
  position: relative;
  margin: 100px 0;
  padding: 0 $gutter 32px;
  overflow: hidden;

  @include sm {
    padding: 1px $gutter-mobile;
    margin: 60px 0;
  }

  &.two-cards--no-bg {
    padding: 0 $gutter;

    .two-cards__holder::before {
      display: none;
    }
  }

  &.two-cards--3 {
    @include md {
      padding: 1px $gutter-mobile;
      margin: 60px 0;
    }

    &::before {
      @include md {
        top: 0;
      }
    }
  }

  &__heading-title {
    margin-top: 24px;
    padding-bottom: 0;

    .title-block {
      margin-top: 0 !important;
      margin-bottom: 0 !important;

      .title-block__wrapper {
        margin: 0;
      }
    }

    &.two-cards--align-left {
      .two-cards__heading-title-subject {
        text-align: left;
      }

      .title-block {
        max-width: 100%;
        width: 100%;
        padding: 0;

        h2,
        .title-block__subject {
          text-align: left !important;
        }
      }
    }

    &.two-cards--align-right {
      .two-cards__heading-title-subject {
        text-align: right;
      }

      .title-block {
        max-width: 100%;
        width: 100%;
        padding: 0;

        h2,
        .title-block__subject {
          text-align: right !important;
        }
      }
    }

    .two-cards--no-bg & {
      padding-bottom: 0;

      .title-block {
        .title-block__wrapper {
          margin: 0;
        }
      }
    }
  }

  &__heading-title-subject {
    color: $medium-color;
    font-family: $font-default;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0.16px;
    text-align: center;
    display: block;
    width: 100%;
  }

  &__wrapper {
    width: 100%;
    max-width: $projects-detail-width;
    margin: 0 auto;
  }

  &__holder {
    display: flex;
    justify-content: center;
    align-items: stretch;
    column-gap: 48px;
    margin-top: 32px;

    &::before {
      content: "";
      position: absolute;
      display: block;
      z-index: -1;
      top: 0;
      left: 50%;
      right: 0;
      bottom: 0;
      width: 100vw;
      background-color: $gray-10;
      transform: translate(-50%, 20%);

      .two-cards--no-image & {
        transform: translate(-50%, 35%);
      }

      @include sm {
        transform: translate(-50%, 0%);
      }
    }

    @include sm {
      display: block;
    }

    .two-cards--3 & {
      column-gap: 32px;

      @include md {
        display: block;
      }
    }
  }

  &__card {
    display: flex;
    flex-direction: column;
    width: calc(100% / 12 * 5 * 0.84);
    transition: transform 0.3s ease-out;
    transform: scale(1);

    &:hover {
      transform: scale(1.1);

      @include sm {
        transform: scale(1);
      }
    }

    &:first-child {
      margin-left: calc(100% / 12);
    }

    &:last-child {
      margin-right: calc(100% / 12);
    }

    @include mdx {
      width: calc(100% / 12 * 6 * 0.84);

      &:first-child,
      &:last-child {
        margin: 0;
      }
    }

    @include sm {
      width: 100%;
      transform: scale(1);
      padding: 0;

      &:first-child,
      &:last-child {
        margin: 60px 0;
      }
    }

    .two-cards--1 & {
      width: calc(100% / 12 * 10);
      flex-direction: row;

      &:hover {
        transform: scale(1.1);

        @include sm {
          transform: scale(1);
        }
      }

      @include md {
        width: 100%;
      }

      @include sm {
        flex-direction: column;
      }
    }

    .two-cards--3 & {
      width: 100%;
      max-width: 360px;

      &:hover {
        transform: scale(1.1);

        @include sm {
          transform: scale(1);
        }
      }

      &:first-child {
        margin-left: 0;
      }

      &:last-child {
        margin-right: 0;
      }

      @include md {
        width: 100%;
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;

        &:first-child,
        &:last-child {
          margin: 60px auto;
        }
      }

      @include sm {
        max-width: 100%;
      }
    }

    .two-cards__card-content-title {
      color: $primary-color;
      margin: 0 0 12px;
    }

    p {
      font-size: 1.6rem;
      margin: 0;
      color: $primary-color;
    }

    ul {
      padding-left: 25px;
    }

    @include sm {
      h2 {
        font-size: 1.8rem;
        line-height: 2.4rem;
        margin: 0 0 1.5rem;
      }

      p {
        font-size: 1.4rem;
      }
    }
  }

  &__card-content {
    padding: 32px;
    background-color: $white;
    flex-grow: 1;

    .two-cards--1 & {
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    @include sm {
      padding: 32px 23px;
    }
  }

  &__card-content-subject {
    color: $medium-color;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 120%;
    margin-bottom: 12px;
    display: block;
  }

  &__card-image {
    position: relative;
    padding-top: 66%;
    flex-shrink: 0;

    .two-cards--1 & {
      padding-top: 34%;
      width: calc(100% / 10 * 6);

      @include sm {
        width: 100%;
        padding-top: 57%;
      }
    }

    img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }
  }

  &__card-actions {
    a {
      white-space: nowrap;
      margin-top: 24px;
      display: inline-flex;
    }

    .link-animation-arrow:after {
      top: 6px;
    }

    .std-button {
      margin-right: 15px;
      padding: 0 20px;
    }
  }
}
