@import url(https://www.officeworks.com.au/resources/orca/modules/theme-deck/theme-deck.css);

/** CHANGELOG
* This changes the order of the image and text content sections on mobile, so the image sits above the text
*/

.half-n-half-hero {
  container-name: half-n-half-hero;
  container-type: inline-size;
}

.half-n-half-hero__container {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "image"
    "text";

  @media only screen and (min-width: 640px) {
    grid-template-columns: 1fr fit-content(50cqw);
    grid-template-areas: "text image";
  }
}
.half-n-half-hero__text__wrapper {
  grid-area: text;
}

.half-n-half-hero__img__wrapper {
  grid-area: image;

  img {
    display: flex;
    height: 100%;
  }
}

.half-n-half-hero__text__wrapper:has(.half-n-half-hero__divider__wrapper) {
  display: flex;
  position: relative;
  flex-direction: column;
  overflow: hidden;

  @media only screen and (min-width: 640px) {
    flex-direction: row;
  }
}

.half-n-half-hero__divider__wrapper {
  position: absolute;
  top: -1px;
  width: 100%;
  height: unset;
  font-size: 0;

  @media only screen and (min-width: 640px) {
    right: -0.3cqw;
    bottom: 0;
    width: unset;
    height: 100%;

    @supports (hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none) {
      right: -0.1cqw;
    }
  }
}

.half-n-half-hero__divider {
  width: 100%;
  height: auto;
  shape-rendering: crispedges;

  @media only screen and (min-width: 640px) {
    width: auto;
    height: 100%;
  }
}

@media only screen and (min-width: 640px) {
  .hnhh-mobile {
    display: none;
  }
}

@media only screen and (max-width: 639px) {
  .hnhh-desktop {
    display: none;
  }
}

.half-n-half-hero__text__container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  margin: 0 auto;
  padding: var(--spacing-300, 24px);
  padding-bottom: var(--spacing-400, 32px);
  text-wrap: pretty;

  @media only screen and (min-width: 640px) {
    padding-right: var(--spacing-450, 40px);
    padding-bottom: var(--spacing-300, 24px);
  }

  @media only screen and (min-width: 800px) {
    width: 90%;
  }

  @media only screen and (min-width: 990px) {
    width: 80%;
  }
}

.half-n-half-hero__text__wrapper .half-n-half-hero__text__container .hyperlink {
  display: inline;
}

.half-n-half-hero__img__container {
  display: block;
  height: 100%;

  img {
    display: flex;
    height: 100%;
  }
}
