/* ==========================================================================
   Reading Page
   ========================================================================== */

.reading-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.reading-header {
  margin-bottom: 2.5rem;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  border-bottom: none;
}

.reading-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text-primary, #1A1A1A);
  margin: 0 0 0.5rem 0;
}

.reading-header .reading-description {
  font-size: 0.95rem;
  color: var(--color-text-primary, #1A1A1A);
  margin: 0;
  max-width: 550px;
  line-height: 1.6;
}

.reading-header .reading-description p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.book-section {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-label {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
  font-size: 0.9375rem !important; /* 15px - matches nav items */
  font-weight: 600 !important;
  color: #1A1A1A !important;
  white-space: nowrap;
}

.section-label--current {
  color: #1A1A1A !important;
}

.section-line {
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.15) !important;
}

.section-count {
  font-size: 0.7rem;
  color: #4A4A4A !important;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Book Grid
   -------------------------------------------------------------------------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

/* Responsive: fewer columns on smaller screens */
@media (max-width: 768px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Book Item
   -------------------------------------------------------------------------- */

.book-item {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.book-cover-wrapper {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-item:hover .book-cover-wrapper {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Actual cover image */
.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback when no cover image */
.book-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c3e50 0%, #1c3f60 50%, #34495e 100%);
  color: white;
  font-size: 0.55rem;
  text-align: center;
  padding: 0.5rem;
  line-height: 1.3;
}

/* Essay hint - removed per user request */

/* Book title */
.book-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1A1A1A !important;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

/* Book author */
.book-author {
  display: block;
  font-size: 0.65rem;
  color: #4A4A4A !important;
}

/* --------------------------------------------------------------------------
   Dark Mode
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  .reading-header {
    border-bottom: none;
  }

  .reading-header .reading-description {
    color: #B0B0B0 !important;
  }

  .reading-header h1 {
    color: #E8E8E8 !important;
  }

  .section-label {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
    color: #B0B0B0 !important;
  }

  .section-label--current {
    color: #E8E8E8 !important;
  }

  .section-line {
    background: rgba(255, 255, 255, 0.1) !important;
  }

  .section-count {
    color: #888888 !important;
  }

  .book-cover-wrapper {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  .book-item:hover .book-cover-wrapper {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }

  .book-title {
    color: #E8E8E8 !important;
  }

  .book-author {
    color: #888888 !important;
  }

  .book-cover-fallback {
    background: linear-gradient(135deg, #3a5068 0%, #2a4a6a 50%, #4a5a6e 100%);
  }
}

