/* ══════════════════════════════════════════════════════
   Pontem Pro – Course Search (/kurssuche/) page styles
   Scoped under the .search-header / .search-layout-wrap tree.
   Card + badge base styles come from custom.css.
   ══════════════════════════════════════════════════════ */

/* ── Breadcrumb sits flush below the floating nav ── */
.breadcrumb { margin-top: 80px; }

/* ── SEARCH HEADER ── */
.search-header {
  background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
  border-bottom: 1px solid var(--gray-200);
  padding: 32px 0 24px;
}
.search-title-row { margin-bottom: 20px; text-align: center; }
.search-title-row h1 { margin-bottom: 4px; }
.search-title-row .search-term { color: var(--primary); }
.search-title-row .subline { font-size: 0.95rem; color: var(--gray-500); margin: 0; }

/* ── PILL SEARCH (centered, inline multi-field) ── */
.pill-search {
  display: flex; align-items: stretch;
  background: #fff;
  border-radius: 64px;
  box-shadow: 0 8px 32px rgba(0,40,48,0.10), 0 1px 3px rgba(0,40,48,0.05);
  padding: 7px;
  gap: 0;
  max-width: 920px;
  margin: 0 auto 4px;
  position: relative;
}
.pill-field {
  display: flex; flex-direction: column; justify-content: center;
  padding: 8px 22px;
  min-width: 0; flex-shrink: 1;
  position: relative;
  border-radius: 50px;
  cursor: text;
  transition: background var(--transition);
}
.pill-field:hover,
.pill-field:focus-within { background: var(--gray-50); }
.pill-field-input  { flex: 1.6; }
.pill-field-select { flex: 1; cursor: pointer; padding-right: 36px; }
.pill-label {
  font-size: 0.72rem; font-weight: 700; color: var(--gray-900);
  margin-bottom: 2px; line-height: 1.3; pointer-events: none;
}
.pill-field input,
.pill-field select {
  border: none; background: transparent; outline: none;
  font-family: inherit; font-size: 0.92rem; font-weight: 500;
  color: var(--gray-900); padding: 0; min-width: 0; width: 100%;
  line-height: 1.4;
  appearance: none; -webkit-appearance: none;
}
.pill-field input::placeholder { color: var(--gray-500); font-weight: 400; }
.pill-field input[type="search"]::-webkit-search-cancel-button { display: none; }
.pill-field-select::after {
  content: '';
  position: absolute; right: 20px; top: 50%;
  width: 10px; height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23182628' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: contain;
  transform: translateY(-50%);
  transition: transform 200ms ease;
  pointer-events: none;
}
.pill-field-select[data-open="true"]::after { transform: translateY(-50%) rotate(180deg); }

/* ── Custom pill dropdown (replaces native <select> for full clickable area
   + consistent styling with the filter modal) ─────────────────────────── */
.pill-field-select[data-pill-dropdown] { position: relative; }

.pill-field-trigger {
  display: block; width: 100%;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit; font-size: 0.92rem; font-weight: 500;
  color: var(--gray-900);
  line-height: 1.4; cursor: pointer;
  /* Extend the click surface to cover the full field including the chevron */
  position: absolute; inset: 0;
  padding: 8px 36px 8px 22px;
  display: flex; flex-direction: column; justify-content: center;
}
.pill-field-trigger:focus-visible {
  outline: 2px solid var(--secondary); outline-offset: -2px;
  border-radius: 50px;
}
.pill-field-trigger .pill-field-value {
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Put the static label above the trigger's value so they visually stack
   inside the same clickable surface. */
.pill-field-select[data-pill-dropdown] > .pill-label {
  position: absolute; top: 8px; left: 22px;
  pointer-events: none;
}
.pill-field-select[data-pill-dropdown] .pill-field-value {
  margin-top: 18px;            /* push below the absolutely-positioned label */
}

.pill-field-popover {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 280px;
  max-width: min(380px, calc(100vw - 48px));
  max-height: 320px; overflow-y: auto;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,40,48,0.14), 0 2px 8px rgba(0,40,48,0.06);
  padding: 8px;
  z-index: 120;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}
