/* =========================================================
   BIL CUSTOM - PROMO BANNER V2.5
   ========================================================= */

.bilcustom-promo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  border-radius: 32px;
  color: var(--bil-white);
  background: var(--bil-purple);
  font-family: var(
    --font-bil,
    "Mona Sans",
    ui-sans-serif,
    system-ui,
    sans-serif
  );
}

/* =========================================================
   BACKGROUNDS
   ========================================================= */

.bilcustom-promo--bg-none {
  background: transparent;
  color: var(--bil-dark);
}

.bilcustom-promo--bg-dark {
  background-color: var(--bil-dark);
}

.bilcustom-promo--bg-purple {
  background-color: var(--bil-purple);
}

.bilcustom-promo--bg-softPurple {
  background-color: #e2d7e5;
  color: var(--bil-dark);
}

/* Desktop sizes */
.bilcustom-promo--compact {
  min-height: 180px;
}

.bilcustom-promo--large {
  min-height: 300px;
}


/* =========================================================
   BACKGROUND IMAGE
   ========================================================= */

.bilcustom-promo--has-image::before {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 0;

  background-image: var(--bilcustom-desktop-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--bilcustom-image-position, center);
}


/* =========================================================
   IMAGE OVERLAY
   ========================================================= */

.bilcustom-promo__overlay {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
}


/* =========================================================
   DESKTOP - PURPLE GRADIENT
   ========================================================= */

.bilcustom-promo--has-image.bilcustom-promo--image-right.bilcustom-promo--effect-purple
  .bilcustom-promo__overlay {

  background: linear-gradient(
    90deg,
    var(--bil-purple) 0%,
    var(--bil-purple) 34%,
    var(--bil-purple-80) 48%,
    var(--bil-purple-00) 76%
  );
}

.bilcustom-promo--has-image.bilcustom-promo--image-left.bilcustom-promo--effect-purple
  .bilcustom-promo__overlay {

  background: linear-gradient(
    270deg,
    var(--bil-purple) 0%,
    var(--bil-purple) 34%,
    var(--bil-purple-80) 48%,
    var(--bil-purple-00) 76%
  );
}


/* =========================================================
   DESKTOP - DARK GRADIENT
   ========================================================= */

.bilcustom-promo--has-image.bilcustom-promo--image-right.bilcustom-promo--effect-dark
  .bilcustom-promo__overlay {

  background: linear-gradient(
    90deg,
    var(--bil-dark) 0%,
    var(--bil-dark) 34%,
    var(--bil-dark-82) 48%,
    var(--bil-dark-00) 76%
  );
}

.bilcustom-promo--has-image.bilcustom-promo--image-left.bilcustom-promo--effect-dark
  .bilcustom-promo__overlay {

  background: linear-gradient(
    270deg,
    var(--bil-dark) 0%,
    var(--bil-dark) 34%,
    var(--bil-dark-82) 48%,
    var(--bil-dark-00) 76%
  );
}


/* No effect */
.bilcustom-promo--effect-none .bilcustom-promo__overlay {
  background: none;
}


/* =========================================================
   CONTENT
   ========================================================= */

.bilcustom-promo__content {
  position: relative;
  z-index: 1;

  box-sizing: border-box;
  min-height: inherit;

  display: flex;
  flex-direction: column;
  justify-content: center;

  gap: 24px;

  padding: 48px 56px;
}


/* Image on right */
.bilcustom-promo--has-image.bilcustom-promo--image-right
  .bilcustom-promo__content {

  width: 55%;
}


/* Image on left */
.bilcustom-promo--has-image.bilcustom-promo--image-left
  .bilcustom-promo__content {

  width: 55%;
  margin-left: auto;
}


/* =========================================================
   CENTER LAYOUT
   ========================================================= */

.bilcustom-promo--align-center .bilcustom-promo__content {
  width: 100%;
  max-width: none;

  margin-inline: auto;

  text-align: center;
  align-items: center;
}


