/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@700&family=Open+Sans&display=swap');

/* Root Variables */
:root {
  --primary-color: #322d27;
  --secondary-color: #36312b;
  --accent-color: #7f7264;
  --text-color: #c7c0b8;
  --muted-text-color: #cec8c1;
  --font-heading: 'Libre Baskerville', serif;
    --font-body: 'Libre Baskerville', serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--primary-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
header {
  background-color: var(--primary-color);
  position: fixed;
  width: 100%;
  z-index: 10;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo a {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--text-color);
  text-decoration: none;
}

nav {
  position: relative;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 20px;
  margin: 0; /* Reset margin for consistency */
    padding: 15px 0; /* Add vertical padding for separation */
    border-bottom: 1px solid var(--secondary-color); /* Optional: add separator line */
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* Burger Menu (for Mobile) */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.burger span {
  height: 3px;
  width: 25px;
  background: var(--text-color);
  margin-bottom: 5px;
  border-radius: 5px;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: url('hero-bg.jpg') center center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 26, 26, 0.7);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-color);
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 4rem;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--muted-text-color);
}

.button {
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 15px 30px;
  font-size: 1.4rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #800040;
}

/* Sections */
section {
  padding: 60px 0;
}

.about-preview, .books-preview {
  background-color: var(--secondary-color);
}

.about-preview h2, .books-preview h2 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  margin-bottom: 20px;
}

.about-preview p, .books-preview p {
  font-size: 1.4rem;
  color: var(--muted-text-color);
}

.link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.8rem;
  transition: color 0.3s ease;
}

.link:hover {
  color: #800040;
}

/* Books Grid */
.books-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.book-card {
  background-color: var(--primary-color);
  padding: 20px;
  border-radius: 5px;
  flex: 1 1 calc(33.333% - 40px);
  text-align: center;
}

.book-card img {
  max-width: 100%;
  border-radius: 5px;
  margin-bottom: 15px;
}

.book-card h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.book-card p {
  font-size: 1.4rem;
  color: var(--muted-text-color);
  margin-bottom: 35px;
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  padding: 20px 0;
}

footer p {
  margin-bottom: 10px;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.socials a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.4rem;
}

.socials a:hover {
  color: var(--accent-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Header */
  .nav-links {
    position: absolute;
    right: 0;
    height: 100vh;
    top: 0;
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: center;
    width: 50%;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .nav-links.nav-active {
    transform: translateX(0%);
  }

  .nav-links li {
    margin: 20px 0;
    margin: 0; /* Reset margin for consistency */
      padding: 15px 0; /* Add vertical padding for separation */
      border-bottom: 1px solid var(--secondary-color); /* Optional: add separator line */
  }

  .burger {
    display: flex;
  }

  /* Hero Content */
  .hero-content h1 {
    font-size: 2.5rem;
  }

  /* Books Grid */
  .books-grid {
    flex-direction: column;
  }

  .book-card {
    flex: 1 1 100%;
  }
}
main {
  padding-top: 80px; /* Adjust to the actual height of your header */
}
/* Contact Section */
.contact {
  padding: 60px 0;
  text-align: center;
  background: var(--secondary-color);
}

.contact h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.contact p {
  font-size: 1.2rem;
  color: var(--muted-text-color);
  margin-bottom: 40px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--primary-color);
  padding: 30px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--accent-color);
  border-radius: 4px;
  background: var(--secondary-color);
  color: var(--text-color);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 5px var(--accent-color);
}

.form-group textarea {
  resize: none;
}

