.form-container {
  background-color: #e0e0e0;
  padding: 70px 120px 100px;
  color: black;
  text-align: center;
  margin-left: -80px;
  margin-right: -80px;
  overflow-x: hidden;
  box-sizing: border-box; /* Explicitly add this here too */
}

.form-container h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--background-color);
}

.form-container p {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.54);
  margin-bottom: 20px;
}

form {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  text-align: left;
  margin-top: 50px;
}

.form-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 25px;
}

.half-width {
  width: 48%;
}

.quarter-width {
  width: 22%;
}

.full-width {
  width: 100%;
}

label {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 5px;
  color: rgba(0, 0, 0, 0.7);
}

input,
textarea {
  padding: 10px;
  border: none;
  border-bottom: 1px solid #aaa;
  font-size: 16px;
  background-color: transparent;
  outline: none;
  width: 100%;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"] {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
textarea {
  height: 50px;
  resize: none;
  background-color: white;
  border: 1px solid #aaa;
}

/* .radio-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 10px;
}

.radio-group label {
  display: flex;
  align-items: center;
  margin-right: 20px;
  margin-bottom: 10px;

  cursor: pointer;
  white-space: nowrap;
}

.radio-group label span {
  margin-left: 8px;
  color: rgba(0, 0, 0, 0.7);
} */

select {
  /* Basic Appearance */
  -webkit-appearance: none; /* Removes default Safari styling */
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  width: 100%;
  padding: 10px;
  margin: 8px 0 15px;
  font-size: 16px;
  color: #999;

  /* Border to match other inputs */
  border: none;
  border-bottom: 1px solid #aaa;

  /* Custom Dropdown Arrow */
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px top 50%;
  background-size: 0.65em auto;

  cursor: pointer;
  font-family: var(--body-font);
}

select::-ms-expand {
  display: none;
}

select:required:invalid {
  color: #999;
}
option[value=""] {
  color: #999;
}
option {
  color: #000;
}
select:focus {
  outline: none;
}

input[type="file"] {
  border: 1px solid #00000020;
  padding: 10px;
  font-size: 14px;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.hidden-file-input {
  display: none;
}

/* .custom-file-upload {
  border: 1px solid #00000020;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  height: auto;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  flex-direction: column;
  padding: 10px;
  box-sizing: border-box;
} */

/* New fix */

.custom-file-upload {
  border: 1px solid #00000020;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  height: auto;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  flex-direction: column;
  padding: 10px;
  box-sizing: border-box;
}

.custom-file-upload:hover {
  background-color: #f5f5f5;
}

.upload-icon {
  font-size: 2em;
  color: #aaa;
  transition: opacity 0.2s ease;
  display: block;
  margin-bottom: 5px;
}

.image-preview {
  display: none;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
}

.remove-image {
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s ease;
}
.remove-image:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.custom-file-upload.has-image {
  border-style: solid;
  border-color: #bbb;
  padding: 0;
  min-height: auto;
}

.custom-file-upload.has-image .upload-icon {
  display: none;
}

.custom-file-upload.has-image .image-preview {
  display: block;
}

.custom-file-upload.has-image .remove-image {
  display: block;
}

.hidden-file-input:focus + .custom-file-upload {
  outline: 1px solid rgb(35, 35, 35);
  outline-offset: 2px;
}
.form-group input.hidden-file-input {
  display: none;
}

/* TODO: Google reCAPTCHA API Widget */
.g-recaptcha {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.submit-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
}

.submit-btn:hover {
  background-color: var(--btn-hover);
  opacity: 1;
}
/* 📱 Tablets & Small Laptops */
@media (max-width: 1024px) {
  .form-container {
    padding: 60px 70px 90px;
  }

  .form-row {
    flex-wrap: wrap;
  }

  .half-width,
  .quarter-width {
    width: 100%;
  }

  /* .radio-group {
    flex-wrap: wrap;
  } */

  select {
    width: 100%;
  }
}
@media screen and (max-width: 900px) {
  .form-container {
    margin-left: -50px;
    margin-right: -50px;
  }
}

/* 📱 Mobile Devices */
@media (max-width: 768px) {
  .form-container {
    padding: 60px 70px 80px;
  }

  form {
    flex-direction: column;
  }

  .form-group {
    width: 100%;
  }
  /* .radio-group label {
    margin-right: 10px;
    margin-bottom: 8px;
  } */

  input,
  textarea {
    font-size: 14px;
  }
}

/* 📱 Small Mobile Screens */
@media (max-width: 480px) {
  .form-container {
    padding: 50px 50px 70px 30px;
    margin-left: -20px;
    margin-right: -20px;
  }

  .form-container h2 {
    font-size: 20px;
  }

  input,
  textarea {
    font-size: 14px;
    padding: 8px;
  }
  .custom-file-upload {
    min-height: 90px;
  }
  .upload-icon {
    font-size: 1.5em;
  }

  .submit-btn {
    font-size: 14px;
    padding: 8px 16px;
  }
}
