.u5m-cta-row {
  position: relative;
  padding: var(--section-padding-medium);
  margin: var(--section-margin-none);

  /* Full-bleed by default — opt out of global section.dark-mode inset panel */
  &.dark-mode:not(.centered-on-page) {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    border-radius: 0;
  }

  &.has-cloud {
    --cta-cloud-height: 150px;
    padding-top: 0;

    .cta-cloud {
      display: block;
      width: 100%;
      height: var(--cta-cloud-height);
      line-height: 0;
      pointer-events: none;
      overflow: hidden;
      /* Tile at native SVG ratio (1440×150) so seams stay aligned */
      background: var(--cta-cloud-image) repeat-x left top / auto var(--cta-cloud-height);

      img {
        display: none;
      }
    }

    > .inner {
      padding-top: var(--section-padding-y);
    }

    @media (max-width: 767px) {
      --cta-cloud-height: 80px;
    }
  }

&.centered-on-page {
  margin-left: auto!important;
  margin-right: auto!important;
  /* max-width: calc(var(--center) + 40px);
  width: calc(100% - 40px); */
  max-width: var(--center);
  max-width: calc(var(--center) - 40px);
  width:calc(100% - 40px);
  border-radius: var(--border3);
  box-shadow: var(--shadow1);
}
  .center {
    display: flex;
    flex-direction: row;
    gap: 50px;
    justify-content: space-between;

    &:not(.top-aligned):not(.bottom-aligned) {
      align-items: center;
    }

    &.top-aligned {
      align-items: flex-start;
    }

    &.center-aligned {
      align-items: center;
    }

    &.bottom-aligned {
      align-items: flex-end;
    }




    .intro-content {
      .btn-text-white {
        color: var(--white);

        a,
        button:not(.close-btn) {
          color: var(--white);
        }
      }
    }
    .media {
      max-width: 580px;
      width: 100%;

      &:not(.is-image) {
        box-shadow: var(--shadow1);
      }

      &.is-image {
        img {
          display: block;
          width: auto;
          max-width: 100%;
          height: auto;
          margin-inline: auto;
          border-radius: var(--border3);
          box-shadow: var(--shadow1);
        }
      }

      &.is-video {
        border-radius: var(--border3);
        overflow: hidden;
      }

      &.is-none {}
    }
 
    }
  }
}

/****************************************/
/* ********** media queries ********** */
/**************************************/

/* tablet */
@media (max-width: 1024px) {
  .u5m-cta-row {
    .center:not(.media-none) {
      align-items: flex-start;
    }
  }
}

/* tablet mid */
@media (max-width: 991px) {
  .u5m-cta-row {
    .center:not(.media-none) {
      flex-direction: column;

      .media {
        max-width: 100%;
      }
    }
  }
}
/* Dark mode: lighter text on button hover */
section.u5m-cta-row.dark-mode :is(span.btn-white, span.btn-stroked-white) :is(a, button:not(.close-btn)):is(:hover, :focus) {
  color: var(--white);
  background-color: rgba(167, 169, 254, .25);
  border-color: var(--accent-light);
}
/* Dark mode: keep text-link buttons white on hover (overrides blog body link hover) */
section.u5m-cta-row.dark-mode span.btn-text-white :is(a, button:not(.close-btn)):is(:hover, :focus) {
  color: var(--white);
}
/* Dark mode in blog posts: heading text outside the span white (overrides blog body heading colour) */
#hs_cos_wrapper_post_body section.u5m-cta-row.dark-mode .intro-content .heading {
  color: var(--white);
}