/* ========== Explore zoekformulier (homepage & explore page) ========== */
.explore-search-form {
  background: #f1f1f1;
  border-radius: 6px;
  max-width: 100%;
  font-family: "Lato", sans-serif;
  font-weight: 400;
  color: grey;
  font-size: 14px;
  line-height: 1.4;
  margin: 20px 0;
  padding: 10px 15px;
}

.explore-search-title {
  margin: 0 0 8px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #444;
}

.explore-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.search-btn {
  background: #665f60;
  color: #fff;
  font-size: 0.8rem !important;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-btn:hover {
  background: #4b4445;
}

.advanced-search {
  font-size: 0.95rem;
  color: #000;
  text-decoration: underline;
  margin-left: auto;
}

/* ========== Explore layout (met sidebar) ========== */
.content-wrapper.with-sidebar {
  max-width: 100% !important;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: flex-start;
}

.explore-sidebar {
  flex: 0 0 275px;
  max-width: 275px;
  order: 0;
}

.explore-results {
  flex: 1;
  margin-left: 0;
}

.explore-results .post-grid {
  margin-left: 0;
}

.explore-filter-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #333;
}

.filter-group {
  margin-bottom: 15px;
}

.filter-heading {
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  display: block;
}

.filter-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #555;
}

/* ========== Dropdown styling (universeel) ========== */
.explore-select {
  padding: 8px 28px 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #333;
  background: #fff url("data:image/svg+xml;utf8,<svg fill='navy' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 8px center;
  background-size: 16px;
  appearance: none;
  cursor: pointer;
  width: auto;
  max-width: max-content;
  min-width: 120px;
  box-sizing: border-box;
}

.explore-sidebar .explore-select {
  width: 100%;
  background: #fff url("data:image/svg+xml;utf8,<svg fill='navy' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 8px center !important;
  background-size: 16px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* ========== Active Filters ========== */
.active-filters-container {
  margin-bottom: 20px;
  padding: 10px;
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.active-filter-pill {
  background-color: #e4e4e4;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 13px;
}

.active-filter-pill .remove-filter {
  text-decoration: none;
  color: #777;
  margin-left: 4px;
  font-weight: bold;
}

.clear-all-filters {
  margin-left: auto;
  font-size: 13px;
}

/* ========== Sidebar Expand/Collapse ========== */
.explore-sidebar .filter-group details { border-bottom: 1px solid #eee; }
.explore-sidebar .main-filter-heading {
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 15px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  border-top: 1px solid #ddd;
}
.explore-sidebar .main-filter-heading::-webkit-details-marker { display: none; }
.explore-sidebar .main-filter-heading::after {
  content: '▶';
  font-size: 0.6em;
  margin-left: 8px;
  transition: transform 0.2s ease-in-out;
}
.explore-sidebar details[open] > .main-filter-heading::after { transform: rotate(90deg); }
.explore-sidebar .filter-group summary.filter-heading {
  cursor: pointer;
  padding: 10px 0;
  list-style: none;
  display: flex;
  align-items: center;
  font-size: 15px;
}
.explore-sidebar .filter-group summary.filter-heading::-webkit-details-marker { display: none; }
.explore-sidebar .filter-group summary.filter-heading::after {
  content: '▶';
  font-size: 0.6em;
  margin-left: 8px;
  transition: transform 0.2s ease-in-out;
}
.explore-sidebar .filter-group details[open] > summary.filter-heading::after { transform: rotate(90deg); }
.explore-sidebar .main-filter-category > .filter-group {
  padding-left: 15px;
  border-left: 1px solid #f0f0f0;
}
.explore-sidebar > .main-filter-category:first-of-type > .main-filter-heading { border-top: none; }
.explore-sidebar .filter-options { padding: 0 0 10px 10px; }

/* ========== Search Input ========== */
.search-filter-group {
  position: relative;
  margin-bottom: 15px;
}
.search-filter-group input[type="search"] {
  width: 100%;
  padding: 8px;
  padding-right: 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.search-submit-btn {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 38px;
  background: transparent;
  border: none;
  border-left: 1px solid #eee;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-submit-btn:hover { color: #000; }
.search-filter-group input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ========== Responsive Filter Styles ========== */
.filter-controls { display: none; }
.close-filters-btn { display: none; }

@media (max-width: 992px) {
  .content-wrapper.with-sidebar { display: block; }
  .filter-controls { display: block; margin-bottom: 1.5rem; }
  #toggle-filters-btn {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
  }
  .explore-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 350px;
    max-width: 90%;
    height: 100%;
    background-color: #fff;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  .explore-sidebar.is-open { transform: translateX(0); }
  .filter-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
  }
  .filter-overlay-backdrop.is-open { display: block; }
  .close-filters-btn {
    display: block;
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
  }
}


/* Sidebar verborgen op mobiel */
.explore-sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  overflow-y: auto;
  transition: left 0.3s ease;
  z-index: 10001;
}

.explore-sidebar.is-open {
  left: 0;
}

.explore-sidebar-inner {
  padding: 20px;
}

/* Sluitknop */
.close-filters-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
}

/* Floating Filter-knop */
.filter-toggle-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #3498db;
  color: #fff;
  padding: 12px 18px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10002;
}

.filter-toggle-btn:hover {
  background: #2980b9;
}

/* Overlay backdrop */
.filter-overlay-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10000;
}

.filter-overlay-backdrop.is-open {
  display: block;
}

/* Desktop: sidebar altijd zichtbaar */
@media (min-width: 769px) {
  .explore-sidebar {
    position: static;
    width: 100%;
    height: auto;
    box-shadow: none;
    left: 0;
  }

  .close-filters-btn,
  .filter-toggle-btn,
  .filter-overlay-backdrop {
    display: none !important;
  }
}

/* Mobiel: knop tonen */
@media (max-width: 768px) {
  .filter-toggle-btn {
    display: block;
  }
}
