/* Directory: filters, result cards, and how-to-read copy. */

.page-main {
  overflow: clip;
}

.dir-hero {
  padding: calc(var(--header-h) + 56px) 0 36px;
  background: var(--cream);
}

.dir-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dir-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 1.1;
}

.dir-lead {
  width: min(100%, 40rem);
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 16.5px;
  line-height: 1.62;
}

.dir-filters {
  position: sticky;
  top: var(--header-h);
  z-index: 24;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 247, 243, 0.94);
  backdrop-filter: blur(16px);
}

.filter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(13rem, auto);
  gap: 12px 16px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span {
  font-size: 13px;
  color: var(--text-muted);
}

.field select,
.select-trigger {
  width: 100%;
  min-height: 48px;
  padding: 0 42px 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' viewBox='0 0 12 8'%3E%3Cpath stroke='%236a6a6a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m1.5 1.5 4.5 5 4.5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.field select:hover,
.select-trigger:hover {
  border-color: #d6d6d0;
}

.select-box {
  position: relative;
}

.select-box.is-open {
  z-index: 12;
}

.select-box.is-enhanced > select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.select-trigger::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 12px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' viewBox='0 0 12 8'%3E%3Cpath stroke='%236a6a6a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m1.5 1.5 4.5 5 4.5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(-50%);
  transition: transform 0.18s ease;
}

.select-box.is-open .select-trigger {
  border-color: #d6d6d0;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.04);
}

.select-box.is-open .select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 12;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.1);
}

.select-menu[hidden] {
  display: none;
}

.select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.select-option:hover,
.select-option.is-active {
  background: var(--cream);
}

.select-option.is-selected {
  background: var(--cream-deep);
  font-weight: 500;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 4px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

.dir-results {
  padding: 36px 0 72px;
  background: var(--cream);
}

.result-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.result-bar p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.biz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.biz-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 24px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.biz-card:hover {
  border-color: #d6d6d0;
}

.biz-meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
}

.biz-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.biz-card h2 a:hover {
  opacity: 0.62;
}

.biz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: auto;
}

.biz-address,
.biz-services {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.biz-services {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.biz-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.biz-tags li {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--cream-deep);
  font-size: 12px;
  color: var(--ink-soft);
}

.biz-card .btn-fill {
  align-self: flex-start;
}

.biz-more-phones {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.biz-more-phones a:hover {
  color: var(--ink);
}

.dir-empty {
  padding: 36px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--paper);
}

.dir-empty[hidden] {
  display: none;
}

.dir-empty strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.dir-empty p {
  margin: 0;
  color: var(--text-muted);
}

.dir-section {
  padding: 88px 0;
  background: var(--cream);
}

.dir-section.on-paper {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 560px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.section-head p {
  margin: 14px 0 0;
  color: var(--text-muted);
}

.read-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.read-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream);
}

.read-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.read-card p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.faq-list {
  width: min(100%, 760px);
  margin: 0 auto;
}

.faq-list details {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-strong);
}

.faq-list summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list details p {
  margin: 10px 0 0;
  color: var(--text-muted);
}

.dir-close {
  padding: 80px 0 96px;
  text-align: center;
  background: var(--cream);
}

.dir-close h2 {
  margin: 0 auto;
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 1.12;
}

.dir-close-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 26px;
}

@media (max-width: 800px) {
  .filter-fields,
  .biz-grid,
  .read-grid {
    grid-template-columns: 1fr;
  }

  .dir-hero {
    padding: calc(var(--header-h) + 36px) 0 28px;
  }

  .dir-section {
    padding: 64px 0;
  }

  .dir-close-actions {
    flex-direction: column;
    gap: 16px;
  }
}
