@use '../../_global/styles/mixins' as *;
@use '../../_global/styles/vars' as *;

.image-text.is-blockquote {
  max-width: 1340px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 45px 0;
  position: relative;
  z-index: 1;
  @media(max-width: 767px) {
    display: block;
  }
  h3 {
    font-size: 28px;
    line-height: 120%; /* 50.4px */
    @media(min-width: 768px) {
      font-size: 36px;
    }
    @media(min-width: 1110px) {
      font-size: 42px;
    }
    + .text {
      font-size: 18px;
      @media(min-width: 768px) {
        font-size: 22px;
      }
    }
  }



  @media(max-width: 767px) {
    display: block;
  }

  .image-text--text,
  .image-text--image {
    width: calc(50% - 30px);
    @media(max-width: 767px) {
      width: auto;
      margin-bottom: 32px;
    }
  }

  .image-text--image {
    position: relative;
    &:after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      display: block;
      height: 8px;
      background-color: var(--color-decoration);
      transition: 0.3s ease;
      z-index: 1;
      border-bottom-right-radius: 4px;
      border-bottom-left-radius: 4px;
    }
  }

  .image-text--text {
    @media(max-width: 767px) {
      display: flex;
    }
  }

  blockquote {
    border-left: 0;
    font-style: normal;
    font-weight: 300;
    margin: calc(var(--section-margin)*.6) 0 0 0;
    padding: 0 20px 0 40px;
    @media(max-width: 767px) {
      padding: 0;
    }
    .text {
      font-size: var(--font-size-h2);
      line-height: 1.2;
      &:not(.author):not(.author-subline) {
        font-family: "Korb", sans-serif;
        position: relative;
        &:before {
          mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MCA0MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Ik0xNyA4LjljLTIuOSAxLjUtNS4xIDMuMi02LjYgNS4yQzkgMTYgOC4zIDE4LjQgOC4zIDIxLjNjLjItLjEuNS0uMSAxLS4xIDIuMSAwIDMuOC43IDUuMyAyIDEuNSAxLjIgMi4yIDMgMi4yIDUuMiAwIDIuNS0uNyA0LjQtMi4xIDUuOS0xLjQgMS40LTMuMiAyLjEtNS40IDIuMS0zLjEgMC01LjQtMS4xLTYuOS0zLjNDLjcgMzAuNyAwIDI3LjYgMCAyMy41YzAtNC42IDEuMS04LjcgMy40LTEyLjJzNS44LTYuNCAxMC40LTguN0wxNyA4Ljl6bTIzIDBjLTIuOSAxLjUtNS4xIDMuMi02LjYgNS4yLTEuNCAxLjktMi4xIDQuMy0yLjEgNy4yLjItLjEuNS0uMSAxLS4xIDIuMSAwIDMuOC43IDUuMyAyIDEuNSAxLjIgMi4yIDMgMi4yIDUuMiAwIDIuNS0uNyA0LjQtMi4xIDUuOS0xLjQgMS40LTMuMiAyLjEtNS40IDIuMS0zLjEgMC01LjQtMS4xLTYuOS0zLjMtMS41LTIuMy0yLjItNS40LTIuMi05LjUgMC00LjYgMS4xLTguNyAzLjQtMTIuMlMzMi40IDUgMzcgMi43bDMgNi4yeiIgc3R5bGU9ImZpbGw6IzU2YmQ2NiIvPjwvc3ZnPg==);
          mask-size: 100%;
          background-color: var(--color-decoration);
          content: "";
          display: block;
          height: 30px;
          margin: 2px 0 2px -40px;
          position: absolute;
          width: 30px;
          left: 0;
          top: -40px;
          @media(max-width: 767px) {
            margin-left: 0;
          }
        }
      }
      &.author {
        font-family: Source Sans Pro,sans-serif;
        font-size: 18px;
        font-weight: 600;
        margin-right: -20px;
        margin-top: 44px;
        padding-top: 8px;
        position: relative;
        text-align: right;
        font-style: normal;
        line-height: 1.2;
        @media(max-width: 767px) {
          text-align: left;
          margin-right: 0;
          padding-top: 20px;
          font-size: 16px;
          line-height: 1.1;
        }
        &:after {
          left: 0;
          position: absolute;
          top: -36px;
          mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MCA0MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Ik0xNyA4LjljLTIuOSAxLjUtNS4xIDMuMi02LjYgNS4yQzkgMTYgOC4zIDE4LjQgOC4zIDIxLjNjLjItLjEuNS0uMSAxLS4xIDIuMSAwIDMuOC43IDUuMyAyIDEuNSAxLjIgMi4yIDMgMi4yIDUuMiAwIDIuNS0uNyA0LjQtMi4xIDUuOS0xLjQgMS40LTMuMiAyLjEtNS40IDIuMS0zLjEgMC01LjQtMS4xLTYuOS0zLjNDLjcgMzAuNyAwIDI3LjYgMCAyMy41YzAtNC42IDEuMS04LjcgMy40LTEyLjJzNS44LTYuNCAxMC40LTguN0wxNyA4Ljl6bTIzIDBjLTIuOSAxLjUtNS4xIDMuMi02LjYgNS4yLTEuNCAxLjktMi4xIDQuMy0yLjEgNy4yLjItLjEuNS0uMSAxLS4xIDIuMSAwIDMuOC43IDUuMyAyIDEuNSAxLjIgMi4yIDMgMi4yIDUuMiAwIDIuNS0uNyA0LjQtMi4xIDUuOS0xLjQgMS40LTMuMiAyLjEtNS40IDIuMS0zLjEgMC01LjQtMS4xLTYuOS0zLjMtMS41LTIuMy0yLjItNS40LTIuMi05LjUgMC00LjYgMS4xLTguNyAzLjQtMTIuMlMzMi40IDUgMzcgMi43bDMgNi4yeiIgc3R5bGU9ImZpbGw6IzU2YmQ2NiIvPjwvc3ZnPg==);
          mask-size: 100%;
          background-color: var(--color-decoration);
          content: "";
          display: block;
          height: 30px;
          margin: 2px 0 2px -40px;
          transform: rotate(180deg);
          width: 30px;
          @media(max-width: 767px) {
            left: 40px;
          }
        }
        &:before {
          content: "— ";
          margin-right: 2px;
          position: relative;
          top: -1px;
        }
      }
      &.author-subline {
        font-family: Source Sans Pro,sans-serif;
        font-size: 18px;
        font-weight: 400;
        margin-right: -20px;
        margin-top: -10px;
        text-align: right;
        font-style: normal;
        line-height: 1.2;
        @media(max-width: 767px) {
          text-align: left;
          margin-right: 0;
          margin-top: -6px;
          font-size: 16px;
          line-height: 1.1;
          padding-left: 18px;
        }
      }
    }
  }

  a {
    margin-top: 11px;
  }

  img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
  }
}

.small-quote {
  .image-text {
    &.is-blockquote {
      .image-text--image {
        position: absolute;
        right: 0;
        bottom: 63px;
        width: 100px;
        @media(max-width: 767px) {
          position: relative;
          right: auto;
          bottom: auto;
          margin: 40px 0 15px 0;
        }
        &:after {
          display: none;
        }
      }
      img {
        border-radius: 50%;
      }
      .image-text--text {
        width: auto;
      }
      blockquote {
        .text:not(.author):not(.author-subline) {
          margin-left: -40px;
          padding-bottom: 10px;
          @media(max-width: 767px) {
            margin-left: 0;
          }
          &:before {
            margin-left: 0;
          }
        }
        .author {
          margin-top: 66px;
          padding-top: 2px;
          @media(max-width: 767px) {
            margin-top: 0;
          }
          &:after {
            top: -56px;
            @media(max-width: 767px) {
              top: -155px;
            }
          }
        }
        .author,
        .author-subline {
          padding-right: 115px;
        }
      }
      @media(max-width: 767px) {

      }
    }
  }
}
