/* Global box-sizing for consistent sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f0f3f0;
  color: #54684f;
  margin: 0;
  padding: 0 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: #54684f;
}

a {
  color: #54684f;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus-visible {
  color: #374534;
  text-decoration: underline;
  outline: none;
}

button, input[type="submit"] {
  background-color: #54684f;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
  background-color: #3f523a;
  outline: none;
}

.container {
  max-width: 900px;
  margin: 2rem auto;
  background-color: white;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 6px;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: #54684f;
  user-select: none;
}

pre, code {
  font-family: 'Courier New', Courier, monospace;
  background-color: #e3e8de;
  color: #3f523a;
  padding: 0.5rem;
  border-radius: 4px;
}

.main-nav {
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  flex: 1;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-list a {
  color: #54684f;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.search-form input[type="search"] {
  padding: 0.3rem 0.5rem;
  border: 1px solid #54684f;
  border-radius: 3px;
  font-size: 1rem;
  width: 180px;
  color: #54684f;
  background-color: #fff;
}

.search-form input[type="search"]::placeholder {
  color: #a1ad9a;
}

.search-form button {
  background: transparent;
  border: none;
  color: #54684f;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

.search-form button:hover,
.search-form button:focus-visible {
  color: #374534;
  outline: none;
}

@media (max-width: 600px) {
  .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .main-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .nav-list {
    width: 100%;
    justify-content: space-around;
  }

  .search-form input[type="search"] {
    width: 100%;
  }
}

.page-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  background-color: white;
  border-radius: 6px;
}

.site-footer {
  background-color: #e3e8de; /* subtle light greenish background */
  color: #374534; /* darker green text */
  padding: 2rem 1rem 3rem; /* extra space at bottom */
  font-size: 1rem;
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  color: #54684f;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #374534;
  outline: none;
}

.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.footer-note {
  flex-basis: 100%;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 1rem;
  color: #54684f;
}

/* Responsive: stack footer on small screens */
@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    order: 1;
    margin-top: 0.5rem;
  }

  .footer-note {
    order: 2;
    margin-top: 1rem;
  }
}
