/* ---------- GLOBAL ---------- */
body {
  margin: 0;
  color: black;
  font-family: papyrus, fantasy;
  text-align: center;
  background-size: 400px 400px;
  background-color: #AEE6AC;
}

/* Make main text a bit nicer on all pages */
h1, h2, h3, p {
  margin: 1rem auto;
  padding: 0 1rem;
}

/* ---------- FORM ELEMENTS ---------- */

textarea {
  width: 70%;
  max-width: 700px;
  height: 150px;
  padding: 12px 20px;
  box-sizing: border-box;
  border-radius: 5px;
  border: none;
  background-color: #75BD75;
  resize: none;
  font-family: papyrus, fantasy;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"] {
  width: 50%;
  max-width: 400px;
  height: 35px;
  font-family: papyrus, fantasy;
  padding: 12px 20px;
  box-sizing: border-box;
  border-radius: 3px;
  border: none;
  background-color: #75BD75;
}

button {
  color: white;
  font-family: papyrus, fantasy;
  padding: 12px 20px;
  box-sizing: border-box;
  border-radius: 3px;
  border: none;
  background-color: #0f4d1c;
  cursor: pointer;
}

button:hover {
  background-color: #145d26;
}

/* ---------- NAVBAR ---------- */

.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;                /* ✅ allows items to wrap on small screens */
  background-color: #0f4d1c;
  padding: 0;
}

/* Links + dropdown buttons share the same base style */
.navbar a,
.dropbtn {
  color: white;
  text-decoration: none;
  padding: 14px 20px;
  font-size: 16px;
  display: block;
  border: none;
  background-color: #0f4d1c;
  cursor: pointer;
  white-space: nowrap;            /* keeps labels from breaking in the middle */
}

/* Hover effects (desktop-ish behavior) */
.navbar a:hover,
.dropdown:hover .dropbtn {
  background-color: #145d26;
}

/* Dropdown container */
.dropdown {
  position: relative;
}

/* Dropdown menu (desktop default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #0f4d1c;
  min-width: 160px;
  z-index: 1;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.dropdown-content a {
  color: white;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #1b7032;
}

/* ---------- FOOTER ---------- */

footer {
  text-align: center;
  padding: 10px;
  background-color: #0f4d1c;
  color: white;
  margin-top: 20px;
}

/* ---------- MOBILE STYLES ---------- */

@media (max-width: 700px) {
  /* Stack navbar items vertically */
  .navbar {
    flex-direction: column;
    align-items: stretch;
  }

  .navbar a,
  .dropbtn {
    width: 100%;
    text-align: left;             /* easier to read on phones */
    padding: 12px 16px;
  }

  .dropdown {
    width: 100%;
  }

  /* Dropdown menus become full-width blocks instead of floating off the side */
  .dropdown-content {
    position: static;
    box-shadow: none;
    width: 100%;
  }

  .dropdown-content a {
    padding-left: 24px;           /* slight indent so it feels nested */
  }

  textarea {
    width: 90%;
  }

  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="date"] {
    width: 80%;
  }
}

/* ---------- CMS REVIEW PAGE ---------- */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Make tables readable */
#cmsTable {
  width: 100%;
  border-collapse: collapse;
  margin: 20px auto 30px;
  table-layout: fixed; /* prevents columns from exploding with long text */
}

#cmsTable th,
#cmsTable td {
  border: 2px solid #0f4d1c;
  padding: 12px 10px;
  vertical-align: top;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: anywhere; /* lets long URLs wrap */
}

#cmsTable thead th {
  background: #75BD75;
}

/* Citation superscripts */
sup.cite,
sup.cite-missing {
  font-size: 0.8em;
  margin-left: 4px;
}

sup.cite a {
  text-decoration: none;
}

sup.cite a:hover {
  text-decoration: underline;
}

sup.cite-missing {
  opacity: 0.6;
}

/* Sources section */
#sources {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 3px solid #0f4d1c;
}

#sourcesList {
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;              /* makes sources easier to read */
  padding-left: 28px;            /* keeps numbers aligned */
}

#sourcesList li {
  margin: 10px 0;
  line-height: 1.4;
}

#sourcesList a {
  overflow-wrap: anywhere;       /* wraps giant links nicely */
}

/* ---------- Dropdown toggle support (for your JS .show class) ---------- */
.dropdown-content.show {
  display: block;
}
