#blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 30px 0;
  font-family: 'Arial', sans-serif;
}

.filter-toggle {
  display: none;
  background: #0078d4;
  color: white;
  border: none;
  padding: 10px 16px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  #blog-filter {
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
  }

  .filter-toggle {
    display: inline-block;
    margin-bottom: 12px;
  }

  #blog-filter.collapsed .filter-category {
    display: none !important;
  }

  #blog-filter.expanded .filter-category {
    display: block;
  }

  .filter-category {
    width: 100%;
    max-width: none;
    margin-bottom: 0 !important;
  }
}


.filter-category {
  flex: 1 1 200px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: rgb;
  transition: box-shadow 0.3s ease;
  @media (max-width: 768px) {
    flex: 0 0 auto;
  }
}

.filter-category.active .filter-list {
  display: block;
}

.filter-category:hover {
  box-shadow: 0 6px 12px rgba(234, 234, 234, 0.1);
}

.filter-title {
  cursor: pointer;
  font-weight: bold;
  position: relative;
  padding-right: 20px;
  background: #e8e8e8;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 14px;
  color: #333;
  border-bottom: 1px solid #eee;
  border-radius: 5px;
  padding-bottom: 6px;
  padding-left: 5px;
}

.filter-title::after {
  content: '▼';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
}

.filter-category.collapsed .filter-title::after {
  transform: translateY(-50%) rotate(-90deg);
}

.filter-list {
  display: block;
  margin-top: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.filter-category.collapsed .filter-list {
  display: none;
}

.filter-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.filter-list li:last-child {
  margin-bottom: 0;
}

.filter-list input[type="checkbox"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0078d4;
  border-radius: 4px;
  border: 1px solid #bbb;
  transition: border-color 0.2s ease;
}

.filter-list input[type="checkbox"]:hover {
  border-color: #0078d4;
}

.filter-list label {
  flex: 1;
  font-size: 14px;
  color: #555;
}
