/* ===========================
   Books Page Specific Styles 
   =========================== */

/* Books Page Headings and Containers */
.books-page-container {
  padding-top: 12px;
  padding-bottom: 40px;
}

.books-page-heading {
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 30px;
  margin-bottom: 20px;
  padding: 0 0 0 34px;
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 700;
  text-transform: none;
  color: black;
}

/* ===========================
   Filter Bar (Top)
   =========================== */
.books-filter-bar {
  width: 95%;
  max-width: 1350px;
  margin: 0 auto 40px;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.filter-dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 160px;
  flex: 1 1 160px;
}

.filter-dropdown-group label {
  font-size: 13px;
  font-weight: 600;
  color: #343a40;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-dropdown {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  font-size: 14px;
  color: #1d262f;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.filter-dropdown:hover {
  border-color: #004F86;
}

.filter-dropdown:focus {
  outline: none;
  border-color: #004F86;
  box-shadow: 0 0 0 2px rgba(0, 79, 134, 0.1);
}

.reset-filters {
  padding: 10px 24px;
  background-color: #005830;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 42px;
  align-self: flex-end;
}

.reset-filters:hover {
  background-color: #00804d;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ===========================
   Books Grid (Full Width)
   =========================== */
.books-grid-container {
  width: 95%;
  max-width: 1350px;
  margin: 0 auto;
}

.isotope-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 -10px;
  width: 100%;
  opacity: 0;
}

.isotope-grid.is-loaded {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.book-item {
  width: calc(25% - 20px);  /* 4 books per row */
  margin: 0 10px 40px 10px;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.book-item-inner {
  display: block;
  text-align: center;
  background-color: transparent;
  border-radius: 4px;
  overflow: hidden;
  transition: 0.3s ease;
  height: 100%;
  padding-bottom: 10px;
}

.book-item-inner:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transform: translateY(-5px);
}

.book-cover-link {
  display: block;
  text-align: center;
  padding: 10px;
  width: 100%;
  text-decoration: none;
}

.book-cover-link .book-title {
  color: #000;
  text-decoration: none;
}

.isotope-grid .book-cover {
  max-height: 270px;
  max-width: 88%;
  object-fit: contain;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  border: 1px solid #ddd;
  transition: 0.3s ease;
}

.book-title {
  display: block;
  font-size: 16px;
  text-align: center;
  width: 100%;
  min-height: 32px;
  max-width: 160px;
  margin: 0 auto;
  padding: 0 8px;
  word-wrap: break-word;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-decoration: none;
}