.header-project-detail {
  position: relative;
  background-color: $white;
  padding-top: 170px;
  overflow: hidden;
  transition: 0.2s background-color;

  &__wrapper {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    max-width: $max-width;
    margin: 0 auto;

    @include mdx {
      flex-direction: column-reverse;
      justify-content: center;
    }
  }

  &__background-white {
    width: 100%;
    height: 250px;
    max-width: 820px;
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: $white;
    z-index: 1;
    opacity: 0;
    transform: translateY(100%);
    transition: 0.3s all 0.2s;

    .js-opening & {
      opacity: 1;
      transform: translateY(0%);
    }

    @include mdx {
      max-width: 85%;
      height: 220px;
    }

    @include sm {
      height: 200px;
    }
  }

  &__background {
    width: 100%;
    height: 100%;
    max-width: 940px;
    position: absolute;
    top: 0;
    right: 0;
    background-color: $secondary-color;
    z-index: 0;
    opacity: 0;
    transform: translateX(100%);
    transition: 0.3s all;

    .js-opening & {
      opacity: 1;
      transform: translateX(0%);
    }

    @include mdx {
      max-width: 40%;
    }
  }

  &--green, &--grey {
    .header-project-detail__background {
      background-color: $topic-green;
    }

    &.js-opening {
      background-color: rgb(152, 194, 31, 0.18);
    }
  }
  &--yellow {
    .header-project-detail__background {
      background-color: $topic-yellow;
    }

    &.js-opening {
      background-color: rgb(253, 195, 0, 0.18);
    }
  }
  &--blue {
    .header-project-detail__background {
      background-color: $topic-blue;
    }

    &.js-opening {
      background-color: rgb(88, 156, 215, 0.18);
    }
  }
  &--orange {
    .header-project-detail__background {
      background-color: $topic-orange;
    }

    &.js-opening {
      background-color: rgb(243, 146, 0, 0.18);
    }
  }

  &__info-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin: 0 65px 140px;
    max-width: 550px;
    position: relative;
    z-index: 3;

    @include sm {
      margin: 0 20px 48px;
    }
  }

  &__title {
    color: $primary-color;
    font-weight: 600;
    max-width: 800px;
    font-size: 100px;
    line-height: 84px;
    margin: 80px auto 30px;
    opacity: 0;
    transition: 0.3s opacity 0.6s;

    .js-opening & {
      opacity: 1;
    }

    @include mdx {
      font-size: 75px;
      line-height: 68px;
    }

    @include sm {
      font-size: 50px;
      line-height: 48px;
      margin: 30px auto 30px;
    }
  }
  &__subtitle {
    color: $primary-color;
    font-weight: 500;
    max-width: 450px;
    font-size: 22px;
    line-height: 27px;
    margin: 0;
    opacity: 0;
    transition: 0.3s opacity 0.7s;

    .js-opening & {
      opacity: 1;
    }

    @include sm {
      font-size: 18px;
      max-width: 82%;
    }
  }
  &__banner-container {
    position: relative;
    width: 100%;
    height: 520px;
    max-width: 785px;
    margin-bottom: 140px;
    z-index: 2;

    .header-project-detail__banner {
      color: transparent;
      -webkit-text-stroke: 2px white;
      position: absolute;
      right: 20px;
      top: -110px;
      margin: auto;
      text-align: left;
      height: 250px;
      font-size: 200px;
      text-transform: capitalize;
      font-weight: bold;
      line-height: 190px;
      z-index: -1;
      font-family: var(--font-default);;
      /* For vertical centering on Chrome and Firefox */
      display: inline-block;
      white-space: pre-wrap;
      opacity: 0;
      transform: translateX(-100%);
      transition: 0.3s all 0.4s;

      @include mdx {
        left: 20px;
        right: auto;
      }

      .js-opening & {
        opacity: 1;
        transform: translateX(0%);
      }
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0;
      transform: translateY(60px);
      transition: 0.4s all ease-out 0.4s;

      .js-opening & {
        transform: translateY(0);
        opacity: 1;
      }
    }

    @include mdx {
      align-self: flex-end;
      margin-bottom: 0px;
      padding-left: 60px;
    }

    @include sm {
      height: 100vw;
      max-height: 315px;

      .header-project-detail__banner-country {
        right: unset;
        left: 20px;
      }
    }
  }
}
