#carousel-header, .header-content, .hwk-header-content {
  // get rid of margin on top at bottom!
  margin-top: -40px;
  margin-bottom: 40px;
  @media (max-width: @screen-xs-max) {
    margin-top: -20px;
  }
}

// --------------------- //
// CAROUSEL HEADER
//
#carousel-header.carousel {
  margin-left: auto;
  margin-right: auto;
  @media (min-width: @screen-xl-min) {
    height: @header-slider-height-xl;
    width: @container-xl;
  }
  @media (min-width: @screen-lg-min)and (max-width: @screen-lg-max) {
    height: @header-slider-height-lg;
    width: @container-lg;
  }
  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
    height: @header-slider-height-md;
    width: @container-md;
  }
  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
    height: @header-slider-height-sm;
    width: @container-sm;
  }
  .carousel-inner {
    .item {

      &.active, .slider-text, .slider-image {
        @media (min-width: @screen-xl-min) {
          height: @header-slider-height-xl;
          max-height: @header-slider-height-xl;
        }
        @media (min-width: @screen-lg-min)and (max-width: @screen-lg-max) {
          height: @header-slider-height-lg;
          max-height: @header-slider-height-lg;
        }
        @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
          height: @header-slider-height-md;
          max-height: @header-slider-height-md;
        }
        @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
          height: @header-slider-height-sm;
          max-height: @header-slider-height-sm;
        }
      }

      // ---------------------------- //
      // default
      //
      &:not(.text-on-top) {
        background-color: transparent !important;

        .container {
          display: flex;
          padding-right: 0;
          padding-left: 0;
        }

        .slider-text {
          background-color: #fff !important;
          flex: 1;
          order: 2;

          display: flex;
          flex-direction: column;
          justify-content: center;
          padding: 20px 40px 20px (@header-slider-default-deco-width + 30);
          position: relative;


          h1, .h1 {
            font-size: 46px;
            @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
              font-size: 36px;
            }
            color: @hwk-blue-dark;
            position: relative;
            width: 100%;
            span:not(.slider-text-h1-deco):not(.slider-text-h1-text) {
              position: absolute;
              top: -35px;
              margin-top: 0;
            }
            &:before {
              content: '';
              display: block;
              width: @header-slider-default-deco-width;
              height: @header-slider-default-deco-height;
              background-color: @hwk-blue-light;
              top: 8px;
              left: -(@header-slider-default-deco-width + 30);
              position: absolute;
            }
          }

          p {
            color: @gray-dark;
            font-size: 16px;
            font-weight: 500;
            line-height: 1.4;
            width: 100%;
          }

          p:not(.lead) {
            a {
              position: relative;
              top: 20px;
              margin: 0;
              font-size: 12px;
              color: @hwk-blue-dark;
              border: 1px solid @hwk-blue-light-25;
              padding: 10px 20px;
            }
          }

          // color of deco box h1
          &.color-hwk-blue-light {
            h1:before, .h1:before {
              background-color: @hwk-blue-light;
            }
          }
          &.color-hwk-blue-dark {
            h1:before, .h1:before {
              background-color: @hwk-blue-dark;
            }
          }
          &.color-hwk-green-dark {
            h1:before, .h1:before {
              background-color: @hwk-green-dark;
            }
          }
          &.color-hwk-green-light {
            h1:before, .h1:before {
              background-color: @hwk-green-light;
            }
          }
          &.color-hwk-orange {
            h1:before, .h1:before {
              background-color: @hwk-orange;
            }
          }
          &.color-hwk-red-dark {
            h1:before, .h1:before {
              background-color: @hwk-red-dark;
            }
          }
          &.color-hwk-red-light {
            h1:before, .h1:before {
              background-color: @hwk-red-light;
            }
          }
          &.color-hwk-yellow {
            h1:before, .h1:before {
              background-color: @hwk-yellow;
            }
          }
        }

        .slider-deco {
          display: none;
        }

        .slider-image {
          order: 3;
          flex-basis: 56%;
          left: 0;

          @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
            flex-basis: 50%;
          }
        }
      }

      // ------------------------------ //
      // text on top
      //
      &.text-on-top {

        background-color: transparent;

        .container {
          position: relative;
        }

        // has color info
        .slider-deco-text-on-top {
          display: none;
        }
        .slider-text {
          display: flex;
          flex-direction: column;
          justify-content: flex-end;
          float: none;
          left: 0;

          :first-child {
            margin-top: 0;
          }
          :last-child {
            margin-bottom: 0;
          }

          & > div {
            padding: 30px 0;
          }

          h1, .h1 {
            font-size: 56px;
            font-weight: 600;
            position: relative;
            margin: 0;
            background-color: @hwk-blue-dark;
            display: inline;
            box-decoration-break: clone;
            line-height: 1.3;
            padding: 5px @header-slider-ontop-padding-width 10px @header-slider-ontop-padding-width;
            left: @grid-gutter-width-half;
            // deco line vertical
            .slider-text-h1-deco {
              margin: 0;
              display: block;
              position: absolute;
              top: 0;
              left: -(@grid-gutter-width-half * 2);
              // height added by js not applied anymore?!
              bottom: 0;
              width: (@grid-gutter-width-half * 2);
              background-color: @hwk-blue-light;
              min-height: 100%;
            }

            @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
                font-size: 50px;
            }
            @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
                font-size: 42px;
            }
          }

          .slider-text-h1 + p {
            margin-top: 30px;
            padding-right: 10%;
          }

          .btn-white {
            background-color: #fff;
            color: @hwk-blue-dark;
            border-color: #fff;
            &:active,
            &:focus,
            &:hover {
              color: @hwk-blue-dark;
              background-color: #fff;
              border-color: #fff;
            }
            width: auto;
          }
          
          .slider-text-container > *:not(.slider-text-h1) {
            margin-left: @grid-gutter-width-half + @header-slider-ontop-padding-width;
          }

          // large screen
          @media (min-width: @screen-xl-min) {
            max-width: 45%;
            .slider-text-container {
              padding-bottom: 60px;
            }
            h1 {
              .slider-text-h1-deco {
                left: -60px;
                width: 60px;
              }
            }
          }
        }

        // ------------- //
        // MOBILE
        // .text-on-top
        @media (max-width: @screen-xs-max) {
          background: white !important;
          &, .container {
            width: 100vw;
            padding: 0;
          }
          .container {
            background-image: none !important;
            display: flex;
            flex-direction: column;

            .slider-text {
              order: 3;
              .slider-text-container {
                padding: 0 0 15px 0;
              }
              // @since 2.0.1 (updated)
              .slider-text-h1 {
                overflow: hidden;
                padding-top: 4px;
                padding-bottom: 4px;
                h1, .h1 {
                  line-height: 1.5;
                }
              }
              p, a {
                color: @text-color;
              }

              .btn-white {
                color: @hwk-blue-dark;
                border-color: @hwk-blue-dark;
              }
            }
            .note.inside {
              position: relative;
              right: auto;
              left: 15px;
              bottom: 20px;
              order: 2;
            }
            .slider-image-text-on-top {
              display: block;
              position: relative;
              order: 1
            }
          }
        }
      }
    }
  }

  // @since 2.0.1
  .slider-link {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 2;
  }

  .carousel-control {
    width: 100px;
    .glyphicon {
      text-align: center;
      font-size: 30px;
      margin: 0;
    }
    &.left, &.right {
      &:focus,
      &:hover {
        background-image: none;
      }
    }
    &.left {
      left: -60px;
      .glyphicon {
        left: 0;
      }
    }
    &.right {
      text-align: right;
      right: -60px;
      .glyphicon {
        right: 0;
        left: auto;
      }
    }
    @media (max-width: @screen-md-max) {
      &.left {
        left: 0px;
      }
      &.right {
        right: 0px;
      }
    }
  }
  
  // -- CAROUSEL HEADER -- //
  @media (min-width: @screen-lg-min) {
    .carousel-inner {
      // -- default -- //
      .item:not(.text-on-top) {
        .slider-text, .slider-image {
          min-height: 380px;
        }
        h1, .h1 {
          margin-top: 35px;
        }
      }
    }
  }
  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
    .carousel-inner {
      // -- default -- //
      .item:not(.text-on-top) {
        .slider-text, .slider-image {
          min-height: 300px;
        }

        h1, .h1 {
          margin-top: 60px;
        }
      }
    }
  }
  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
    .carousel-inner {
      // -- default -- //
      .item:not(.text-on-top) {
        .slider-text, .slider-image {
          min-height: 300px;
        }

        h1, .h1 {
          margin-top: 60px;
        }
      }
      .text-on-top {
        p {
          font-size: @font-size-small;
        }
      }
    }
  }
  // -- CAROUSEL HEADER - MOBILE -- //
  @media (max-width: @screen-xs-max) {
    margin-bottom: 20px;
    .carousel-inner {
      .item {
        img {
          height: @header-slider-image-height-xs;
          width: 100%;
          object-fit: cover;
        }
      }
      // -- default -- //
      .item:not(.text-on-top) {
        .container {
          flex-direction: column;
          padding: 0;

          .slider-image, .bg-image {
            order: 1;
            width: 100vw !important;
            max-height: 230px;
          }
          .slider-text {
            padding: 30px 20px 20px 30px;
            width: 100vw;
            h1, .h1 {
              font-size: 24px !important;
              margin-bottom: 10px;
              span {
                top: -26px !important;
              }
              &::before {
                width: 20px;
                height: 40px;
                background-color: #408FE5;
                top: 4px;
                left: -30px;
              }
            }
          }
        }
        .note.inside {
          bottom: -5px;  
          left: 15px;
          right: auto;
        }
      }
      .text-on-top {
        h1, .h1 {
          font-size: 24px !important;
        }
        p:not(.note) {
          font-size: @font-size-small;
        }
      }
    }

    .carousel-control span.glyphicon {
      top: calc(@header-slider-image-height-xs / 2 + 15px);
    }

    .carousel-indicators {
      display: none;
    }
  }
}


