@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

:root {
  --primary-color: #0d62e9;
  --primary-color-dark: #FF4742;
  --secondary-color: #22796e;
  --text-dark: #2a2635;
  --text-light: #6b7280;
  --bg-color: #f9efe3;
  --max-width: 1200px;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
}

nav {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #ffffff;
  z-index: 99;
}

.nav__content {
  max-width: var(--max-width);
  margin: auto;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: 0.3s;
}
nav .logo a:hover {
  color: var(--primary-color-dark);
}

nav .checkbox {
  display: none;
}

nav input {
  display: none;
}
nav .checkbox i {
  font-size: 2rem;
  color: var(--primary-color);
  cursor: pointer;
}

ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  transition: left 0.3s;
}
nav ul li {
  position: relative;
}

nav ul li:hover .dropdown {
  display: block;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px; 
  background-color: #fff; 
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
  z-index: 100;
}

.dropdown li {
  display: block;
}

.dropdown li a {
  padding: 10px;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.dropdown li a:hover {
  color: var(--primary-color);
}

ul li a {
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-dark);
  transition: 0.3s;
}

ul li a:hover {
  color: var(--primary-color);
}

/* Centering content */
.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin-top: 80px; /* Adjust based on your navbar height */
}

.section h2 {
  margin-bottom: 20px;
  font-size: 2rem;
  color: var(--text-dark);
}

.book-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  padding: 40px; /* Increased padding */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  max-width: 800px; /* Increased width */
  width: 100%;
}

.book-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 500px; /* Increased height */
  margin-bottom: 20px;
  overflow: scroll; /* Hide overflow */
  position: relative; /* Added for the line */
}

.book {
  display: flex;
  width: 100%; /* Ensure the book takes full width */
  height: 100%; /* Ensure the book takes full height */
}

.page {
  margin: 0 10px;
  flex: 1; /* Make pages take equal space */
}

.page img {
  max-width: 100%; /* Ensure the image is responsive */
  max-height: 100%; /* Ensure the image is responsive */
  object-fit: cover; /* Maintain aspect ratio */
}

.page.left-page {
  display: flex;
  justify-content: center;
  align-items: center;
}

.page.right-page {
  display: flex;
  flex-direction: column;
}

.page h2, .page p {
  margin: 10px 0;
}

/* Center line */
.book-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background-color: #ddd;
}

.buttons-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px; /* Increased width */
  margin-top: 20px;
}

.buttons-container button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  background-color: #333;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
}

.buttons-container button:hover {
  background-color: #555;
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  z-index: 9999;
  display: none;
}

/* Footer styling */
#footer {
  background-color: #f8f9fa;
  padding: 20px 0;
  text-align: center;
}

#footer .footer__nav {
  margin-bottom: 10px;
}

#footer .footer__nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
}

#footer .footer__nav ul li {
  display: inline;
}

#footer .footer__nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

#footer .footer__nav ul li a:hover {
  color: #007bff;
}

.footer__line {
  border: 0;
  height: 3px;
  background: #333; /* Change color as needed */
  margin: 20px 0; /* Adjust margin as needed */
}

#footer .footer__credit {
  font-size: 0.9em;
  color: #666;
}

#footer .footer__credit a {
  color: #007bff;
  text-decoration: none;
}

#footer .footer__credit a:hover {
  text-decoration: underline;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
  .book-container {
    flex-direction: column;
  }

  .buttons-container {
    flex-direction: column;
    align-items: center;
  }

  .buttons-container button {
    width: 100%;
    margin-bottom: 10px;
  }
}