.pill-field-popover::-webkit-scrollbar        { width: 4px; }
.pill-field-popover::-webkit-scrollbar-thumb  { background: var(--gray-300); border-radius: 2px; }

.pill-field-select[data-open="true"] .pill-field-popover {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 0s;
}

.pill-option {
  display: block; width: 100%;
  margin: 0; padding: 9px 12px;
  border: 0; background: transparent;
  text-align: left;
  font-family: inherit; font-size: 0.88rem; font-weight: 500;
  color: var(--gray-700);
  cursor: pointer; border-radius: 8px;
  transition: background 140ms ease, color 140ms ease;
  line-height: 1.35;
  min-height: 40px;
}
.pill-option:hover        { background: var(--gray-50); color: var(--gray-900); }
.pill-option:focus-visible{
  outline: none;
  background: var(--gray-50);
  box-shadow: inset 0 0 0 2px var(--secondary);
}
.pill-option.is-active {
  background: var(--mint);
  color: var(--secondary);
  font-weight: 600;
}
.pill-option.is-active::before {
  content: '✓';
  margin-right: 8px;
  font-weight: 700;
}
.pill-divider { width: 1px; background: var(--gray-200); margin: 14px 0; flex-shrink: 0; }
.pill-more {
  background: none; border: none;
  color: var(--secondary);
  font-family: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; padding: 0 22px;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
  transition: color var(--transition);
}
.pill-more:hover { color: var(--primary); text-decoration: underline; }
.pill-submit {
  background: var(--primary); color: #fff; border: none;
  border-radius: 50px; padding: 0 22px; min-height: 48px;
  font-family: inherit; font-size: 0.9rem; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.pill-submit:hover { background: var(--primary-dark); box-shadow: 0 6px 18px rgba(216,94,67,0.3); }
.pill-submit:active { transform: translateY(1px); }
.pill-submit svg { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════
   LAYOUT – full-width results (no sidebar; filters in modal/sheet)
   ══════════════════════════════════════════════════════ */
.search-layout-wrap { padding: 28px 0 64px; background: #fff; }
.search-layout { display: block; }
.results-area { width: 100%; min-width: 0; }

.results-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.results-found { font-size: 0.9rem; color: var(--gray-700); font-weight: 500; }
.results-found strong { color: var(--gray-900); font-weight: 700; }
.results-toolbar-spacer { flex: 1; }

.sort-wrap {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.84rem; color: var(--gray-500);
}
.sort-wrap label { font-weight: 500; white-space: nowrap; }
.sort-select {
  border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  padding: 7px 28px 7px 12px; font-family: inherit; font-size: 0.84rem;
  color: var(--gray-900); background: #fff; cursor: pointer;
  min-height: 38px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236e8f92' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.sort-select:focus { outline: none; border-color: var(--secondary); }

.mobile-filter-btn {
  display: none;  /* hidden on desktop – the pill's "Mehr Filter" button is the only entry */
  align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.84rem; font-weight: 600; color: var(--secondary);
  background: #fff; border: 1.5px solid var(--secondary);
  cursor: pointer; font-family: inherit;
  transition: all var(--transition);
  min-height: 38px; position: relative;
}
.mobile-filter-btn:hover { background: var(--mint); }
.mobile-filter-btn svg { width: 16px; height: 16px; }
.filter-badge-count {
  background: var(--primary); color: #fff;
  border-radius: 10px; padding: 1px 7px;
  font-size: 0.7rem; font-weight: 700; line-height: 1.4;
  display: none; min-width: 20px; text-align: center;
}
.filter-badge-count.visible { display: inline-block; }

/* ── Active filter chips ── */
.active-filters-wrap {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 20px;
}
.active-filters-wrap:empty { display: none; }
.active-filter-label {
  font-size: 0.78rem; color: var(--gray-500);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  margin-right: 4px;
}
.active-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px 5px 12px; border-radius: 20px;
  background: var(--secondary); color: #fff;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; border: none; white-space: nowrap;
  transition: all var(--transition);
  font-family: inherit;
}
.active-filter-chip:hover { background: var(--secondary-dark); }
.active-filter-chip .chip-remove {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; line-height: 1;
  transition: background var(--transition);
}
.active-filter-chip:hover .chip-remove { background: rgba(255,255,255,0.4); }
.btn-reset-all-inline {
  background: none; border: none; font-family: inherit;
  font-size: 0.8rem; color: var(--primary); font-weight: 600;
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
  transition: background var(--transition);
}
.btn-reset-all-inline:hover { background: var(--primary-light); }

/* ── Results grid – 3-col desktop ── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Hidden by filter OR pagination */
.course-card.hidden { display: none; }

/* Type-driven left-border accent (works with existing custom.css card) */
.course-card[data-kurstyp="umschulung"]      { border-left-color: var(--primary); }
.course-card[data-kurstyp="weiterbildung"]   { border-left-color: var(--secondary); }
.course-card[data-kurstyp="coaching"]        { border-left-color: #17a589; }

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 64px 32px;
  background: var(--gray-50); border-radius: var(--radius-md);
  border: 1px dashed var(--gray-300);
}
.empty-state-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  background: #fff; border-radius: 50%;
  border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
}
.empty-state-icon svg { width: 28px; height: 28px; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; }
.empty-state p { color: var(--gray-500); font-size: 0.9rem; max-width: 420px; margin: 0 auto 24px; }
.empty-state-suggestions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.empty-suggestion-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 16px; border-radius: 20px; font-size: 0.84rem;
  font-weight: 600; border: 1.5px solid var(--gray-300);
  background: #fff; color: var(--gray-700); cursor: pointer;
  transition: all var(--transition);
  font-family: inherit; min-height: 40px;
}
.empty-suggestion-chip:hover { border-color: var(--secondary); color: var(--secondary); }

/* ── Load more ── */
.load-more-wrap {
  text-align: center; margin-top: 40px; padding-top: 28px;
  border-top: 1px solid var(--gray-200);
}
.load-more-wrap p { font-size: 0.84rem; color: var(--gray-500); margin-bottom: 12px; }

/* ══════════════════════════════════════════════════════
   FILTER OVERLAY + SHEET (mobile bottom sheet / desktop modal)
   ══════════════════════════════════════════════════════ */
.filter-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(12,32,36,0.5); z-index: 300;
  opacity: 0; transition: opacity 280ms ease;
}
.filter-overlay.active { display: block; }
.filter-overlay.visible { opacity: 1; }

