/* Book Review Page Styles */

.book-review-header {
  background-color: transparent !important; /* Ensure it matches page background */
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 1px solid #ffc1d5;
}

.book-review-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  letter-spacing: 2px;
}

.book-review-header p {
  font-size: 1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Section background */
.book-review-section {
  background: #ffe9f0; /* light pink */
  border-top: 2px solid #ff6b8a; /* strong pink */
  border-bottom: 2px solid #ff6b8a;
}


/* Review Tabs */
.review-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  justify-content: center;
}

.review-tabs .tab {
  padding: 8px 20px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #333;
}

.review-tabs .tab:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.review-tabs .tab.active {
  background-color: #ff6b6b;
  color: white;
  border-color: #ff6b6b;
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .book-grid {
    grid-template-columns: 1fr;
  }
}

/* Book Card */
.book-card {
  background: #ffe9f0; /* light pink card */
  border: 1px solid #ff6b8a; /* strong pink border */
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 138, 0.15);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-card:hover {
  box-shadow: 0 8px 16px rgba(255, 107, 138, 0.25);
  transform: translateY(-4px);
  border-color: #ff6b8a;
}

.book-thumb-link {
  display: block;
  overflow: hidden;
  background: #fff0f4; /* subtle pink */
  aspect-ratio: 3/4;
}

.book-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}

.book-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

/* Book Info */
.book-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  align-items: center !important; /* Force center */
  text-align: center !important; /* Force center */
}

.book-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.4;
  color: #333;
}

.book-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.book-title a:hover {
  color: #ff6b6b;
}

.book-description {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 12px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: justify; /* justify text as requested */
  hyphens: auto;
}

.book-rating {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center; /* center the label and stars */
  gap: 8px;
  margin-bottom: 12px;
  width: 100%;
  flex-wrap: nowrap; /* Prevent wrapping */
  white-space: nowrap; /* Prevent wrapping */
}

.rating-label {
  color: #ff6b8a; /* strong pink */
  font-weight: 600;
  font-size: 0.9rem;
}


.stars {
  display: flex;
  gap: 4px;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  height: 16px; /* lock row height */
  line-height: 16px; /* prevent growth */
  overflow: hidden; /* avoid expansion */
}

/* Ensure stars never blow up */
.book-rating, .stars { line-height: 1; }
.stars .star-svg { width:16px !important; height:16px !important; display:inline-block; flex:0 0 16px !important; }
/* Hide any leftover text-based stars inside our stars container */
.stars .star { display: none !important; }


/* SVG star styling */
.stars .star-svg { width:16px; height:16px; display:inline-block; margin-right:3px; flex: 0 0 16px !important; vertical-align: middle; }
.star-svg.full { fill:#ffc107; }
.star-svg.empty { fill:#e0e0e0; }

.star {
  font-size: 1.25rem;
  line-height: 1;
  color: #e0e0e0; /* default empty color */
}

.star.full {
  color: #ffc107; /* gold */
}

/* Half star: base grey with gold overlay at 50% */
.star.half {
  position: relative;
  color: #e0e0e0; /* base */
}
.star.half::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: #ffc107;
}

.star.empty {
  color: #e0e0e0;
}

/* score-text removed on archive */
.score-text { display: none; }

.read-more-btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: #ff6b6b;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  align-self: center; /* center the button */
  margin-top: auto;
  box-shadow: 0 2px 0 rgba(0,0,0,0.05);
}

.read-more-btn:hover {
  background-color: #ff5252;
  transform: translateX(2px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.pagination a:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
  background-color: #fff5f5;
}

.pagination .page-numbers.current {
  background-color: #ff6b6b;
  color: white;
  border-color: #ff6b6b;
}

.pagination svg {
  width: 18px;
  height: 18px;
}

