/* Unified public filter card — same structure on every listings page */
.filter-panel,
.filter-sidebar,
.filters-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  padding: 16px 14px 14px;
  height: fit-content;
  position: sticky;
  top: calc(var(--csl-nav-h, 72px) + 16px);
  z-index: 20;
}

.filter-panel .cs-back-home-btn,
.filter-sidebar .cs-back-home-btn,
.filters-panel .cs-back-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #172a74, #21a9af);
  color: #fff !important;
  border-radius: 50%;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(23, 42, 116, 0.25);
  margin: 0 0 10px;
}

.filter-panel .filter-section,
.filter-sidebar .filter-group,
.filter-sidebar .filter-section,
.filters-panel .filter-section {
  border: 0;
  border-bottom: 1px solid #eceff3;
  margin: 0;
  padding: 4px 0;
  background: transparent;
  box-shadow: none;
}

.filter-panel .filter-section:last-of-type,
.filter-sidebar .filter-group:last-of-type,
.filter-sidebar .filter-section:last-of-type,
.filters-panel .filter-section:last-of-type {
  border-bottom: 1px solid #eceff3;
}

.filter-panel summary.filter-title,
.filter-sidebar summary.filter-title,
.filters-panel summary.filter-title,
.filter-panel .filter-section > .filter-title,
.filter-sidebar .filter-group > .filter-title,
.filter-sidebar .filter-section > h6,
.filter-sidebar > h5 {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  margin: 0;
  padding: 11px 8px;
  border-radius: 10px;
  border: 2px solid transparent;
  color: #172a74;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
}

.filter-panel summary.filter-title::-webkit-details-marker,
.filter-sidebar summary.filter-title::-webkit-details-marker,
.filters-panel summary.filter-title::-webkit-details-marker {
  display: none;
}

.filter-panel summary.filter-title::before,
.filter-sidebar summary.filter-title::before,
.filters-panel summary.filter-title::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #111;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

details.filter-section[open] > summary.filter-title::before,
details.filter-group[open] > summary.filter-title::before {
  transform: rotate(90deg);
}

details.filter-section[open] > summary.filter-title,
details.filter-group[open] > summary.filter-title,
.filter-panel summary.filter-title:focus,
.filter-sidebar summary.filter-title:focus,
.filters-panel summary.filter-title:focus {
  border-color: #21a9af;
  outline: none;
}

.filter-panel details.filter-section > *:not(summary),
.filter-sidebar details.filter-section > *:not(summary),
.filter-sidebar details.filter-group > *:not(summary),
.filters-panel details.filter-section > *:not(summary) {
  padding: 4px 8px 12px;
}

.filter-panel .btn-apply,
.filter-sidebar .btn-apply,
.filters-panel .btn-apply,
.filter-panel button[type="submit"],
.filter-sidebar button[type="submit"] {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: #172a74;
  color: #fff !important;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: none;
}
.filter-panel .btn-apply:hover,
.filter-sidebar .btn-apply:hover,
.filters-panel .btn-apply:hover {
  background: #12225f;
  color: #fff !important;
}

@media (max-width: 991px) {
  .filter-panel,
  .filter-sidebar,
  .filters-panel {
    position: static;
  }
}