.filter-sheet {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; z-index: 301;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,40,48,0.18);
  flex-direction: column;
  max-height: 92vh;
  transform: translateY(100%);
  transition: transform 380ms cubic-bezier(0.32, 0.72, 0, 1);
}
.filter-sheet.active { display: flex; }
.filter-sheet.visible { transform: translateY(0); }

.filter-sheet-handle {
  width: 44px; height: 4px; background: var(--gray-300);
  border-radius: 2px; margin: 10px auto 0; flex-shrink: 0;
}
.filter-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--gray-200); flex-shrink: 0;
}
.filter-sheet-header h3 { font-size: 1rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.filter-sheet-header h3 svg { width: 16px; height: 16px; color: var(--secondary); }
.btn-close-sheet {
  background: var(--gray-100); border: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-700); font-size: 1.2rem;
  transition: background var(--transition);
}
.btn-close-sheet:hover { background: var(--gray-200); }
.filter-sheet-body {
  overflow-y: auto; flex: 1; padding: 0 20px;
  -webkit-overflow-scrolling: touch;
}
.filter-sheet-body .filter-group-toggle { padding: 16px 0; min-height: 52px; font-size: 0.92rem; }
.filter-sheet-body .filter-option { padding: 10px 8px; min-height: 46px; font-size: 0.9rem; }

