/* FinalCta — source: sections/FinalCta.tsx */

/*
 * .lt-section (tokens.css) owns padding-block, including its 1024-1440 and
 * <=720 overrides; the JSON zeroes Elementor's own container padding so the two
 * can never stack. Only the inline padding is reset here — .lt-container inside
 * supplies the real horizontal band.
 *
 * Gradient lives here rather than in Elementor's background control for the
 * same reason as Hero's: the control can't take a var()/clamp() and this keeps
 * every colour decision for the section in one file.
 */
#finalcta {
  background: linear-gradient(135deg, #0d1a2e 0%, #1a3a6e 100%);
  padding-inline: 0;
}

#finalcta .lt-fc-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Blobs (keyframes live in tokens.css — shared with Hero and Solution).
   The border-radius matches the keyframe's 0% stop so there is no jump on
   first paint; the animation overrides it from there. */
#finalcta .lt-fc-blob-1 {
  top: -80px;
  inset-inline-end: -60px;
  width: 480px;
  height: 380px;
  background: rgba(41, 128, 242, 0.15);
  border-radius: 72% 28% 58% 42% / 42% 62% 38% 58%;
  animation: lt-blob 14s var(--ease) infinite;
}

#finalcta .lt-fc-blob-2 {
  bottom: -60px;
  inset-inline-start: -40px;
  width: 340px;
  height: 280px;
  background: rgba(126, 176, 242, 0.12);
  border-radius: 72% 28% 58% 42% / 42% 62% 38% 58%;
  animation: lt-blob 18s var(--ease) infinite reverse;
}

/*
 * .lt-eyebrow is display:inline-block, but as a direct child of a flex column
 * container the widget wrapper is a flex item — inline-block computes to block
 * and the pill would stretch the full 1280 band. align-self shrinks it back to
 * its content and centres it.
 */
#finalcta .lt-fc-eyebrow {
  align-self: center;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* The <h2> carries the UA font-size (1.5em), so this has to reach the title
   element itself — setting font-size on the widget wrapper alone is inherited
   and then overridden. */
#finalcta .lt-fc-h2 .elementor-heading-title {
  font-size: var(--t-h1);
  font-weight: 900;
  color: #fff;
  margin: 0;
}

#finalcta .lt-fc-sub p {
  font-size: var(--t-lead);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  max-width: 560px;
  margin: 18px auto 40px;
}

/* ---------------------------------------------------------------------------
 * Form card.
 *
 * Elementor Pro is not installed yet, so the slot currently holds a placeholder
 * heading. Everything below is written against Elementor Pro's Form markup
 * (.elementor-field-group / .elementor-field / .elementor-field-label /
 * .elementor-button[type=submit]) so that dropping the widget into #lt-cta-form
 * needs no restyling — only deleting the placeholder.
 *
 * Ported from components/LeadForm.tsx.
 * ------------------------------------------------------------------------- */
#finalcta #lt-cta-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-2xl); /* 48px */
  box-shadow: var(--shadow-strong);
  padding: clamp(26px, 3.5vw, 40px);
  /*
   * width MUST be definite (100%), not auto. `margin: 0 auto` gives this flex
   * item auto cross-axis margins, and auto margins suppress the column's
   * align-items:stretch — with width:auto the card collapses to fit-content
   * (~225px, the width of the submit button) and max-width never binds.
   * A definite 100% sizes it from the track, max-width caps it at 460, and the
   * auto margins still do the centring.
   */
  width: 100% !important;
  max-width: 460px;
  margin: 0 auto;
  /* .lt-fc-inner centres the section's copy; the card's own fields are
     start-aligned as in LeadForm. */
  text-align: start;
}

#finalcta #lt-cta-form .lt-cta-form-placeholder {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--page-fg-subtle);
}

/*
 * Elementor Pro lays the fields wrapper out as a wrapping row with negative
 * side margins and per-group padding (its column grid). This card is a single
 * column, so the grid is unwound into a plain flex column with a real gap.
 */
#finalcta #lt-cta-form .elementor-form-fields-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
}

/* align-items:stretch is load-bearing: Elementor Pro's own .elementor-field-group
   sets align-items:center, which in this column flex shrinks the <label> to its
   text width and centres it over the input instead of aligning it to the inline
   start as LeadForm does. */
#finalcta #lt-cta-form .elementor-field-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

#finalcta #lt-cta-form .elementor-field-label {
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--page-fg-strong);
}

/* .elementor-field-textual is listed alongside .elementor-field because the
   size classes (elementor-size-*) set min-height/padding on it directly. */
#finalcta #lt-cta-form .elementor-field,
#finalcta #lt-cta-form .elementor-field-textual {
  width: 100%;
  height: auto;
  min-height: 0;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--page-fg-strong);
  background: var(--page-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 16px;
  box-shadow: none;
  resize: vertical;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

#finalcta #lt-cta-form .elementor-field::placeholder,
#finalcta #lt-cta-form .elementor-field-textual::placeholder {
  color: var(--page-fg-faint);
}

#finalcta #lt-cta-form .elementor-field:focus,
#finalcta #lt-cta-form .elementor-field-textual:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(41, 128, 242, 0.12);
}

#finalcta #lt-cta-form .elementor-button[type="submit"] {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: var(--brand-primary);
  border: none;
  border-radius: var(--r-pill);
  padding: 15px 24px;
  cursor: pointer;
  box-shadow: 0 10px 28px -6px rgba(41, 128, 242, 0.45);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

#finalcta #lt-cta-form .elementor-button[type="submit"]:hover {
  background: #1a6fd8;
  transform: translateY(-2px);
}

/* ------------------------------------------------------------------------- */

#finalcta .lt-fc-ctas {
  flex-wrap: wrap;
  margin-top: 36px;
}

/* Both CTAs size to their content instead of Elementor's
   --container-widget-width: 100%, which would stack them. */
#finalcta .lt-fc-ctas > .elementor-element {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}

#finalcta .lt-fc-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  padding: 16px 28px;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

#finalcta .lt-fc-wa:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

#finalcta .lt-fc-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

#finalcta .lt-fc-phone:hover {
  color: #fff;
}
