/* =============================================================
   Contact CTA Section — pixel-perfect Figma implementation
   All selectors scoped to .sonto-cfc — no interference with
   existing .contact-cta-section styles. Design base: 1440px.
   ============================================================= */

.sonto-cfc,
.sonto-cfc * {
  box-sizing: border-box;
}

/* ── 1. Section shell ─────────────────────────────────────── */
/* min-height here is a CSS safety floor before GF renders.
   The section grows naturally beyond 868px once GF injects form
   fields — no JS height locking needed or wanted. */
.sonto-cfc {
  background: #00ad94;
  position: relative;
  overflow: hidden;
  min-height: 868px;
}

/* ── 2. Background image (fills from 536px to section bottom) */
.sonto-cfc__bg-img {
  position: absolute;
  top: 536px;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.sonto-cfc__bg-v-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,149,127,0) 34.13%, rgba(0,149,127,1) 92%);
  opacity: 0.75;
}
.sonto-cfc__bg-h-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0) 57%, rgba(0,0,0,1) 76%);
  opacity: 0.5;
}

/* ── 3. Two-column layout wrapper ─────────────────────────── */
.sonto-cfc__wrap {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 75px 72px;
  display: flex;
  align-items: flex-start;
  gap: 100px; /* intentional 100px design gap between columns */
}

/* ── 4. Left column — normal flow, max 576px content area ─── */
.sonto-cfc__left {
  flex: 1 1 0;
  min-width: 0;
  max-width: 576px;
  display: flex;
  flex-direction: column;
}

/* ── 5. Left column: rating badge ─────────────────────────── */
.sonto-cfc__rating {
  /* sits at the top of the column, no top margin */
}
.sonto-cfc__rating .rating-badge,
.sonto-cfc__rating .rating-badge * {
  color: #ffffff !important;
}
.sonto-cfc__rating .rating-badge .star {
  filter: brightness(0) invert(1);
}

/* ── 6. Left column: title ────────────────────────────────── */
/* Figma: rating top=75, title top=127 → gap ≈ 52px from section.
   Rating badge height ~35px → margin-top = 52 − 35 = ~17px */
.sonto-cfc__title {
  margin: 0;
  margin-top: 17px;
  color: #ffffff;
  font-size: 48px;
  line-height: 46.38px;
  letter-spacing: -1.2px;
  font-weight: 600;
}

/* ── 7. Left column: description ─────────────────────────── */
/* Figma: title top=127, desc top=250 → gap = 123px from title top.
   Title 2 lines = ~93px tall → margin-top = 123 − 93 = ~30px */
.sonto-cfc__desc {
  margin: 0;
  margin-top: 30px;
  color: #ffffff;
  font-size: 20.1px;
  line-height: 26.27px;
  font-weight: 400;
}
.sonto-cfc__desc p {
  margin: 0;
}

/* ── 8. Left column: stat counters ───────────────────────── */
/* Figma: desc top=250, counters top=349 → gap = 99px from desc top.
   Desc 3 lines = ~79px tall → margin-top = 99 − 79 = ~20px */
.sonto-cfc__stats {
  margin-top: 20px;
  display: flex;
  flex-direction: row;
  gap: 64px;
  align-items: flex-start;
      justify-content: space-between;
}
.sonto-cfc__stat {
  display: flex;
  flex-direction: column;
}
.sonto-cfc__stat-num {
  color: #ffffff;
  font-size: 63.3px;
  line-height: 1;
  letter-spacing: -0.76px;
  font-weight: 600;
    height: 88px;
  display: flex;
  align-items: center;
}
.sonto-cfc__stat-lbl {
  color: #ffffff;
  font-size: 20.5px;
  line-height: 23.82px;
  letter-spacing: -0.25px;
  font-weight: 400;
max-width: 115px;
}

/* ── 9. White card (right column, 620px wide) ─────────────── */
.sonto-cfc__card {
  flex: 0 0 620px;
  background: #ffffff;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sonto-cfc__card-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.sonto-cfc__card-title {
  color: #000000;
  font-size: 32px;
  line-height: 26.27px;
  font-weight: 600;
  margin: 0;
}
.sonto-cfc__card-sub {
  color: #00ad94;
  font-size: 16px;
  line-height: 22.3px;
  font-weight: 400;
  margin: 0;
}

