// ----------------------------------------------------- //
// NEW CLASSES
/*

  .align-middle.col // needs -stretch on row
  .aria-structure   // used on ul to make items more accessable not really ul
  .bg-color
  .bg-white
  .bg-white-box
  .border-right
  .border-right-lg
  .border-right-md
  .border-right-sm
  .border-bottom
  .border-bottom-lg
  .border-bottom-md
  .border-bottom-sm
  .border-bottom-xs
  .d-flex
  .d-flex-wrap
  .hwk-icon-menu.col
  .hwk-teaser-image-info      (presse teaser => smaller image height)
  .header-content             (0 margin-top)
  .hwk-header-content         (Header element image text)
  .listgroup-arrow
  .listgroup-arrow-right
  .listgroup-content
  .listgroup-footer
  .listgroup-image-blog 
  .listgroup-info
  .list-group-item (?)
  .listgroup-wrapper
  .list-icon-check
  .no-margin-x
  .no-margin-y
  .no-padding-x
  .no-padding-y
  .no-wrap                      // @since 2.0.1
  .space-around
  .stretch                      (goes usually with .d-block-xs for mobile)
  .submenu-full-width
  .teaser-box
  .teaser-icon
  .teaser-image-info
  .top-blog-box
  .top-blog-image
*/

// ----------------------------------------------------- //

.test {
  border: 1px solid #f0f;
}

// --------------------- //
// ICON FONT
// see font.less
// (not showing on some server all lowercase)

// --------------------- //
// GENERAL
//
// cannot see reason for setting this to 160/-160
.content section {
  padding-top: 0;
  margin-top: 0;
}

// set all the different paddings for devices
footer .container,
.container {
  padding-right: @grid-gutter-width-half;
  padding-left: @grid-gutter-width-half;
  @media (min-width: @screen-xl-min) {
    .row {
      margin-left: -@grid-gutter-width-half-xl;
      margin-right: -@grid-gutter-width-half-xl;
    }

    padding-right: @grid-gutter-width-half-xl;
    padding-left: @grid-gutter-width-half-xl;
  }
  @media (max-width: @screen-xs-max) {
    padding-left: @grid-gutter-width-half-xs;
    padding-right: @grid-gutter-width-half-xs;
    .row {
      margin-left: -@grid-gutter-width-half-xs;
      margin-right: -@grid-gutter-width-half-xs;
    }
  }
}

// @todo documentation
// to prepare row for stretching content:
// 1) .d-flex.d-flex-wrap
// 2) .stretch
// but it needs segments which have height: 100%
.row.d-flex.d-flex-wrap,
.row.stretch {
  display: flex;
  flex-wrap: wrap;
  // safari bug fix (will wrap early)
  &::before, &::after {
    width: 0;
  }
}
@media (min-width: @screen-lg-min) {
  .row.d-flex-lg.d-flex-wrap-lg,
  .row.stretch-lg {
    display: flex;
    flex-wrap: wrap;
    // safari bug fix (will wrap early)
    &::before, &::after {
      width: 0;
    }
  }
}
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
  .row.d-flex-md.d-flex-wrap-md,
  .row.stretch-md {
    display: flex;
    flex-wrap: wrap;
    // safari bug fix (will wrap early)
    &::before, &::after {
      width: 0;
    }
  }
}
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  .row.d-flex-sm.d-flex-wrap-sm,
  .row.stretch-sm {
    display: flex;
    flex-wrap: wrap;
    // safari bug fix (will wrap early)
    &::before, &::after {
      width: 0;
    }
  } 
}
@media (max-width: @screen-xs-max) {
  .row.d-flex-xs.d-flex-wrap-xs,
  .row.stretch-xs {
    display: flex;
    flex-wrap: wrap;
    // safari bug fix (will wrap early)
    &::before, &::after {
      width: 0;
    }
  }
}



.row {
  margin-left: -@grid-gutter-width-half;
  margin-right: -@grid-gutter-width-half;
  @media (min-width: @screen-xl-min) {
    margin-left: -@grid-gutter-width-half-xl;
    margin-right: -@grid-gutter-width-half-xl;
  }
  @media (max-width: @screen-xs-max) {
    margin-left: -@grid-gutter-width-half-xs;
    margin-right: -@grid-gutter-width-half-xs;
  }
}

