/* ===========================
   Layout
   =========================== */
#portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: flex-start;
  width: 100%;
  align-items: flex-start;
  margin-left: 30px !important;
}

.filter-column {
  flex: 1 1 100%;
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .filter-column {
    flex: 1 1 calc(33.33% - 20px);
    max-width: calc(33.33% - 20px);
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-right: 30px;
}

.filter-headline {
  font-family: "Aptos Regular" !important;
  font-size: 26px !important;
  display: block;
  margin-bottom: 10px;
}

/* Buttons container */
#portfolio-filters .grve-filter-group .grve-filter-buttons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px;
}

/* Force a dedicated line for "Alle" above the pills */
#portfolio-filters .grve-filter-group .grve-filter-buttons > .filter-alle-row {
  order: -1 !important;               /* comes before all pills */
  flex: 0 0 100% !important;          /* take a full row */
  width: 100% !important;
  display: block !important;
  margin-bottom: 8px;
  padding-left: 0;
}

/* ===========================
   Pills (normal term buttons)
   =========================== */
.filter-btn {
  background: #f3f3f3;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 5px 15px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: "Aptos Regular";
  font-size: 18px;
}

.filter-btn.active,
.filter-btn:hover {
  background: #325fa5;
  color: #fff;
}

/* Disabled (non-combinable) terms */
.filter-btn.disabled {
  opacity: 0.2;
  pointer-events: none;
  filter: grayscale(0.6);
}

/* ===========================
   "Alle" (text-only)
   =========================== */
.filter-alle-row .filter-btn.is-all {
  background: none !important;
  border: none;
  padding: 0;
  font-size: 18px;
  font-family: "Aptos Regular";
  margin-left: 0;                     /* align left */
}

/* Disabled by default: grey, unclickable, not faded */
.filter-btn.is-all.disabled {
  color: #999 !important;
  cursor: default;
  pointer-events: none;
  opacity: 1 !important;              /* override generic disabled */
  filter: none !important;            /* override generic disabled */
  font-weight: 400;
}

/* Enabled when that taxonomy has any selection: blue + bold */
.filter-btn.is-all:not(.disabled) {
  color: #325fa5 !important;
  cursor: pointer;
  font-weight: 700;                   /* bold when enabled */
}

/* Keep hover clean for "Alle" */
.filter-btn.is-all:hover { background: none !important; }
.filter-btn.is-all.disabled:hover { color: #999 !important; }
.filter-btn.is-all:not(.disabled):hover { color: #325fa5 !important; }

/* ===========================
   Toggle & global reset
   =========================== */
#filter-toggle-btn {
  color: #000;
  background-color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  font-family: "Aptos Regular";
  margin-bottom: 30px !important;
  margin-left: 15px !important;
}
#filter-toggle-btn:hover { color: #117acb; }

#filter-reset-btn { background: #d9d9d9; }
#filter-reset-btn:hover { background: #325fa5; color: #fff; }

/* Keep the global reset hidden (optional) */
.filter-reset-wrapper { display: none; }

/* ===========================
   Theme integration
   =========================== */
/* Hide Impeka infinite pagination when filters are active */
body.filters-active .grve-infinite-pagination,
body.filters-active .grve-infinite-button-wrapper,
body.filters-active .grve-infinite-button {
  display: none !important;
}