/* =========================================================
   SPLIT LAYOUT
   ========================================================= */

.bilcustom-promo--align-split .bilcustom-promo__content {
  width: 100%;

  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}


/* =========================================================
   COPY
   ========================================================= */

.bilcustom-promo__copy {
  max-width: none;
}


/* =========================================================
   TITLE
   ========================================================= */

.bilcustom-promo__title {
  

  color: inherit;

  font-family: var(
    --font-bil-condensed,
    "Mona Sans Condensed",
    ui-sans-serif,
    system-ui,
    sans-serif
  );

  font-weight: var(--font-weight-normal, 400);
  line-height: 1.1;

  text-wrap: balance;
}

.bilcustom-promo--large .bilcustom-promo__title {
  
}

.bilcustom-promo--compact .bilcustom-promo__title {
  
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.bilcustom-promo__description {
  margin: 14px 0 0;

  max-width: none;

  font-family: var(
    --font-bil,
    "Mona Sans",
    ui-sans-serif,
    system-ui,
    sans-serif
  );

  font-size: 1rem;
  line-height: 1.5;
}

.bilcustom-promo--align-center
  .bilcustom-promo__description {

  margin-inline: auto;
}


/* =========================================================
   SEMANTIC IMAGE
   ========================================================= */

.bilcustom-promo__semantic-image {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;
}


/* =========================================================
   CTA
   Visuals remain centralized in cta.css
   ========================================================= */


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

  /* -------------------------------------------------------
     CARD
     Height is driven by its content
     ------------------------------------------------------- */

  .bilcustom-promo {
    border-radius: 28px;
  }

  .bilcustom-promo--compact,
  .bilcustom-promo--large {
    min-height: 0;
  }


  /* -------------------------------------------------------
     MOBILE IMAGE

     Image is ALWAYS on top on mobile.
     Horizontal framing follows the desktop Left / Right selection.
     Explicit vertical positioning remains available.
     ------------------------------------------------------- */

  .bilcustom-promo--has-image {
    /* Space occupied by the visual part */
    --bilcustom-mobile-visual-height: clamp(300px, 92vw, 470px);
  }

  .bilcustom-promo--has-image.bilcustom-promo--image-right {
    --bilcustom-mobile-image-x: right;
  }

  .bilcustom-promo--has-image.bilcustom-promo--image-left {
    --bilcustom-mobile-image-x: left;
  }

  .bilcustom-promo--has-image::before {
    background-image: var(--bilcustom-mobile-image);
    background-repeat: no-repeat;

    /*
     * Cover the upper visual area.
     * The image continues underneath the gradient so there
     * is no hard image / background boundary.
     */
    background-size: auto var(--bilcustom-mobile-visual-height);
    background-position: var(--bilcustom-mobile-image-x, right) var(--bilcustom-mobile-image-y, top);

    bottom: auto;
    height: var(--bilcustom-mobile-visual-height);
  }


  /* -------------------------------------------------------
     MOBILE OVERLAY
     Common geometry
     ------------------------------------------------------- */

  .bilcustom-promo--has-image .bilcustom-promo__overlay {
    z-index: -2;

    /*
     * Overlay extends farther down than the visible image.
     * This makes the image transition naturally into the
     * solid card background.
     */
    height: calc(
      var(--bilcustom-mobile-visual-height) + 180px
    );

    bottom: auto;
  }


  /* =======================================================
     MOBILE PURPLE GRADIENT

     IMPORTANT:
     Always TOP -> BOTTOM.
     Same result for desktop Image Left and Image Right.

     Strong transition:
     - clean image at the top
     - purple begins early
     - becomes strong before image ends
     - reaches exact solid purple
     ======================================================= */

  .bilcustom-promo--has-image.bilcustom-promo--effect-purple
    .bilcustom-promo__overlay,

  .bilcustom-promo--has-image.bilcustom-promo--image-left.bilcustom-promo--effect-purple
    .bilcustom-promo__overlay,

  .bilcustom-promo--has-image.bilcustom-promo--image-right.bilcustom-promo--effect-purple
    .bilcustom-promo__overlay {

    /* Reach the solid background at the title, before the image ends. */
    background: linear-gradient(
      to bottom,
      rgba(112, 47, 138, 0) 0,
      rgba(112, 47, 138, 0.20) calc(var(--bilcustom-mobile-visual-height) - 220px),
      rgba(112, 47, 138, 0.85) calc(var(--bilcustom-mobile-visual-height) - 160px),
      var(--bil-purple) calc(var(--bilcustom-mobile-visual-height) - 100px),
      var(--bil-purple) 100%
    ) !important;
  }


  /* =======================================================
     MOBILE DARK GRADIENT
     Same behaviour using BIL dark
     ======================================================= */

  .bilcustom-promo--has-image.bilcustom-promo--effect-dark
    .bilcustom-promo__overlay,

  .bilcustom-promo--has-image.bilcustom-promo--image-left.bilcustom-promo--effect-dark
    .bilcustom-promo__overlay,

  .bilcustom-promo--has-image.bilcustom-promo--image-right.bilcustom-promo--effect-dark
    .bilcustom-promo__overlay {

    /* Reach the solid background at the title, before the image ends. */
    background: linear-gradient(
      to bottom,
      rgba(45, 21, 63, 0) 0,
      rgba(45, 21, 63, 0.20) calc(var(--bilcustom-mobile-visual-height) - 220px),
      rgba(45, 21, 63, 0.85) calc(var(--bilcustom-mobile-visual-height) - 160px),
      var(--bil-dark) calc(var(--bilcustom-mobile-visual-height) - 100px),
      var(--bil-dark) 100%
    ) !important;
  }


  /* -------------------------------------------------------
     NONE = really no gradient
     ------------------------------------------------------- */

  .bilcustom-promo--has-image.bilcustom-promo--effect-none
    .bilcustom-promo__overlay {

    background: none !important;
  }


  /* =======================================================
     MOBILE CONTENT
     ======================================================= */

  .bilcustom-promo__content,
  .bilcustom-promo--has-image.bilcustom-promo--image-right
    .bilcustom-promo__content,
  .bilcustom-promo--has-image.bilcustom-promo--image-left
    .bilcustom-promo__content,
  .bilcustom-promo--align-split
    .bilcustom-promo__content {

    width: 100%;

    min-height: 0;

    margin: 0;

    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;

    text-align: center;

    gap: 22px;
  }


  /* -------------------------------------------------------
     WITH IMAGE

     Content starts before the end of the visual area so
     the title can move upward INTO the gradient.
     ------------------------------------------------------- */

  .bilcustom-promo--has-image
    .bilcustom-promo__content {

    padding:
      calc(var(--bilcustom-mobile-visual-height) - 100px)
      28px
      38px;
  }


  /* -------------------------------------------------------
     WITHOUT IMAGE

     No artificial height.
     Card follows content naturally.
     ------------------------------------------------------- */

  .bilcustom-promo--no-image
    .bilcustom-promo__content {

    padding: 42px 28px;

    justify-content: center;
  }


  /* =======================================================
     MOBILE COPY
     ======================================================= */

  .bilcustom-promo__copy {
    width: 100%;
    max-width: none;
  }


  /* =======================================================
     MOBILE TITLE
     ======================================================= */

  .bilcustom-promo__title,
  .bilcustom-promo--large
    .bilcustom-promo__title,
  .bilcustom-promo--compact
    .bilcustom-promo__title {

    

    line-height: 1.04;

    
  }


  /* =======================================================
     MOBILE DESCRIPTION
     ======================================================= */

  .bilcustom-promo__description {
    margin: 14px auto 0;

    max-width: 100%;

    font-size: 1.125rem;
    line-height: 1.4;
  }


  /* =======================================================
     MOBILE CTA
     ======================================================= */

  .bilcustom-promo__cta-wrap {
    width: 100%;
  }

  .bilcustom-promo__shared-cta {
    width: 100%;
  }

  .bilcustom-promo__shared-cta
    .bilcustom-cta__link:not(.bilcustom-cta__link--icon):not(.bilcustom-cta__link--text):not(.bilcustom-cta__link--textArrow) {

    width: 100%;
  }
}

