.custom-categories-wrapper .no-results-message {
  display: flex;
  justify-content: center;
  grid-column: 2 / 3;
  min-height: 300px;
  text-align: center;
  font-size: 20px;
  color: #7a5a00;
  font-weight: 600;
  margin: 0 auto 80px auto;
  padding: 40px 0 40px 0;
  width: 100%;
}

.custom-categories-wrapper,
.custom-categories-wrapper * {
  box-sizing: border-box;
  font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;
  color: #000;
}

.custom-categories-wrapper .elegant-icon-arrow-right::before {
  font-family: 'ElegantIcons';
  content: '\35';
  font-style: normal;
  font-weight: normal;
  display: inline-block;
  text-decoration: inherit;
  width: 1em;
  margin-right: 0.3em;
  vertical-align: middle;
}

.custom-categories-wrapper .elegant-icon-presence::before {
  font-family: 'ElegantIcons';
  content: '\e0e9';
  font-style: normal;
  font-weight: normal;
  display: inline-block;
  width: 1em;
  vertical-align: middle;
}

.custom-categories-wrapper .elegant-icon-online::before {
  font-family: 'ElegantIcons';
  content: '\e00d';
  font-style: normal;
  font-weight: normal;
  display: inline-block;
  width: 1em;
  vertical-align: middle;
}

/* ==========================================================================
   Themenfinder search mask – design "N2 Weiß"
   Layout/styling only. All IDs and classes used by categories.js are kept:
   #searchInput, #searchButton, #*Multiselect, #*Button, #*Content,
   .multiselect-dropdown, .multiselect-label, .open
   ========================================================================== */

.custom-categories-wrapper .search-filter-section {
  --tf-line: #E3E3E3;
  --tf-fill: #F4F4F4;
  --tf-fill-hover: #E6E6E6;
  --tf-muted: #555555;
  --tf-placeholder: #6B6B6B;
  --tf-accent: #FBB000;
  width: 100%;
  max-width: 1050px;
  margin: 0 auto 80px auto;
  padding: 52px 56px 44px;
  background: #FFFFFF;
  border: 1.5px solid var(--tf-line);
  border-radius: 32px;
}

.custom-categories-wrapper .search-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

/* reset Divi paragraph/heading spacing inside the mask */
.custom-categories-wrapper .search-filter-section p,
.custom-categories-wrapper .search-filter-section h2 {
  margin: 0;
  padding: 0;
}

/* --- head ---------------------------------------------------------------- */
.custom-categories-wrapper .tf-head {
  margin-bottom: 6px;
}

.custom-categories-wrapper .search-filter-section .tf-kicker {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--tf-muted);
}

.custom-categories-wrapper .search-filter-section .tf-title {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 900;
  color: #000;
}

.custom-categories-wrapper .search-filter-section .tf-sub {
  margin-top: 8px;
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.5;
  color: var(--tf-muted);
}

/* --- field labels -------------------------------------------------------- */
.custom-categories-wrapper .search-filter-section .field-heading {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 900;
  color: #000;
}

/* --- search input -------------------------------------------------------- */
.custom-categories-wrapper .search-field-wrapper {
  width: 100%;
}

.custom-categories-wrapper .search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.custom-categories-wrapper .search-input-icon {
  position: absolute;
  left: 18px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #000;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.custom-categories-wrapper .search-input {
  width: 100%;
  height: 60px;
  margin: 0;
  padding: 0 16px 0 52px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--tf-fill);
  box-shadow: none;
  font-size: 18px;
  font-weight: 400;
  color: #000;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s;
}

.custom-categories-wrapper .search-input::placeholder {
  color: #707070;
  opacity: 1;
}

.custom-categories-wrapper .search-input:hover {
  border-color: #000;
}

.custom-categories-wrapper .search-input:focus-visible {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}

/* --- 2 x 2 grid ---------------------------------------------------------- */
.custom-categories-wrapper .filter-dropdowns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  width: 100%;
}

.custom-categories-wrapper .dropdown-wrapper {
  position: relative;
  min-width: 0;
}

.custom-categories-wrapper .multiselect-dropdown {
  position: relative;
  width: 100%;
}

/* --- dropdown trigger ---------------------------------------------------- */
.custom-categories-wrapper .multiselect-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 14px 0 16px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--tf-fill);
  box-shadow: none;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s;
}

.custom-categories-wrapper .multiselect-button:hover,
.custom-categories-wrapper .multiselect-dropdown.open .multiselect-button {
  border-color: #000;
  background: var(--tf-fill);
}

.custom-categories-wrapper .multiselect-button:focus {
  outline: none;
}

