{% require_css %}
<style>
  {% scope_css %}

  section.custom_form {
    ;
  }
  .cs_form_box {
    background-color: ;
    border-radius: 5px;
    position: relative;
  }
  {% if module.check_to_add_top_right_image %}
  section.custom_form .cs_form_box:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 184px;
    height: 184px;
    background-image: url();
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top right;
    pointer-events: none;
    z-index: 1;
    transform: translate(-30px, -83px);
  }
  {% endif %}
  .cs_form_title,
  .cs_form_text {
    ;
  }

  @media (min-width: 768px) and (max-width: 1024px) {
    section.custom_form { 
      ;
    }
    {% if module.check_to_add_top_right_image %}
    section.custom_form .cs_form_box:after {
      width: 150px;
      height: 150px;
      transform: translate(-26px, -70px);
    }
    {% endif %}
  }

  @media (max-width: 767px) {
    section.custom_form { 
      ;
    }
    {% if module.check_to_add_top_right_image %}
    section.custom_form .cs_form_box:after {
      width: 102px;
      height: 102px;
      transform: translate(33px, -54px);
    }
    {% endif %}
  }

  {% end_scope_css %}
</style>
{% end_require_css %}

section.custom_form#form-scroll {
  scroll-margin-top: 60px;
}
section.custom_form {
  position: relative;
}
section.custom_form .content-wrapper {
  max-width: 1085px;
}
.cs_form_title h4 {
  font-weight: 500;
  margin-bottom: 10px;
}
.cs_form_title h6 {
  font-size: 18px;
  line-height: 24px;
  color: var(--body-color);
}
.cs_form_box {
  padding: 35px 20px 40px;
}
.cs_form_main .form-title {
  padding-bottom: 20px;
}
.cs_form_main {
  max-width: 802px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Submit Button Alignment Fix --- */
.cs_form_main .hs_submit.hs-submit {
  text-align: center;
  margin-top: 25px;
  clear: both;
  width: 100%;
  display: block;
}

.cs_form_text {
  margin-top: 16px;
}
section.custom_form .cs_form_text h4 {
  color: var(--body-color);
  letter-spacing: -0.5px;
}
.cs_form_title h3 {
    font-style: italic;
    letter-spacing: -0.6px;
}
.custom_form .submitted-message {
    text-align: center;
    padding: 40px 10px;
}
/* --- ROBUST GRID SYSTEM (Fixes Alignment & Gaps) --- */

/* 1. Reset Box Model: Ensures padding doesn't stretch width */
.cs_form_main fieldset,
.cs_form_main .hs-form-field,
.cs_form_main .input,
.cs_form_main input,
.cs_form_main textarea,
.cs_form_main select {
    box-sizing: border-box !important;
}

/* 2. Row Container: Uses negative margin to pull edges flush */
.cs_form_main fieldset {
    max-width: none !important;
    width: auto !important;
    margin-left: -10px; /* Pulls left edge back */
    margin-right: -10px; /* Pulls right edge back */
}

/* 3. Columns: Adds the gap INSIDE the columns */
.cs_form_main .hs-form-field {
    padding-left: 10px;  /* Creates half the gap */
    padding-right: 10px; /* Creates half the gap */
    float: left;
}

/* 4. Column Widths: Now they add up perfectly */
/* Single Column (Full Width) */
.cs_form_main fieldset.form-columns-1 .hs-form-field {
    width: 100%;
}
/* Two Columns (Split) */
.cs_form_main fieldset.form-columns-2 .hs-form-field {
    width: 50%;
}
/* Three Columns (Just in case you need it later) */
.cs_form_main fieldset.form-columns-3 .hs-form-field {
    width: 33.33%;
}

/* 5. Force Inputs to fill their column space */
.cs_form_main .hs-input,
.cs_form_main input[type="text"],
.cs_form_main input[type="email"],
.cs_form_main input[type="tel"],
.cs_form_main textarea {
    width: 100% !important;
}

/* --- HIDE GOOGLE RECAPTCHA BADGE --- */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* --- Style & Clear the Legal Text --- */
.recaptcha-legal-text {
  clear: both;
  width: 100%;
  display: block;
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: 15px;
  line-height: 1.4;
}
.recaptcha-legal-text a {
  color: #666666;
  text-decoration: underline;
  padding-top: .5rem;
}
.recaptcha-legal-text a:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  section.custom_form .content-wrapper {
    padding: 0 50px;
  }
  .cs_form_title h6 {
    font-size: 14px;
    line-height: 18px;
  }
  .cs_form_box {
    padding: 25px 23px 30px;
  }
  .cs_form_box fieldset.form-columns-2 {
    margin-bottom: -6px;
  }
  .cs_form_main .hs_submit.hs-submit {
    margin-top: 20px;
  }
  .cs_form_main .form-title {
    padding-bottom: 3px;
  }
  .cs_form_title h4 {
    margin-bottom: 5px;
  }
  .cs_form_text {
    margin-top: 13px;
  }
  .cs_form_text h4 {
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.28px;
  }
   section.custom_form fieldset.form-columns-2 .hs-form-field {
    width: 100%;
    float: left;
  }
}