.results-section { padding: 48px 0 84px; }

.results-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 26px;
}

.results-heading h1 {
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.08;
  margin: 0;
}

.back-link {
  align-items: center;
  display: inline-flex;
  font-family: var(--heading);
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  padding: 7px 0;
}

.back-link svg {
  height: 17px;
  transform: rotate(180deg);
  width: 17px;
}

.mobile-filter-button {
  align-items: center;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 13px;
  color: white;
  display: none;
  font-family: var(--heading);
  font-size: 15px;
  font-weight: 700;
  justify-content: space-between;
  min-height: 52px;
  padding: 13px 16px;
  width: 100%;
}

.mobile-filter-button span {
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.filter-panel {
  align-items: end;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.filter-group {
  align-items: center;
  display: flex;
  gap: 10px;
}

.filter-group strong {
  flex: 0 0 auto;
  font-family: var(--heading);
  font-size: 14px;
  white-space: nowrap;
}

.filter-group select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #4d565c 50%) calc(100% - 18px) 50% / 5px 5px no-repeat,
    linear-gradient(135deg, #4d565c 50%, transparent 50%) calc(100% - 13px) 50% / 5px 5px no-repeat,
    white;
  border: 1px solid #bfc5c9;
  border-radius: 12px;
  color: var(--ink);
  min-height: 52px;
  min-width: 190px;
  outline: none;
  padding: 0 38px 0 14px;
}

.filter-group select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(226, 6, 19, .1);
}

.sort-group select { min-width: 170px; }

.results-count {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 21px 0 34px;
}

.results-count p {
  color: #58636a;
  font-size: 15px;
  margin: 0;
}

.results-count p strong { color: var(--ink); }

.clear-filters {
  background: transparent;
  border: 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  padding: 7px 0 7px 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.business-grid,
.professional-list {
  display: grid;
  gap: 14px;
}

.business-grid {
  align-items: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-card {
  background: white;
  border: 2px solid #c4c8cb;
}

.business-card {
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
}

.business-heading {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 64px minmax(0, 1fr);
  margin-bottom: 18px;
}

.business-heading h3,
.professional-name h3 {
  font-family: var(--heading);
  font-size: 20px;
  line-height: 1.18;
  margin: 0;
}

.business-heading p,
.professional-name p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  margin: 5px 0 0;
}

.profile-identity {
  align-items: center;
  background: var(--sky-soft);
  border: 1px solid #cee5f3;
  color: #285671;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--heading);
  font-weight: 700;
  justify-content: center;
  overflow: hidden;
}

.profile-identity.compact {
  border-radius: 14px;
  font-size: 18px;
  height: 64px;
  width: 64px;
}

.profile-identity.professional {
  border-radius: 50%;
  font-size: 22px;
  height: 92px;
  width: 92px;
}

.profile-identity img {
  height: 100%;
  object-fit: contain;
  padding: 6px;
  width: 100%;
}

.profile-identity.professional img {
  object-fit: cover;
  padding: 0;
}

.profile-contact {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.profile-contact a {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.category-tag {
  align-self: flex-start;
  background: #e8f6ec;
  border: 1px solid #c1e5ca;
  border-radius: 999px;
  color: #28623a;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 6px 9px;
  text-transform: uppercase;
}

.profile-location {
  align-items: flex-start;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  gap: 7px;
  line-height: 1.45;
  margin: 15px 0 12px;
}

.profile-location svg {
  color: var(--red);
  flex: 0 0 auto;
  height: 17px;
  margin-top: 2px;
  width: 17px;
}

.business-actions,
.professional-actions {
  display: grid;
  gap: 8px;
}

.business-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 4px;
}

.button {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-family: var(--heading);
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 43px;
  padding: 10px 12px;
  text-align: center;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.button.primary {
  background: var(--red);
  border: 1px solid var(--red);
  color: white;
}

.button.secondary {
  background: white;
  border: 1px solid #bcc3c7;
  color: var(--ink);
}

.professional-group {
  border-top: 1px solid #d7dbde;
  margin-top: 34px;
  padding-top: 44px;
}

.professional-card {
  border-radius: 22px;
  padding: 28px;
}

.professional-summary {
  align-items: start;
  display: grid;
  gap: 17px;
  grid-template-columns: 92px minmax(0, 1fr) 190px;
}

.professional-details { min-width: 0; }

.professional-details .profile-contact { margin: 13px 0 0; }
.professional-details .profile-location { margin-bottom: 0; }

.professional-description {
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  margin: 20px 0 0 109px;
  padding: 18px 30px 0 0;
}

.empty-state {
  background: white;
  border: 2px solid #c4c8cb;
  border-radius: 18px;
  padding: 36px;
  text-align: center;
}

.empty-state h2 {
  font-family: var(--heading);
  margin: 0 0 10px;
}

.empty-state p { margin: 0; }

.search-action-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #172128aa;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  overflow: auto;
  transition: opacity .18s ease, visibility .18s ease;
}

.search-action-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.search-action-dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 22px 24px;
  background: #fff;
  box-shadow: 0 24px 80px #12222d52;
}

.search-action-close {
  position: absolute;
  top: 9px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  background: #fff;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.search-action-modal-content h2 {
  margin: 0 42px 26px 0;
  font-size: 22px;
  line-height: 1.1;
}

.search-action-form {
  display: grid;
  gap: 16px;
}

.search-action-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.search-action-form input,
.search-action-form select,
.search-action-form textarea {
  width: 100%;
  border: 1px solid #aeb3b7;
  border-radius: 10px;
  padding: 12px 13px;
  background: #fff;
}

.search-action-form textarea {
  min-height: 120px;
  resize: vertical;
}

.search-action-form-row {
  display: grid;
  gap: 16px;
}

.search-action-terms {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.search-action-terms a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.search-action-actions,
.search-action-result-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-action-actions button,
.search-action-result-actions button {
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
}

.search-action-cancel {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: 9px 18px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.search-action-actions .primary-button,
.search-action-result-actions .primary-button {
  border-radius: 10px;
}

.search-action-cancel:hover {
  background: var(--ink);
  color: #fff;
}

.search-action-result {
  display: grid;
  gap: 18px;
  padding: 0 0 8px;
}

.search-action-result-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-action-result-heading h2 {
  margin: 0;
  font-size: clamp(25px, 5vw, 34px);
}

.search-action-result-mark {
  display: inline-flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e1f3e6;
  color: #176834;
  font-size: 28px;
  font-weight: 900;
}

.search-action-result--failure .search-action-result-mark {
  background: #fde2e2;
  color: #9d252b;
}

.search-action-result p {
  margin: 0;
  color: var(--ink-soft);
}

@media (min-width: 640px) {
  .search-action-dialog {
	padding: 20px 42px 30px;
  }

  .search-action-close {
	top: 11px;
	right: 18px;
  }

  .search-action-form-row {
	grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: hover) and (pointer: fine) {
  .button.primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
  }

  .button.secondary:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: white;
  }

  .profile-contact a:hover { color: #ff6670; }
}

@media (max-width: 1039px) {
  .business-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .professional-card { padding: 24px; }

  .professional-description {
    font-size: 15px;
    padding-right: 0;
  }
}

@media (max-width: 820px) {
  .results-section { padding: 34px 0 72px; }

  .mobile-filter-button { display: flex; }

  .filter-panel {
    display: none;
    margin-top: 10px;
  }

  .filter-panel.is-open {
    align-items: stretch;
    display: grid;
  }

  .filter-group {
    align-items: stretch;
    display: grid;
  }

  .filter-group select {
    min-width: 0;
    width: 100%;
  }

  .business-grid { grid-template-columns: 1fr; }

  .professional-summary {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .profile-identity.professional {
    height: 82px;
    width: 82px;
  }

  .professional-actions { grid-column: 1 / -1; }
  .professional-description { margin-left: 0; }
}

@media (max-width: 520px) {
  .results-heading { align-items: center; }
  .results-heading h1 { font-size: 32px; }
  .filter-panel { padding: 15px; }
  .results-count { margin-bottom: 26px; }
  .business-card { padding: 18px; }

  .business-heading {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .profile-identity.compact {
    height: 58px;
    width: 58px;
  }

  .business-heading h3,
  .professional-name h3 {
    font-size: 19px;
  }

  .profile-contact a,
  .profile-location {
    font-size: 13px;
  }

  .professional-card { padding: 18px; }

  .professional-summary {
    gap: 14px;
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .profile-identity.professional {
    height: 68px;
    width: 68px;
  }

  .professional-description { line-height: 1.58; }
}