/* General Styling for Contact Form */
.contact-form {
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-form .form-label {
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.contact-form .form-control,
.contact-form .message-textarea {
  background-color: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Adjust Textarea Styling for Consistency */
.message-textarea {
  width: 100%;
  height: 125px;
  background-color: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 1rem;
  resize: vertical; /* Allow only vertical resizing */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form .form-control:focus,
.message-textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.message-textarea:focus {
  background-color: #ffffff; /* White background on focus */
  color: #333333;
}

.contact-form .form-control.is-invalid,
.message-textarea.is-invalid {
  border-color: #f44336; /* Red border for invalid input */
  background-color: #ffe6e6; /* Light red background for invalid input */
}

/* Button Styling */
.contact-form button[type="submit"] {
  background-color: #007bff;
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-form button[type="submit"]:hover {
  background-color: #0056b3;
  transform: scale(1.02);
}

/* Container */
.container.my-4 {
  padding: 1.5rem;
  background-color: var(--background-color);
  color: var(--text-color);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* General Card Styles */
.card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* Card Header */
.card-header {
  font-weight: bold;
  font-size: 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-header.bg-primary {
  background-color: var(--button-primary-bg);
  color: var(--button-primary-text);
}

/* Card Body */
.card-body p {
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: var(--text-color);
}

.card-body p strong {
  font-weight: 600;
}

/* Card Footer */
.card-footer {
  background-color: var(--card-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1rem;
}

.card-footer .btn-outline-danger {
  border-color: var(--button-danger-bg);
  color: var(--button-danger-bg);
  transition: background-color 0.3s, color 0.3s;
}

.card-footer .btn-outline-danger:hover {
  background-color: var(--button-danger-bg);
  color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
  .row > .col-md-6,
  .row > .col-lg-4 {
      flex: 0 0 100%;
      max-width: 100%;
  }

  .card {
      margin-bottom: 1rem;
  }
}
