/* Center header and navigation to match main content */
body.home header,
body.home nav {
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

body.home main {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 3em;
}

/* Current issue: two columns - narrower left with articles, larger right with hero image */
body.home section#current_issue {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-gap: 1em;
  align-items: start;
}

body.home section#current_issue p.issue_label {
  font-style: normal;
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 0.5em;
}

body.home section#current_issue div.articles {
  grid-column: 1;
  line-height: 1.6;
}

body.home section#current_issue div.articles p {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

body.home section#current_issue p#hero_image {
  grid-column: 2;
}

/* Recent section: display issues horizontally */
body.home section.recent {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5em;
}

body.home section h2 {
  width: 100%;
  margin-bottom: 0.75em;
  margin-top: 0;
  font-family: Helvetica, sans-serif;
  font-size: 1.5em;
  font-weight: normal;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

body.home section.recent div.blurb {
  flex: 1 1 auto;
  min-width: 200px;
  padding: 0.75em;
  padding-top: .1em;
  line-height: 1.6; /* Improved readability */
}

body.home section.recent div.blurb p {
  margin-bottom: 0.75em;
  line-height: 1.6;
}

/* Books and Film sections: two columns side by side */
body.home .books-film-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 2em;
  width: 100%;
}

body.home .books-film-container section.books {
  grid-column: 1;
  grid-area: unset; /* Override grid-area from style.css */
  width: 100%;
  display: block;
  min-width: 0; /* Prevent grid overflow */
}

body.home .books-film-container section.film {
  grid-column: 2;
  grid-area: unset; /* Override grid-area from style.css */
  width: 100%;
  display: block;
  min-width: 0; /* Prevent grid overflow */
}

/* Newsletter section: full width */
body.home section.newsletter {
  width: 100%;
  clear: both;
  padding: 0.5em;
  background-color: #fff7e2;
  border-radius: 10px;
  margin-top: 0;
  padding-top: 0;
}

body.home section#fundraising {
  text-align: center;
}

body.home section h3 {
  font-style: normal;
  font-size: 1.1em;
  font-weight: normal;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.4;
}

/* 
body.home section.recent div:first-of-type {
	grid-area: first_recent;
}

body.home section.recent div:nth-of-type(2) {
	grid-area: second_recent;
}

body.home section.recent div:last-of-type {
	grid-area: third_recent;
}
*/
body.home section#current_issue h2 a {
  text-decoration: none;
  font-family: Helvetica, sans-serif;
}


body.home section#current_issue img.hero {
  width: 100%;
  max-width: 500px;
  height: auto;
}

body.home section#current_issue div.cover a img,
body.home section.recent div.cover a img {
  height: 200px;
  border: 1px solid gray;
  box-shadow: 2px 2px 1px gray;
}

body.home section#current_issue div.cover a:hover img,
body.home section.recent div.cover a:hover img {
  box-shadow: 4px 4px 1px gray;
}

/* Media queries for responsive homepage layout */
@media (max-width: 768px) {
  body.home main {
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 2em;
  }

  body.home section#current_issue {
    grid-template-columns: 1fr;
  }

  body.home section#current_issue p#hero_image {
    grid-column: 1;
  }

  body.home .books-film-container {
    grid-template-columns: 1fr;
  }

  body.home .books-film-container section.books,
  body.home .books-film-container section.film {
    grid-column: 1;
  }
}

@media (max-width: 576px) {
  body.home main {
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 2em;
  }

  body.home section#current_issue {
    grid-template-columns: 1fr;
  }

  body.home section#current_issue p#hero_image {
    grid-column: 1;
  }

  body.home section.film,
  body.home section.books,
  body.home section#current_issue,
  body.home section.recent,
  body.home section.newsletter {
    width: 100%;
  }

  body.home .books-film-container {
    grid-template-columns: 1fr;
  }

  body.home .books-film-container section.books,
  body.home .books-film-container section.film {
    grid-column: 1;
  }
}
