/**
 * @file
 * Story Display
 *
 * Contains styles for Story Display object.
 */

.story-display {

  &__header {
    padding: 0 1rem;

    @media (min-width: $break-medium) {
      padding: 0 3.125rem;
    }

    @media (min-width: $break-large) {
      padding: 0;
    }
  }

  &__intro {
    padding: 0 1rem;
    @media (min-width: $break-medium) {
      padding: 0 3.125rem;
      margin: 0 0 1rem;
    }
    @media (min-width: $break-large) {
      padding: 0;
      margin-bottom: 32px;
    }
  }

  &__wrap {
    color: $color-white;
    padding: 2.5rem 1.25rem 0;
    background-image: url("../assets/img/story-sm.png");
    background-size: cover;
    background-position: center;


    @media (min-width: $break-medium) {
      padding: 4rem 3.125rem 0;
      background-image: url("../assets/img/story-md.png");
    }

    @media (min-width: $break-large) {
      position: relative;
      padding: 64px 0;
      display: flex;
      gap: 24px;
      background: none;
      &:after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        height: 100%;
        display: block;
        background-image: url("../assets/img/story-lg.png");
        background-color: $color-blue-dark;
        background-size: cover;
        background-repeat: no-repeat;
        // 260 is the combo of left nav width plus the padding on content column.
        margin-left: -18.55%;
        z-index: -2;
      }
    }

    @media (min-width: $break-x-large) {
      &:after {
        margin-left: -145px;
      }
    }
  }

  &__img {
    margin: 0 0 1.5rem;
    border: 1px solid $color-white;
    a:before {
      display: none;
    }
    img {
      object-fit: cover;
      aspect-ratio: 280/144;
    }

    @media (min-width: $break-medium) {
      flex: 0 0 40%;
      border: 3px solid $color-white;
    }

    @media (min-width: $break-large) {
      order: 2;
      flex: 1;
      margin-bottom: 0;
      height: fit-content;
      img {
        aspect-ratio: 385/311;
      }
    }

    img {
      width: 100%;
    }
  }

  &__content {

    @media (min-width: $break-large) {
      width: 47%;
    }

  }

  &__quote {
    line-height: 1.4;
    @include fontsize(18px);
    font-weight: 600;
    padding: 0 0 1rem;

    @media (min-width: $break-medium) {
      padding: 0 0 2.5rem;
    }

    @media (min-width: $break-large) {
      padding: 0;
      @include fontsize(24px);
      line-height: 1.4;
    }
  }

  &__title {
    margin: 0 0 0.625rem;
    @include fontsize(16px);
    line-height: 1.5;
    position: relative;
    font-weight: 600;

    a {
      color: $color-blue-light;
      margin-right: 0.75rem;
      &:focus {
        @include focus-light();
      }
      &:before {
        background-color: $color-blue-light;
      }
      &:after {
        content: '';
        position: absolute;
        right: -7px;
        bottom: 1px;
        width: 1px;
        height: 17px;
        background-color: $color-white;
      }
      &:hover {
        color: $color-white;
      }
      &:hover:before {
        background-color: $color-blue-light;
      }
    }

    @media (min-width: $break-large) {
      @include fontsize(18px);
      line-height: 1.6;
      font-weight: 700;

      a {
        margin-right: 1.1rem;
        &:after {
          right: -9px;
        }
      }
    }
  }

  &__subtitle {
    margin: 0 0 0.625rem;
    @include fontsize(16px);
    line-height: 1.5;
  }

  &__caption {
    background-color: $color-purple;
    color: $color-white;
    padding: 1.5rem 1.25rem;
    font-style: italic;
    @include fontsize(14px);
    line-height: 1.2;
    font-weight: 500;

    a {
      color: $color-blue-light;

      &:before {
        background-color:$color-blue-light;
      }

      &:focus {
        @include focus-light();
      }

      &:hover {
        color: $color-white;
        &:before {
          background-color:$color-white;
        }
      }
    }

    @media (min-width: $break-medium) {
      margin: 0 auto;
      padding: 1.5rem 3.125rem;
      @include fontsize(16px);
      line-height: 1.5;
    }

    @media (min-width: $break-large) {
      background-color: unset;
      position: relative;
      padding: 1.5rem 0;
      &:after {
        content: '';
        background-color: $color-purple;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        height: 100%;
        display: block;
        margin-left: -18.55%;
        z-index: -2;
      }
    }

    @media (min-width: $break-x-large) {
      &:after {
        margin-left: -145px;
      }
    }
  }

  @media (min-width: 300px) and (max-width: $break-large - 1px) {
    @include full-width();
  }

  @media (min-width: $break-medium) and (max-width: $break-large - 1px) {
    &__caption {
      @include full-width();
    }
  }
}
