.lgf-section {
  position: relative;
  padding: 40px 0;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f1f4f8; /* Fallback */
}

.lgf-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Add a subtle blue-grey wash over the image */
  background: rgba(181, 197, 222, 0.7);
  z-index: 1;
  pointer-events: none;
}

.lgf-container {
  position: relative;
  z-index: 2;
}

.lgf-row {
  display: flex;
  justify-content: stretch;
  align-items: start;
  gap: 44px;
  margin: 0 auto;
}

.lgf-col {
  flex: 1;
}
.lgf-col--content {
  flex: 1.3;
  max-width: 595px;
}
.lgf-col--form {
  background-color: #7990c7;
  border-radius: 0 20px 20px 0; /* Add rounding to match right side of form panel */
  padding: 52px 29px;
}

.lgf-card {
  background-color: #4b32a2;
  border-radius: 0 25px 0 0;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  height: 100%; /* Match height of form container */
}
.lgf-card__body {
  padding: 60px 25px 65px;
  flex-grow: 1;
}
.lgf-card__title {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 45px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: #fff;
}
.lgf-card__text {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 25px;
  line-height: 1.2;
}
.lgf-card__footer {
  background-color: rgba(255, 255, 255, 0.85); /* Light strip */
  color: #313f42;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 18px;
  text-transform: uppercase;
  padding: 15px 23px;
  text-align: right;
}

/*
 * Generic Form Styling Override
 * Targets elements created by typical form shortcodes (e.g. Gravity Forms or HubSpot)
 */