.submit-button {
  background: var(--accent-color);
  color: var(--text-color);
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.submit-button:hover {
  background: #800040;
  transform: translateY(-2px);
}
@media (max-width: 768px) {
  .contact-form {
    padding: 20px 15px;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.9rem;
  }

  .submit-button {
    font-size: 0.9rem;
    padding: 8px 15px;
  }
}
/* Mobile Menu Hidden */
.nav-links {
  display: none; /* Hide the menu by default */
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 50%; /* Adjust width for mobile */
  background-color: var(--primary-color);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.nav-links.nav-active {
  display: flex; /* Show the menu when active */
}

.nav-links li {
  margin: 20px 0;
  margin: 0; /* Reset margin for consistency */
    padding: 15px 15px; /* Add vertical padding for separation */
    border-bottom: 1px solid var(--secondary-color); /* Optional: add separator line */
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* Burger Menu */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.burger span {
  height: 3px;
  width: 25px;
  background: #ffffff;
  margin: 5px 0;
  border-radius: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Burger Toggle Animation */
.burger.toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.toggle span:nth-child(2) {
  opacity: 0;
}

.burger.toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .burger {
    display: flex; /* Show burger on mobile */
  }
}
/* Desktop Navigation */
@media (min-width: 769px) {
  .nav-links {
    display: flex !important; /* Always visible on desktop */
    position: relative; /* Reset position */
    height: auto; /* Reset height */
    width: auto; /* Reset width */
    flex-direction: row; /* Horizontal layout */
    justify-content: flex-end; /* Align items to the right */
    background-color: transparent; /* Remove background color */
    .nav-links li {
      padding: 10px; /* Reset padding for desktop */
      margin-left: 20px; /* Standard horizontal spacing */
      border-bottom: none; /* No border for desktop */
  }

  .nav-links.nav-active {
    transform: none; /* No sliding effect on desktop */
  }

  .burger {
    display: none; /* Hide burger on desktop */
  }
}
/* Remove border for the last menu item */
.nav-links li:last-child {
  border-bottom: none;
}
/* About Section */
.about {
  padding: 60px 20px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.8;
}

.about h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
  color: var(--accent-color);
}

.about p {
  font-size: 1.4rem;
  margin-bottom: 20px;
  text-align: justify;
}
/* Books Section */
.books {
  padding: 60px 20px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  text-align: center;
}

.books h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--accent-color);
}

.books-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.book-card {
  background-color: var(--primary-color);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
  width: 300px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card a {
  text-decoration: none;
  color: var(--text-color);
}

.book-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.book-card h3 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 30px;
}

.book-card p {
  font-size: 1.4rem;
  color: var(--muted-text-color);
  margin-bottom: 30px;
  padding-top: 3px;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
/* Call-to-Action Buttons */
.button {
  display: inline-block;
  background-color: var(--accent-color);
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 20px;
  font-size: 1.4rem;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.button:hover {
  background-color: #800040;
  transform: translateY(-2px);
}
/* Homepage Hero Section with Space Background */
.hero {
  height: 100vh;
  background: url('https://pub-3b8aba42708d40db9c971cf2123d3d17.r2.dev/images/manuscript.webp') center center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Adjust overlay for better text readability */
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-color);
}

/* Blog Section */
.blog {
  padding: 60px 20px;
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.blog h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem; /* Match heading hierarchy */
  text-align: center;
  margin-bottom: 40px;
  color: var(--accent-color);
}

article {
  background-color: var(--primary-color);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
}

article h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  text-align: center;
}

article p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--muted-text-color);
  margin-bottom: 20px;
  text-align: justify;
}

article p:last-child {
  margin-bottom: 0;
}

article p:first-child {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 10px;
}
/* About Page Image Styling */
.about img {
  display: block;
  margin: 0 auto; /* Center the image */
  width: 200px; /* Default size for desktop */
  height: 200px; /* Match height and width for a perfect circle */
  border-radius: 50%; /* Makes the image circular */
  object-fit: cover; /* Ensures the image scales properly */
  border: 5px solid var(--secondary-color); /* Adds a border for styling */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Adds a shadow effect */
  transition: all 0.3s ease; /* Smooth resizing transition */
}

/* Mobile-Specific Styling */
@media (max-width: 311px) {
  .about img {
    max-width: 50px; /* Smaller size for mobile */
    max-height:500px; /* Maintain circular shape */
    margin-bottom: 15px; /* Add spacing below the image */
    border-radius: 50%;
 }
}
