.image-with-text-section {
  word-break: break-word;
  background-color: #f7f3ef;
}

.image-with-text__inner {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

/* Image block (left) - half page-width, auto height */
.image-with-text-section .block-image {
  flex: 0 0 50%;
  max-width: 50%;
  position: relative;
  display: block;
}

.image-with-text-section .block-image > a,
.image-with-text-section .block-image > .empty-image-class,
.image-with-text-section .block-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

/* Content group (right) - overlaps 50px to the right of inner, white bg + black text */
.image-with-text-section .image-with-text__group {
  position: absolute;
  top: 50%;
  right: 0px;
  transform: translateY(-50%);
  min-height: 40vw;
  width: calc(50% + 100px);
  background-color: #ffffff !important;
  color: #000000 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 80px;
  text-align: center !important;
  box-sizing: border-box;
}

/* Force every child in the group to be centered and black */
.image-with-text-section .image-with-text__group,
.image-with-text-section .image-with-text__group * {
  color: #000000 !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Subheading: italic, small caps style */
.image-with-text-section .image-with-text__group .subheading {
  font-style: italic;
  font-size: 28px !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  margin-bottom: 24px !important;
}

/* Heading: also italic to match JA style */
.image-with-text-section .image-with-text__group .heading {
  font-style: italic;
  font-weight: 400 !important;
  margin-bottom: 20px !important;
}

/* Rich text body */
.image-with-text-section .image-with-text__group .rich-text,
.image-with-text-section .image-with-text__group .rich-text p {
  max-width: 520px;
  font-size: 14px !important;
  line-height: 1.8 !important;
  margin-bottom: 24px !important;
}

/* Button inside the group - white background, black text, thin black border */
.image-with-text-section .image-with-text__group .button {
  position: relative;
  display: inline-block;
  color: #000000 !important;
  background-color: #ffffff !important;
  --button-border-thickness: 0px !important;
  --button-border-radius: 0 !important;
  padding: 20px 36px !important;
  margin-top: 32px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  border: 1.5px solid #000000 !important;
  outline: none !important;
  text-decoration: none !important;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Override base button ::after (which uses box-shadow as a second border)
   so we only have the real 1.5px border on all sides. */
.image-with-text-section .image-with-text__group .button::after,
.image-with-text-section .image-with-text__group .button:hover::after {
  box-shadow: none !important;
  content: none !important;
}

/* Vertical line directly above the button, bottom touching the button top edge */
.image-with-text-section .image-with-text__group .button::before {
  background-color: #000000;
  content: "";
  width: 1px;
  height: 28px;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
}

/* Button hover: black background, white text, matching border (no internal gap) */
.image-with-text-section .image-with-text__group .button:hover {
  color: #ffffff !important;
  background-color: #000000 !important;
  border-color: #000000 !important;
  opacity: 1 !important;
  outline: none !important;
  text-decoration: none !important;
}

/* Mobile layout: stack image above text */
@media (max-width: 959px) {
  .image-with-text__inner {
    flex-direction: column;
  }

  .image-with-text-section .block-image {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .image-with-text-section .image-with-text__group {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-top: -20px;
    padding: 30px 20px 40px;
  }
}
