/* @careers-block */

.padder {
  @include poly-padding;
  
}

.careers-block {
  position: relative;
  background-position: center;
  background-size: cover;
  overflow: hidden;

  @media (min-width: $medium-screen) {
    @include poly-padding-x--large;
  }

  @media (min-width: $large-screen) {
    @include poly-padding-y;
  }

  &__background {
    position: absolute;
    bottom: -5%;
    left: 0;
    background-size: cover !important;
    background-position: center center !important;
    height: 110%;
    width: 100%;
    z-index: 1;
  }

  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(to bottom, rgba(4, 3, 42, 0.78), rgba(57, 51, 84, 0.2) 80%);
    z-index: 2;

    @media (min-width: $large-screen) {
      background-image: linear-gradient(to right, rgba(4, 3, 42, 0.78), rgba(57, 51, 84, 0.2) 70%);
    }
  }

  &__inner {
    max-width: $container-width;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
    z-index: 3;
    
    @include poly-padding-y--small;

    @media (min-width: $medium-screen) {
      @include poly-padding-x--large;
    }

    @media (min-width: $large-screen) {
      @include poly-padding-y--large;
    }
  }

  &__content {
    box-sizing: content-box;
    @include poly-padding--large;

    @media (min-width: $large-screen) {
      @include poly-margin-y--large;
    }

    @media (min-width: $medium-screen) {
      flex-basis: 345px;
      @include poly-margin-left;
    }
    
    h3 {
      color: white;
    }

    p {
      font-size: 14px;
      letter-spacing: 1px;
      color: white;

      & + .cta {
        margin-top: $base-spacing;
      }
    }
  }

  &__title {
    position: absolute;
    right: 0;
    transform: translateX(100%);
    height: 100%;
  }
}

.section-side-heading {
  font-family: 'Biryani', sans-serif;
  font-size: 12px;
  font-weight: 200;
  font-style: normal;
  font-stretch: normal;
  line-height: normal;
  letter-spacing: 3.4px;
  color: #eb0047;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  transition: 0.3s;
  transform: rotate(90deg) translateY(-150%);
  transform-origin: left top;
  position: sticky;
  top: 120px;

  /**
   * This is a really, really cool hack, that I'm really pleased
   * with. It's forcing the element to have a height even though
   * the height is technically still restricted to the originally
   * painted width (IE, before any transforms are applied. This
   * means it can still play nicely with the position: sticky;
   * property and we can get some cool effects out of it.
   */
  margin-bottom: calc(100% + #{$base-spacing});

  @media (max-width: 1150px) {
    transform: rotate(90deg) translateY(-150%) translateX(-10%);
    opacity: 0;
  }

  &::before {
    content: "";
    display: block;
    height: 2px;
    width: $large-spacing*1.5;
    box-shadow: 0 0 6px 0 rgba(235, 0, 71, 0.5);
    background-image: linear-gradient(to left, #fd5d8a, #900b4a);
    margin-right: $base-spacing;
  }
}
