body {
  margin: 0;
  min-height: 100vh;

  font-family: Arial, Helvetica, sans-serif;

  background:
    url("./images/BodyBackgroundUnsplash.jpg")
    center / cover
    fixed no-repeat;
}

h1 {
  text-align: center;
}

.brand {
  margin: 0;
  margin-left: 0.5rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-family:'Times New Roman', Times, serif;
  font-weight: bold;
  color: ghostwhite;
}
.content {
  padding: 20px;
}

.content a {
  color: cyan;
  text-decoration: none;
}
.content a:hover {
  text-decoration: underline;
  color: rgb(162, 255, 255);
}

img {
  max-width: 90%; /* keep image smaller than the container so centering is visible */
  height: auto;
  display: block;
  margin: 1rem auto 0;
}

/* Header settings */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
}
.topnav button {
  background: transparent;
  border: none;
  color:ghostwhite;

  font-size: 1.25rem;
  cursor: pointer;
  margin-left: auto;
}

.topnav {
  position: relative;
  width: 100%;
  box-sizing: border-box;

  display: flex;
  flex-wrap: wrap;
  align-items: center;

  background:
    linear-gradient(to right, black, black, darkcyan);

  padding: 1rem;
  gap: 1rem;
}

.topnav img {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-links {
  display: none;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0 0;
  list-style: none;
}

.nav-links.open {
  display: block;
}

.nav-links li a {
  display: block;
  padding: 0.65rem 0;
  color: whitesmoke;
  text-decoration: none;
  font-weight: 600;
}

.nav-links li a:hover {
  text-decoration: underline;
  color:mediumaquamarine;
}

footer {
  text-align: center;
  padding: 1rem;
  color: ghostwhite;
  font-size: 0.9rem;
  background-color: black
}
.mobile-container {
  max-width: 640px;
  width: 100%;
  margin: 20px auto;

  background-color: rgba(0,0,0,0.70);

  color: ghostwhite;
  border-radius: 10px;

  position: relative;
  padding-top: 0;

  box-sizing: border-box;
  overflow-x: visible;
}
.mobile-container form {
  max-width: 640px;
  width: 100%;
  margin: 20px auto;
}

.contact-form {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.form-field,
.form-actions {
  display: grid;
  gap: 0.55rem;
}

/* Compact inline layout for checkbox labels */
.form-field--checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-start;
  width: 100%;
  padding: 0.2rem 0;
}

.form-field--checkbox input[type="checkbox"] {
  margin-left: 0.35rem;
  margin-right: 0;
}


.form-field--full {
  grid-column: 1 / -1;
}

.mobile-container form label,
.mobile-container form .field-label {
  white-space: normal;
}

.mobile-container form input,
.mobile-container form textarea,
.mobile-container form select,
.mobile-container form fieldset {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Checkboxes should not be full-width */
.mobile-container form input[type="checkbox"] {
  width: auto;
  max-width: none;
}

.mobile-container form fieldset {
  margin: 0.25rem 0;
  padding: 0.75rem 0.9rem;
  min-width: 0;
}

.radio-group {
  display: grid;
  gap: 0.5rem;
}

.radio-group > label {
  display: block;
  white-space: normal;
  margin: 0;
  padding: 0.15rem 0;
}

.radio-group > label input {
  margin-right: 0.5rem;
}

.form-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.25rem;
}

.form-actions input[type="submit"],
.form-actions input[type="reset"] {
  width: 100%;
  display: block;
}

@media (max-width: 360px) {
  .form-actions {
    grid-template-columns: 1fr;
  }
}

article.plant {
  display: grid;
  grid-template-columns: 40% 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
  "title text"
  "image text";
  gap: 1rem;
  align-items: start;
  margin-bottom: 2rem;
}

article.plant h2 {
  grid-area: title;
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
}

article.plant img {
  grid-area: image;
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

article.plant p {
  grid-area: text;
  margin: 0;
  line-height: 1.6;
}

/* Responsive adjustments */

@media (min-width: 641px) {
  body {
    background: url("./images/Grovedesktopwallpaper.jpg") center / cover fixed no-repeat;
    font-size: 18px;
    line-height: 1.6;
  }

  .topnav {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .menu-button {
    display: none;
  }

  .nav-links {
    display: flex !important;
    width: auto;
    margin: 0 0 0 auto;
    padding: 0;
    gap: 1.25rem;
    align-items: center;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    margin: 0;
  }

  .nav-links li a {
    padding: 0;
  }

  .nav-links li a:hover {
    text-decoration: underline;
    color:ghostwhite;
  }

  .mobile-container {
    max-width: none;
    width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .content {
    padding: 50px;
  }

  /* Desktop-only centering/padding for the Spells & Spelljars page */
  .page-spells .content {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    box-sizing: border-box;
  }

  /* Center headings and paragraphs on desktop for better layout */
  .content h2,
  .content p,
  article.plant h2,
  article.plant p {
    text-align: center;
  }

  /* Slightly larger h2 on desktop for all pages (bigger than body text, smaller than h1) */
  h2 {
    font-size: 1.6rem;
  }

  /* Scale plant images down on desktop for better layout */
  article.plant img {
    width: 50%;
    max-width: 50%;
    margin: 0 auto;
  }

  /* Center the plant explanation vertically beside the photo */
  article.plant {
    grid-template-columns: 38% 1fr;
    align-items: center;
    gap: 1.5rem;
  }

  article.plant p {
    align-self: center;
    padding: 0 0.5rem;
  }

  /* Apply same percentage scaling to other content images (exclude header/logo) */
  .content img {
    width: 50%;
    max-width: 50%;
    margin: 0 auto;
    display: block;
  }

  /* Ensure <picture> elements and their inner <img> are centered between text blocks */
  .content picture,
  .content picture img {
    display: block;
    margin: 1rem auto;
    width: 60%;
    max-width: 60%;
  }

  /* Specific smaller size for Leshi antlers image on desktop high-res */
  #leshi-antlers {
    width: 40%;
    max-width: 40%;
    margin: 0 auto;
    display: block;
  }
}
