.heading body {
  font-family: "Montserrat", serif;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: bold;
}

/* Reset default margins and padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", serif;
}

/* Navigation Bar Styling */
.navbar {
  background-color: #333;
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  /* Ensure it spans the full width */
}

.navbar ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.navbar ul li {
  display: inline;
}

.navbar ul li a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  padding: 10px 20px;
  transition: background-color 0.3s ease;
}

.navbar ul li a:hover,
.navbar ul li a.active {
  background-color: #007B5F;
  /* Green hover and active effect */
  border-radius: 5px;
}

/* Body and Background */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #333;
  margin: 0;
  height: 100vh;
}

/* Content Section */
.content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  width: 100%;
  padding: 20px;
  /* Add padding for better spacing on smaller screens */
}

/* Book Outer Container */
.book {
  padding: 100px;
  background-color: #2b2a2a;
  border: 10px solid white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Essay Container */
.essay-container {
  position: relative;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Heading */
.heading {
  position: absolute;
  top: -25px;
  left: 20px;
  background-color: #ff1493;
  color: black;
  font-weight: bold;
  padding: 10px 40px;
  border-radius: 5px;
  font-size: 1.2em;
  margin-top: 10px;
  height: 60px;
}

/* Essay Text */
.essay p {
  color: #333;
  line-height: 1.6;
  font-size: 1em;
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .content {
    padding: 10px;
    /* Reduce padding on smaller screens */
  }

  .book {
    padding: 50px;
    /* Reduce padding on the book container */
    border: 8px solid white;
  }

  .essay-container {
    width: 250px;
    /* Reduce width for smaller screens */
    padding: 15px;
  }

  .heading {
    font-size: 1em;
    /* Adjust font size for smaller screens */
    padding: 8px 30px;
    top: -20px;
  }

  .essay p {
    font-size: 0.9em;
    /* Adjust text size for readability on smaller devices */
  }

  .navbar ul {
    flex-direction: column;
    /* Stack navbar items vertically on smaller screens */
    gap: 10px;
  }

  .navbar ul li a {
    font-size: 14px;
    /* Reduce font size for smaller screens */
    padding: 8px 15px;
  }
}

@media (max-width: 480px) {
  .book {
    padding: 30px;
    border: 5px solid white;
  }

  .essay-container {
    width: 200px;
    padding: 10px;
  }

  .heading {
    font-size: 0.9em;
    padding: 5px 20px;
  }

  .essay p {
    font-size: 0.8em;
  }

  .navbar ul {
    padding-left: 10px;
    /* Align navbar to the left for very small screens */
  }

  .navbar ul li a {
    padding: 6px;
    font-size: 12px;
  }
}