/* Library page styles — owns: library-specific layout, filters, resource cards */

.lib-page { min-height: 100vh; display: flex; flex-direction: column; }

/* Nav extras */
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-user { font-size: 14px; color: var(--fg-muted); }
.btn-logout {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 14px; font-family: var(--font-body); font-size: 13px;
  color: var(--fg-muted); cursor: pointer; transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--fg-muted); color: var(--fg); }

/* Page header */
.lib-header {
  background: var(--bg-dark); color: #fff; padding: 56px 0 48px;
}
.lib-header-inner { max-width: 1100px; margin: 0 auto; padding: 0 32px; }
.lib-eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 16px;
}
.lib-title {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 16px; color: #fff;
}
.lib-sub { font-size: 17px; color: rgba(255,255,255,0.68); line-height: 1.7; max-width: 520px; }

/* Filters bar */
.lib-filters-bar {
  background: var(--bg-warm); border-bottom: 1px solid var(--border); padding: 24px 0;
  position: sticky; top: 0; z-index: 100;
}
.lib-filters-inner { max-width: 1100px; margin: 0 auto; padding: 0 32px; display: flex; flex-direction: column; gap: 16px; }

.filter-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-label {
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-muted);
  min-width: 72px;
}
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg-card); font-family: var(--font-display); font-weight: 500;
  font-size: 13px; color: var(--fg-light); cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.pill.active {
  background: var(--fg); color: #fff; border-color: var(--fg);
}

/* Content area */
.lib-content { flex: 1; padding: 40px 0 80px; }
.lib-content-inner { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

.results-meta {
  font-size: 14px; color: var(--fg-muted); margin-bottom: 28px;
}
.results-meta span { font-weight: 700; color: var(--fg); }
.clear-filters { color: var(--accent); text-decoration: none; font-weight: 500; }
.clear-filters:hover { text-decoration: underline; }

/* Resource grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* Resource card */
.resource-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.resource-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(196,125,46,0.08); }

.resource-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.resource-badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* Badges */
.badge {
  font-family: var(--font-display); font-weight: 700; font-size: 11px;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px;
}
/* Category colors */
.badge-save-time { background: #e8f5e9; color: #2e7d32; }
.badge-career { background: #e3f2fd; color: #1565c0; }
.badge-understand-ai { background: #fce4ec; color: #c62828; }
.badge-best-tools { background: var(--accent-bg); color: var(--accent); }
/* Difficulty colors */
.badge-beginner { background: #f3f4f6; color: #374151; }
.badge-intermediate { background: #fdf6ec; color: #92400e; }
.badge-advanced { background: #ede9fe; color: #5b21b6; }

.resource-type-tag {
  font-family: var(--font-display); font-weight: 500; font-size: 12px; color: var(--fg-muted);
  background: var(--bg-warm); border: 1px solid var(--border); border-radius: 4px;
  padding: 3px 8px; white-space: nowrap;
}

.resource-title {
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--fg);
  line-height: 1.35; margin-bottom: 12px;
}
.resource-summary {
  font-size: 14px; color: var(--fg-light); line-height: 1.7; flex: 1; margin-bottom: 20px;
}

.resource-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.resource-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.meta-item { font-size: 13px; color: var(--fg-muted); }

.resource-link {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  color: var(--accent); text-decoration: none; white-space: nowrap;
  transition: color 0.15s;
}
.resource-link:hover { color: var(--accent-light); }

/* Guide cards — truncated summary, links to dedicated /guide/:id page */
.guide-card .resource-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read Guide link — styled as a button-link */
.guide-link {
  display: inline-block;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.15s;
}
.guide-link:hover { background: var(--accent); color: #fff; }

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px; text-align: center; gap: 12px;
}
.empty-icon { font-size: 48px; }
.empty-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--fg); }
.empty-sub { font-size: 15px; color: var(--fg-muted); }
.empty-sub a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* Responsive */
@media (max-width: 768px) {
  .lib-header-inner, .lib-filters-inner, .lib-content-inner { padding: 0 20px; }
  .lib-header { padding: 40px 0 32px; }
  .lib-filters-bar { position: static; }
  .filter-group { flex-direction: column; align-items: flex-start; gap: 8px; }
  .filter-label { min-width: unset; }
  .resources-grid { grid-template-columns: 1fr; }
  .nav-user { display: none; }
}

@media (max-width: 480px) {
  .resource-footer { flex-direction: column; align-items: flex-start; }
}
