@use "@infineon/design-system-tokens/dist/tokens";

//
// Hero Banner
//

.ifx__hero-banner {
  position: relative;

  &-image {
    position: relative;
  }

  &-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(tokens.$color-bg-darken, 0.1);

    &:after {
      content: "";
      background-image: url("../public/CS_Herobanner_Mainpage_mobile.svg");
      background-repeat: no-repeat;
      background-position: right center;
      background-size: contain;
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 100%;

      @include media-breakpoint-up(lg) {
        background-image: url("../public/CS_Herobanner_Mainpage.svg");
      }
    }
  }

  &-body {
    padding-top: tokens.$spacing-l;
    padding-bottom: tokens.$spacing-l;

    @include media-breakpoint-up(lg) {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      padding-top: tokens.$sizing-xxxl;
    }
  }

  &-sub-headline {
    font-size: tokens.$font-size-m;
    font-weight: tokens.$font-weight-semi-bold;
    line-height: 1.25;
    margin-bottom: tokens.$sizing-s;

    @include media-breakpoint-up(lg) {
      font-size: tokens.$font-size-xl;
      margin-bottom: tokens.$sizing-xs;
    }
  }

  &-headline {
    font-size: tokens.$font-size-xxl;
    line-height: 1.2;
    margin-bottom: tokens.$sizing-s;

    @include media-breakpoint-up(lg) {
      font-size: tokens.$font-size-m * 4.25;
      line-height: 1.3;
    }
  }

  &-padded-text {
    @include media-breakpoint-up(lg) {
      color: tokens.$color-text-white;
      background-color: rgba(tokens.$color-default-500, .75);
      padding: tokens.$sizing-xs tokens.$sizing-m;
      -webkit-box-decoration-break: clone;
      box-decoration-break: clone;
      line-height: 1.5;
    }
  }
}



// Hero Banner Subpage
//

.ifx__hero-banner-subpage {
  position: relative;
  background-color: #F5F5F5;

  &:before,
  &:after {
    content: "";
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
  }

  &::before {
    @include media-breakpoint-up(xxl) {
      background-image: url("../public/CS_Herobanner_Subpage2.svg");
      background-position: left center;
    }
  }

  &::after {
    background-image: url("../public/CS_Herobanner_Subpage_Mobile.svg");
    background-position: right center;
    
    @include media-breakpoint-up(lg) {
      background-image: url("../public/CS_Herobanner_Subpage1.svg");
    }
  }

  &-body {
    padding-top: tokens.$spacing-xxl;
    padding-bottom: tokens.$spacing-xxxl;

    @include media-breakpoint-up(lg) {
      padding-top: tokens.$spacing-xxl * 1.5;
    }
  }

  p {
    @include media-breakpoint-down(lg) {
      font-size: tokens.$font-size-s;
    }
  }
}