// PADDING
.no-padding-x {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.no-padding-y {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.no-margin-x {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.no-margin-y {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

@media (max-width: @screen-xs-max) {
  .margin-top-l, .margin-top-m {
    margin-top: 30px !important;
  }

  .padding-top-l, .padding-top-m {
    padding-top: 30px !important;
  }

  .margin-bottom-l, .margin-bottom-m {
    margin-bottom: 30px !important;
  }

  .padding-bottom-l, .padding-bottom-m {
    padding-bottom: 30px !important;
  }
}

// HR LINES
#content {

  &:focus {
    outline: none;
  }

  hr {
    border-top: 2px solid @hwk-blue-light-25;
  }

  .bg-white-box {
    hr {
      border-top: 1px solid @hwk-blue-light-25;
    }
  }

  .content {
    hr {
      &.margin-top-s {
        margin-top: 25px !important;
      }

      &.margin-bottom-s {
        margin-bottom: 25px !important;
      }
    }
  }
}

// COLORS
.bg-white-box, .top-blog-box {
  background-color: #fff;
  box-shadow: 1px 1px 6px rgba(127, 127, 127, 0.3);

  &.row {
    margin-left: -@listgroup-padding-x;
    margin-right: -@listgroup-padding-x;
    // see screen xl
    @media (min-width: @screen-xl-min) {
      margin-left: -@listgroup-padding-x-xl;
      margin-right: -@listgroup-padding-x-xl;
    }
    @media (max-width: @screen-xs-max) {
      // have it run over the edge so no shadow left/right
      //margin-left: -@listgroup-padding-x-xs;
      //margin-right: -@listgroup-padding-x-xs;
      // margin will be -18px so add 3px as padding to be 15px again
      padding-left: @listgroup-padding-x - @grid-gutter-width-half-xs;
      padding-right: @listgroup-padding-x - @grid-gutter-width-half-xs;
    }
  }
}

.btn-default {
  &:hover {
    border-color: @hwk-blue-light;
    color: @hwk-blue-light;
    background-color: #fff;
  }
}


.bg-white {
  background-color: #fff !important;
}

.bg-color {
  background-color: @body-bg;
}

.bg-blue-light-25,
div.color-blue-light-25 {
  background-color: @hwk-blue-light-25 !important;
}

.border-right {
  border-right: 1px solid @hwk-blue-light-25;
  @media (max-width: @screen-xs-max) {
    border-right: none;
    border-bottom: 1px solid @hwk-blue-light-25;
  }
}

@media (min-width: @screen-lg-min) {
  .border-right-lg {
    border-right: 1px solid @hwk-blue-light-25;
  }
}

@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
  .border-right-md {
    border-right: 1px solid @hwk-blue-light-25;
  }
}

@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  .border-right-sm {
    border-right: 1px solid @hwk-blue-light-25;
  }
}

.border-bottom {
  border-bottom: 1px solid @hwk-blue-light-25;
}

@media (min-width: @screen-lg-min) {
  .border-bottom-lg {
    border-bottom: 1px solid @hwk-blue-light-25;
  }
}

@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
  .border-bottom-md {
    border-bottom: 1px solid @hwk-blue-light-25;
  }
}

@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  .border-bottom-sm {
    border-bottom: 1px solid @hwk-blue-light-25;

    &.teaser-tile {
      padding-bottom: 20px;
    }
  }
}

@media (max-width: @screen-xs-max) {
  .border-bottom-xs {
    border-bottom: 1px solid @hwk-blue-light-25;

    &.teaser-tile {
      padding-bottom: 10px;
    }
  }
}

.glyphicon {
  &.color-hwk-green-dark {
    &::before {
      color: @hwk-green-dark;
    }
  }
}

// -- HELPER --//
.d-flex {
  display: flex !important;
}
.d-flex-wrap {
  flex-wrap: wrap !important;
}
.d-block {
  display: block !important;
}
.d-inline-block {
  display: inline-block !important;
}

@media (min-width: @screen-lg-min) {
  .d-flex-lg {
    display: flex !important;
  }
  .d-flex-wrap-lg {
    flex-wrap: wrap !important;
  }
  .d-block-lg {
    display: block !important;
  }
  .d-inline-block-lg {
    display: inline-block !important;
  }
}

@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
  .d-flex-md {
    display: flex !important;
  }
  .d-flex-wrap-md {
    flex-wrap: wrap !important;
  }
  .d-block-md {
    display: block !important;
  }
  .d-inline-block-md {
    display: inline-block !important;
  }
}

