/* Doctors directory: reconstruction of references/doctors/01.png and 02.png.
   Breadcrumbs, specialty links and booking cards reuse catalog.css;
   shared surfaces, typography, portraits and focus states remain in site.css. */
.doctors-page .specialty-link[aria-current="true"] {
  color: var(--link-color);
}

.doctors-page .specialty-link[aria-current="true"] .specialty-arrow {
  opacity: 1;
}

.doctor-directory {
  margin-top: var(--space-16);
}

.doctor-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
  margin-bottom: var(--space-6);
}

.doctor-filter {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.doctor-filter select {
  width: 100%;
  max-width: var(--doctor-filter-width);
  min-width: 0;
  min-height: var(--field-min-height);
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-field);
  background-color: var(--surface-soft);
  color: var(--text-primary);
  font-size: var(--control-text-size);
  line-height: var(--control-text-line-height);
  cursor: pointer;
}

.doctor-filter .filter-submit {
  min-height: var(--field-min-height);
}

.js .doctor-filter .filter-submit {
  display: none;
}

.doctor-result-count {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--caption-size);
  line-height: var(--caption-line-height);
}

.doctor-result-count a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: var(--space-1);
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--space-8);
}

.doctor-grid .doctor-card {
  min-width: 0;
}

.doctor-grid .doctor-card img,
.doctor-grid .portrait-placeholder {
  height: var(--doctor-photo-height);
}

.doctor-grid .doctor-card h2,
.doctor-grid .doctor-card h3,
.doctor-grid .doctor-card p {
  overflow-wrap: anywhere;
}

.doctor-grid .doctor-card h2 {
  margin-bottom: var(--space-3);
  color: var(--doctor-name-color);
  font-size: var(--font-size-22);
  line-height: var(--line-height-22-22);
  letter-spacing: normal;
  transition: color var(--motion-fast) var(--motion-easing);
}

.doctor-grid .doctor-card > a:hover h2,
.doctor-grid .doctor-card > a:focus-visible h2 {
  color: var(--doctor-name-hover-color);
}

.high-contrast .doctor-grid .doctor-card > a:hover h2,
.high-contrast .doctor-grid .doctor-card > a:focus-visible h2 {
  color: var(--color-primary);
  text-decoration: underline;
}

.doctor-grid .doctor-card > .button {
  display: flex;
  width: 100%;
}

@media (max-width: 64rem) {
  .doctor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--space-6);
  }
}

@media (max-width: 48rem) {
  .doctor-directory {
    margin-top: var(--space-8);
  }

  .doctor-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .doctor-filter {
    width: 100%;
  }

  .doctor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doctor-grid .doctor-card h2 {
    margin-bottom: var(--space-1);
    font-size: var(--font-size-18);
    line-height: var(--line-height-18-28);
  }
}

@media (max-width: 32rem) {
  .doctor-grid {
    grid-template-columns: 1fr;
  }
}