.custom-categories-wrapper .multiselect-button:focus-visible {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}

.custom-categories-wrapper .multiselect-button.selected {
  background: var(--tf-fill);
}

.custom-categories-wrapper .multiselect-label,
.custom-categories-wrapper .multiselect-label.is-placeholder {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 400;
  color: var(--tf-placeholder);
}

.custom-categories-wrapper .multiselect-label.is-selected {
  color: #000;
  font-weight: 900;
}

.custom-categories-wrapper .multiselect-arrow {
  display: inline-flex;
  color: #000;
  transition: transform .15s ease;
}

.custom-categories-wrapper .multiselect-arrow svg {
  display: block;
}

.custom-categories-wrapper .multiselect-dropdown.open .multiselect-arrow {
  transform: rotate(180deg);
}

/* --- dropdown panel ------------------------------------------------------ */
.custom-categories-wrapper .multiselect-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  z-index: 1000;
  display: none;
  width: min(420px, calc(100vw - 32px));
  min-width: 100%;
  max-height: 360px;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
}

/* panels in the right column open towards the left */
.custom-categories-wrapper .filter-dropdowns > .dropdown-wrapper:nth-child(even) .multiselect-content {
  left: auto;
  right: 0;
}

.custom-categories-wrapper .multiselect-dropdown.open .multiselect-content {
  display: block;
}

.custom-categories-wrapper .multiselect-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .15s ease;
}

.custom-categories-wrapper .multiselect-option:hover {
  background: var(--tf-fill);
}

/* visually hidden but still focusable checkbox (keyboard support) */
.custom-categories-wrapper .multiselect-option input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.custom-categories-wrapper .checkbox-custom {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1.5px solid #8A8A8A;
  border-radius: 4px;
  background: #FFFFFF;
  transition: background-color .15s, border-color .15s;
}

.custom-categories-wrapper .multiselect-option input[type="checkbox"]:checked + .checkbox-custom {
  background: #000;
  border-color: #000;
}

.custom-categories-wrapper .multiselect-option input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-categories-wrapper .multiselect-option input[type="checkbox"]:focus-visible + .checkbox-custom {
  outline: 3px solid #000;
  outline-offset: 2px;
}

.custom-categories-wrapper .option-label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  white-space: normal;
}

/* --- Format & Veranstaltungsart: segmented toggles ------------------------
   The (hidden) trigger button stays in the DOM because categories.js only
   attaches the checkbox listeners when it exists. */
.custom-categories-wrapper .tf-segment .multiselect-button {
  display: none;
}

.custom-categories-wrapper .tf-segment .multiselect-content,
.custom-categories-wrapper .filter-dropdowns > .tf-segment:nth-child(even) .multiselect-content {
  position: static;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  padding: 4px;
  overflow: visible;
  background: var(--tf-fill);
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}

.custom-categories-wrapper .tf-segment .multiselect-option {
  padding: 0;
  border-radius: 10px;
}

.custom-categories-wrapper .tf-segment .multiselect-option:hover {
  background: transparent;
}

.custom-categories-wrapper .tf-segment .checkbox-custom {
  display: none;
}

.custom-categories-wrapper .tf-segment .option-label {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  color: #000;
  transition: background-color .15s, color .15s;
}

.custom-categories-wrapper .tf-segment .multiselect-option:hover .option-label {
  background: var(--tf-fill-hover);
}

.custom-categories-wrapper .tf-segment input[type="checkbox"]:checked ~ .option-label {
  background: #000;
  color: #FFFFFF;
}

.custom-categories-wrapper .tf-segment input[type="checkbox"]:focus-visible ~ .option-label {
  outline: 3px solid #000;
  outline-offset: 2px;
}

/* --- footer & search button --------------------------------------------- */
.custom-categories-wrapper .search-button-wrapper {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--tf-line);
}

.custom-categories-wrapper .search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  margin: 0;
  padding: 12px 22px 12px 28px;
  border: 0;
  border-radius: 18px;
  background: var(--tf-accent);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.custom-categories-wrapper .search-button,
.custom-categories-wrapper .search-button svg {
  color: #070707;
}

.custom-categories-wrapper .search-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.custom-categories-wrapper .search-button:hover {
  background: #000;
}

.custom-categories-wrapper .search-button:hover,
.custom-categories-wrapper .search-button:hover svg {
  color: #FFFFFF;
}

/* Set the stroke explicitly: theme/Divi rules can override `currentColor` on the icon. */
.custom-categories-wrapper .search-button svg path {
  stroke: #070707 !important;
  transition: stroke .15s;
}

.custom-categories-wrapper .search-button:hover svg path,
.custom-categories-wrapper .search-button:focus-visible svg path {
  stroke: #FFFFFF !important;
}