@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  .d-flex-sm {
    display: flex !important;
  }
  .d-flex-wrap-sm {
    flex-wrap: wrap !important;
  }
  .d-block-sm {
    display: block !important;
  }
  .d-inline-block-sm {
    display: inline-block !important;
  }
}

@media (max-width: @screen-xs-max) {
  .d-flex-xs {
    display: flex !important;
  }
  .d-flex-wrap-xs {
    flex-wrap: wrap !important;
  }
  .d-block-xs {
    display: block !important;
  }
  .d-inline-block-xs {
    display: inline-block !important;
  }
}
// @since 2.0.1
.no-wrap {
  white-space: nowrap;
}

// on col vertical align middle
.col.align-middle {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

// -- FIX BOOTSTRAP BUG --//
// column not automatically 100% on mobile
@media (max-width: @screen-xs-max) {
  .col:not([class*="col-xs"]) {
    width: 100%;
  }
}

// container inside container-fluid
.container-fluid {
  padding: 0;
}
// -- remove margin top from #content to have full width background start after menu -- //
// -- @todo find coherent solution --/
// changed: turn whole body bg white instead and insert blue container-fluid if needed (see article)


// --------------------- //
// HEADER 
//
// SEARCH
.search-form {
}


// --------------------- //
// FORM
//
// firefox select option showing times roman fix
input,
button,
select,
textarea {
  // variabels not working here ?!
  font-family: @font-family-base, sans-serif !important;
}

// copied from bootstrap 4
/*.custom-select {
    display: inline-block;
    width: 100%;
    height: calc(2.25rem + 2px);
    padding: .375rem 1.75rem .375rem .75rem;
    line-height: 1.5;
    color: #495057;
    vertical-align: middle;
    background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center;
    background-size: auto;
    background-size: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}*/

.content form, form {

  select {
    padding-left: 10px;
    padding-right: 10px;

    // from bootstrap 4
    line-height: 1.5;
    vertical-align: middle;
    background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center @input-bg;
    background-size: auto;
    background-size: 14px 10px;
    appearance: none;

    option {
      // nothing happens here
      padding: 5px 0;
    }
  }

  .form-group {
    position: relative;

    label, .control-label {
      transition: all .3s;
      color: @input-label-color;
      font-size: @input-label-size;
      position: absolute;
      top: ((@input-height-base - @font-size-small) / 2);
      margin: 0;
      left: @grid-gutter-width-half + 12;
      @media (min-width: @screen-xl-min)  {
        left: @grid-gutter-width-half-xl + 12;
      }
    }

    .form-control {
      padding-top: 16px;
      background-color: @input-bg;
      color: @input-color;
      border-color: @input-border;
      border-radius: @input-border-radius;
      box-shadow: none;

      &::placeholder {
        opacity: 0; // hide it as it used to be the "label"
      }

      &:focus {
        border-color: @input-border-focus;
      }
    }

    // class .filled is set in form.js
    &.filled {
      .form-control + label {
        font-size: @font-size-xxs;
        top: 4px;
      }
    }

    // always with select fields
    select.form-control + label {
      font-size: @font-size-xxs;
      top: 4px;
    }

    input {
      height: @input-height-base;
    }

    &.has-feedback {
      .form-control {
        padding-right: @padding-base-horizontal;
      }

      .glyphicon.form-control-feedback {
        font-size: @font-size-base-p;
        position: absolute;
        top: ((@input-height-base - @font-size-small) / 2);
        right: 20px;
        @media (min-width: @screen-xl-min)  {
          right: @grid-gutter-width-half-xl;
        }
      }

      .form-control {
        &:focus {
          box-shadow: none;
        }
      }

      &.has-success {
        .form-control {
          color: @input-color;
          border-color: @state-success-border;
          background-color: @input-bg;
        }

        .glyphicon.form-control-feedback {
          color: @brand-success;
        }
      }

      &.has-error {
        .form-control {
          color: @input-color;
          border-color: @state-danger-border;
          background-color: @input-bg;
        }

        .glyphicon.form-control-feedback {
          color: @brand-danger;
        }
      }
    }
  }

  input[type="checkbox"] {
    appearance: checkbox;
    width: 24px;
    height: 24px;
  }

  input[type="radio"] {
    appearance: radio;
    width: 20px;
    height: 20px;
  }

  .checkbox, .radio {
    label {
      padding-left: 30px;

      input[type="checkbox"],
      input[type="radio"] {
        top: -5px;
        margin-left: -30px;
      }
    }
  }
}

//
// IMAGES
// -----------------
body .content img {
  &.img-responsive {
    width: 100%;
  }
  & + * {
    margin-top: 15px;
  }
  & + h4,
  & + h5,
  & + h6,
  & + p {
    margin-top: 10px;
  }
  & + .note,
  & + figcaption {
    margin-top: 5px;
  }
}

// --------------------- //
// SWIPE HORIZONZAL
//
.swipe-horizontal-wrapper { // new
  position: relative;

  &.has-swipe {
    padding: 0 15px;
  }

  a.swipe-horizontal-arrow {
    border-bottom: none;
    &:active,
    &:focus,
    &:hover {
      background-color: transparent;
    }
  }
}

.swipe-horizontal-container {
  overflow: hidden;
  background: @color-background;
}

.swipe-horizontal {
  position: relative;
  white-space: nowrap;

  li {
    float: none;
    display: inline-block;
  }
}

.swipe-horizontal-arrow {
  cursor: pointer;
  position: relative;

  &, span.glyphicon {
    color: @hwk-blue-dark;
    font-size: @font-size-small;
  }
  span.glyphicon {
    top: 2px;
    text-align: center;
    width: 25px;
  }

  &.disabled {
    cursor: initial;

    &, span.glyphicon {
      color: @hwk-blue-dark-25;
    }
  }

  position: absolute;
  top: 10px;
  width: 25px;
  height: 25px;
  display: block;
}

.swipe-horizontal-left {
  left: -15px;
}

.swipe-horizontal-right {
  right: -15px;
}

body, #content, .content {
  // not used yet
  ul.aria-structure {
    list-style: none;
    padding: 0;
    margin: 0;
  }
}

