@use '../../base/variable';
@use '../../abstract';

.split-image-04 {
  padding-block: 0;

  &__inner {
    overflow: hidden;
    border-radius: 24px;
  }

  &__content {
    background-color: var(--gray-50);
    padding: 40px 24px 48px;
    text-align: left;
  }

  .cds-cta-section__title {
    margin-bottom: 16px;
    text-align: left;
  }

  .cds-cta-section__desc {
    margin-bottom: 32px;
  }

  &__img {
    display: block;

    img {
      vertical-align: top;
    }
  }

  // theme
  &.cds-cta-section--dark {
    background-color: transparent;
  }

  .cds-cta-section--dark &__content {
    background-color: var(--secondary-gray-blue-700);
  }

  @include abstract.media-bp-up('md') {
    $half-width: 608px;

    padding: 0 32px;
    margin-left: auto;
    margin-right: auto;
    width: min(100%, variable.$max-width);
    max-height: 480px;

    &__inner {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
    }

    &__content {
      padding: 88.5px calc(64px / $half-width * 100%);
    }

    .cds-btn:nth-child(n + 2) {
      margin-top: 0;
    }

    .cds-cta-section__title {
      margin-bottom: 20px;
    }

    .cds-cta-section__desc {
      margin-bottom: 40px;
    }

    .cds-cta-section__btn-wrap {
      justify-content: flex-start;
    }

    &__img {
      margin-top: 0;

      img {
        height: 100%;
        -o-object-fit: cover;
        object-fit: cover;
      }
    }
  }
}