.custom-categories-wrapper .search-button:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}

/* --- responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .custom-categories-wrapper .filter-dropdowns {
    grid-template-columns: 1fr;
  }

  .custom-categories-wrapper .filter-dropdowns > .dropdown-wrapper:nth-child(even) .multiselect-content {
    left: 0;
    right: auto;
  }
}

@media (max-width: 720px) {
  .custom-categories-wrapper .search-filter-section {
    margin-bottom: 40px;
    padding: 36px 20px 24px;
    border-radius: 24px;
  }

  .custom-categories-wrapper .search-filter-section .tf-title {
    font-size: 26px;
  }

  .custom-categories-wrapper .search-filter-section .tf-sub {
    font-size: 15px;
  }

  .custom-categories-wrapper .search-input {
    height: 54px;
    font-size: 16px;
  }

  .custom-categories-wrapper .tf-segment .multiselect-content,
  .custom-categories-wrapper .filter-dropdowns > .tf-segment:nth-child(even) .multiselect-content {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .custom-categories-wrapper .tf-segment .multiselect-content::-webkit-scrollbar {
    display: none;
  }

  .custom-categories-wrapper .tf-segment .multiselect-option {
    flex: none;
  }

  .custom-categories-wrapper .search-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-categories-wrapper .search-filter-section * {
    transition: none !important;
  }
}

/* Results Section */
.custom-categories-wrapper .results-section {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* No fixed min-height: the section shrinks to the actual number of results. */
.custom-categories-wrapper .results-wrapper {
  overflow-y: auto;
}

.custom-categories-wrapper .result_column {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 40px;
  margin: 0;
}

/* Card Styles */
.custom-categories-wrapper .card {
  background: #eee;
  border-radius: 8px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: block;
  position: relative;
  font-size: 16px;
}

.custom-categories-wrapper .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.custom-categories-wrapper .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.custom-categories-wrapper .card-category-static {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 14px;
}

.custom-categories-wrapper .category-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.custom-categories-wrapper .card-icons {
  display: flex;
  gap: 8px;
  color: #666;
}

.custom-categories-wrapper .card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
  color: #333;
  width: 90%;
}

.custom-categories-wrapper .card-link {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: #FBB000;
  font-size: 16px;
}

/* Pagination */
.custom-categories-wrapper .pagination-outer {
  width: 100%;
  display: flex;
  justify-content: center;
}

.custom-categories-wrapper .pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  margin-top: 40px;
}

.custom-categories-wrapper .pagination-btn {
  padding: 12px 16px;
  background-color: white;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-categories-wrapper .pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #FBB000;
  color: #000;
}

.custom-categories-wrapper .pagination-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(251, 176, 0, 0.3);
}

.custom-categories-wrapper .pagination-btn:active {
  transform: scale(0.98);
}

.custom-categories-wrapper .pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f8f9fa;
}

.custom-categories-wrapper .pagination-btn.page-number {
  background-color: white;
  border: 2px solid #e1e1e1;
  color: #666;
}

.custom-categories-wrapper .pagination-btn.page-number:hover {
  background-color: #f8f9fa;
  border-color: #FBB000;
  color: #000;
}

.custom-categories-wrapper .pagination-btn.page-number.active {
  background-color: #FBB000;
  border-color: #FBB000;
  color: #000;
  font-weight: 600;
}

.custom-categories-wrapper #paginationInfo {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

/* Responsive Design */
@media (max-width: 1200px) {

  .custom-categories-wrapper .result_column {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .custom-categories-wrapper .result_column {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Discount Badge Styling */
.custom-categories-wrapper .card-discount-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #FFD77D;
  width: fit-content;
  border-radius: 6px;
  font-weight: 700;
  margin-top: 6px;
  box-shadow: 0 2px 6px rgba(255, 215, 125, 0.3);
}

.custom-categories-wrapper .card-discount-badge .discount-percent {
  font-size: 1.2rem;
  font-weight: 900;
  color: #000;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-image: url('https://campus-ew.de/wp-content/uploads/2025/12/Rabatt_Orange.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 50%;
  flex-shrink: 0;
}

.custom-categories-wrapper .card-discount-badge .discount-percent::before {
  content: '';
}

.custom-categories-wrapper .card-discount-badge .discount-amount {
  font-size: 0.85rem;
  color: #AA2E49;
  font-weight: 700;
  white-space: nowrap;
}

.custom-categories-wrapper.filters-hidden .search-filter-section {
  display: none !important;
}
.custom-categories-wrapper .elegant-icon-elearning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  margin-left: 4px;
}