.lgf-form-wrapper {
  overflow: hidden;
  /* Target specific field groupings for columns based on assumed typical form wrappers */
  /* Submit Button styling */
  /* Example of consent text area */
}
.lgf-form-wrapper .lgf-demo-form .lgf-form-grid,
.lgf-form-wrapper .wpcf7-form .lgf-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 27px 20px;
}
.lgf-form-wrapper .lgf-demo-form .lgf-form-field,
.lgf-form-wrapper .wpcf7-form .lgf-form-field {
  min-width: 0;
}
.lgf-form-wrapper .lgf-demo-form .lgf-form-field--full,
.lgf-form-wrapper .wpcf7-form .lgf-form-field--full {
  grid-column: 1/-1;
}
.lgf-form-wrapper .lgf-demo-form .lgf-form-field--half,
.lgf-form-wrapper .wpcf7-form .lgf-form-field--half {
  grid-column: span 1;
}
.lgf-form-wrapper .lgf-demo-form .lgf-form-field--country-code,
.lgf-form-wrapper .wpcf7-form .lgf-form-field--country-code {
  grid-column: span 1;
}
.lgf-form-wrapper .wpcf7-form-control-wrap {
  display: block;
}
.lgf-form-wrapper .lgf-phone-row {
  display: flex;
  gap: 8px;
}
.lgf-form-wrapper .lgf-phone-row .wpcf7-form-control-wrap:first-child {
  flex: 0 0 auto;
  width: 130px;
}
.lgf-form-wrapper .lgf-phone-row .wpcf7-form-control-wrap:last-child {
  flex: 1;
  min-width: 0;
}
.lgf-form-wrapper .lgf-phone-row select {
  width: 100%;
}
.lgf-form-wrapper .lgf-phone-row input[type=tel] {
  width: 100%;
}
.lgf-form-wrapper .wpcf7-not-valid-tip {
  color: #e53e3e;
  font-size: 13px;
  margin-top: 4px;
  display: block;
}
.lgf-form-wrapper .wpcf7-response-output {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  border: none;
}
.lgf-form-wrapper .wpcf7-response-output.wpcf7-mail-sent-ok {
  background: #ecfdf5;
  color: #065f46;
}
.lgf-form-wrapper .wpcf7-response-output.wpcf7-validation-errors, .lgf-form-wrapper .wpcf7-response-output.wpcf7-mail-sent-ng, .lgf-form-wrapper .wpcf7-response-output.wpcf7-spam-blocked {
  background: #fef2f2;
  color: #991b1b;
}
.lgf-form-wrapper label {
  display: none;
}
.lgf-form-wrapper input[type=text],
.lgf-form-wrapper input[type=email],
.lgf-form-wrapper input[type=tel],
.lgf-form-wrapper select,
.lgf-form-wrapper textarea {
  width: -webkit-fill-available;
  background-color: #ffffff;
  border: none;
  border-radius: 0 25px 0 0;
  padding: 15px 20px;
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  color: #313f42;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.lgf-form-wrapper input[type=text]::-moz-placeholder, .lgf-form-wrapper input[type=email]::-moz-placeholder, .lgf-form-wrapper input[type=tel]::-moz-placeholder, .lgf-form-wrapper select::-moz-placeholder, .lgf-form-wrapper textarea::-moz-placeholder {
  color: #9ea2ac;
}
.lgf-form-wrapper input[type=text]::placeholder,
.lgf-form-wrapper input[type=email]::placeholder,
.lgf-form-wrapper input[type=tel]::placeholder,
.lgf-form-wrapper select::placeholder,
.lgf-form-wrapper textarea::placeholder {
  color: #9ea2ac;
}
.lgf-form-wrapper input[type=text]:focus,
.lgf-form-wrapper input[type=email]:focus,
.lgf-form-wrapper input[type=tel]:focus,
.lgf-form-wrapper select:focus,
.lgf-form-wrapper textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px #4b32a2;
}
.lgf-form-wrapper select {
  color: #9ea2ac !important;
}
.lgf-form-wrapper select::-moz-placeholder {
  color: #9ea2ac !important;
}
.lgf-form-wrapper select::placeholder {
  color: #9ea2ac !important;
}
.lgf-form-wrapper textarea {
  min-height: 82px;
  resize: vertical;
}
.lgf-form-wrapper select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1.5L6 6.5L11 1.5" stroke="%23939EA1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 20px center;
  padding-right: 40px;
}
.lgf-form-wrapper .gfield,
.lgf-form-wrapper .form-group {
  width: 100%;
}
.lgf-form-wrapper input[type=submit],
.lgf-form-wrapper button[type=submit] {
  background-color: #4b32a2;
  color: #ffffff;
  border: none;
  border-radius: 0 25px 0 0;
  padding: 15px 0;
  width: 100%;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 10px;
}
.lgf-form-wrapper input[type=submit]:hover,
.lgf-form-wrapper button[type=submit]:hover {
  background-color: #3a2680;
}
.lgf-form-wrapper .form-text,
.lgf-form-wrapper .ginput_container_consent {
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  margin-top: 15px;
  margin-bottom: 15px;
}
.lgf-form-wrapper .form-text a,
.lgf-form-wrapper .ginput_container_consent a {
  color: #ffffff;
  text-decoration: underline;
}
.lgf-form-wrapper .lgf-form-consent {
  margin-top: 20px;
}
.lgf-form-wrapper .lgf-form-consent__title {
  display: block;
  margin: 0 0 14px;
  color: #fff;
  font: 700 16px "Roboto", sans-serif;
  line-height: 1.4;
}
.lgf-form-wrapper .lgf-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
}
.lgf-form-wrapper .lgf-checkbox__text {
  color: rgba(255, 255, 255, 0.95);
  font: 400 15px "Roboto", sans-serif;
  line-height: 1.2;
}
.lgf-form-wrapper .lgf-checkbox .wpcf7-list-item {
  margin-left: 0;
}
.lgf-form-wrapper .lgf-form-field--phone .iti {
  width: 100%;
}
.lgf-form-wrapper .lgf-form-field--phone .iti__selected-country {
  background: #ffffff;
  border: none;
  border-right: 1px solid #e0e0e0;
  border-radius: 0 25px 0 0;
  padding: 0 12px;
  height: 100%;
  gap: 8px;
}
.lgf-form-wrapper .lgf-form-field--phone .iti__selected-country:hover, .lgf-form-wrapper .lgf-form-field--phone .iti__selected-country:focus {
  background: #f5f5f5;
  outline: none;
}
.lgf-form-wrapper .lgf-form-field--phone .iti__selected-dial-code {
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  color: #9ea2ac;
}
.lgf-form-wrapper .lgf-form-field--phone .iti__flag,
.lgf-form-wrapper .lgf-form-field--phone .iti__globe {
  display: none !important;
}
.lgf-form-wrapper .lgf-form-field--phone .iti__dropdown-content {
  border: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.lgf-form-wrapper .lgf-form-field--phone .iti__search-input {
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid #e0e0e0;
  outline: none;
}
.lgf-form-wrapper .lgf-form-field--phone .iti__country-name {
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  color: #313f42;
}
.lgf-form-wrapper .lgf-form-field--phone .iti__dial-code {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: #9ea2ac;
}
.lgf-form-wrapper .lgf-form-field--phone .iti__country.iti__highlight {
  background: #f0edfa;
}
.lgf-form-wrapper .lgf-form-submit {
  margin-top: 30px;
}
.lgf-form-wrapper .lgf-form-privacy {
  margin-top: 18px;
}
.lgf-form-wrapper .lgf-form-privacy p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.95);
  font: 400 12px "Roboto", sans-serif;
  line-height: 1.35;
}
.lgf-form-wrapper .lgf-form-privacy a {
  color: rgba(255, 255, 255, 0.95);
  font: 400 12px "Roboto", sans-serif;
  line-height: 1.35;
  text-decoration: underline;
}
@media (max-width: 1023px) {
  .lgf-section {
    padding: 50px 0;
  }
  .lgf-row {
    flex-direction: column;
    gap: 30px;
  }
  .lgf-col--content {
    max-width: 100%;
  }
  .lgf-col--form {
    width: 100%;
    border-radius: 20px;
    padding: 30px 0px;
  }
  .lgf-card {
    border-radius: 20px 20px 0 0;
  }
}
@media (max-width: 767px) {
  .lgf-card__body {
    padding: 40px 20px;
  }
  .lgf-card__title {
    font-size: 26px;
  }
  .lgf-card__text {
    padding-bottom: 10px;
    font-size: 18px;
  }
  .lgf-card__footer {
    padding: 10px 20px;
    font-size: 14px;
  }
  .lgf-form-wrapper .lgf-demo-form .lgf-form-grid,
  .lgf-form-wrapper .wpcf7-form .lgf-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .lgf-form-wrapper .lgf-demo-form .lgf-form-field--full, .lgf-form-wrapper .lgf-demo-form .lgf-form-field--half, .lgf-form-wrapper .lgf-demo-form .lgf-form-field--country-code,
  .lgf-form-wrapper .wpcf7-form .lgf-form-field--full,
  .lgf-form-wrapper .wpcf7-form .lgf-form-field--half,
  .lgf-form-wrapper .wpcf7-form .lgf-form-field--country-code {
    grid-column: 1/-1;
    max-width: 100%;
  }
}