/* Course Filter */

.filter-bar {
  padding: 14px;
  border: 1px solid #dec3ae;
  border-radius: 8px;
  background: rgba(255, 250, 240, .62);
  box-shadow: 0 10px 28px rgba(96, 43, 22, .04);
}

.filter-bar .content {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr;
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--red);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: var(--weight-semibold);
  line-height: 1.1;
  white-space: nowrap;
}

.course-filter-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.course-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.course-filter .icon-circle {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  font-size: 1rem;
}

.course-filter-clear {
  min-height: 32px;
  padding: 0 14px;
  color: var(--red);
  font: inherit;
  font-size: .9rem;
  font-weight: var(--weight-semibold);
  line-height: 1;
  white-space: nowrap;
  background: rgba(255, 250, 240, .72);
  border: 1px solid rgba(145, 28, 29, .28);
  border-radius: 5px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.course-filter-clear:hover {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 8px 18px rgba(145, 28, 29, .12);
}

.course-filter-clear[hidden] {
  display: none;
}

.course-filter-toggle {
  display: none;
  min-height: 32px;
  padding: 0 14px;
  color: var(--red);
  font: inherit;
  font-size: .9rem;
  font-weight: var(--weight-semibold);
  line-height: 1;
  white-space: nowrap;
  background: rgba(255, 250, 240, .72);
  border: 1px solid rgba(145, 28, 29, .28);
  border-radius: 5px;
  cursor: pointer;
}

.course-filter-toggle span {
  margin-left: 6px;
}

.input-like,
.select-like {
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  font-size: var(--text-meta);
  line-height: var(--leading-meta);
  border: 1px solid #dfc7b4;
  border-radius: 5px;
  background: #fffaf2;
}

.filter-bar .input-like,
.filter-bar .select-like {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-filter .primary-btn {
  min-height: 40px;
  min-width: 110px;
  padding: 0 22px;
  white-space: nowrap;
}

.course-filter-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e7ceb8;
  border-radius: 6px;
  background: rgba(255, 250, 240, .45);
}

.course-filter-row legend.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.course-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  color: #2f2620;
  font-size: .9rem;
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  border-right: 1px solid #e7ceb8;
}

.course-filter-label-icon {
  width: 20px;
  flex: 0 0 20px;
  color: var(--red);
  font-size: 1rem;
  text-align: center;
}

.course-filter-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 8px;
  min-width: 0;
  padding: 8px 10px;
}

.course-filter-option {
  min-height: 32px;
  min-width: 92px;
  padding: 0 12px;
  color: #2f2620;
  font: inherit;
  font-size: .9rem;
  line-height: 1.25;
  text-align: center;
  background: rgba(255, 250, 240, .68);
  border: 1px solid #e4cab3;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.course-filter-option:hover,
.course-filter-option.is-active {
  color: var(--red);
  border-color: rgba(145, 28, 29, .38);
  box-shadow: 0 8px 18px rgba(145, 28, 29, .08);
}

.course-filter-option.is-active {
  color: #fff;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%);
  border-color: var(--red);
}

.tab-row,
.category-row {
  display: grid;
  gap: 12px;
}

.tab-row {
  grid-template-columns: repeat(7, 1fr);
}

.category-row {
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid #dfc2ad;
  padding: 16px;
}

.tab-item,
.category-item {
  display: flex;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #4b3b32;
  font-size: var(--text-meta);
  line-height: var(--leading-meta);
  text-align: center;
  border-bottom: 2px solid transparent;
}

.tab-item.active,
.category-item.active {
  color: var(--red);
  border-color: var(--red);
}

/* Course Listing */

.course-list-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}

.course-list-card {
  display: grid;
  grid-auto-rows: auto 1fr;
  overflow: hidden;
  background: #fff8ee;
  border: 1px solid #dfc5b3;
  border-radius: 5px;
}

.course-list-card[hidden],
.course-list-card.is-filtered-out {
  display: none;
}

.course-list-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.course-list-card .card-body {
  padding: 12px;
}

.course-empty {
  margin: 20px 0 0;
  padding: 18px;
  color: var(--red);
  font-weight: var(--weight-semibold);
  text-align: center;
  border: 1px solid #dfc5b3;
  border-radius: 6px;
  background: #fff8ee;
}
