/* CHANGELOG
  * 1.0.5 - Changes the order of the image and text content sections on mobile, so the image sits above the text.
  * 1.0.6 - Changed divider wrapper style on desktop so it sits flush both top and bottom.
  * 1.1.0 - Removed vestigial theme-deck import. Added underline to hyperlink class, line-thickness increased for on hover effect.
  * 1.1.1 - More spacing above icon in mobile view, gap size between text content now is 32px for desktop, 16px for mobile.
  * 1.1.2 - Fixed padding for text content.
  * 1.1.3 - inline-padding change from min-640px to min-800px
*/

.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) {
    top: 0; /* v1.0.6 */
    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);
  gap: 16px;
  text-wrap: pretty;

  @media only screen and (min-width: 640px) {
    gap: 48px;
  }

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

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

  @media only screen and (max-width: 639px) {
    padding-top: var(--spacing-400, 32px);
  }
}

.half-n-half-hero__text__wrapper .half-n-half-hero__text__container .hyperlink {
  display: inline;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;

  &:hover {
    text-decoration-thickness: 2px !important;
  }
}

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

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