/* learn/learn.css — Human Workforce Learning Finder (self-contained) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --card: #1a1d27;
  --card-border: #2d3148;
  --accent: #4f8ef7;
  --accent-dim: rgba(79, 142, 247, 0.12);
  --live: #22c55e;
  --muted-badge: #475569;
  --text: #e2e8f0;
  --muted: #64748b;
  --chip-text: #7eb0ff;
  --font: 'Inter', system-ui, sans-serif;
  --radius: 8px;
  --header-h: 57px;
  --nav-h: 44px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(15,17,23,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
  height: var(--header-h);
}
.wordmark {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--text);
}
.header-link { font-size: 0.8rem; color: var(--accent); text-decoration: none; }
.header-link:hover { text-decoration: underline; }

/* ── Secondary nav ── */
.learn-nav {
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  z-index: 100;
  background: rgba(15,17,23,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
  height: var(--nav-h);
  overflow-x: auto;
}
.learn-nav-inner {
  display: flex; align-items: center;
  padding: 0 2rem; height: 100%; white-space: nowrap;
}
.learn-nav-link {
  display: inline-flex; align-items: center;
  padding: 0 0.9rem; height: 100%;
  font-size: 0.78rem; font-weight: 500;
  color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.learn-nav-link:hover { color: var(--text); }
.learn-nav-link--active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Main ── */
main { flex: 1; padding-top: calc(var(--header-h) + var(--nav-h)); }

/* ── Footer ── */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2rem; flex-wrap: wrap; gap: 0.5rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.8rem; color: var(--muted);
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── Hero ── */
.learn-hero {
  padding: 4rem 2rem 3rem; text-align: center;
  max-width: 800px; margin: 0 auto;
}
.learn-eyebrow {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.learn-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700; line-height: 1.25; margin-bottom: 1rem;
}
.learn-hero p {
  font-size: 1rem; color: var(--muted); line-height: 1.7;
  max-width: 580px; margin: 0 auto 2rem;
}

/* ── Search ── */
.learn-search-wrap {
  max-width: 600px; margin: 0 auto; position: relative;
}
.learn-search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 40px; color: var(--text);
  font-size: 0.95rem; font-family: var(--font); outline: none;
  transition: border-color 0.12s;
}
.learn-search-input::placeholder { color: var(--muted); }
.learn-search-input:focus { border-color: var(--accent); }
.learn-search-icon {
  position: absolute; left: 1.1rem; top: 50%;
  transform: translateY(-50%); color: var(--muted); pointer-events: none;
}

/* ── Sections ── */
.learn-section { max-width: 1200px; margin: 0 auto; padding: 3rem 2rem; }
.learn-section-title { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.learn-section-header {
  display: flex; align-items: baseline;
  justify-content: space-between; margin-bottom: 1.5rem;
}
.learn-see-all { font-size: 0.8rem; color: var(--accent); text-decoration: none; }
.learn-see-all:hover { text-decoration: underline; }

/* ── Grids ── */
.learn-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.learn-grid--2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.learn-grid--4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* ── Badges / chips ── */
.badge-chip {
  display: inline-block; padding: 0.18rem 0.5rem;
  background: var(--accent-dim); color: var(--chip-text);
  border-radius: 20px; font-size: 0.7rem; font-weight: 500;
}
.badge-ep {
  display: inline-block; padding: 0.18rem 0.5rem;
  background: rgba(79,142,247,0.2); color: var(--accent);
  border-radius: 20px; font-size: 0.7rem; font-weight: 600;
}
.badge-live {
  display: inline-block; padding: 0.18rem 0.5rem;
  background: rgba(34,197,94,0.15); color: #22c55e;
  border-radius: 20px; font-size: 0.7rem; font-weight: 600;
}
.badge-soon {
  display: inline-block; padding: 0.18rem 0.5rem;
  background: rgba(71,85,105,0.4); color: var(--muted);
  border-radius: 20px; font-size: 0.7rem; font-weight: 600;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ── Episode card ── */
.episode-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.12s;
}
.episode-card:hover { border-color: var(--accent); }
.episode-thumb {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: #0a0d14; display: block;
}
.episode-body {
  padding: 1rem 1.1rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.55rem; flex: 1;
}
.episode-meta { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.episode-title { font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.episode-summary { font-size: 0.8rem; color: var(--muted); line-height: 1.55; flex: 1; }

/* ── Book card ── */
.book-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.4rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.book-title { font-size: 1rem; font-weight: 600; }
.book-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.6; flex: 1; }

/* ── Course card ── */
.course-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.4rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.course-title { font-size: 1rem; font-weight: 600; }
.course-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.6; flex: 1; }
.course-meta { font-size: 0.76rem; color: var(--muted); display: flex; gap: 1rem; }

/* ── Topic card ── */
.topic-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.25rem;
  text-decoration: none; display: flex; flex-direction: column; gap: 0.4rem;
  transition: border-color 0.12s, transform 0.1s; cursor: pointer;
}
.topic-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.topic-name { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.topic-count { font-size: 0.78rem; color: var(--muted); }
.topic-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* ── Path card ── */
.path-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.4rem;
  text-decoration: none; display: flex; flex-direction: column; gap: 0.55rem;
  transition: border-color 0.12s, transform 0.1s; cursor: pointer;
}
.path-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.path-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.path-audience { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.path-steps { font-size: 0.76rem; color: var(--accent); font-weight: 500; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.52rem 1.1rem; border-radius: 6px;
  font-size: 0.82rem; font-weight: 600; text-decoration: none;
  cursor: pointer; border: none; transition: opacity 0.12s; font-family: var(--font);
}
.btn:hover { opacity: 0.85; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--ghost {
  background: transparent; border: 1px solid var(--card-border); color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.btn--disabled { background: var(--card-border); color: var(--muted); cursor: not-allowed; opacity: 0.6; }

/* ── Filter panel ── */
.filter-panel {
  display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start;
  padding: 1.25rem 0; border-bottom: 1px solid var(--card-border); margin-bottom: 1.5rem;
}
.filter-group { display: flex; flex-direction: column; gap: 0.45rem; }
.filter-label {
  font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.filter-chip {
  padding: 0.28rem 0.65rem; border-radius: 20px;
  border: 1px solid var(--card-border); background: transparent;
  color: var(--muted); font-size: 0.74rem; font-family: var(--font);
  cursor: pointer; transition: all 0.12s;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip--active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Detail views ── */
.detail-back {
  font-size: 0.82rem; color: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.3rem; margin-bottom: 1.5rem;
}
.detail-back:hover { text-decoration: underline; }
.detail-title {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.25; margin-bottom: 0.6rem;
}
.detail-subtitle { font-size: 0.95rem; color: var(--muted); line-height: 1.65; max-width: 680px; }
.detail-grid { display: grid; gap: 2.5rem; grid-template-columns: 2fr 1fr; }
.detail-section-title {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 1rem;
}

/* ── Step list ── */
.step-list { display: flex; flex-direction: column; gap: 0.75rem; list-style: none; }
.step-item {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1rem;
}
.step-num {
  flex-shrink: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}
.step-body { flex: 1; }
.step-title { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.step-topics { font-size: 0.76rem; color: var(--muted); }

/* ── Search results ── */
.result-list { display: flex; flex-direction: column; gap: 0.85rem; }
.result-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  display: flex; gap: 1rem; align-items: flex-start;
  text-decoration: none; transition: border-color 0.12s;
}
.result-card:hover { border-color: var(--accent); }
.result-thumb {
  flex-shrink: 0; width: 110px; height: 62px;
  object-fit: cover; border-radius: 4px; background: #0a0d14;
}
.result-body { flex: 1; }
.result-format {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.2rem;
}
.result-title { font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.result-summary { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty-state p { font-size: 0.95rem; }

/* ── Takeaway / callout ── */
.takeaway {
  background: var(--accent-dim); border: 1px solid rgba(79,142,247,0.3);
  border-radius: var(--radius); padding: 1.25rem;
  font-size: 0.9rem; line-height: 1.65; color: var(--text); font-style: italic;
}

/* ── Objectives list ── */
.objectives-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.objectives-list li {
  display: flex; gap: 0.55rem;
  font-size: 0.88rem; color: var(--text); line-height: 1.5;
}
.objectives-list li::before { content: '→'; color: var(--accent); flex-shrink: 0; }

/* ── Sidebar items ── */
.sidebar-list { display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-item {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 6px; font-size: 0.82rem; color: var(--text); text-decoration: none;
}
.sidebar-item:hover { border-color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .learn-grid--2 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .learn-section { padding: 2rem 1rem; }
  .learn-hero { padding: 2.5rem 1rem 2rem; }
  .learn-nav-inner { padding: 0 1rem; }
  .header { padding: 1rem; }
  .learn-grid { grid-template-columns: 1fr; }
  .learn-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .result-thumb { display: none; }
  .filter-panel { gap: 1rem; }
}
