.search_results {
  margin: 1rem 0 2.5rem;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-results-grid > li {
  min-width: 0;
}

.search-result-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid #e4e0da;
  border-radius: 0.5rem;
  background: #fff;
  color: #242424;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.search-result-card:hover {
  border-color: #41738b;
  background: #faf9f7;
}

.search-result-label {
  margin-bottom: 0.75rem;
  color: #41738b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-result-title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.search-result-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0 0 1.25rem;
  color: #606060;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.search-result-arrow {
  align-self: flex-end;
  margin-top: auto;
  color: #41738b;
  font-size: 1.5rem;
}

#headerSearchResults {
  width: 100%;
  white-space: normal;
}

#headerSearchResults:not(:empty) {
  margin-top: 0.5rem;
  border: 1px solid #e4e0da;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

#headerSearchResults .search-suggestions {
  max-height: min(50vh, 26rem);
  margin: 0;
  padding: 0.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

#headerSearchResults .search-suggestions > li {
  margin: 0;
  padding: 0;
}

#headerSearchResults .search-suggestions > li + li {
  border-top: 1px solid #efede9;
}

.search-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  padding: 0.75rem;
  border-radius: 0.3rem;
  color: #242424;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
}

.search-suggestion-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-suggestion-arrow {
  flex-shrink: 0;
  color: #41738b;
}

.search-suggestion:hover {
  background: #f3f0eb;
}

.search-result-card:focus-visible,
.search-suggestion:focus-visible {
  outline: 2px solid #41738b;
  outline-offset: -2px;
  background: #f3f0eb;
}

.search-results-empty {
  margin: 0;
  padding: 1.5rem;
  border-radius: 0.5rem;
  background: #f7f5f2;
  color: #606060;
  font-size: 1rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .search-results-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .search-result-card {
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-result-card {
    transition: none;
  }
}

.search-result-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.search-result-switcher > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.65rem 1rem;
  border: 1px solid #e4e0da;
  border-radius: 0.5rem;
  background: #fff;
  color: #242424;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.search-result-switcher > a:hover {
  border-color: #41738b;
  background: #f3f0eb;
}

.search-result-switcher > a[aria-current="page"] {
  border-color: #41738b;
  background: #41738b;
  color: #fff;
}

.search-result-switcher > a:focus-visible {
  outline: 2px solid #41738b;
  outline-offset: 3px;
}

.search-result-count {
  min-width: 1.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.07);
  text-align: center;
  font-size: 0.85rem;
}

.search-result-switcher > a[aria-current="page"] .search-result-count {
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
  .search-result-switcher > a {
    flex: 1 1 auto;
  }
}