/* V5.32 — rollback native heading typography only (pre-V3.5 sizing). */
.bilcustom-promo--large .bilcustom-promo__title{font-size:clamp(2rem,4vw,4rem)}
.bilcustom-promo--compact .bilcustom-promo__title{font-size:clamp(1.5rem,2.5vw,2.5rem)}
@media(max-width:48rem){.bilcustom-promo--compact .bilcustom-promo__title{font-size:clamp(2.5rem,11vw,4rem)}}


/* V5.35 — Promo Banner content padding adjustment. */
.bilcustom-promo__content{
  padding:68px 76px;
}

/* V5.38 — Promo Banner exact pre-native-heading typography rollback (V3.4 behavior). */
.bilcustom-promo__title.bilcustom-section-heading{
  margin:0;
  font-family:var(--font-bil-condensed,"Mona Sans Condensed",ui-sans-serif,system-ui,sans-serif);
  font-weight:var(--font-weight-normal,400);
  line-height:1.04;
  letter-spacing:-.025em;
}
.bilcustom-promo--large .bilcustom-promo__title.bilcustom-section-heading{
  font-size:clamp(2rem,4vw,4rem);
}
.bilcustom-promo--compact .bilcustom-promo__title.bilcustom-section-heading{
  font-size:clamp(1.5rem,2.5vw,2.5rem);
}
@media(max-width:48rem){
  .bilcustom-promo__title.bilcustom-section-heading,
  .bilcustom-promo--large .bilcustom-promo__title.bilcustom-section-heading,
  .bilcustom-promo--compact .bilcustom-promo__title.bilcustom-section-heading{
    font-size:clamp(2.5rem,11vw,4rem);
    line-height:1.04;
    margin:0;
  }
}

