{% 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; 
    margin-right: -10px; 
}

/* 3. Columns: Adds the gap INSIDE the columns */
.cs_form_main .hs-form-field {
    padding-left: 10px;  
    padding-right: 10px; 
    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;
}

/* =========================================
   CHECKBOX STYLING (Products/Services)
   ========================================= */

/* 1. The Main "White Box" Container */
.cs_form_main .hs-fieldtype-checkbox {
  background-color: #f7f7f7 !important;
  border-radius: 3px !important;
  padding: 20px 25px !important;
  
  /* Fixes the width to align perfectly with the grid's text inputs */
  width: calc(100% - 20px) !important; 
  margin-top: 10px;
  margin-left: 10px !important;
  margin-right: 10px !important;
  
  clear: both;
  box-sizing: border-box !important;
}

/* 2. The Label ("Which Products...") */
.cs_form_main .hs-fieldtype-checkbox > label {
  display: block !important;
  color: #3E3E3F !important;
  font-family: inherit;
  font-size: 18px; 
  font-weight: 700;
  font-style: italic;
  margin-bottom: 15px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  width: 100%;
}

/* 3. The List Container (Grid Wrapper) */
.cs_form_main .inputs-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

/* 4. THREE Column Layout - The Item Wrapper */
.cs_form_main .inputs-list li {
  width: 33.33% !important; 
  margin-bottom: 12px !important;
  padding-right: 5px;
  box-sizing: border-box !important;
}

/* 5. The Flex Container (Aligns Box and Text)  */
.cs_form_main .hs-form-checkbox-display {
  display: flex !important;
  align-items: center !important; 
  width: 100%;
  margin: 0 !important;
}

/* 6. The Checkbox Square (Increased Size) */
.cs_form_main .hs-form-checkbox-display input {
  -webkit-appearance: none;
  appearance: none;
  width: 24px !important;  /* Increased from 18px */
  height: 24px !important; /* Increased from 18px */
  border: 2px solid #71a847 !important; 
  background-color: #fff !important;
  border-radius: 3px;
  cursor: pointer;
  float: none !important;
  margin-top: 0 !important; 
  margin-right: 15px !important; /* Added slightly more breathing room */
  flex-shrink: 0; 
  position: relative; 
}

/* Checked State */
.cs_form_main .hs-form-checkbox-display input:checked {
  background-color: #fbe134 !important; 
  border-color: #fbe134 !important;
}
.cs_form_main .hs-form-checkbox-display input:checked::after {
  content: '✔';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #333;
  font-size: 16px; /* Increased checkmark size to match new box size */
  font-weight: 900;
}

/* 7. Option Text */
.cs_form_main .hs-form-checkbox-display span {
  color: #3E3E3F !important;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.2; 
  cursor: pointer;
  margin: 0 !important; 
}

/* =========================================
   --- MOBILE RESPONSIVE --- 
   ========================================= */

@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;
  }

  /* --- Checkboxes Mobile Settings --- */
  .cs_form_main .hs-fieldtype-checkbox {
     padding: 20px 15px !important; /* Slightly tighter padding for small screens */
     width: calc(100% - 20px) !important; /* Maintains the alignment fix */
  }
  .cs_form_main .inputs-list li {
     width: 100% !important; /* Stacks to single column */
     margin-bottom: 15px !important; /* Increases touch spacing between rows */
  }
}