/*general styles*/
body {
  background-color: #ffecd1;
  color: #000000;
  font-family: "Alegreya Sans SC", sans-serif;
  margin: 0;
  padding: 0;
}

h1,
h2 {
  text-align: center;
  font-family: "Cinzel Decorative", serif;
  font-weight: 700;
  color: #4cc9f0;
  margin: 40px 0;
}

p {
  line-height: 1.6;
  font-size: 1.1rem;
  color: #000000;
  margin: 0 auto;
}
footer {
  text-align: center;
  font-family: cursive;
}

/*nav*/
div.container#navbar {
  margin: 20px auto;
  width: 90%;
  text-align: center;
}

nav a {
  text-decoration: none;
  margin: 15px;
  background-color: #f08080;
  border: 2px solid #000000;
  border-radius: 10px;
  padding: 8px 12px;
  color: #000000;
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  transition: 0.3s;
}

nav a:hover {
  background-color: #000000;
  color: #f08080;
}

/*index and fantasy layout*/
#top3,
#bottom3 {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  margin: 40px;
}
img[alt="book"] {
  height: 250px;
  border-radius: 10px;
}
figure.main-image {
  text-align: center;
}

figcaption {
  font-style: italic;
  color: #813405;
  text-align: center;
  border-top: 2px solid #4cc9f0;
  font-size: large;
  padding: 4px;
  margin-top: 5px;
}

/*home text*/
#home,
#fantasy-text,
#thriller-text {
  font-weight: 400;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/*romance layout*/
.romance-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  padding: 30px;
  margin-top: 35px;
}

#left3,
#right3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

#left3 img,
#right3 img {
  width: 250px;
  height: auto;
  border-radius: 10px;
  border: 2px solid #4cc9f0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/*thriller page*/
.thriller-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.thriller-images figure {
  text-align: center;
}

.thriller-images img {
  width: 150px;
  height: 260px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid #4cc9f0;
}

.thriller-images figcaption {
  margin-top: 5px;
  font-style: italic;
  font-size: 0.95rem;
  color: #813405;
}

.thriller-text {
  text-align: center;
  max-width: 400px;
  margin: 50px;
  font-family: "Alegreya Sans SC", sans-serif;
  line-height: 1.6;
  color: #000000;
  font-size: 1.1rem;
}

/* ---------------------------------------
   Responsive Design
--------------------------------------- */
@media (max-width: 800px) {
  .thriller-images {
    flex-direction: column;
    align-items: center;
  }

  .thriller-images img {
    width: 150px;
    height: auto;
  }

  .thriller-text {
    max-width: 90%;
  }
}

/*mystery layout*/
.mystery-wrap {
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  grid-template-rows: auto auto;
  gap: 20px;
  align-items: start;
  justify-items: center;
  margin: 40px;
}

.side-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-images.left {
  grid-column: 1;
  grid-row: 1;
}
.side-images.right {
  grid-column: 3;
  grid-row: 1;
}

.center-text {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
  max-width: 400px;
}

.bottom-images {
  grid-column: 1 / 4;
  grid-row: 2;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.mystery-wrap figure img {
  width: 150px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #4cc9f0;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.mystery-wrap figcaption {
  text-align: center;
  font-style: italic;
  margin-top: 5px;
  font-size: 0.9rem;
  color: #813405;
}
