/// A testimony
///
/// @group testimonies
///
/// @example scss - usage
///
///   @include k-Testimony((
///     font: 'regular',
///   ));
///
/// @example html
///
///   <div class="k-Testimony">
///     <div class="k-Testimony__title">…</div>
///     <img class="k-Testimony__image" alt="…" src="…" />
///     <blockquote class="k-Testimony__text">…</blockquote>
///   </div>
@mixin k-Testimony($testimony) {
  @include k-with-module('k-Testimony: $testimony') {
    $font: k-map-fetch($testimony, 'font');

    .k-Testimony {
      margin-bottom: k-px-to-rem(30px);
      text-align: center;
    }

    .k-Testimony__title {
      margin: 0 0 k-px-to-rem(20px) 0;
      @include k-typographyFont($font);
      @include k-typographyFontSize(5);

      @include k-media-min('m') {
        @include k-typographyFontSize(4, 1.25);
      }

      @include k-media-min('l') {
        // Forced height to keep testimonies aligned when the title spans
        // two lines.
        min-height: 4rem;
        margin-top: -2rem;

        // If the title spans two lines, align it to the bottom
        display: flex;
        align-items: flex-end;
        justify-content: center;
      }
    }

    .k-Testimony__image {
      // For margins to stick, we need to turn <img> into block elements
      display: block;
      margin: 0 auto;

      border-radius: 50%;
    }

    .k-Testimony__text {
      margin: k-px-to-rem(20px) 0 0;

      // Override boostrap on blockquotes
      padding: 0;
      border: 0;

      @include k-typographyFont($font);
      @include k-typographyFontSize;
    }
  }
}