/* ── 10. Form wrapper ─────────────────────────────────────── */
.sonto-cfc__form-wrap {
  flex: 1;
  min-width: 0;
}
.sonto-cfc__form-wrap .gform_wrapper {
  margin: 0 !important;
}

/* ── 11. Gravity Form: CSS variable overrides (teal theme) ── */
.sonto-cfc__form-wrap .gform_wrapper[id] {
  --gf-color-primary:           #00ad94 !important;
  --gf-color-primary-rgb:       0, 173, 148 !important;
  --gf-color-primary-darker:    #007d6b !important;
  --gf-color-primary-lighter:   #00c9ad !important;
  --gf-ctrl-border-color:       rgba(0, 173, 148, 0.6) !important;
}

/* ── 12. Input / textarea field styling ───────────────────── */
.sonto-cfc__form-wrap input[type="text"],
.sonto-cfc__form-wrap input[type="email"],
.sonto-cfc__form-wrap input[type="tel"],
.sonto-cfc__form-wrap input[type="number"],
.sonto-cfc__form-wrap input[type="url"],
.sonto-cfc__form-wrap select,
.sonto-cfc__form-wrap textarea {
  border: 1px solid rgba(0, 173, 148, 0.6) !important;
  border-radius: 5px !important;
  padding: 12px !important;
  font-size: 14px !important;
  color: rgba(0, 0, 0, 0.75) !important;
  width: 100% !important;
  background: #ffffff !important;
  box-shadow: none !important;
  outline: none !important;
  transition: border-color 0.15s ease;
}
.sonto-cfc__form-wrap input[type="text"]:focus,
.sonto-cfc__form-wrap input[type="email"]:focus,
.sonto-cfc__form-wrap input[type="tel"]:focus,
.sonto-cfc__form-wrap textarea:focus {
  border-color: #00ad94 !important;
}
.sonto-cfc__form-wrap textarea {
  height: 190px !important;
  resize: vertical;
}

/* Hide GF labels (placeholder-only design) */
.sonto-cfc__form-wrap .gfield_label,
.sonto-cfc__form-wrap .gfield_required {
  display: none !important;
}

/* Tighten GF field gaps */
.sonto-cfc__form-wrap .gform_body {
  padding: 0 !important;
}
.sonto-cfc__form-wrap .gfield {
  padding-top: 0 !important;
}
.sonto-cfc__form-wrap .gfields {
  gap: 12px !important;
  row-gap: 12px !important;
}
.sonto-cfc__form-wrap .gform_fields {
  --gf-field-gap-y: 12px !important;
  --gf-field-gap-x: 12px !important;
}

/* Validation */
.sonto-cfc__form-wrap .gfield_description.validation_message,
.sonto-cfc__form-wrap .gfield_error .gfield_label {
  color: #c00 !important;
  font-size: 12px !important;
}
.sonto-cfc__form-wrap .gfield_error input,
.sonto-cfc__form-wrap .gfield_error textarea {
  border-color: #c00 !important;
}

/* ── 13. Submit button — pill + white arrow circle ────────── */
.sonto-cfc__form-wrap .gform_footer,
.sonto-cfc__form-wrap .gform-footer {
  padding: 4px 0 0 !important;
  margin: 0 !important;
  text-align: left !important;
}
.sonto-cfc__form-wrap .gform_button,
.sonto-cfc__form-wrap .gform_next_button {
  background: #00ad94 !important;
  border-radius: 48px !important;
  padding: 8px 5px 8px 18px !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 16px !important;
  line-height: 22.4px !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
}
.sonto-cfc__form-wrap .gform_button::after,
.sonto-cfc__form-wrap .gform_next_button::after {
  content: '';
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300ad94' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
}
.sonto-cfc__form-wrap .gform_button:hover,
.sonto-cfc__form-wrap .gform_next_button:hover {
  background: #009980 !important;
}

/* ── 14. Rating badge inside card — desktop: hidden ─────────
   On mobile the rating moves into the white card (Figma mobile).
   On desktop it lives in the left column (.sonto-cfc__rating). */
.sonto-cfc__rating-card {
  display: none;
}

