/* Reset some default browser spacing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #222;
}

img {
  max-width: 100%;
}

/* Header */
header {
  background-color: #0b6e4f;
  color: white;
  min-height: 90px;            /* was a fixed height, which clipped content on phones */
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;             /* lets the nav drop below the logo when space runs out */
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 60px;                /* explicit height; "100%" of a changing header is unreliable */
  width: auto;
  display: block;
}

header h1 {
  font-size: clamp(22px, 5vw, 40px);   /* scales down on small screens */
  line-height: 1.2;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 0;
}

nav a:hover {
  text-decoration: underline;
}

/* Sections */
section {
  padding: 60px 40px;
  max-width: 800px;
  margin: 0 auto;
}

section h2 {
  color: #0b6e4f;
  margin-bottom: 15px;
}

section p + p {
  margin-top: 1em;
}

/* Footer */
footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 20px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.card {
  background-color: #f2f8f5;
  border: 1px solid #d0e4da;
  border-radius: 8px;
  padding: 20px;
}

.card h3 {
  color: #0b6e4f;
  margin-bottom: 10px;
  font-size: 18px;
}

/* Contact form */
.form-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;             /* 16px stops iPhones zooming in when a field is tapped */
  width: 100%;
}

button[type="submit"] {
  background-color: #0b6e4f;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button[type="submit"]:hover {
  background-color: #094f39;
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: wait;
}

#form-status {
  margin-top: 10px;
  font-weight: bold;
}

.hp-field {                    /* hidden spam trap field */
  position: absolute;
  left: -9999px;
}

/* Tablets: two cards per row */
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phones */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    text-align: center;
    padding: 12px 16px;
  }

  .logo {
    justify-content: center;
  }

  .logo img {
    height: 44px;
  }

  nav {
    justify-content: center;
    gap: 4px 16px;
  }

  section {
    padding: 36px 20px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  button[type="submit"] {
    width: 100%;
  }
}
