/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Open+Sans&display=swap');

:root {
  --primary: #2c5364;
  --accent: #0f2027;
  --light-bg: #f4f4f4;
  --card-bg: #fff;
  --text: #333;
}

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: var(--light-bg);
  color: var(--text);
  line-height: 1.6;
}

/* HEADER */
header {
  background: linear-gradient(to right, var(--accent), var(--primary));
  color: white;
  padding: 3rem 1rem;
  text-align: center;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

header p {
  margin: 0.2rem 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ABOUT SECTION */
#about {
  max-width: 1000px;
  margin: auto;
  padding: 3rem 1rem;
  text-align: center;
}

#about img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

#about h2 {
  font-size: 2rem;
  font-family: 'Playfair Display', serif;
  margin-bottom: 1rem;
}

#about p {
  font-size: 1rem;
  max-width: 800px;
  margin: auto;
  text-align: justify;
  line-height: 1.8;
}

/* BOOKS SECTION */
#books {
  padding: 3rem 1rem;
  background-color: white;
  text-align: center;
}

#books h2 {
  font-size: 2rem;
  font-family: 'Playfair Display', serif;
  margin-bottom: 2rem;
}

.book-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
  margin: 1rem auto;
  padding: 1.5rem;
  max-width: 350px;
  text-align: center;
  transition: transform 0.3s ease;
}

.book-card:hover {
  transform: translateY(-5px);
}

.book-card img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
  background-color: #f9f9f9;
  padding: 10px;
}


.book-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.book-card p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1rem;
}

.book-card a {
  text-decoration: none;
  color: white;
  background-color: var(--primary);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.book-card a:hover {
  background-color: #1c3a47;
}
/* CONTACT */
#contact {
  background: var(--light-bg);
  padding: 3rem 1rem;
  text-align: center;
  animation: fadeInUp 1s ease both;
}

#contact h2 {
  font-size: 2rem;
  font-family: 'Playfair Display', serif;
  margin-bottom: 1.5rem;
  position: relative;
}

#contact h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--primary);
  margin: 0.5rem auto;
  border-radius: 2px;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  } 
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

form {
  max-width: 500px;
  margin: auto;
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  animation: fadeInUp 1.3s ease both;
}

form label {
  display: block;
  text-align: left;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: var(--primary);
}

input,
textarea {
  width: 100%;
  padding: 0.9rem;
  margin-bottom: 1.2rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 83, 100, 0.2);
}

button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

button:hover {
  background-color: #1c3a47;
  transform: scale(1.05);
}

/* FOOTER */
footer {
  background: #eee;
  color: #666;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

footer a {
  color: #333;
  font-weight: bold;
  text-decoration: none;
}

/* Dark Mode Overrides */
body.dark-mode {
  --primary: #1f2933;
  --accent: #111827;
  --light-bg: #0d1117;
  --card-bg: #1c1c1c;
  --text: #f5f5f5;
  background-color: var(--light-bg);
  color: var(--text);
  background-color: var(--card-bg);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.05);
}

body.dark-mode header {
  background: linear-gradient(to right, var(--accent), var(--primary));
  color: white;
}

/* Book Card - Dark Mode */
body.dark-mode .book-card {
  background-color: #1e1e1e; /* dark card background */
  color: #e0e0e0;            /* light text */
}

body.dark-mode .book-card h3 {
  color: #ffffff;            /* bright title */
}

body.dark-mode .book-card p {
  color: #cccccc;            /* soft white for body text */
}

body.dark-mode .book-card a.button {
  background-color: #2a5bd7; /* vibrant button */
  color: #ffffff;
}

body.dark-mode .book-card a.button:hover {
  background-color: #1a3bb3;
}

/* Dark Mode Form Styling */
body.dark-mode #contact {
  background-color: #111; /* darker background */
  color: #f0f0f0;          /* light text color */
}

body.dark-mode #contact h2 {
  color: #ffffff;
  border-bottom: 2px solid #444;
  display: inline-block;
  padding-bottom: 0.3rem;
}

body.dark-mode form label {
  color: #cccccc;
  display: block;
  margin-bottom: 0.5rem;
  text-align: left;
}

body.dark-mode input,
body.dark-mode textarea {
  background-color: #1e1e1e;
  color: #ffffff;
  border: 1px solid #444;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #888;
}

body.dark-mode input[type="file"] {
  color: #ccc;
}

body.dark-mode button {
  background-color: #2a5bd7;
  color: #ffffff;
}

body.dark-mode button:hover {
  background-color: #1a3bb3;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 30px;
  background-color: var(--primary);
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem 0.8rem;
  border-radius: 50%;
  text-align: center;
  text-decoration: none;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.back-to-top:hover {
  background-color: #1c3a47;
  transform: translateY(-4px);
}

/* Hamburger Menu */
.mobile-nav {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
}

#menuToggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

#menuToggle span {
  display: block;
  height: 3px;
  background-color: var(--text);
  border-radius: 2px;
  transition: 0.4s ease;
}

/* Navigation Menu */
#menu {
  position: fixed;
  top: 0;
  left: -250px;
  width: 200px;
  height: 100vh;
  background-color: var(--primary);
  color: white;
  padding-top: 60px;
  list-style: none;
  transition: left 0.3s ease;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
}

#menu li {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#menu li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* Toggle active */
#menu.active {
  left: 0;
}

/* Dark mode override for menu */
body.dark-mode #menu {
  background-color: #111;
}

body.dark-mode #menuToggle span {
  background-color: #f5f5f5;
}

/* Hamburger Menu */
.mobile-nav {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
}

#menuToggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

#menuToggle span {
  display: block;
  height: 3px;
  background-color: var(--text);
  border-radius: 2px;
  transition: 0.4s ease;
}

/* Navigation Menu */
#menu {
  position: fixed;
  top: 0;
  left: -250px;
  width: 200px;
  height: 100vh;
  background-color: var(--primary);
  color: white;
  padding-top: 60px;
  list-style: none;
  transition: left 0.3s ease;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
}

#menu li {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#menu li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* Toggle active */
#menu.active {
  left: 0;
}

/* Dark mode override for menu */
body.dark-mode #menu {
  background-color: #111;
}

body.dark-mode #menuToggle span {
  background-color: #f5f5f5;
}

