@charset "UTF-8";

.slider {
  opacity: 0;
  transition: opacity 0.4s linear;

  &.single-slide {
    .controls {
      display: none;
    }
  }

  &.initiated {
    opacity: 1;
  }

  .slide-overflow {
    overflow: hidden;
    transition: height 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  .slide-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    width: 10000%;
    contain: layout;

    &.no-transition {
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;

      .image-box:after {
        content: "";
        @include fullsize;
        z-index: 2;
      }
    }

    img, a {
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
      -webkit-user-drag: none;
      -moz-user-drag: none;
    }
  }

  .slide {
    position: relative;
    width: 1%;
    min-width: 1%;
    max-width: 1%;
  }

  .prev-clone,
  .next-clone {
    position: absolute;
    display: flex;
    width: 100%;
  }

  .prev-clone {
    position: absolute;
    right: 100%;
    justify-content: flex-end;
  }
}

.rotation .slider {
  position: relative;
  display: block;
  border-bottom: 8px solid $color-secondary;
  border-bottom: 8px solid var(--theme-color-secondary, $color-secondary);
  background-color: $color-primary;
  background-color: var(--theme-color-primary, $color-primary);

  @media(max-width: 567px) {
    margin: 0 -20px;
  }

  .tabs {
    position: absolute;
    bottom: 0;
    right: 0;
    list-style: none;
    font-size: 0;
    line-height: 0;
    margin: 0;
    padding: 0;
    white-space: nowrap;

    @media(max-width: 767px) {
      padding: 15px;
    }

    li {
      display: inline-block;

      &.active button {
        background-color: white;
        color: $color-primary;
        color: var(--theme-color-primary, $color-primary);

        &:hover, &:focus, &:active, &:active:focus {
          color: $color-primary;
          color: var(--theme-color-primary, $color-primary);
        }
      }
      &:not(.active) button {
        &:hover {
          color: $color-white;
          box-shadow: 0 0 0 5px rgba($color-primary, 0.4);
          box-shadow: 0 0 0 5px rgba(var(--theme-color-primary-rgb, $color-primary-rgb), 0.4);
          //background-color: $color-secondary;
          //background-color: var(--theme-color-secondary, $color-secondary);
        }
        &:focus, &:active {
          color: $color-white;
        }
      }
    }

    button {
      @extend .btn;
      font-size: 28px;
      padding: 15px 5px;
      width: 60px;
      margin: 5px;
      cursor: pointer;
      transition: 0.3s ease;
      justify-content: center;
      outline: 0 !important;
      @include focusvisible;

      @media(max-width: 767px) {
        width: 44px;
        font-size: 18px;
        line-height: 1;
        padding: 8px 2px;
      }

      @media(max-width: 567px) {
        font-size: 20px;
        width: 30px;
        height: 30px;
        border-radius: 12px;
        padding: 0;
        min-height: 0;
        margin: 3px;
      }

      &:hover {
        box-shadow: none;
      }

      &:focus, &:active {
        outline: none;
      }
    }
  }

  .prev, .next, .count {
    display: none;
  }

  .controls {
    position: absolute;
    display: block;
    bottom: 0;
    right: 0;
    margin: 20px;
  }

  &.many-slides {
    .tabs {
      display: none;
    }

    .count {
      margin: 0 10px;
      padding: 15px;
      border-radius: 24px;
      min-width: 120px;
      text-align: center;

      span {
        margin: 0 5px;
      }
    }

    .count, .prev, .next {
      display: inline-block;
      vertical-align: top;
      background-color: $color-primary;
      background-color: var(--theme-color-primary, $color-primary);
      color: $color-white;
      color: var(--theme-color-background, $color-white);
      line-height: 30px;
      font-size: 22px;
    }

    .prev, .next {
      font-size: 30px;
      padding: 15px;
      border-radius: 24px;
      border: 0;
      width: 60px;
      transition: 0.3s ease;
      outline: 0 !important;
      @include focusvisible;

      &:before {
        @include icon-pfeil-links;
        font-family: "Icons";
        display: block;
      }

      &:hover {
        color: $color-white;
        box-shadow: 0 0 0 5px rgba($color-primary, 0.4);
        box-shadow: 0 0 0 5px rgba(var(--theme-color-primary-rgb, $color-primary-rgb), 0.4);
      }
    }

    .next:before {
      @include icon-pfeil-rechts;
    }

    @media(max-width: 767px) {
      .count {
        display: block;
        list-style: none;
        font-size: 18px;
        line-height: 20px;
        border-radius: 16px;
        padding: 12px;
        margin: 0;
        min-width: 80px;
      }

      .prev, .next {
        display: none;
      }
    }
  }

  .slide {
    &:not(.current) {
      height: 0;
    }
    &.text-only .outer {
      @media(max-width: 999px) {
        .text-box {
          min-height: calc(40vw + 100px);
        }
      }
      @media(min-width: 1000px) {
        &:after {
          content: "";
          position: relative;
          display: block;
          padding-top: calc(44.4444% - 13.3333px);
        }
      }
    }
  }

  .outer {
    margin: 0 -20px;
    display: flex;

    @media(max-width: 999px) {
      flex-direction: column;
      margin: 0;
      overflow: hidden;
    }
    &.download{
      .text-box .btn{
        &:before{
          @include icon-small-download;
        }
      }
    }

    &.intranet{
      .text-box .btn{
        &:before{
          @include icon-small-schloss;
        }
      }
    }
    &.extranet{
      .text-box .btn{
        &:before{
          @include icon-small-stern;
        }
      }
    }
    &.extern{
      .text-box .btn{
        &:before{
          @include icon-small-link-external;
        }
      }
    }
  }

  .image-box {
    position: relative;
    order: 1;
    flex: 1 1 100%;

    &:before {
      content: "";;
      position: relative;
      display: block;
      padding-top: 66.66667%;
    }

    > img, .gallery {
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      width: 100%;
      object-fit: cover;
    }

    .gallery {
      margin: 0;
      padding: 0;

      .gallery-wrapper {
        margin: 0;
        padding: 0;
        min-height: 100%;
      }

      .image {
        padding: 0;
      }

      .btn.icon-gallery, .btn.icon-galerie {
        @media(max-width: 999px) {
          top: auto;
          right: auto;
          bottom: 0;
          left: 0;
        }
      }
    }

    @media(min-width: 1000px) {
      padding-right: 20px;
      flex: 1 1 66.66667%;
      max-width: 66.66667%;

      > img, .gallery {
        width: calc(100% - 20px);
        left: 1px;
      }
    }
  }

  .copyright {
    position: absolute;
    display: block;
    left: 100%;
    bottom: 0;
    transform-origin: 0 100%;
    color: $color-white;
    color: var(--theme-color-background, $color-white);
    font-size: 12px;
    line-height: 1.2;
    text-shadow: 0px 0px 3px rgba($color-black, 0.6), 0px 0px 8px rgba($color-black, 0.6);
    z-index: 2;
    width: 66%;
    padding: 26px 8px;
    transform: rotate(-90deg);

    @media(max-width: 999px) {
      font-size: 10px;
      padding: 4px 6px;
    }
  }

  .text-box {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 33.33333%;
    max-width: 33.3333%;
    min-width: 400px;
    color: $color-white;
    color: var(--theme-color-background, $color-white);
    z-index: 2;
    padding: 40px 20px 40px 80px;

    @media(max-width: 1339px) {
      min-width: 360px;
      padding: 30px 10px 30px 60px;
    }

    @media(max-width: 1199px) and (min-width: 1000px) {
      min-height: 500px;
      font-size: 16px;
    }

    @media(max-width: 999px) {
      padding: 40px 40px 10px;
      min-width: 0;
      max-width: none;
      background-color: $color-primary;
      background-color: var(--theme-color-primary, $color-primary);
    }

    @media(max-width: 567px) {
      padding: 28px 20px 10px;
    }

    &:first-child {
      padding: 100px 80px;
      position: static;
      background-color: transparent;
      max-width: none;

      @media(max-width: 999px) {
        //justify-content: flex-start;
        padding: 40px;
      }
      @media(max-width: 567px) {
        padding: 28px 20px 100px;
      }

      &:after {
        content: "";
        background: linear-gradient(130deg, $color-gradient-01 10%, $color-gradient-02 80%, $color-gradient-03 100%);
        background: linear-gradient(130deg, var(--theme-olor-gradient-01, $color-gradient-01) 10%, var(--theme-color-gradient-02, $color-gradient-02) 80%, var(--theme-color-gradient-03, $color-gradient-03) 100%);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 800px;
      }

      > * {
        max-width: 800px;
        z-index: 1;
      }
    }

    &:not(:first-child):before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      margin: -15% -14% -15% 20px;
      background-color: $color-primary;
      background-color: var(--theme-color-primary, $color-primary);
      z-index: -1;
      border-top-right-radius: 28% 50%;
      border-bottom-right-radius: 28% 50%;

      @media(max-width: 1000px) {
        top: auto;
        padding-top: 70%;
        margin-right: 0;
        margin: 0 -15% -8%;
        border-radius: 0;
        border-bottom-left-radius: 50% 28%;
        border-bottom-right-radius: 50% 28%;
      }
    }

    h2, .like-h2 {
      margin-bottom: 0.4em;
      margin-left: -0.05em;
    }

    p {
      font-size: 16px;

      @media(min-width: 768px) {
        font-size: 18px;
      }
    }

    .kicker {
      margin-bottom: 12px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;

      @media(max-width: 767px) {
        margin-bottom: 8px;
      }
    }

    .btn {
      margin-top: 6px;

      @media(min-width: 768px) {
        margin-top: 18px;
      }
    }
  }

  img {
    max-width: 100%;
  }
}
