/*
DO NOT EDIT ANY CSS
If implementing Intersection Observer, you will need to:
  - set the #loadmore element (styled by the last rule) to display: flex via JavaScript
  - use the rule for #term to italicize the search term in the header

When coding the JS to create content, you will need to store each movie in a DIV, which must be inside of a SECTION, which must be inside of the existing/starter section#results
This is required for the CSS to style the elements correctly

Example (the outer section#results is hard-coded for you; you need to generate the rest via JS):

<section id="results>
  <section>
    <div>
      <h3>Movie</h3>
      <p>Year released: 2001</p>
      <img...>
    </div>
  </section>
  <section>
    <div>
      <h3>Another Movie</h3>
      <p>Year released: 2001</p>
      <img...>
    </div>
  </section>
</section> <!-- end #results -->
*/

html {
  counter-reset: movie;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

body {
  margin: 0;
  padding-top: 150px;
}

header {
  background-color: rgba(245, 245, 220, .98);
  border-bottom: 2px solid #9ac524;
  margin-bottom: 1rem;
  padding: .25rem 1rem;
  position: fixed;
  top: 0;
  width: 100%;
}

h1 {
  margin: 0;
}

form {
  display: inline;
}

form label {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

img {
  height: auto;
  max-width: 150px;
}

h3 {
  margin-bottom: 0;
}

p {
  margin-top: 0;
}

#search {
  margin: 1rem 0;
}

#results {
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  padding: 1rem;
}

#results section {
  border: 2px solid #333;
  border-radius: 10px;
}

#results section:before {
  background: #333;
  border-radius: 6px 6px 0 0;
  color: #fff;
  content: counter(movie);
  counter-increment: movie;
  display: block;
  padding: 0.25rem;
  text-align: center;
}

#results section > div {
  padding: 0.5rem;
}

#term {
  font-style: italic;
}

#loadmore {
  align-items: center;
  background: rgb(179, 235, 183);
  display: none;
  font-size: 1.5rem;
  height: 100px;
  justify-content: center;
  margin-top: 1rem;
}
