/* contact.css - responsive version */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background-color: #f4f4f4;
  color: #333;
}

header {
  background-color: #333;
  color: white;
  padding: 20px;
  text-align: center;
}

.container {
  /* make container fluid & centered */
  width: 100%;
  max-width: 900px;
  margin: 24px auto;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  display: block;
}

/* Title */
h2 {
  color: #007bff;
  margin: 0 0 18px 0;
  font-size: 1.6rem;
}

/* Form elements */
form {
  margin-bottom: 10px;
}

/* Use full width for inputs and responsive font sizing */
form input,
form textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  resize: vertical;
  background: #fafafa;
  color: #333;
}

/* Make button accessible and full-width on tiny screens */
form button {
  padding: 12px 18px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  display: inline-block;
}

/* Contact info block */
.contact-info {
  margin-top: 20px;
  font-size: 0.95rem;
  color: #444;
}

/* Back to home button - flows with document */
.back-home-button {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      background-color: #555;
      color: white;
      padding: 10px 20px;
      text-decoration: none;
      border-radius: 15px;
      font-weight: bold;
      z-index: 1000;
    }
    .back-home-button:hover {
      background-color: #333;
    }


/* Clear float for container after elements (so footer doesn't overlap) */
.container::after {
  content: "";
  display: block;
  clear: both;
}

/* Footer */
footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 15px 10px;
  font-size: 14px;
  margin-top: 24px;
}

/* Small-screen adjustments */
@media (max-width: 760px) {
  .container {
    margin: 16px;
    padding: 16px;
    border-radius: 10px;
  }

  h2 {
    font-size: 1.4rem;
  }

  /* Remove float on small devices so button stacks below content */
  /* .back-home-button {
    float: none;
    display: block;
    width: 100%;
    text-align: center;
  } */

  form button {
    width: 100%;
  }
}

/* Very small devices: slightly larger touch targets */
@media (max-width: 380px) {
  form input,
  form textarea {
    padding: 14px;
    font-size: 1.02rem;
  }

  /* .back-home-button {
    padding: 12px 16px;
    font-size: 1rem;
  } */
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.error-text {
    color: red;
    font-size: 13px;
    margin-top: 5px;
    height: 14px; /* keeps layout fixed even when no error */
}

.success-msg {
    color: green;
    margin-top: 15px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
}
