/* =========================================
   BASE LAYOUT & TYPOGRAPHY
   ========================================= */
.tdg-section-wrapper {
  /* Give it a negative top margin to pull it up over the hero */
  /* Adjust -100px to match exactly how much overlap you want */
  margin-top: -100px !important; 
  
  padding: 0 20px 60px 20px; /* Removed top padding so it doesn't push itself down */
  display: flex;
  flex-direction: column; 
  align-items: center;
  font-family: 'Outfit', sans-serif;
  width: 100%;
  
  /* Critical: Ensures it sits ON TOP of the hero banner */
  position: relative; 
  z-index: 10; 
}

.tdg-contact-card {
  width: 100%;
  max-width: 1029px;
  position: relative;
  overflow: hidden;
  padding: 60px 40px;
  text-align: center;
  
  /* Light Gradient Background */
  background: transparent linear-gradient(180deg, #F4F6F7 0%, #E1EDF6 100%) 0% 0% no-repeat padding-box;
  box-shadow: 0px 10px 30px #0000002C; /* Increased shadow for better "lift" effect */
  border-radius: 53px;
  
  color: #414141; 
}

/* Main Form Intro Text (Paragraph Style) */
.contact-header,
.contact-header p,
.contact-header h2,
.contact-header h3,
.contact-header div {
  font: normal normal normal 20px/30px 'Outfit', sans-serif !important;
  letter-spacing: 1px !important;
  color: #414141 !important;
  max-width: 600px;
  margin: 0 auto 30px auto !important; 
  text-align: center !important;
}

/* =========================================
   HUBSPOT FORM - RESET
   ========================================= */

.tdg-form-scope * { box-sizing: border-box !important; }

.tdg-form-scope .hs-form,
.tdg-form-scope .hs-form fieldset {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.tdg-form-scope .hs-form fieldset::after {
  content: "";
  display: table;
  clear: both;
}

/* =========================================
   FIELD LAYOUTS
   ========================================= */

.tdg-form-scope .hs-form-field {
  float: left;
  padding: 0 !important;
  margin: 0 0 15px 0 !important;
  clear: none !important;
}

/* 1. Name & Email/Phone: 2 Columns */
.tdg-form-scope .hs_firstname,
.tdg-form-scope .hs_email {
  width: calc(50% - 8px) !important;
  margin-right: 16px !important;
}

.tdg-form-scope .hs_lastname,
.tdg-form-scope .hs_phone {
  width: calc(50% - 8px) !important;
}

/* 2. Company & Revenue: Full Width */
.tdg-form-scope .hs_company,
.tdg-form-scope .hs_revenue {
  width: 100% !important;
  clear: both !important;
}

/* --- REVENUE SECTION (Pill + Forced Width Spread) --- */
.tdg-form-scope .hs_revenue {
  width: 100% !important;
  clear: both !important;
  margin-bottom: 25px !important;
  
  background-color: #9EB2C321 !important; 
  border-radius: 24px !important; 
  padding: 15px 30px !important; 
  box-sizing: border-box !important;
  
  display: flex !important;
  align-items: center !important; 
  justify-content: flex-start !important; 
}

/* 1. FORCE THE INTERNAL WRAPPERS TO FILL SPACE */
.tdg-form-scope .hs_revenue .input,
.tdg-form-scope .hs_revenue .hs-field-desc {
  flex: 1 !important;
  width: 100% !important;
  display: flex !important;
}

/* 2. THE INPUTS LIST (Now has room to spread) */
.tdg-form-scope .hs_revenue .inputs-list {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important; 
  
  /* THIS SPREADS THEM */
  width: 100% !important;
  flex: 1 !important;
  justify-content: space-between !important; 
  
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* 3. INDIVIDUAL ITEMS (Remove fixed gaps) */
.tdg-form-scope .hs_revenue .inputs-list li {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important; 
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}
/* Push only the first checkbox item further to the right */
.tdg-form-scope .hs_revenue .inputs-list li:first-child {
  margin-left: 120px !important; /* Adjust this number to push it as far as you like */
}

/* 4. LABEL (Fixed distance from first item) */
.tdg-form-scope .hs_revenue > label,
.tdg-form-scope .hs_revenue legend {
  font: normal normal normal 16px/30px 'Outfit', sans-serif !important;
  margin-right: 40px !important; /* Adjust this for gap between text and 1st box */
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* 3. The "White Card" Checkbox Section */
.tdg-form-scope .hs_what_could_be_slowing_your_growth {
  width: 100% !important;
  clear: both !important;
  background-color: #fff;
  border-radius: 14px;
  padding: 35px 40px 40px 40px !important;
  margin-top: 10px !important;
  margin-bottom: 30px !important;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}

/* 4. Text Area */
.tdg-form-scope .hs_how_can_we_help_ {
  width: 100% !important;
  clear: both !important;
  margin-bottom: 40px !important;
}

/* 5. Submit Button Wrapper */
.tdg-form-scope .hs_submit,
.tdg-form-scope .actions {
  width: 100% !important;
  clear: both !important;
  text-align: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =========================================
   INPUT STYLING (Fields & Textareas)
   ========================================= */

.tdg-form-scope input[type="text"],
.tdg-form-scope input[type="email"],
.tdg-form-scope input[type="tel"],
.tdg-form-scope textarea {
  height: 50px !important;
  border-radius: 14px !important;
  padding: 0 20px !important;
  background-color: #fff !important;
  width: 100% !important;
  border: 1px solid #D6E4EE !important;
  color: #414141 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 16px !important;
}

.tdg-form-scope textarea {
  height: 120px !important;
  padding-top: 15px !important;
  resize: vertical;
}

/* Help Text (Placeholders) */
.tdg-form-scope input::placeholder,
.tdg-form-scope textarea::placeholder {
  font: normal normal normal 16px/40px 'Outfit', sans-serif !important;
  letter-spacing: 0.32px !important;
  color: #BABABA !important;
  opacity: 1 !important;
}

/* Hide labels for standard inputs */
.tdg-form-scope .hs_firstname label,
.tdg-form-scope .hs_lastname label,
.tdg-form-scope .hs_email label,
.tdg-form-scope .hs_phone label,
.tdg-form-scope .hs_company label,
.tdg-form-scope .hs_how_can_we_help_ label {
  display: none !important;
}

/* Revenue Checkbox Text - UPDATED TO 16px */
.tdg-form-scope .hs_revenue .hs-form-checkbox label,
.tdg-form-scope .hs_revenue .hs-form-checkbox-display span,
.tdg-form-scope .hs_revenue .hs-form-radio label,
.tdg-form-scope .hs_revenue .hs-form-radio-display span {
  color: #414141 !important; 
  font-family: 'Outfit', sans-serif !important;
  font-weight: 400 !important;
  font-size: 16px !important; 
}

/* =========================================
   CHECKBOX STYLING & LAYOUT FIX
   ========================================= */

/* 1. RESET THE LIST CONTAINER */
.tdg-form-scope ul,
.tdg-form-scope .inputs-list {
  list-style: none !important; 
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px 0px !important; 
}

/* 2. LIST ITEM LAYOUT (Grid) */
.tdg-form-scope .inputs-list li {
  display: flex !important;
  
  /* --- ALIGNMENT FIX 1: Top align, then push box down --- */
  align-items: flex-start !important; 
  
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
  width: 50% !important; 
}

/* 3. REVENUE SPECIFIC OVERRIDE */
.tdg-form-scope .hs_revenue .inputs-list li {
  width: auto !important; 
  margin-right: 30px !important; 
  margin-bottom: 0 !important;
  align-items: center !important; /* Keep revenue centered */
}

/* 4. CUSTOM CHECKBOX DESIGN */
.tdg-form-scope input[type="checkbox"],
.tdg-form-scope input[type="radio"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 22px !important;
  height: 22px !important;
  
  margin: 0 12px -5px 0 !important; 
  
  /* --- ALIGNMENT FIX 2: Push box down 4px to match text --- */
  margin-top: 4px !important;
  
  flex-shrink: 0 !important;
  background-color: #fff;
  border: 2px solid #D6B37E !important; 
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  display: inline-block !important;
}

/* Revenue Radio buttons fix (reset the top margin) */
.tdg-form-scope .hs_revenue input[type="radio"] {
  margin-top: 0 !important;
}

/* 5. CHECKED STATE */
.tdg-form-scope input[type="checkbox"]:checked,
.tdg-form-scope input[type="radio"]:checked {
  background-color: #D6B37E !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 80%;
  background-position: center;
  background-repeat: no-repeat;
}

/* 6. LABEL TEXT STYLING */
.tdg-form-scope .hs-form-checkbox label,
.tdg-form-scope .hs-form-checkbox-display span,
.tdg-form-scope .hs-form-radio label,
.tdg-form-scope .hs-form-radio-display span {
  font-size: 16px !important;
  color: #414141 !important;
  line-height: 1.5 !important; /* Defined line height for consistent alignment */
  font-weight: 400 !important;
  font-family: 'Outfit', sans-serif !important;
  cursor: pointer;
  margin-bottom: 0 !important; 
}

/* =========================================
   SUBMIT BUTTON (Gradient Border)
   ========================================= */

.tdg-form-scope input[type="submit"] {
  width: auto !important;
  padding: 12px 70px !important;
  height: auto !important;
  border-radius: 50px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;

  /* --- BROKEN APART FOR SAFETY --- */
  font-family: 'Outfit', sans-serif !important;
  font-weight: 500 !important; /* "Medium" = 500 */
  font-size: 20px !important;
  line-height: 42px !important;
  font-style: normal !important;
  letter-spacing: 0px !important;
  color: #FFFFFF !important;

  border: 2px solid transparent !important; 
  background: 
    linear-gradient(#2D4353, #2D4353) padding-box, 
    linear-gradient(192deg, #FFFFFF 0%, #E3DACD 47%, #C7A97F 100%) border-box !important;
}

.tdg-form-scope input[type="submit"]:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 15px 30px rgba(0,0,0,0.3) !important;
  background: linear-gradient(192deg, #FFFFFF 0%, #E3DACD 47%, #C7A97F 100%) border-box !important;
  color: #0C313F !important; 
}

/* =========================================
   BELOW FORM AREA (Text CTA)
   ========================================= */

.below-form-area {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 85px !important;
  margin-bottom: 0px !important; 
  width: 100%;
}

.below-form-text,
.below-form-text p,
.below-form-text a,
.below-form-text span {
  text-decoration: underline !important;
  font: italic normal 600 24px/28px 'Raleway', sans-serif !important;
  letter-spacing: 1.2px !important;
  color: #073345 !important;
  text-transform: capitalize !important;
}

/* =========================================
   MOBILE RESPONSIVE (Max-Width: 768px)
   ========================================= */
@media (max-width: 768px) {
  
  /* 1. LAYOUT & OVERFLOW FIXES */
  .tdg-section-wrapper { 
    padding: 0 15px 40px 15px !important; 
    margin-top: -50px !important; 
    overflow-x: hidden !important; 
    align-items: center !important; 
    width: 100% !important;
    box-sizing: border-box !important; 
  }
  
  .tdg-contact-card { 
    padding: 30px 15px !important; 
    border-radius: 30px !important; 
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  
  .card-content {
    width: 100% !important;
    padding: 0 !important;
  }

  /* 2. HEADLINE TYPOGRAPHY */
  .contact-header,
  .contact-header p,
  .contact-header h2,
  .contact-header div {
    font: normal normal normal 17px/24px 'Outfit', sans-serif !important;
    letter-spacing: 0px !important;
    color: #1D2A2D !important;
    margin-bottom: 25px !important;
  }

  /* 3. STACK ALL STANDARD FIELDS */
  .tdg-form-scope .hs-form-field {
    width: 100% !important;
    float: none !important;
  }

  .tdg-form-scope .hs_firstname,
  .tdg-form-scope .hs_lastname,
  .tdg-form-scope .hs_email,
  .tdg-form-scope .hs_phone {
    width: 100% !important;
    margin-right: 0 !important;
  }
  
  /* 4. REVENUE SECTION: STACK VERTICALLY */
  .tdg-form-scope .hs_revenue {
    display: block !important; 
    height: auto !important;
    padding: 20px 15px !important;
    width: 100% !important;
  }
  
  .tdg-form-scope .hs_revenue > label,
  .tdg-form-scope .hs_revenue legend {
    margin-bottom: 15px !important;
    white-space: normal !important; 
    text-align: left !important;
    width: 100% !important;
  }

  .tdg-form-scope .hs_revenue .inputs-list {
    flex-direction: column !important;
    align-items: flex-start !important; 
    justify-content: flex-start !important; 
    gap: 0 !important;
    width: 100% !important;
  }

  /* --- FIX START: RESET MARGINS FOR REVENUE ITEMS --- */
  .tdg-form-scope .hs_revenue .inputs-list li,
  .tdg-form-scope .hs_revenue .inputs-list li:first-child {
    width: 100% !important;
    margin-left: 0 !important;  /* Fixes the alignment indentation */
    margin-right: 0 !important; /* Fixes any extra width pushing out */
    margin-bottom: 12px !important;
    align-items: center !important; /* Keeps checkbox vertically centered with text */
  }
  /* --- FIX END --- */
  
  /* 5. GROWTH SECTION (White Card) */
  .tdg-form-scope .hs_what_could_be_slowing_your_growth {
    padding: 25px 15px !important; 
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .tdg-form-scope .hs_what_could_be_slowing_your_growth > label, 
  .tdg-form-scope .hs_what_could_be_slowing_your_growth legend {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px !important; /* Adds space between text and checkboxes */
  }

  /* 6. GENERAL INPUT LIST ALIGNMENT */
  .tdg-form-scope .inputs-list {
    justify-content: flex-start !important; 
  }

  .tdg-form-scope .inputs-list li {
    width: 100% !important;
    margin-bottom: 5px !important; 
    display: flex !important; 
    align-items: flex-start !important;
    justify-content: flex-start !important; 
  }
  
  /* UPDATED: Font size 13px for mobile labels */
  .tdg-form-scope .hs-form-checkbox label,
  .tdg-form-scope .hs-form-radio label,
  .tdg-form-scope .hs-form-checkbox-display span,
  .tdg-form-scope .hs-form-radio-display span {
    font-size: 13px !important;
    white-space: normal !important; 
    word-break: break-word !important;
    text-align: left !important;
    line-height: 1.4 !important;
  }
  
  /* 7. SUBMIT BUTTON (182px) */
  .tdg-form-scope .hs_submit,
  .tdg-form-scope .actions {
    text-align: center !important; 
  margin: 10px auto !important;
  padding: 0 !important;
}
  }
  
  .tdg-form-scope input[type="submit"] {
    width: 182px !important; 
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important;
    font-size: 17px !important;
    line-height: 42px !important;
    padding: 0 !important; 
  }
  /* --- REVENUE LABEL LEFT ALIGN --- */
  .tdg-form-scope .hs_revenue > label,
  .tdg-form-scope .hs_revenue legend {
    text-align: left !important;
    width: 100% !important;
    display: block !important; /* Ensures it takes full width to allow left align */
    margin-bottom: 10px !important;
  }

  /* 8. BOTTOM TEXT CTA (Inside Card on Mobile) */
  .below-form-area {
    display: flex !important;
    flex-direction: row !important; 
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important; 
    margin-top: 65px !important; 
    margin-bottom: 0 !important;
    width: 100% !important;
  }
  
  .below-form-text,
  .below-form-text p,
  .below-form-text a,
  .below-form-text span {
    font: italic normal 600 20px/24px 'Raleway', sans-serif !important; 
    letter-spacing: 0.5px !important;
    color: #073345 !important;
    text-decoration: underline !important;
    white-space: nowrap !important; 
  }
  
  .below-form-area svg, 
  .below-form-area img {
    max-width: 24px !important;
    height: auto !important;
  }
}