.filter-sheet-footer {
  display: flex; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--gray-200); flex-shrink: 0;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: #fff;
}
.btn-reset-sheet {
  background: #fff; border: 1.5px solid var(--gray-300);
  color: var(--gray-700); padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  min-height: 48px; white-space: nowrap;
  transition: all var(--transition);
}
.btn-reset-sheet:hover { border-color: var(--primary); color: var(--primary); }
.btn-apply-sheet {
  background: var(--secondary); color: #fff; border: none;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  flex: 1; min-height: 48px;
  transition: background var(--transition);
}
.btn-apply-sheet:hover { background: var(--secondary-dark); }

/* ── Filter group accordion (inside sheet/modal) ── */
.filter-group { border-bottom: 1px solid var(--gray-200); }
.filter-group:last-child { border-bottom: none; }
.filter-group-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; background: none; border: none;
  font-family: inherit; font-size: 0.88rem; font-weight: 700;
  color: var(--gray-900); cursor: pointer; text-align: left;
  transition: color var(--transition); min-height: 44px;
}
.filter-group-toggle:hover { color: var(--secondary); }
.filter-group-toggle-right { display: inline-flex; align-items: center; gap: 8px; }
.filter-group-count-active {
  background: var(--secondary); color: #fff;
  border-radius: 10px; padding: 1px 7px;
  font-size: 0.7rem; font-weight: 700; display: none;
}
.filter-group-count-active.visible { display: inline; }
.filter-group-chevron {
  width: 14px; height: 14px; color: var(--gray-500);
  transition: transform 250ms ease; flex-shrink: 0;
}
.filter-group.open .filter-group-chevron { transform: rotate(180deg); }
.filter-group-body {
  display: none; padding-bottom: 12px; flex-direction: column; gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}
.filter-group.open .filter-group-body { display: flex; }
.filter-group-body::-webkit-scrollbar { width: 4px; }
.filter-group-body::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }
.filter-group-body::-webkit-scrollbar-track { background: transparent; }