// --------------------- //
// HEADER CONTENT
//
//.color-hwk-green-dark
.hwk-header-content {
  display: flex;

  // 1. column text
  .hwk-header-content-text {  // .col
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    flex: @hwk-header-content-text-prop;
    min-height: @hwk-header-content-height;
    @media (min-width: @screen-xl-min) {
      min-height: @hwk-header-content-height-xl;
    }
    .header-text {
      padding: 50px 10%;
      max-width: ((@container-lg - @grid-gutter-width) / 2);
      @media (min-width: @screen-xl-min) {
        max-width: ((@container-xl - (@grid-gutter-width-xl * 2)) / 2);
      }
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .header-deco {
      display: flex;
      width: 100%;
      div {
        height: 24px;
        &:first-child {
          flex: 1;
        }
        &:last-child {
          flex: 3;
        }
      }
    }

    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
      flex: @hwk-header-content-text-prop-md;
    }
    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
      flex: @hwk-header-content-text-prop-sm;
    }
  }

  // 2. Column Image
  .hwk-header-content-image {
    flex: @hwk-header-content-image-prop;
    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
      flex: @hwk-header-content-image-prop-md;
    }
    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
      flex: @hwk-header-content-image-prop-sm;
    }
  }

  @media (max-width: @screen-xs-max) {
    flex-direction: column;
    width: 100%;
    .hwk-header-content-image {
      flex: 1 230px;
      order: 1;
    }
    .hwk-header-content-text {
      flex: 1;
      order: 2;
      align-items: flex-start;
      min-height: 1px;
      .header-text {
        padding: 30px 20px;
      }
    }
  }
}