/* Reduce overall black bar padding */
.bg-black.pb3-m.pb6-l {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Flatten nav padding */
.bg-black nav.pv3 {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

/* Flatten the title block padding */
.bg-black .tc-l.pv3 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Make title font smaller */
.bg-black h1.f2.f-subheadline-l {
  font-size: 4rem !important;  /* adjust to taste */
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* --- Homepage Category Grid Styles --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media screen and (min-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 960px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.category-block {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.category-block-content {
  padding: 0;
  position: relative;
  z-index: 2; /* Ensures content is above the block link */
}

/* Make the entire block clickable */
.block-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1; /* Sits below content but above background */
  text-indent: -9999px; /* Hides link text */
}

/* Header within the block */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #000;
  color: #fff;
  padding: 0.75rem 1rem;
}

.category-header h2 {
  margin: 0;
  font-size: 1.25rem; /* Tachyons f4 equivalent */
  color: #fff;
}

/* "More" link in the header */
.more-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem; /* Tachyons f6 equivalent */
  transition: color 0.2s;
  z-index: 3; /* Make sure it's clickable */
  position: relative;
}

.more-link:hover {
  color: #ccc;
}


.category-block-content > p {
    padding: 0 1rem;
    margin-top: 0.75rem;
}

.book-preview-list {
  padding: 0 1rem 1rem 1rem; /* Add padding to the book list */
}

/* Individual book links */
.book-link {
  z-index: 3;
  position: relative;
}

.link-style {
  color: #357edd;
  text-decoration: none;
  transition: color 0.2s;
}

.link-style:hover {
  text-decoration: underline;
  color: #00449e;
}

li.pv1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* --- Single Book Page Styles --- */
.book-info-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #eee;
}

.book-details {
  flex: 2; /* Takes up more space */
  min-width: 250px;
}

.book-details h2 {
  margin-top: 0;
  border-bottom: 2px solid #000;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.book-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.book-details li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.book-details li:last-child {
  border-bottom: none;
}

.book-download {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
}

.btn-download {
  display: inline-block;
  background-color: #000;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  transition: background-color 0.3s ease;
}

.btn-download:hover {
  background-color: #333;
}

/* --- Book List Card View --- */
.book-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.book-card-link {
  text-decoration: none;
  color: inherit;
}

.book-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  height: 100%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.book-card h2 {
  color: #000;
}

.book-card p {
  line-height: 1.5;
}