.filter-option {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.84rem; color: var(--gray-700);
  transition: background var(--transition);
  user-select: none; min-height: 36px;
}
.filter-option:hover { background: var(--gray-50); color: var(--gray-900); }
.filter-option.disabled { opacity: 0.4; pointer-events: none; }
.filter-option input[type="checkbox"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.filter-checkbox-visual {
  width: 18px; height: 18px; border-radius: 4px;
  border: 1.5px solid var(--gray-300); background: #fff;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.filter-option:hover .filter-checkbox-visual { border-color: var(--secondary); }
.filter-option input:checked + .filter-checkbox-visual {
  background: var(--secondary); border-color: var(--secondary);
}
.filter-option input:checked + .filter-checkbox-visual::after {
  content: ''; width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.filter-option-text { flex: 1; line-height: 1.3; }
.filter-option-count {
  font-size: 0.72rem; color: var(--gray-500);
  background: var(--gray-100); border-radius: 8px;
  padding: 1px 8px; font-weight: 600;
}
.filter-option[data-value="umschulung"]    .filter-option-count { background: var(--primary-light); color: var(--primary); }
.filter-option[data-value="weiterbildung"] .filter-option-count { background: var(--mint); color: var(--secondary); }
.filter-option[data-value="coaching"]      .filter-option-count { background: #e8f8f5; color: #17a589; }

/* ══════════════════════════════════════════════════════
   DESKTOP (≥ 641px) – sheet becomes a centered modal
   ══════════════════════════════════════════════════════ */
@media (min-width: 641px) {
  .filter-overlay { background: rgba(12,32,36,0.55); }
  .filter-sheet {
    top: 50%; left: 50%; right: auto; bottom: auto;
    width: min(560px, calc(100vw - 48px));
    max-height: min(86vh, 720px);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,40,48,0.22), 0 4px 16px rgba(0,40,48,0.08);
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
    transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1),
                opacity 200ms ease;
  }
  .filter-sheet.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  .filter-sheet-handle { display: none; }
  .filter-sheet-header { padding: 16px 22px; }
  .filter-sheet-header h3 { font-size: 1.05rem; }
  .filter-sheet-body { padding: 4px 22px 8px; }
  .filter-sheet-footer { padding: 14px 22px; border-radius: 0 0 16px 16px; }
}

/* ══════════════════════════════════════════════════════
   TABLET (≤ 1023px)
   ══════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .results-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* Pill compacts: drop Fachbereich/Themenbereich column below 900px */
@media (max-width: 899px) {
  .pill-search { max-width: 100%; }
  .pill-field { padding: 8px 18px; }
  .pill-field-select:nth-of-type(2),
  .pill-divider:nth-of-type(2) { display: none; }
  .pill-more { padding: 0 14px; font-size: 0.84rem; }
  .pill-submit { padding: 0 18px; font-size: 0.86rem; }
}

/* ══════════════════════════════════════════════════════
   MOBILE (≤ 640px)
   ══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .breadcrumb { margin-top: 64px; padding: 8px 0; font-size: 0.76rem; }

  .search-header {
    padding: 18px 0 14px;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
  }
  .search-title-row { margin-bottom: 10px; }
  .search-title-row h1 {
    font-size: 1rem; font-weight: 600; line-height: 1.35;
    color: var(--gray-700); letter-spacing: -0.01em;
  }
  .search-title-row h1 .search-term { color: var(--gray-900); font-weight: 800; }
  .search-title-row .subline { display: none; }

  /* Pill becomes minimal: keyword + compact submit */
  .pill-search {
    border-radius: 14px; padding: 4px 4px 4px 14px;
    box-shadow: 0 2px 10px rgba(0,40,48,0.08);
    flex-wrap: nowrap; align-items: center; max-width: 100%;
  }
  .pill-search .pill-field-select,
  .pill-search .pill-divider,
  .pill-search .pill-more { display: none; }
  .pill-field-input { flex: 1; padding: 6px 6px 6px 0; }
  .pill-field-input .pill-label { font-size: 0.64rem; margin-bottom: 1px; color: var(--gray-500); }
  .pill-field-input input { font-size: 0.92rem; font-weight: 500; }
  .pill-submit {
    min-height: 42px; padding: 0 14px; font-size: 0.82rem;
    border-radius: 10px; gap: 6px;
  }
  .pill-submit svg { width: 14px; height: 14px; }
  .pill-submit #pillSubmitCount { font-weight: 700; }

  .search-layout-wrap { padding: 12px 0 36px; }

  .results-toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin-bottom: 14px; }
  .results-found { font-size: 0.82rem; white-space: nowrap; flex: 0 1 auto; color: var(--gray-700); }
  .results-toolbar-spacer { display: block; flex: 1; }

  .mobile-filter-btn {
    display: inline-flex;     /* re-enable on mobile (pill's "Mehr Filter" is hidden here) */
    padding: 7px 12px; font-size: 0.8rem; min-height: 38px; gap: 6px;
    flex: 0 0 auto; border-width: 1.5px; border-radius: 10px;
  }
  .mobile-filter-btn svg { width: 14px; height: 14px; }
  .filter-badge-count { font-size: 0.66rem; padding: 1px 6px; min-width: 18px; }

  .sort-wrap { width: auto; order: 0; gap: 0; flex: 0 0 auto; }
  .sort-wrap label { display: none; }
  .sort-select {
    min-height: 38px; padding: 6px 26px 6px 10px;
    font-size: 0.8rem; font-weight: 600;
    border-radius: 10px; background-color: var(--gray-50);
    max-width: 140px;
  }

  .active-filters-wrap {
    margin-bottom: 14px; gap: 6px;
    overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px;
    scrollbar-width: none;
  }
  .active-filters-wrap::-webkit-scrollbar { display: none; }
  .active-filter-chip { font-size: 0.74rem; padding: 4px 8px 4px 10px; flex-shrink: 0; }
  .active-filter-label { display: none; }
  .btn-reset-all-inline { font-size: 0.76rem; flex-shrink: 0; }

  .results-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Mobile card parity with homepage (compact teaser, stretched link) */
  .course-card {
    padding: 14px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    border-left-width: 3px;
  }
  .course-card:hover { box-shadow: var(--shadow); transform: none; }
  .course-card:active { transform: scale(0.995); }
  .course-card h3 a::after {
    content: ''; position: absolute; inset: 0; z-index: 1;
  }
  .course-type-badge {
    font-size: 0.62rem; padding: 2px 8px;
    margin-bottom: 6px; letter-spacing: 0.06em;
  }
  .course-card h3 { font-size: 0.95rem; line-height: 1.3; margin-bottom: 8px; }
  .course-card .course-card-meta,
  .course-card .price-badge,
  .course-card .btn { display: none; }
  .card-facts {
    display: flex; flex-wrap: wrap; gap: 14px;
    grid-template-columns: unset;
    padding: 0; margin: 0; background: transparent; border-radius: 0;
  }
  .card-fact { display: flex; align-items: baseline; gap: 4px; }
  .card-fact label {
    font-size: 0.68rem; display: inline; margin: 0; color: var(--gray-500);
  }
  .card-fact span { font-size: 0.78rem; display: inline; font-weight: 600; color: var(--gray-900); }

  .empty-state { padding: 36px 18px; border-radius: 14px; }
  .empty-state h3 { font-size: 1rem; }
  .empty-state p  { font-size: 0.86rem; }
  .empty-suggestion-chip { font-size: 0.8rem; padding: 7px 13px; min-height: 36px; }
  .load-more-wrap { margin-top: 26px; padding-top: 20px; }
  .load-more-wrap p { font-size: 0.8rem; }

  /* Mobile sheet polish */
  .filter-sheet { border-radius: 18px 18px 0 0; max-height: 88vh; }
  .filter-sheet-handle { width: 38px; height: 4px; margin-top: 8px; background: var(--gray-300); }
  .filter-sheet-header { padding: 12px 20px; border-bottom: 1px solid var(--gray-200); }
  .filter-sheet-header h3 { font-size: 0.95rem; letter-spacing: -0.01em; }
  .btn-close-sheet { width: 32px; height: 32px; font-size: 1.05rem; background: var(--gray-100); }
  .filter-sheet-body { padding: 4px 18px 8px; }
  .filter-sheet-body .filter-group-toggle { padding: 14px 0; min-height: 48px; font-size: 0.9rem; }
  .filter-sheet-body .filter-option { padding: 10px 8px; min-height: 44px; font-size: 0.9rem; border-radius: 8px; }
  .filter-sheet-body .filter-checkbox-visual { width: 20px; height: 20px; border-radius: 5px; }
  .filter-sheet-footer {
    padding: 12px 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    gap: 10px;
    box-shadow: 0 -2px 16px rgba(0,40,48,0.06);
  }
  .btn-apply-sheet {
    font-size: 0.92rem; font-weight: 700;
    min-height: 50px; border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,79,90,0.18);
  }
  .btn-apply-sheet:active { transform: translateY(1px); }
  .btn-reset-sheet {
    min-height: 50px; border-radius: 10px;
    padding: 12px 16px; font-size: 0.86rem; font-weight: 600;
  }
}

/* Ultra-narrow */
@media (max-width: 380px) {
  .sort-select { max-width: 120px; font-size: 0.76rem; padding-right: 24px; }
  .mobile-filter-btn { padding: 7px 10px; font-size: 0.76rem; }
  .mobile-filter-btn svg { width: 13px; height: 13px; }
  .results-found { font-size: 0.78rem; }
  .course-card { padding: 12px 14px; }
  .card-facts { gap: 10px; }
  .card-fact label { font-size: 0.66rem; }
  .card-fact span  { font-size: 0.76rem; }
}