/* V5.39 mobile gutter audit */

@media(max-width:767px){
  .bilcustom-promo{
    width:calc(100% - 40px);
    margin-inline:auto;
  }
  .bilcustom-promo__content{
    padding:40px 28px;
  }
}

/* V5.64 — full approved background palette and fluid banner copy. */
.bilcustom-promo--bg-white { background-color: var(--bil-white); color: var(--bil-dark); }
.bilcustom-promo--bg-color01 { background-color: var(--bil-surface-01); color: var(--bil-dark); }
.bilcustom-promo--bg-color02 { background-color: var(--bil-surface-02); color: var(--bil-dark); }
.bilcustom-promo--bg-color03 { background-color: var(--bil-surface-03); color: var(--bil-dark); }
.bilcustom-promo--bg-background { background-color: var(--bil-background); color: var(--bil-dark); }
.bilcustom-promo--align-center .bilcustom-promo__copy { width: 100%; }
.bilcustom-promo--align-split .bilcustom-promo__copy { flex: 1; min-width: 0; }
.bilcustom-promo__description > .rich-text { width: 100%; max-width: none; }

/* Independent title, rich-text and CTA alignment. */
.bilcustom-promo__content { text-align:left; }
.bilcustom-promo__copy { width:100%; }
.bilcustom-promo__shared-cta.bilcustom-cta--left { justify-content:flex-start; }
.bilcustom-promo__shared-cta.bilcustom-cta--center { justify-content:center; }
.bilcustom-promo__shared-cta.bilcustom-cta--right { justify-content:flex-end; }

/* V6.84 — Match mobile title line-height to its actual font-size.
   Scoped to Promo Banner, including titles placed outside the banner. */
@media (max-width: 767px) {
  .bilcustom-promo .bilcustom-promo__title.bilcustom-configured-heading,
  .bilcustom-promo-title-out .bilcustom-configured-heading {
    line-height: 1 !important;
  }
}
