/* ============================================================================
   Learning Paths — Cards, Timeline, Roadmap
   ============================================================================ */

.paths-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.paths-header {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-soft);
}

.paths-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 0.4rem;
  color: var(--text-main);
}

.paths-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
}

/* Path cards grid */
.paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.path-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}

.path-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.path-card.expanded {
  grid-column: 1 / -1;
  cursor: default;
}

.path-card__top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.path-card__icon {
  font-size: 2.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.path-card__info {
  flex: 1;
  min-width: 0;
}

.path-card__label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: var(--text-main);
}

.path-card__desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 0.6rem;
}

.path-card__meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.path-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Progress bar */
.path-progress {
  margin-top: 1rem;
}

.path-progress__bar {
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}

.path-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--status-success), var(--status-success-text));
  border-radius: 3px;
  transition: width 0.5s ease;
  min-width: 0;
}

.path-progress__text {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
}

/* CTA button */
.path-card__cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, var(--xp-purple), var(--xp-purple));
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.path-card__cta:hover {
  opacity: 0.88;
}

/* Collapse / expand toggle */
.path-card__toggle {
  background: none;
  border: none;
  color: var(--text-accent);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.3rem 0;
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.path-card__toggle:hover {
  text-decoration: underline;
}

.path-card__toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.path-card.expanded .path-card__toggle svg {
  transform: rotate(180deg);
}

/* ============================================================================
   Timeline / Roadmap
   ============================================================================ */

.path-timeline {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  display: none;
}

.path-card.expanded .path-timeline {
  display: block;
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Vertical line */
.timeline-list::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-soft);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.55rem 0;
  position: relative;
}

/* Completion node */
.timeline-node {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-node__circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-soft);
  background: var(--bg-primary);
  transition: all 0.3s;
}

/* States */
.timeline-item[data-status="complete"] .timeline-node__circle {
  background: var(--status-success);
  border-color: var(--status-success);
  box-shadow: 0 0 8px var(--status-success-soft);
}

.timeline-item[data-status="in-progress"] .timeline-node__circle {
  background: linear-gradient(to top, var(--status-warning) 50%, var(--bg-primary) 50%);
  border-color: var(--status-warning);
}

.timeline-item[data-status="not-started"] .timeline-node__circle {
  background: var(--bg-primary);
  border-color: var(--border-soft);
}

.timeline-body {
  flex: 1;
  min-width: 0;
}

.timeline-body__title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  margin: 0;
}

.timeline-body__title a {
  color: inherit;
  text-decoration: none;
}

.timeline-body__title a:hover {
  text-decoration: underline;
}

.timeline-body__detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

.timeline-body__status {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  margin-top: 0.2rem;
  font-weight: 500;
}

.timeline-item[data-status="complete"] .timeline-body__status {
  background: var(--status-success-soft);
  color: var(--status-success-text);
}

.timeline-item[data-status="in-progress"] .timeline-body__status {
  background: var(--status-warning-soft);
  color: var(--status-warning-text);
}

.timeline-item[data-status="not-started"] .timeline-body__status {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
}

/* ============================================================================
   Responsive
   ============================================================================ */

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

  .path-card.expanded {
    grid-column: 1;
  }

  .path-card__top {
    flex-direction: column;
    gap: 0.5rem;
  }
}
