@import '../../_global/styles/mixins';
@import '../../_global/styles/vars';

.participation-stage {
  background-image: url('./beteiligung-cover.jpg');
  background-size: cover;
  color: white;
  min-height: calc(18vw + 300px);
  display: flex;
  align-items: center;
  margin: 0;

  &.background-image {
    background-size: cover;
    background-position: 50% 50%;
  }

  &.first-element {
    @media(min-width: 1400px) {
      margin-top: -60px;
    }
  }

  .kicker {
    margin-bottom: 0.6em;
  }

  .btn {
    margin-top: 0.8em;
    margin-bottom: 0.4em;
  }

  .text-box {
    max-width: 580px;
    padding: calc(30px + 1vw) 0;
  }

  a:not(.btn) {
    color: white;

    + .btn {
      margin-left: 30px;
    }
  }

  .progress {
    --color-bg: var(--theme-color-white);
    --color-fg: var(--theme-color-white);
    --bg-opacity: 0.4;

    + h1, + .text-2 {
      margin-top: 0.7em;
    }
  }

  &.image-stage {
    position: relative;
    background-image: none;
    background-color: var(--theme-color-primary);
    overflow: hidden;
    z-index: 1;

    &::before {
      content: "";
      position: absolute;
      left: 0;
      right: 50%;
      top: 0;
      bottom: 0;
      margin: -15% 0 -15% 0;
      background-color: var(--theme-color-primary);
    }

    .text-box {
      position: relative;
    }

    .image-box {
      position: absolute;
      left: 45%;
      right: 0;
      top: 0;
      bottom: 0;
      z-index: -1;

      img {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 1;
        transition: 0.4s ease;

        &.loading {
          opacity: 0;
        }
      }
    }

    @media(max-width: 1200px) {
      &::before {
        min-width: 560px;
      }

      .text-box {
        max-width: 480px;
      }
    }

    @media(min-width: 1000px) {
      &::before {
        border-top-right-radius: 28% 50%;
        border-bottom-right-radius: 28% 50%;
        min-width: 650px;
      }
    }

    @media(max-width: 999px) {
      padding-bottom: 75%;

      &::before {
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0 -28% 67%;
        border-bottom-left-radius: 50% 28%;
        border-bottom-right-radius: 50% 28%;
        min-width: 0;
      }

      .col {
        padding: 0 var(--col-padding);
      }

      .image-box {
        position: absolute;
        top: auto;
        left: 0;

        &::before {
          content: '';
          position:  relative;
          display: block;
          padding-top: 75%;
        }

        img {
          position: absolute;
          top: 0;
          left: 0;
        }
      }

      .text-box {
        max-width: none;
        margin-bottom: 0;
        padding-bottom: 24px;
      }
    }
  }
}