/* --- General Body & Typography --- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background-color: #ffffff;
  /* A clean white background */
  color: #1a1a1a;
  /* A softer black for text */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2 {
  line-height: 1.2;
}

/* --- Header & Navigation --- */
.header {
  background-color: #ffffff;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  display: inline-block;
  width: 100px;
  height: 50px;
  background-color: #1a1a1a;
  border-radius: 0 0 8px 8px;
  padding: 14px 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo img {
  width: 100%;
  height: 100%;
}

.nav-links {
  display: flex;
  gap: 25px;
  flex: 1;
  line-height: 1.2;
}

.nav-links:first-child {
  justify-content: flex-end;
}

.nav-links:last-child {
  justify-content: flex-start;
}

.nav-links a {
  color: #555;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: .25rem .5rem;
}

.nav-links a:hover {
  color: white;
  background-color: #33a;
}

/* --- Main Content & Container --- */
.container {
  max-width: 720px;
  /* Slightly narrower for better line length */
  margin: 60px auto;
  padding: 0 20px;
}

.page-title {
  text-align: center;
  margin-bottom: 60px;
  font-size: 2.8rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -1px;
}

/* --- Book Card Styling --- */
.book-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* Always one column */
  gap: 60px;
  /* Increased gap for more breathing room */
}

.book-card {
  background-color: transparent;
  /* Remove card background */
  display: flex;
  flex-direction: column;
  /* Default stack for mobile */
  gap: 20px;
}

.book-thumbnail {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.book-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.book-card:hover .book-thumbnail img {
  transform: scale(1.05);
}

.book-info {
  padding: 10px 0;
  text-align: left;
  /* Align text left for readability */
}

.book-title {
  font-size: 1.75rem;
  margin: 0 0 10px 0;
  font-weight: 700;
  color: #1a1a1a;
}

.book-description {
  margin: 0 0 25px 0;
  color: #555;
  font-size: 1rem;
  line-height: 1.8;
}

.amazon-button {
  display: inline-block;
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
}

.amazon-button.coming-soon {
  background-color: #5a5a5a;
}

.amazon-button:not(.coming-soon):hover {
  background-color: #33a;
  color: white;
  transform: translateY(-2px);
  cursor: pointer;
}

/* --- Accordion Styling --- */
.accordion {
  margin: 20px 0;
}

.accordion-header {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 500;
  color: #495057;
  transition: background-color 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header:hover {
  background-color: #e9ecef;
}

.accordion-header::after {
  content: '▼';
  font-size: 12px;
  transition: transform 0.3s ease;
}

.accordion-header.active::after {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-top: none;
  border-radius: 0 0 6px 6px;
}

.accordion-content.active {
  max-height: none;
}

.accordion-body {
  padding: 0 16px 16px;
  color: #495057;
  line-height: 1.6;
}

.accordion-body ul {
  margin-top: -1rem;
}

.book-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dee2e6;
}

.book-details h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #343a40;
}

.book-details ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: none;
}

.book-details li {
  margin-bottom: 4px;
  font-size: 14px;
}

.book-details li::before {
  content: '•';
  color: #6c757d;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}


/* --- End Matter Copy --- */

.hr-line {
  border: 0;
  height: 1px;
  background-color: #e0e0e0;
  margin: 40px auto;
  max-width: 75%;
}

.endmatter {
  color: #333;
  font-size: 1.1rem;
}
.endmatter a {
  color: #007bff;
  text-decoration: underline;
  font-weight: 500;
}
.endmatter a:hover {
  color: white;
  text-decoration: none;
  background-color: #33a;
}

/* --- About Us --- */
.about-section {
  max-width: 700px;
  margin: 3rem 0;
}

.about-section .amazon-button {
  background-color: #F6ED78;
  color: black;
}

/* --- Contact Us --- */
.contact-section {
  padding: 2rem 20px;
  background-color: #f8f9fa;
  margin-top: 3rem;
}

.contact-section h2 {
  margin-top: 0;
}




/* --- Footer --- */
.footer {
  text-align: center;
  padding: 0px 20px 40px;
  margin-top: 20px;
  font-size: 0.9em;
  color: #888;
}

.text-muted {
  font-size: 85%;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .header {
    gap: 10px;
  }

  .page-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
  }

  .container {
    margin: 40px auto;
  }
}
