/* Health Library page — hero, filters, book grid, CTA. Extracted from
   HealthLibrary.jsx (2026-08-30) so the component can be lean. Imported
   from the HealthLibrary page component. */
.library-page {
  min-height: 100vh;
  background: #f8fafc;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero Section */
.library-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  padding: 6rem 0;
  text-align: center;
}

.hero-icon {
  width: 80px;
  height: 80px;
  background: rgba(34, 197, 94, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #22c55e;
}

.library-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  margin: 0 0 1rem 0;
}

.hero-description {
  font-size: 1.25rem;
  color: #94a3b8;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: #22c55e;
}

.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Search Section */
.search-section {
  background: white;
  padding: 2rem 0;
  border-bottom: 1px solid #e2e8f0;
  position: -webkit-sticky;
  position: sticky;
  top: 70px;
  z-index: 100;
}

.search-bar {
  position: relative;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.search-bar input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.category-filter-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.category-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 260px;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  color: #1f2937;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.category-dropdown-trigger:hover {
  border-color: #22c55e;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.12);
}

.category-dropdown-trigger[aria-expanded="true"] {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.category-current {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #22c55e;
}

.category-current span {
  color: #1f2937;
}

.category-caret {
  color: #64748b;
  transition: transform 0.2s ease;
}

.category-caret.open {
  transform: rotate(180deg);
}

.category-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  list-style: none;
  padding: 6px;
  margin: 0;
  z-index: 100;
  animation: categoryMenuIn 0.16s ease-out;
}

@keyframes categoryMenuIn {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.category-dropdown-menu li {
  list-style: none;
  margin: 0;
}

.category-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #1f2937;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.category-dropdown-item__icon {
  display: inline-flex;
  width: 22px;
  justify-content: center;
  color: #64748b;
  transition: color 0.15s ease;
}

.category-dropdown-item__label {
  flex: 1 1;
}

.category-dropdown-item:hover {
  background: #f1f5f9;
}

.category-dropdown-item:hover .category-dropdown-item__icon {
  color: #22c55e;
}

.category-dropdown-item.active {
  background: rgba(34, 197, 94, 0.10);
  color: #15803d;
}

.category-dropdown-item.active .category-dropdown-item__icon,
.category-dropdown-item.active .category-dropdown-item__check {
  color: #22c55e;
}

.category-dropdown-item__check {
  color: #22c55e;
}

/* Books Section */
.books-section {
  padding: 4rem 0;
}

.books-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.books-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.book-count {
  background: #f1f5f9;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  /* Darkened from #64748b (4.34:1) → #475569 (5.5:1) — WCAG-AA */
  color: #475569;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  grid-gap: 1.5rem;
  gap: 1.5rem;
}

.book-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.book-card:hover {
  border-color: #22c55e;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.book-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.book-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.book-year {
  background: #f1f5f9;
  padding: 0.375rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  /* Darkened from #64748b (4.34:1) → #475569 (5.5:1) — WCAG-AA */
  color: #475569;
  font-weight: 600;
}

.book-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.book-author {
  font-size: 0.938rem;
  /* Darkened from #22c55e (2.27:1 on white) → #15803d (5.34:1) — WCAG-AA */
  color: #15803d;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.book-description {
  font-size: 0.938rem;
  /* Darkened from #64748b → #475569 (5.5:1 on white) — WCAG-AA */
  color: #475569;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.book-topics {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.topic-tag {
  background: #f0fdf4;
  /* Darkened from #16a34a (3.14:1 on #f0fdf4) → #14532d (7.5:1) — WCAG-AAA */
  color: #14532d;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.read-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.read-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Book actions row — used for PDF entries that expose View and
   Download side by side. */
.book-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0.5rem;
  gap: 0.5rem;
}
.book-actions .read-btn { padding: 0.7rem 0.35rem; font-size: 0.85rem; gap: 0.3rem; }

/* Reading-progress badge — pinned above the actions row when the driver
   has previously opened this PDF. Nudges resumption of long guides
   without dominating the card visually. */
.book-progress {
  margin: 0.5rem 0 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.book-progress__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #15803d;
}
.book-progress__bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  overflow: hidden;
}
.book-progress__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.4s ease;
}


/* Secondary "View" variant — outlined so the primary "Download"
   remains the visual anchor of the pair. Text/border darkened
   from #16a34a (3.29:1) → #15803d (5.34:1) for WCAG-AA. */
.read-btn--secondary {
  background: #ffffff;
  color: #15803d;
  border: 1.5px solid #15803d;
}
.read-btn--secondary:hover {
  background: #f0fdf4;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.2);
}

/* Red "PDF" badge that sits inline with the book title so users
   instantly see which entries are downloadable files vs external
   archive.org links. */
.pdf-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.no-results {
  text-align: center;
  padding: 4rem 0;
  color: #94a3b8;
}

.no-results h3 {
  color: #64748b;
  margin: 1rem 0 0.5rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  padding: 4rem 0;
  text-align: center;
}

.cta-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin: 0 0 1rem 0;
}

.cta-content p {
  font-size: 1.125rem;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.cta-note {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  color: #22c55e;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .library-hero h1 {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .books-grid {
    grid-template-columns: 1fr;
  }

  .category-dropdown-trigger {
    min-width: 100%;
    width: 100%;
  }

  .category-dropdown-menu {
    min-width: 100%;
    max-height: 60vh;
    overflow-y: auto;
  }

  .books-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}


/*# sourceMappingURL=438.e623b50a.chunk.css.map*/