// --------------------- //
// OTHER
//
.content {
  .link-item {
    margin-bottom: 10px;
    span.glyphicon {
      top: 1px;
      float: left;
      //margin-right: 5px;
      width: 30px;
      font-size: 22px;
    }
    span.small {
      float: none;
      margin-bottom: 0;
    }
  }
}

// --------------------- //
// FOOTER
//
// to make it available again for other footer elements
footer {
  margin-top: 0;
}

footer.site-footer {
  // @todo: had margin top before => check margin bottom content
  &, #footer-bottom {
    margin-top: 0;
  }

  #footer-content {
    ul.aria-structure {
      // not mobile
      @media (min-width: @screen-sm-min) {
        display: flex;
        li {
          margin-right: 50px;

          &:last-child {
            margin-right: 0;
            margin-left: auto;
          }
        }
      }
      @media (max-width: @screen-xs-max) {
        li {
          margin-bottom: 10px;
          &:last-child {
            margin-bottom: 0;
            margin-top: 20px;
          }
        }
      }
    }
  }
}

#footer-bottom {
  .row.border-top,
  .col.border-top {
    &::before {
      content: '';
      display: block;
      width: 100%;
      height: 1px;
      background-color: #fff;
      margin-bottom: 8px;
    }
  }

  .row.border-top {
    &::before {
      margin-left: @grid-gutter-width-half;
      margin-right: @grid-gutter-width-half;
      width: calc(100% - @grid-gutter-width);

      @media (min-width: @container-xl) {
        margin-left: @grid-gutter-width-half-xl;
        margin-right: @grid-gutter-width-half-xl;
        width: calc(100% - @grid-gutter-width-xl);
      }
      @media (max-width: @screen-xs-max) {
        margin-left: @grid-gutter-width-half-xs;
        margin-right: @grid-gutter-width-half-xs;
        width: calc(100% - @grid-gutter-width-half-xs * 2);
      }
    }
  }

  .copyright {
    margin-top: 10px;
  }

  nav {
    text-align: right;
  }

  ul#footer-menu {
    margin-top: 10px;

    li {
      display: inline-block;
      margin-left: 15px;

      &::before {
        content: "\E072";
        font-family: @icon-font-name;
        color: #fff;
        font-size: 12px;
      }
    }
  }

  @media (max-width: @screen-sm-max) {
    ul#footer-menu {
      li {
        display: block;
        margin-left: 0;
        text-align: left;
      }

      margin-bottom: 20px;
    }
  }
}

// BIG SCREEN XL
@media (min-width: @container-xl) {
  /*.form-group {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }*/
}

