.company-directory {
  display: flex;
  gap: 20px;
  background-color: #f4f4f4;
  border: 1px solid #e5e5e5;
}

.company-filter {
  width: 25%;
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.company-filter p {
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 10px;
}

.company-filter p span {
  display: block;
  text-align: center;
}

.company-filter-section {
  margin-bottom: 20px;
  padding-top: 10px;
}

.company-filter-section p {
  font-weight: bold;
  font-size: 1em;
  margin-bottom: 20px !important;
}

.company-filter label {
  display: block;
  margin-bottom: 20px;
}

.company-filter button {
  padding: 10px 20px;
  margin-top: 5px;
  background-color: #e03c3f;
  color: #fff;
  border: 1px solid #e03c3f;
  cursor: pointer;
  font-size: 0.9em;
  width: 100%;
}

.company-filter button:hover {
  background-color: #ae080b;
}

button.show-more-filters {
  background-color: #f4f4f4;
  color: #000;
  border: 1px solid #e0d8b9;
  font-size: 0.9em;
}

button.show-more-filters:hover {
  background-color: #ae080b;
  color: #fff;
  border: 1px solid #ae080b;
  font-size: 0.9em;
}

.company-list {
  width: 75%;
  background-color: #f4f4f4;
  padding: 20px;
}

.company-item {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.company-name {
  margin: 0;
  font-size: 1em;
  color: #424844;
  margin-bottom: 10px;
  font-weight: 500;
}

.company-details {
  font-size: 0.9em;
  color: #424844;
}

.company-categories {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.category {
  background-color: #e0d8b9;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.9em;
  color: #424844;
}

.no-results {
  margin-top: 20px;
  font-weight: bold;
  color: #e22738;
}

/* Show only the top 5 filter options by default */
.company-filter-section .filter-option:nth-child(n+6) {
  display: none;
}

.company-filter-section.expanded .filter-option {
  display: block;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .company-directory {
    flex-direction: column;
  }

  .filter-toggle {
    display: block;
    background-color: #e03c3f;
    color: #fff;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
  }

  .company-filter {
    display: none;
    width: 100%;
  }

  .company-filter.visible {
    display: block;
  }

  .company-list {
    width: 100%;
  }

  .company-item {
    padding: 15px;
  }

  .company-name {
    font-size: 1.2em;
  }

  .company-details {
    font-size: 0.9em;
  }

  .company-categories {
    flex-direction: column;
    gap: 5px;
  }

  .category {
    font-size: 0.8em;
  }
}

/* Hide the filter toggle button on desktop view */
@media (min-width: 769px) {
  .filter-toggle {
    display: none;
  }
}