/* =============================================
   Green Valley Community Garden — Global Styles
   ============================================= */

/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2c2c2c;
  background-color: #f9f6f1;
}

/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #2e7d32;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ---- Header ---- */
header {
  background-color: #2e7d32;
  color: #fff;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

header .site-title {
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

header .tagline {
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.85;
}

/* ---- Navigation ---- */
nav {
  background-color: #1b5e20;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0 40px;
}

nav ul li a {
  display: block;
  padding: 12px 20px;
  color: #c8e6c9;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

nav ul li a:hover,
nav ul li a:focus,
nav ul li a.active {
  background-color: #2e7d32;
  color: #fff;
  outline: none;
}

/* ---- Main content ---- */
main {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
}

/* ---- Hero banner (index only) ---- */
.hero {
  background-color: #e8f5e9;
  border-left: 5px solid #2e7d32;
  padding: 28px 32px;
  margin-bottom: 32px;
  border-radius: 4px;
}

.hero h1 {
  font-size: 1.9rem;
  color: #1b5e20;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.05rem;
  color: #4a4a4a;
}

/* ---- Garden image ---- */
.garden-image {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 24px auto;
  border: 3px solid #a5d6a7;
  border-radius: 6px;
}

/* ---- Section headings ---- */
h2 {
  font-size: 1.4rem;
  color: #2e7d32;
  border-bottom: 2px solid #a5d6a7;
  padding-bottom: 6px;
  margin: 32px 0 14px;
}

h3 {
  font-size: 1.1rem;
  color: #388e3c;
  margin: 20px 0 8px;
}

p {
  margin-bottom: 14px;
}

/* ---- Info boxes ---- */
.info-box {
  background-color: #fff;
  border: 1px solid #c8e6c9;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

/* ---- Table ---- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 32px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
}

caption {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 8px;
  color: #1b5e20;
  text-align: left;
}

th {
  background-color: #2e7d32;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid #c8e6c9;
}

tr:nth-child(even) td {
  background-color: #f1f8e9;
}

/* ---- Toggle section (JavaScript feature) ---- */
.toggle-btn {
  background-color: #2e7d32;
  color: #fff;
  border: none;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-family: Arial, Helvetica, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-btn:hover,
.toggle-btn:focus {
  background-color: #1b5e20;
  outline: 2px solid #a5d6a7;
  outline-offset: 2px;
}

.toggle-content {
  display: none;
  margin-top: 16px;
  background-color: #e8f5e9;
  border-left: 4px solid #66bb6a;
  padding: 16px 20px;
  border-radius: 0 4px 4px 0;
}

/* When JS adds the 'visible' class */
.toggle-content.visible {
  display: block;
}

/* ---- Contact form ---- */
.contact-form {
  background-color: #fff;
  border: 1px solid #c8e6c9;
  border-radius: 6px;
  padding: 28px 32px;
  max-width: 560px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #2c2c2c;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: Arial, Helvetica, sans-serif;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #2e7d32;
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.submit-btn {
  background-color: #2e7d32;
  color: #fff;
  border: none;
  padding: 11px 28px;
  font-size: 1rem;
  font-family: Arial, Helvetica, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:hover,
.submit-btn:focus {
  background-color: #1b5e20;
  outline: 2px solid #a5d6a7;
  outline-offset: 2px;
}

/* ---- Calculator (about page) ---- */
.calculator {
  background-color: #fff;
  border: 1px solid #c8e6c9;
  border-radius: 6px;
  padding: 24px 28px;
  max-width: 420px;
  margin-bottom: 32px;
}

.calc-result {
  margin-top: 14px;
  font-weight: bold;
  color: #1b5e20;
  min-height: 1.4em;
}

/* ---- Footer ---- */
footer {
  background-color: #1b5e20;
  color: #c8e6c9;
  text-align: center;
  padding: 18px 24px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  margin-top: 60px;
}

footer a {
  color: #a5d6a7;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  header {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    padding: 0 8px;
  }

  nav ul li a {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  main {
    margin: 24px auto;
  }

  .contact-form {
    padding: 20px 16px;
  }
}
