// ----------------------- //
// DEFAULT
//
.teaser-tile {
  display: flex;
  flex-direction: column;
  height: 100%; // @todo: docu: needs row to have d-flex
}

.teaser-image {
  margin-bottom: 20px;
  min-height: @hwk-teaser-image-height;
  max-height: @hwk-teaser-image-height;
  img {
    min-width: 100%;
    min-height: @hwk-teaser-image-height;
    object-fit: cover;
  }
  @media (min-width: @screen-xl-min) {
    max-height: @hwk-teaser-image-height-xl;
    img {
      min-height: @hwk-teaser-image-height-xl;
    }
  }
}

@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  .col-sm-12 {
    .teaser-tile {
      flex-direction: row;
      .teaser-image {
        margin-bottom: 0;
        flex: 1;
        img {
          height: 100%;
          object-fit: cover;
        }
      }
      .teaser-text {
        padding: 0 @grid-gutter-width @grid-gutter-width @grid-gutter-width;
        flex: 1;
      }

      .teaser-text {
        padding-top: @grid-gutter-width;
        display: flex;
        flex-direction: column;
        justify-content: center;
        p {
          &:last-child {
            padding-bottom: 0;
          }
        }
      }
    }
  }
}


.teaser-icon {
  width: 60px;
  img {
    height: 60px;
    margin: @listgroup-padding-x;
    @media (min-width: @screen-xl-min) {
      margin: @listgroup-padding-x-xl;
    }
  }
  .glyphicon {
    margin: 5px @listgroup-padding-x;
    @media (min-width: @screen-xl-min) {
      margin: 10px @listgroup-padding-x-xl;
    }
    &::before {
      font-size: 76px;
      line-height: 1.2;
    }
  }

}

a.teaser-link { // link-area
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  top: 0px;
  opacity: 0;
  left: 0;
}

// ----------------------- //
// TEASER BOX
//
.teaser-box {
  background-color: #fff;
  box-shadow: 1px 1px 6px rgba(127, 127, 127, 0.3);
  margin-left: -@listgroup-padding-x;
  margin-right: -@listgroup-padding-x;
  //margin-bottom not working since height : 100% => set height instead
  height: calc(100% - ((@grid-gutter-width-half - @listgroup-padding-x) * 2)); // @todo docu: needs row to have .d-flex.d-flex-wrap
  @media (min-width: @screen-xl-min) {
    // 22.02.2021 to make it consistent
    margin-left: -@listgroup-padding-x-xl;
    margin-right: -@listgroup-padding-x-xl;
    //margin-bottom not working since height : 100% => set height instead
    height: calc(100% - ((@grid-gutter-width-half-xl - @listgroup-padding-x-xl) * 2));
    // before to have more space between them
    //height: calc(100% - @grid-gutter-width-half-xl);
    //margin-bottom: @grid-gutter-width-half-xl;
  }

  @media (max-width: @screen-xs-max) {
    margin-left: -@listgroup-padding-x-xs;
    margin-right: -@listgroup-padding-x-xs;
  }

  overflow: hidden;
  &:focus,
  &:hover {
    box-shadow: 1px 1px 12px rgba(127, 127, 127, 0.6);
  }
  &:active {
    box-shadow: 1px 1px 4px rgba(127, 127, 127, 0.8);
  }
  .teaser-text {
    padding-left: @listgroup-padding-x;
    padding-right: @listgroup-padding-x;
    @media (min-width: @screen-xl-min) {
      // 22.02.2021 to make it consistent
      padding-left: @listgroup-padding-x-xl;
      padding-right: @listgroup-padding-x-xl;
    }
    padding-bottom: 12px;
  }
}

// ----------------------- //
// TEASER IMAGE INFO
// (see Presse)
//
// set to container or row to reduce image height
.hwk-teaser-image-info {
  .teaser-image {
    min-height: @hwk-teaser-image-info-height;
    max-height: @hwk-teaser-image-info-height;
    img {
      min-width: 100%;
      min-height: @hwk-teaser-image-info-height;
      object-fit: cover;
    }
    @media (min-width: @screen-xl-min) {
      max-height: @hwk-teaser-image-info-height-xl;
      img {
        min-height: @hwk-teaser-image-info-height-xl;
      }
    }
  }
}
.teaser-image {
  position: relative;
  overflow: hidden;
}
.teaser-image-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, .2);
  background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
  padding: 10px @listgroup-padding-x;
  @media (min-width: @screen-xl-min) {
    padding: 10px @listgroup-padding-x-xl;
  }
  color: #fff;
  font-size: @font-size-small;
  .large {
    font-size: 36px;
    font-weight: @font-weight-bold;
    line-height: 1;
    display: block;
  }
}

// ----------------------- //
// TEASER Business Card
//
.teaser-box.business-card {

  @media (min-width: @screen-sm-min) {
    display: flex;
    padding: @listgroup-padding-x;
    @media (min-width: @screen-xl-min) {
      padding: @listgroup-padding-x-xl;
    }
    .teaser-image {
      flex-basis: 25%;
      margin: 0;

      img {
        min-width: 100%;
        max-width: 100%;
        min-height: 220px;
        max-height: 220px;
        height: 100%;
        object-fit: cover;
        display: block;
      }
    }

    .teaser-text {
      padding: 0 0 0 30px;

      p:last-child {
        padding-bottom: 0;
      }
    }
  }

  @media (max-width: @screen-xs-max) {
    .teaser-image {
      padding: 15px;
      margin: 0;
      width: 50%;
      img {
        min-width: 100%;
        max-width: 100%;
        min-height: 200px;
        max-height: 280px;
        height: 100%;
        object-fit: cover;
        display: block;
      }
    }
  }
}