.cta-split-container {
  display: flex;
  overflow: hidden;
  width: 99vw;
  margin: 0 auto;
  min-height: 480px;
  border-radius: 20px;
}

.cta-split-container.reverse {
  flex-direction: row-reverse;
}

.cta-split-container.flat-style {
  display: block;
  padding: 60px 40px;
  text-align: left;
  background-color: var(--background-color, #f8f6f1);
  border-radius: 24px;
}

.cta-split-container.flat-style .left-pane {
  padding: 60px 40px;
  border-radius: 20px;
  width: 100%;
}

.cta-split-container.flat-style .cta-inner {
  max-width: 800px;
  margin: 0 auto;
}

.cta-split-container.flat-style .right-pane {
  display: none !important;
}

.left-pane {
  flex: 1 1 50%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
  box-sizing: border-box;
}

.left-pane.align-right {
  align-items: flex-end; /* aligns entire inner block to the right */
}

.left-pane.align-right .cta-inner {
  text-align: right;
}

.right-pane {
  flex: 1 1 50%;
  background-size: cover;
  background-position: center;
  border-top-right-radius: inherit;
  border-bottom-right-radius: inherit;
  min-height: 480px;
}

.cta-inner {
  max-width: 500px;
}

.cta-inner {
  display: flex;
  flex-direction: column;
}

.left-pane.align-right .cta-inner {
  align-items: flex-end;
}
/*
.cta-btn {
  margin-top: 20px;
  padding: 14px 24px;
  font-size: 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border: solid 2px var(--dark-background-color);
  color: var(--dark-background-color, #ffc83d) !important;
} */
.cta-btn {
  position: relative;
  overflow: hidden;
  z-index: 0; /* should be lower than text */
  margin-top: 20px;
  padding: 14px 24px;
  font-size: 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border: solid 2px var(--dark-background-color);
  background-color: transparent;
  color: var(--background-color, #ffc83d) !important;
  transition: color 0.3s ease;
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: var(--secondary-color, #fb343d);
  z-index: -1; /* sit behind text */
  transition: width 0.4s ease;
}

.cta-btn:hover::before {
  width: 100%;
}

.cta-btn:hover {
  /* color: white !important; */
}
.cta-split-container {
  display: flex;
  overflow: hidden;
  width: 100%;            /* was 99vw */
  margin: 0 auto;
  min-height: 480px;
  border-radius: 20px;
}

/* 2) Desktop/tablet fine-tuning */
@media (max-width: 1024px) {
  .left-pane { padding: 32px; }
  .cta-inner { max-width: 580px; }
}

/* 3) Phone layout: stack, give image its own height, shrink paddings */
@media (max-width: 640px) {
  /* stack the two panes */
  .cta-split-container:not(.flat-style) {
    flex-direction: column;
    min-height: unset;
    border-radius: 16px;
  }

  .left-pane {
    flex: 0 0 auto;
    width: 100%;
    padding: 20px;
    align-items: flex-start; /* default; your .align-right will re-override if needed */
    border-radius: 16px 16px 0 0; /* top rounded by default */
  }

  /* keep reverse order sensible: image first if .reverse */
  .cta-split-container.reverse .right-pane { order: 0; }
  .cta-split-container.reverse .left-pane  { order: 1; }

  .right-pane {
    flex: 0 0 auto;
    width: 100%;
    height: clamp(180px, 45vw, 320px); /* visible, responsive image */
    min-height: unset;
    border-radius: 0 0 16px 16px;       /* bottom rounded by default */
    background-size: cover;
    background-position: center;
  }
}

/* 4) Fluid type on small screens (override inline px with !important) */
@media (max-width: 640px) {
  .left-pane h2 {
    font-size: clamp(24px, 8vw, 38px) !important;
    line-height: 1.12 !important;
  }
  .left-pane h3 {
    font-size: clamp(16px, 5vw, 22px) !important;
    line-height: 1.2 !important;
  }
  .left-pane p {
    font-size: clamp(14px, 4vw, 18px) !important;
    line-height: 1.45 !important;
  }

  /* nicer tap target */
  .cta-btn {
    padding: 12px 18px;
    font-size: 18px;
  }
}

/* 5) If you ever render without image (flat style), keep current behavior */
.cta-split-container.flat-style {
  display: block;
  padding: 40px 24px; /* slightly smaller on mobile than your 60px */
}
@media (max-width: 640px) {
  .cta-split-container.flat-style .left-pane { padding: 0; }
  .cta-split-container.flat-style .cta-inner { max-width: none; }
}
