@import '~Breakpoints';
@import '~Colors';
@import '~FontSize';
@import '~Layout';

.item {
  position: relative;
  height: 31rem;
  margin-top: 3rem;
  h3 {
    margin-top: 0;
    line-height: 1;
  }
  overflow: hidden;
  &:after, &:before {
    content: '';
    position: absolute;
    right: 0;
    width: 100%;
    @include media-breakpoint-up(md) {
      width: calc(70% - 4rem);
    }
    transition: opacity .5s ease;
  }
  &:before {
    bottom: 0;
    height: 3rem;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, .5) 70%, white 80%);
    z-index: 1;
  }
  &:after {
    @include media-breakpoint-up(md) {
      opacity: 0;
    }
    height: 100%;
    top: 0;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, .5) 50%, white);
  }
  &:hover, &:active, &:focus {
    &:after, .link {
      opacity: 1;
    }
  }
  &:nth-of-type(even) {
    &:after, &:before {
      left: 0;
      right: auto;
    }
    .figure {
      float: right;
      margin-right: 0;
      margin-left: 2rem;
    }
    .link {
      left: auto;
      right: 50%;

      @include media-breakpoint-up(md) {
        right: calc(65% + 2rem);
      }
      transform: translateX(50%);
    }
  }
}
.header {
  @include fontSizer(2.6)
}
.figure {
  height: 25%;
  margin-right: 2rem;
  width: 30%;
  float: left;
  object-position: 0;


  @include media-breakpoint-up(md) {
    height: 100%;
  }
  object-fit: cover;
}

.content {
  position: relative;
}

.detail {
  color: $brand-primary;
  font-weight: 100;
  font-style: italic;
  @include fontSizer(1.8, 1.4)

}

.link {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  @include media-breakpoint-up(md) {
    left: calc(65% + 2rem);
    opacity: 0;
  }
  transform: translateX(-50%);
  transition: opacity .5s ease;

}
