/**
 * @file
 * Hero
 *
 * Contains styles for hero.
 */

@use '_helper' as *;

.hero {
  margin-bottom: 30px;
  padding: 0 18px 30px;
  position: relative;
  color: $color-white;
  background-color: $color-blue-dark;

  a,
  button {
    @include focus-light;
  }

  .cta {
    &--button {
      @include ctaButton($darkBG: true);
    }
  }

  &.has-section-nav {
    padding-bottom: 66px;
  }

  @media screen and (min-width: $break-medium) {
    margin-bottom: $spacing-vertical-sm;
    padding: 0 30px 60px;

    &.has-section-nav {
      padding-bottom: 66px;
    }
  }

  @media screen and (min-width: $break-large) {
    margin-bottom: 80px;
    padding: 0 59px 60px;

    &.has-section-nav {
      padding-bottom: 70px;
    }
  }

  &__content {
    margin: 0 auto;
    padding-top: 195px;
    max-width: calc($content-max - 58px * 2);
    position: relative;
    z-index: 1;

    @media screen and (min-width: $break-large) {
      padding-top: 232px;
    }
  }

  &__title {
    @include h1-slab;
  }

  &__cta {
    padding: rem(20px) 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: rem(10px);

    @media screen and (min-width: $break-large) {
      padding: rem(37px) 0 0;
      gap: rem(13px);
    }
  }

  &__image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
  }

  &--with-image {
    &::before {
      content: '';
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1;
      background: linear-gradient(180deg, rgba($color-black, 0) 0%, $color-black 100%);
    }

    .hero__content {
      padding-top: 68.1%;

      @media screen and (min-width: $break-medium) {
        padding-top: 31.8%;
      }

      @media screen and (min-width: $break-large) {
        padding-top: 34.2%;
      }
    }
  }

  &--home {
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
    background-color: $color-black;

    a {
      color: $color-white;

      &:hover {
        text-decoration-color: $color-white;
      }
    }

    .container {
      position: relative;
      padding-bottom: rem(120px);
      z-index: 101;

      @media screen and (min-width: $break-medium) {
        padding-bottom: rem(130px);
      }

      @media screen and (min-width: $break-large) {
        padding-bottom: rem(150px);
      }
    }

    .hero {
      &__bg {
        position: relative;

        @media screen and (min-width: $break-medium) {
          position: static;
        }

        &::after {
          content: '';
          position: absolute;
          top: 0;
          left: 50%;
          z-index: 2;
          width: 100svw;
          height: 100%;
          transform: translateX(-50%);
          background: linear-gradient(180deg, rgba(0, 0, 0, 0.60) 2.06%, rgba(0, 0, 0, 0.00) 24.43%), linear-gradient(199deg, rgba(0, 0, 0, 0.00) 37.43%, rgba(0, 0, 0, 0.60) 57.06%);

          @media screen and (min-width: $break-medium) {
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.50) 40.5%, rgba(0, 0, 0, 0.50) 100%);
          }
        }

        img,
        picture {
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          object-fit: cover;
          z-index: 0;
        }
      }

      &__video {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity 0.3s ease;

        &.js-show {
          opacity: 1;

          +.container {
            &:before {
              content: '';
              position: absolute;
              top: 0;
              left: 50%;
              width: calc(100svw + 2px); // avoid subpixel issues when scaling
              height: 79px;
              transform: translateX(-50%);
              background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
              pointer-events: none;

              @media screen and (min-width: $break-medium) {
                height: 91px;
              }

              @media screen and (min-width: $break-large) {
                height: 104px;
              }
            }
          }
        }

        &-btn {
          position: absolute;
          left: rem(18px);
          bottom: rem(70px);
          z-index: 2;
          width: rem(30px);
          height: rem(30px);
          border: 1px solid $color-white;
          background-color: $color-black;
          border-radius: 100%;
          transition: all .3s;

          @media screen and (min-width: $break-medium) {
            left: rem(31px);
            bottom: rem(65px);
            width: rem(38px);
            height: rem(38px);
          }

          @media screen and (min-width: $break-large) {
            left: rem(58px);
            bottom: rem(80px);
          }

          &:hover {
            border-color: $color-black;
            background-color: $color-white;

            &::before {
              border-color: $color-black;
            }
          }

          &::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: rem(4px);
            height: rem(12px);
            border: .3rem solid $color-white;
            border-width: 0 .3rem;
            transform: translate(-50%, -50%);
          }

          &.is-paused {
            &::before {
              width: 0;
              height: 0;
              border-top: rem(7px) solid transparent;
              border-bottom: rem(7px) solid transparent;
              border-left: rem(10px) solid $color-white;
              border-right: 0;
              clip-path: polygon(0 0, 0% 100%, 100% 50%);
              transform: translate(calc(-50% + 2px), -50%);
            }

            &:hover {
              &::before {
                border-left-color: $color-black;
              }
            }
          }
        }
      }

      &__title {
        padding: rem(198px) 0 0;
        color: $color-white;
        background-color: transparent;

        @media screen and (min-width: $break-medium) {
          padding: rem(144px) 0 0;
        }

        @media screen and (min-width: $break-large) {
          margin: 0;
          padding: rem(276px) 0 0;
        }

        h1 {
          max-width: 550px;

          @media screen and (min-width: $break-large) {
            max-width: 600px;
          }
        }

        &-eyebrow {
          font-family: $font-roboto-condensed;
          font-size: rem(18px);
          font-style: normal;
          font-weight: 900;
          line-height: 1.05;
          /* 18.9px */
          text-transform: uppercase;

          @media screen and (min-width: $break-medium) {
            font-size: rem(22px);
          }

          @media screen and (min-width: $break-large) {
            font-size: rem(32px);
          }
        }

        &-main {
          display: block;
          font-family: "Roboto Slab";
          text-transform: capitalize;
          font-size: rem(55px);
          font-style: normal;
          font-weight: 400;
          line-height: 0.9;

          @media screen and (min-width: $break-medium) {
            font-size: rem(80px);
          }

          @media screen and (min-width: $break-large) {
            font-size: rem(120px);
          }
        }
      }
    }
  }

  &--program {
    .hero {
      &__title {
        display: flex;
        flex-direction: column-reverse;
        font-size: rem(30px);
        margin-bottom: rem(10px);
        font-style: normal;
        font-weight: 400;
        line-height: 1.05;

        @media screen and (min-width: $break-medium) {
          font-size: rem(48px);
          margin-bottom: rem(5px);
        }

        @media screen and (min-width: $break-large) {
          font-size: rem(70px);
          margin-bottom: rem(10px);
          flex-direction: row;
          align-items: flex-end;
          gap: rem(20px)
        }
      }

      &__program {
        &-summary {
          font-family: $font-roboto-slab;
          font-size: rem(25px);
          font-style: normal;
          font-weight: 300;
          line-height: 1.2;

          @media screen and (min-width: $break-medium) {
            font-size: rem(32px);
          }

          @media screen and (min-width: $break-large) {
            font-size: rem(38px);
          }
        }

        &-ctas {
          display: flex;
          gap: rem(10px);
          margin-top: rem(20px);

          @media screen and (min-width: $break-large) {
            gap: rem(20px);
            margin-top: rem(29px);
          }

          .cta--button {
            @include ctaButton(true);
            font-size: rem(14px);

            @media screen and (min-width: $break-large) {
              font-size: rem(18px);
            }
          }
        }
      }
    }
  }

  &--blog-detail {
    .hero__title {
      @include h3;
    }
  }
}

.breadcrumbs {
  margin-bottom: 10px;

  @media screen and (min-width: $break-large) {
    margin-top: 9px;
    margin-bottom: 10px;
  }

  ul {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 13px;
    list-style-type: none;

    li {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 0;
      gap: 6px;

      @media screen and (min-width: $break-large) {
        flex-direction: row-reverse;
      }

      &:not(:last-child) {
        @media screen and (max-width: ($break-large - 1)) {
          display: none;
        }
      }

      &::before {
        content: '';
        margin-left: 3px;
        display: block;
        width: 10px;
        height: 10px;
        border-top: solid 2px $color-gold;
        border-right: 0;
        border-bottom: 0;
        border-left: solid 2px $color-gold;
        transform: rotate(-45deg);
        position: static;
        border-radius: 0;
        background-color: transparent;

        @media screen and (min-width: $break-medium) {
          margin-left: 4px;
        }

        @media screen and (min-width: $break-large) {
          margin-left: 0;
          transform: rotate(135deg);
        }
      }
    }

    a {
      @include breadcrumb-linked;
      @include hover-body-link($color-white)
    }
  }
}