/* Native Elements */
body  {
  margin: 0;
  background-color: hsl(48, 49%, 85%);
  font-family: "Merriweather";
}

a {
  text-decoration: none;
  color: hsl(48, 49%, 25%);
}

a:visited {
  color: hsl(48, 49%, 25%);
}

header  {
  position: sticky;
  top: 0px;
  filter: drop-shadow(0px 3px 6px);
  margin-bottom: 12px;
}

nav {
  display: flex;
  width: 100%;
  height: 35px;
  background-color: hsl(48, 49%, 80%);
  justify-content: flex-start;
  padding: 6px;
}

/* SEARCH FORM STYLING */
.nav-search {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 0.4rem;
  padding-right: 0.5rem;
}

/* SEARCH INPUT */
.nav-search input[type="search"] {
  padding: 0.3rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* SEARCH BUTTON */
.nav-search button {
  padding: 0.6rem 0.6rem;
  line-height: 0.7;
  font-size: 0.55rem;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background-color: hsl(48, 49%, 60%);
  color: #fff;
  transition: background-color 0.2s ease;
}

.nav-search button:hover {
  background-color: hsl(48, 49%, 60%);
}

/* OPTIONAL: make input shrink gracefully */
.nav-search input[type="search"] {
  width: 180px;
  max-width: 40vw;
}

/* --- NAV LINKS --- */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;           /* space between links */
  margin-left: 0;
  padding: 15px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #000;         /* match your navbar style */
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: hsl(48, 49%, 95%);;
}

nav img,
.nav-links {
  display: inline-flex;
  align-items: center;
}

nav ul  {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav li  {
  display: inline-flex;
  background-color: hsl(48, 49%, 65%);
}

nav a {
  padding: 8px;
  vertical-align: center;
}

h2  {
  margin: 0px;
}

.imgwrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  overflow: hidden;
  gap: 10px;
}

.thumbs  {
  display: block;
  height: 150px;
  border: 0px solid black;
}

/* Main Layout */

/* Defining the 1st level grid */ 
.gridtemplate {
  display: grid;
  grid-template: auto / 2fr auto;
}

/* Populating the two 2nd level columns */
.gridleftsection  {
  display:grid;
  grid-auto-rows: max-content;
}

.gridrightsection {
  display: grid;
  grid-auto-rows: max-content
}

.gridheadertemplate {
  display: grid;
  grid-template: auto / 2fr auto;
}

.mainleftsection  {
  padding: 5px;
  margin: 5px;
  border: 1px solid hsl(48, 49%, 50%);
  background-color: hsl(48, 49%, 95%);
}

.titleleftsection  {
  align-content: center;
  padding: 5px;
  margin: -5px;
  border-bottom: 1px solid hsl(48, 49%, 50%);
  background-color: hsl(48, 49%, 90%);
}

.title  {
  font-size: 22px;
  font-weight: bold;
}

.author {
  text-align: right;
}

.mainrightsection  {
  padding: 5px;
  margin: 5px;
  border: 1px solid hsl(48, 49%, 50%);
  background-color: hsl(48, 49%, 95%);
}

button.pagination:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transition: opacity 0.3s ease;
}

button.pagination {
  padding: 8px 16px;
  margin: 6px;
  font-size: 16px;
  background-color: hsl(48, 49%, 70%);
  color: #333;
  border: 1px solid hsl(48, 49%, 50%);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

footer  {
  text-align: center;
  padding: 10px;
}

/* Miscellaneous */

@media only screen and (max-width: 800px)  {
  .gridrightsection {
    display: none;
  }
  .mainrightsection{
    display: none;
  }
}