// --------------------- //
// scrollspy
// added class .scrollspy so all here is replaced
//
#content #myScrollspy, #content .scrollspy {
  z-index: 999;
  ul.nav-tabs {
    margin-top: 40px;
    background-color: white;
    border: none;
    box-shadow: 1px 1px 6px rgba(127, 127, 127, 0.3);
    & > li {
      &.static {
        color: #000;
        font-weight: @font-weight-bold;
        padding: 8px 20px;
      }
      & > a {
        color: @hwk-blue-dark;
        padding: 13px 20px;
        border: none;
        border-top: 1px solid @hwk-blue-light-25;
        margin-right: 0;
      }
      &.active a,
      a:hover,
      a:active,
      a:focus {
        background-color: @hwk-blue-light-25;
        color: @hwk-blue-dark;
      }
    }
    &.affix {
      top: 120px;
    }
    &.affix-bottom {
      position: absolute;
    }
  }

  .nav-stacked > li + li {
    margin-top: 0;
  }

  &.col-md-2 {
    .nav-tabs {
      // 2 due to border 1px left/right
      @media (min-width: @screen-xl-min) {
        width: (@container-xl * .1666666667) - @grid-gutter-width-half-xl * 2 - 2;
      }
      @media (min-width: @screen-lg-min) and (max-width: @screen-lg-max) {
        width: (@container-lg * .1666666667) - @grid-gutter-width-half * 2 - 2;
      }
      @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
        width: (@container-md * .1666666667) - @grid-gutter-width-half * 2 - 2;
      }
    }
  }

  &.col-md-3 {
    .nav-tabs {
      // 2 due to border 1px left/right
      @media (min-width: @screen-xl-min) {
        width: (@container-xl * .25) - @grid-gutter-width-half-xl * 2 - 2;
      }
      @media (min-width: @screen-lg-min) and (max-width: @screen-lg-max) {
        width: (@container-lg * .25) - @grid-gutter-width-half * 2 - 2;
      }
      @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
        width: (@container-md * .25) - @grid-gutter-width-half * 2 - 2;
      }
    }
  }
}

// --------------------- //
// 3. NAV LEVEL classic
//
#header-nav-3 {

  //display: flex;    // added by js
  justify-content: center;

  position: relative;
  z-index: 2;
  margin-top: -40px;
  padding-top: 30px;
  padding-bottom: 30px;
  margin-bottom: 40px;
  width: 100%;
  background: #fff;
  box-shadow: 3px 3px 6px rgba(@gray-dark, .2);

  h1#head-nav-3,
  #head-nav-3.h1 {
    font-size: @font-size-h3;
    color: @hwk-blue-dark !important;
    margin: 0;
    padding: 0;
  }
  #nav-level-3 {
    ul {
      list-style: none;
      li {
        &, a {
          color: @hwk-blue-dark;
          font-weight: @font-weight-normal;
        }
        &.active > a,
        a:hover, a:focus, a:active {
          color: @hwk-blue-dark;
          font-weight: @font-weight-bold;
        }
      }
    }
  }
  & > .row {
    margin-left: auto;
    margin-right: auto;
    @media (min-width: @screen-xl-min) {
      width: @container-xl;
    }
    @media (min-width: @screen-lg-min) and (max-width: @screen-lg-max) {
      width: @container-lg;
    }
    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
      width: @container-md;
    }
    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
      width: @container-sm;
    }
    @media (max-width: @screen-xs-max) {
      width: 100%;
    }
  }
  // not mobile | tablet
  @media (min-width: @screen-md-min) {

    #nav-level-3 {
      align-self: flex-end;
      ul {
        display: flex;
        margin: 0;
        // @since 2.0.6
        flex-wrap: wrap;
        li {
          margin: 0 0 2px 30px;
        }
      }
    }
    .col-md-12 {
      float: none;
      display: flex;
      justify-content: space-between;
      .clearfix, hr {
        position: absolute;
        display: none;
      }
    }
  }

  // mobile | tablet
  @media (max-width: @screen-sm-max) {
    margin-top: -30px;
    padding-left: @grid-gutter-width-half-xs;
    padding-right: @grid-gutter-width-half-xs;
    #nav-level-3 {
      margin-top: 20px;
      ul {
        li {
          margin-top: 10px;
          float: none;
        }
      }
    }
    hr {
      display: none;
    }
  }

  @media (max-width: @screen-xs-max) {
    top: -20px;
  }
}
// --------------------- //

//
// ANCHOR scroll and offset @since 2.0.6
// -------------------------------------
html {
  scroll-behavior: smooth;
  scroll-padding-top: @navbar-height;
}