/* ── 15. Responsive — tablet (≤1200px) ───────────────────── */
@media (max-width: 1200px) {
  .sonto-cfc__wrap {
    padding: 60px 48px;
    gap: 48px;
  }
  .sonto-cfc__title {
    font-size: clamp(28px, 3.5vw, 40px);
    line-height: 1.1;
  }
  .sonto-cfc__stat-num {
    font-size: clamp(40px, 5vw, 56px);
    height: auto;
  }
  .sonto-cfc__stats {
    gap: 40px;
  }
  .sonto-cfc__card {
    flex: 0 0 440px;
  }
  .sonto-cfc__bg-img {
    top: 400px;
  }
}

/* ── 16. Responsive — mobile (≤767px) — Figma mobile design ─
   Layout: single column. Rating badge moves into the card.
   BG image: fixed 250px at the very bottom of section.
   All pixel values derived from Figma mobile @ 390px width. */
@media (max-width: 767px) {

  /* Section: no min-height — JS drives it; BG image is 250px */
  .sonto-cfc {
    min-height: 0;
  }

  /* Wrap: column, Figma paddings (43px top, 25px sides, 125px bottom) */
  .sonto-cfc__wrap {
    flex-direction: column;
    padding: 43px 25px 125px;
    gap: 0;
    min-height: 0;
  }

  /* Left column: full width */
  .sonto-cfc__left {
    max-width: 100%;
    width: 100%;
  }

  /* Rating badge hidden from left column — it lives in the card on mobile */
  .sonto-cfc__rating {
    display: none;
  }

  /* Title: Figma 32px / 36px lh */
  .sonto-cfc__title {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -1.2px;
    margin-top: 0;
  }

  /* Description: Figma 18px / 23.58px lh, 26px gap below title */
  .sonto-cfc__desc {
    font-size: 18px;
    line-height: 23.58px;
    margin-top: 26px;
  }

  /* Counters row: 10px gap below description */
  .sonto-cfc__stats {
    gap: 24px;
    margin-top: 10px;
    flex-wrap: nowrap;
  }

  /* Counter numbers: Figma 32px, contained in 45px height box */
  .sonto-cfc__stat-num {
    font-size: 32px;
    line-height: 19.2px;
    letter-spacing: -0.38px;
    height: 45px;
  }

  /* Counter labels: 14px, allow natural line-wrap (Figma shows 2 lines) */
  .sonto-cfc__stat-lbl {
    font-size: 14px;
    line-height: 16.24px;
    letter-spacing: -0.17px;
    white-space: normal;
    max-width: 80px;
  }

  /* Card: centred, max 340px wide, 36px below counters */
  .sonto-cfc__card {
    flex: 0 0 auto;
    width: min(340px, 100%);
    margin: 36px auto 0;
    padding: 24px;
    align-items: center;
    gap: 12px;
  }

  /* Rating inside the card: visible on mobile, vertical stack */
  .sonto-cfc__rating-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .sonto-cfc__rating-card .rating-badge {
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none;
  }
  .sonto-cfc__rating-card .rating-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .sonto-cfc__rating-card .rating-stars {
    justify-content: center;
  }
  .sonto-cfc__rating-card .score {
    font-size: 15.2px !important;
    color: #00332f !important;
  }
  .sonto-cfc__rating-card .based {
    font-size: 10px !important;
    text-align: center !important;
    color: #00332f !important;
  }

  /* Card title: centred, 28px */
  .sonto-cfc__card-title {
    font-size: 28px;
    line-height: 36px;
    text-align: center;
  }

  /* Card subtitle: left-aligned, 13px */
  .sonto-cfc__card-sub {
    font-size: 13px;
    align-self: stretch;
  }

  /* Form: stretch to card width; force single-column GF grid */
  .sonto-cfc__form-wrap {
    align-self: stretch;
  }
  .sonto-cfc__form-wrap .gform_fields {
    grid-template-columns: 1fr !important;
  }
  .sonto-cfc__form-wrap .gfield--width-half,
  .sonto-cfc__form-wrap .gfield.gf_left_half,
  .sonto-cfc__form-wrap .gfield.gf_right_half {
    grid-column: 1 / -1 !important;
  }

  /* BG image: always 250px fixed at the very bottom — CSS takes over from JS */
  .sonto-cfc__bg-img {
    top: auto !important;
    bottom: 0;
    height: 250px;
  }
}
