/* QuoteForm Styles - Final Corrected Version */
.quote-form-section {
  position: relative;
  z-index: 20;
  width: 100%;
}

.quote-form-section .container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.floating-form {
  background-color: #ffffff;
  border-radius: 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 60px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: none;
  width: 100%;
  box-sizing: border-box;
}

/* Perspective Grid */
.floating-form::before {
  content: '';
  position: absolute;
  top: -180px;
  left: -20%;
  width: 140%;
  height: 600px;
  background-size: 58.5px 13px;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  transform: perspective(800px) rotateX(72deg);
  transform-origin: center top;
  z-index: 1;
  pointer-events: none;
}

.form-inner-container {
  position: relative;
  z-index: 100;
  width: 100%;
}

.form-header {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.form-title {
  color: #54b248;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.form-subtitle {
  color: #1a1a1a;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.form-inputs {
  display: flex;
  gap: 20px 15px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.input-group {
  flex: 1 1 200px;
  margin: 0;
}

.input-group:nth-child(5) {
  flex: 2 1 300px;
}

.form-input {
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid #54b248;
  border-radius: 50px;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  outline: none;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: #3d8b33;
  box-shadow: 0px 4px 20px rgba(84, 178, 72, 0.2);
}

.captcha-and-submit-group {
  flex: 2 1 320px;
  display: flex;
  flex-direction: column;
  position: relative;
  justify-content: flex-end;
}

.captcha-label {
  position: absolute;
  top: -15px;
  left: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.actions-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.captcha-input {
  width: 140px !important;
  flex: none;
}

.form-submit {
  flex: 1;
  background-color: #54b248;
  color: #ffffff;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0px 4px 15px rgba(84, 178, 72, 0.4);
  transition: all 0.3s ease;
}

.form-submit:hover {
  background-color: #429037;
  transform: translateY(-2px);
}

.form-footer-inline {
  position: absolute;
  bottom: -25px;
  left: 10px;
  font-size: 11px;
  color: #555;
  font-weight: 500;
}

.form-footer-inline a {
  color: #54b248;
  font-weight: 700;
}

.side-curve {
  position: absolute;
  top: -10px;
  bottom: -10px;
  width: 110px;
  background-size: 100% 100%;
  z-index: 5;
  pointer-events: none;
}

.left-curve {
  left: -5px;
}

.right-curve {
  right: 0;
}

.form-pattern-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right center;
  z-index: 6;
  pointer-events: none;
}

/* --- Responsiveness --- */

@media (max-width: 1072px) {
  .floating-form {
    padding: 40px 90px !important;
  }
}




@media (max-width: 1024px) {
  .quote-form-section .container {
    width: 95%;
  }

  .floating-form {
    padding: 30px 95px !important;
  }

  .form-inputs {
    gap: 15px 10px;
  }
}

@media (max-width: 768px) {
  .quote-form-section .container {
    width: 100%;
    padding: 0 15px;
    /* Consistent left-right padding */
    box-sizing: border-box;
  }

  .floating-form {
    padding: 25px 30px !important;
    /* Balanced internal padding */
    border-radius: 20px;
    margin: 0 auto !important;
    /* Centering the box */
    margin-top: 0 !important;
    width: 100%;
    min-height: auto !important;
    height: auto !important;
    display: block !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow: hidden;
    /* Prevent any child elements from leaking out */
  }

  .form-inner-container {
    width: 100%;
    max-width: 100%;
  }

  .form-header {
    text-align: center;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
  }

  .form-title {
    font-size: 21px;
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .form-inputs {
    display: block !important;
    width: 100% !important;
    margin: 0;
    padding: 0;
  }

  .input-group {
    width: 100% !important;
    margin-bottom: 12px !important;
    /* Fixed small gap */
  }

  .form-input {
    padding: 14px 18px;
    font-size: 15px;
    text-align: left;
  }

  .captcha-and-submit-group {
    margin-top: 25px;
    display: block !important;
  }

  .captcha-label {
    position: static;
    display: block;
    margin-bottom: 8px;
    margin-left: 10px;
    font-size: 13px;
  }

  .actions-row {
    flex-direction: column;
    gap: 12px;
  }

  .captcha-input {
    width: 100% !important;
  }

  .form-submit {
    width: 100%;
    padding: 15px;
    font-size: 18px;
  }

  .form-footer-inline {
    position: static;
    margin-top: 20px;
    text-align: center;
    display: block;
  }

  .side-curve,
  .form-pattern-overlay,
  .floating-form::before {
    display: none !important;
  }
}