.courses-page {
  min-height: 70vh;
  background: rgb(248 250 252 / 60%);
  color: #0f172a;
}

.courses-page__container {
  padding-block: 2rem;
}

.courses-heading {
  margin-bottom: 1.25rem;
}

.courses-heading h1 {
  margin: 0;
  color: #020617;
  font-family: Outfit, Inter, system-ui, sans-serif;
  font-size: 1.875rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.courses-heading p {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
}

.course-filter {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.course-filter__layout {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.75rem;
}

.course-categories {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.course-category {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  padding-inline: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.course-category:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.course-category--active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.course-category--active:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.course-filter__controls {
  display: grid;
  min-width: 0;
  gap: 0.5rem;
}

.course-search {
  display: flex;
  min-width: 0;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.course-search:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px #dbeafe;
}

.course-search__icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  color: #94a3b8;
}

.course-search input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
}

.course-search input::placeholder {
  color: #94a3b8;
}

.course-sort select {
  width: 100%;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  outline: 0;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.course-sort select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px #dbeafe;
}

.course-category:focus-visible,
.course-search:focus-within,
.course-sort select:focus-visible {
  outline: none;
}

.courses-empty-state {
  display: grid;
  min-height: 18rem;
  margin-top: 1.25rem;
  place-items: center;
  padding: 2rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  background: #fff;
  text-align: center;
}

.courses-empty-state__icon {
  color: #0f172a;
  font-size: 2.25rem;
  line-height: 1;
}

.courses-empty-state h2 {
  margin: 0.75rem 0 0;
  color: #0f172a;
  font-family: Outfit, Inter, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.3;
}

.courses-empty-state p {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .courses-heading p {
    font-size: 1rem;
  }

  .course-filter__controls {
    grid-template-columns: minmax(16rem, 1fr) 12rem;
  }
}

@media (min-width: 768px) {
  .courses-heading h1 {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .courses-page__container {
    padding-block: 2.5rem;
  }
}

@media (min-width: 1280px) {
  .course-filter__layout {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .course-filter__controls {
    width: 34rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .courses-page *,
  .courses-page *::before,
  .courses-page *::after {
    transition-duration: 0.01ms !important;
  }
}
