/* Sidebar */
.topics-filter-sidebar {
  width: 220px;
  padding: 2rem 1.5rem;
  background: #e9e9e1;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  position: sticky;
  margin-top: 15px;
  top: 100px;
  align-self: flex-start;
  font-family: 'Public Sans', sans-serif;
}

.topics-filter-sidebar h2 {
  font-size: 1.5rem;
  color: #f16363;
  margin-bottom: 1.5rem;
  text-align: left;
  border-bottom: 2px solid #ffd9a6;
  padding-bottom: 8px;
}

/* Dropdown container */
.filter-dropdown {
  position: relative; /* important for absolute positioning */
  width: 100%;
}

/* Dropdown button */
.dropdown-toggle {
  width: 100%;
  padding: 10px 15px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f5c686, #ffcc70, #ffd9a6);
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: #343a40;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.dropdown-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Dropdown arrow */
.dropdown-arrow {
  font-size: 0.9rem;
  color: #343a40;
  transition: transform 0.3s ease;
  transform: rotate(90deg);
}

.filter-dropdown.active .dropdown-arrow {
  transform: rotate(0deg);
}

/* Dropdown content (hidden by default) */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%; /* just below the button */
  left: 0;
  width: 100%;
  background: #fff5eb;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-top: 5px;
  padding: 10px;
  z-index: 10;
  max-height: 250px; /* scroll if too long */
  overflow-y: auto;
}

/* Show dropdown */
.filter-dropdown.active .dropdown-content {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Checkbox labels */
.dropdown-content label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.dropdown-content label:hover {
  background-color: rgba(241, 99, 99, 0.1);
}

.dropdown-content input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: #f16363;
}

/* Responsive: hide sidebar on small screens */
@media (max-width: 992px) {
  .topics-filter-sidebar {
    display: none;
  }
}

/* Flex layout with main content */
.home-container {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  align-items: flex-start; /* keeps sidebars aligned at top */
}

main {
  flex: 1;
  min-width: 0;
}
