/* ═══════════════════════════════════════════════
   courses.css — Courses listing page styles
   ═══════════════════════════════════════════════ */

/* ─── COURSES LAYOUT ─── */
.courses-layout {
  padding: var(--space-xl) 0 var(--space-3xl);
  background: #05080c;
  min-height: 60vh;
}

.courses-container {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}

/* ─── SIDEBAR ─── */
.sidebar {
  position: sticky;
  top: calc(var(--navbar-h) + var(--space-lg));
  background: #080d13;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: var(--space-xl);
  flex-shrink: 0;
  max-height: calc(100vh - var(--navbar-h) - 2rem);
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── MAIN COURSE AREA ─── */
.courses-main {
  flex: 1;
  min-width: 0; /* prevent overflow */
}

/* ─── TOOLBAR ─── */
.courses-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  gap: var(--space-md);
  flex-wrap: wrap;
}

.results-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sort-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.sort-group .select {
  width: auto;
  padding-right: 2rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .courses-container {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    max-height: none;
  }
}

@media (max-width: 600px) {
  .courses-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
