#top {
  display: flex;
  align-items: center;
  min-height: 500px;
}

#top h1 {
  font-size: 3rem;
  font-family: "Arial", sans-serif;
  text-align: left;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

#subheading {
  color: white;
  font-size: 1.6rem;
  font-family: "Arial", sans-serif;
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
  text-align: left;
}

#contact {
  display: flow-root;
  padding: 3rem 0;
  font-size: 1.2rem;
}

/* Cards */
.contact-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #dce5eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgb(8 55 84 / 7%);
}

/* Navy card headers */
.contact-card-header {
  background-color: rgba(15, 50, 71, 0.03);
  padding: 1.5rem 2rem;
}

.contact-card-header h2 {
  font-family: "Arial", sans-serif;
  font-size: 1.5rem;
  margin: 0;
  text-align: center;
}

/* Description lists */
.contact-card dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 1.75rem 2rem;
  margin: 0;
}

.contact-card dt {
  color: #657787;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.contact-card dd {
  color: #083754;
  font-size: 1rem;
  margin: 0 0 1.5rem;
  overflow-wrap: anywhere;
}

.contact-card dd:last-child {
  margin-bottom: 0;
}

/* Contact links */
.contact-card a {
  color: #083754;
  font-weight: 600;
  text-decoration-color: #ffc107;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.contact-card a:hover {
  color: #007ca8;
}

/* Form */

/* Form card */
#contact-us-form {
  width: 100%;
  min-width: 0;
  max-width: 750px;
  margin: 0 auto;
}

/* Form contents */
#contact-us-form .contact-form-body {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

/* Labels */
#contact-us-form .form-label {
  display: block;
  color: #083754;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Input fields */
#contact-us-form .form-control {
  background-color: #f8fafc;
  border: 1px solid #d5e0e8;
  border-radius: 10px;
  color: #083754;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#contact-us-form .form-control::placeholder {
  color: #8595a3;
}

/* Focus */
#contact-us-form .form-control:focus {
  background-color: #fff;
  border-color: #d4a000;
  box-shadow: 0 0 0 0.2rem rgb(255 193 7 / 20%);
}

/* Message field */
#contact-us-form textarea {
  min-height: 150px;
  resize: vertical;
}

/* Submit button */
#contact-us-form #send-message {
  display: block;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background-color: #083754;
  border: 2px solid #083754;
  border-radius: 10px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s;
}

#contact-us-form #send-message:hover {
  background-color: #12557d;
  border-color: #12557d;
}

#contact-us-form #send-message:focus-visible {
  box-shadow: 0 0 0 0.25rem rgb(255 193 7 / 45%);
}

#contact-us-form #send-message:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Validation */
#contact-us-form .invalid-feedback {
  font-size: 0.875rem;
  margin-top: 0.4rem;
}

/* Form alerts */
#contact-us-form .alert {
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

/* Main contact layout */
#contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
}

/* Information cards container */
#contact-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  min-width: 0;
}

/* Tablet: information cards side by side */
@media (min-width: 768px) {
  #contact-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* Desktop: information cards left, form right */
/* Desktop: information cards left, form right */
@media (min-width: 992px) {

    /* Two columns: 40% information, 60% form */
  #contact-layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: stretch;
  }

    /* Stack information cards vertically */
  #contact-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  /* Allow form to fill the grid row's height */
  #contact-us-form {
    display: flex;
    flex-direction: column;
  }

  /* Allow form body to fill the space below its header */
  #contact-us-form .contact-form-body {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  /* Allow message field wrapper to absorb extra height */
  #contact-us-form .message-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  /* Expand textarea to fill the available vertical space */
  #message {
    flex: 1;
    height: auto;
    min-height: 150px;
  }
}