/* Form Container */
#contact {
  background: #fff;
  position: relative;
  overflow: hidden;
}

#contact .container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Form Elements */
#contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
  transition: all 0.3s ease;
  appearance: none;
}

/* Input Focus States */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--bright-blue);
  box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.15);
}

/* Select Dropdown */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Textarea */
textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

/* File Upload */
.file-upload-group {
  display: none;
  margin: 1.5rem 0;
}

.file-upload-label {
  display: block;
  cursor: pointer;
}

.file-upload-button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: #f3f4f6;
  color: #4b5563;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
}

.file-upload-text {
  margin-left: 12px;
  color: #6b7280;
  font-size: 0.9em;
}

.file-upload-label input[type="file"] {
  display: none;
}

.file-upload-label:hover .file-upload-button {
  background: #e5e7eb;
}

.file-hint {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Submit Button */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: white;
  background: var(--bright-blue);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  overflow: hidden;
}

.btn:hover:not(:disabled) {
  background: #0095e6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 163, 255, 0.25);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

/* Button Loader */
.btn-loader {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bright-blue);
  color: white;
}

.btn-loader svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Form Messages */
.form-message {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
  display: none;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-message:not(:empty) {
  display: block;
}

.form-message.success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message.error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Cloudflare Turnstile */
.cf-turnstile {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  min-height: 78px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #contact-form {
    padding: 30px 20px;
  }
  
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    padding: 0.75rem 1rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
  }
}
