.company-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.company-card {
  background-color: #fff;
  border: 1px solid#1c2756;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(30, 72, 179, 0.1);
  text-align: center;
  transition: transform 0.3s;
}

.company-card:hover {
  transform: translate(2px, -5px);
}

.company-logo {
  max-width: 280px;
  max-height: 126px;
  height: auto;
  padding-top: 10px;
}

.company-name {
  display: block;
  width: 100%;
  background: #1c2756;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  margin-top; 20px;
  padding: 20px;
}

.company-name a {
  color: white;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  width: 100%;
}

.company-name a:hover {
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  text-decoration: underline;
}

.text-main, .trl-label {
  color: #000;
  font-size: 0.75rem;
  margin-bottom: 10px;
  text-align: left;
  padding-left: 20px;
  padding-right: 20px;
}

.trl-label{
  font-weight: 700;
}

.water-issues, .target-markets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: left;
  margin-bottom: 10px;
  padding-left: 20px;
  padding-right: 20px;
}

.water-issue-label, .filter-label-waterIssues{
  color: #000;
  padding: 5px 10px;
  border-radius: 20px;
  background-color: #99d9fd;
  font-size: 0.6rem;
}

.target-markets-label, .filter-label-targetMarkets{
  color: #000;
  padding: 5px 10px;
  border-radius: 20px;
  background-color: #FFCA3F;
  font-size: 0.6rem;
}

.pill{
  color: #000;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.6rem;
}

.water-issues>.pill {
  background-color: #99d9fd;
}

.target-markets>.pill {
  background-color: #FFCA3F;
}

.target-markets li {
  font-size: 0.875rem;
  color: #555;
}

.company-link {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #00796b;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.company-link:hover {
  background-color: #004d40;
}

.filter-wrapper {
  border: 1px solid #1c2756;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 20px;
  position: relative;
}

.filter-label-container {
  position: absolute;
  top: -17px;
  left: 20px;
  background: #fff;
  padding: 0 10px;
}

.filter-label-text {
  color: #000;
  font-size: 1rem;
  font-weight: bold;
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  text-align: center;
}

option {
 padding: 5px;
}

#water-issue-filter, #target-market-filter, #trl-filter {
  padding: 10px;
  font-size: 0.6rem;
  border: 1px solid #1c2756;
  color: #000;
  border-radius: 5px;
  margin: 5px;
}

#water-issue-filter, #target-market-filter{
  width: 200px;
}

#trl-filter {
  width: 100px;
}

.active-filters {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-label {
  font-size: 0.5rem;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
}

.filter-label .remove-btn {
  background: none;
  border: none;
  color: #ff0000;
  font-size: 0.6rem;
  margin-left: 10px;
  cursor: pointer;
  padding: 0;
  font-family: Poppins,sans-serif;
}

.filter-label .remove-btn:hover {
  color: #b30000;
}

.clear-filters-btn {
  padding: 10px;
  background-color: #1c2756;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  width: 200px;
  margin-right: 0;
  margin-left: auto;
}

.clear-filters-btn:hover {
  background-color:rgba(30, 72, 179, 0.90);
}

@media (max-width: 600px) {
  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }


  .filter-container label,
  .filter-container select,
  .clear-filters-btn {
    margin-bottom: 10px;
    width: 100%;
    max-width: 300px;
    margin-right: auto;
    margin-left: auto;
  }

  .company-card {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .company-name {
    font-size: 0.75rem;
  }

  .pill {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  .company-link {
    padding: 8px 15px;
    font-size: 0.875rem;
  }

  #water-issue-filter, #target-market-filter, #trl-filter {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 10px;
  }

  #water-issue-filter, #target-market-filter {
    max-width: 300px;
  }

  #trl-filter {
    max-width: 240px;
  }

  .trl-label {
    text-align: left;
    padding-left: 0px;
  }
}