/* Searchable public tentor directory */
.tentor-page-shell {
  max-width: 1280px;
  margin-inline: auto;
  padding-top: clamp(44px, 7vw, 84px);
}

.tentor-directory-header {
  margin-bottom: 28px;
}

.tentor-directory-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
}

.tentor-directory-heading h1 {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--ink);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.04;
}

.tentor-directory-heading p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.tentor-directory-heading > strong {
  flex: 0 0 auto;
  margin-bottom: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(13, 104, 251, 0.16);
  border-radius: 999px;
  background: var(--soft);
  color: var(--green-dark);
  font-family: var(--font-secondary);
  font-size: 15px;
}

.tentor-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(16, 42, 92, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(16, 42, 92, 0.06);
}

.tentor-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 270px);
  gap: 12px;
}

.tentor-search-field {
  position: relative;
  display: block;
}

.tentor-search-field svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.tentor-search-field input,
.tentor-subject-field select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(16, 42, 92, 0.14);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.tentor-search-field input {
  padding: 12px 16px 12px 48px;
}

.tentor-subject-field {
  position: relative;
  display: block;
}

.tentor-subject-field > span {
  position: absolute;
  z-index: 1;
  top: 7px;
  left: 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.tentor-subject-field select {
  appearance: auto;
  padding: 20px 40px 5px 13px;
  cursor: pointer;
}

.tentor-search-field input:focus,
.tentor-subject-field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(13, 104, 251, 0.1);
}

.tentor-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 3px;
  scrollbar-width: thin;
}

.tentor-filter-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(16, 42, 92, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: 700 13px/1.2 var(--font-primary);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.tentor-filter-chip:hover {
  border-color: rgba(13, 104, 251, 0.36);
  color: var(--green-dark);
}

.tentor-filter-chip.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.tentor-filter-chip:focus-visible,
.tentor-reset:focus-visible {
  outline: 3px solid rgba(254, 182, 0, 0.68);
  outline-offset: 2px;
}

.tentor-results-row {
  display: flex;
  min-height: 34px;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.tentor-results-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.tentor-reset {
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font: 700 13px var(--font-primary);
  cursor: pointer;
}

.tentor-directory-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.tentor-directory-grid .tentor-card {
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(16, 42, 92, 0.09);
  border-radius: 16px;
  box-shadow: 0 9px 26px rgba(16, 42, 92, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tentor-directory-grid .tentor-card:hover {
  border-color: rgba(13, 104, 251, 0.22);
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(16, 42, 92, 0.12);
}

.tentor-directory-grid .tentor-card .tentor-card-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center top;
}

.tentor-card-copy {
  min-height: 112px;
  padding: 16px;
}

.tentor-directory-grid .tentor-card h2 {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 11px;
  overflow: hidden;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tentor-directory-grid .tentor-card span {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green-dark);
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.tentor-card[hidden],
.tentor-empty-state[hidden],
.tentor-load-more[hidden],
.tentor-reset[hidden] {
  display: none;
}

.tentor-empty-state {
  padding: 64px 20px;
  border: 1px dashed rgba(16, 42, 92, 0.18);
  border-radius: 16px;
  background: rgba(238, 246, 255, 0.65);
  text-align: center;
}

.tentor-empty-state h2 {
  margin: 0 0 8px;
}

.tentor-empty-state p {
  margin: 0 0 20px;
  color: var(--muted);
}

.tentor-load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 32px;
}

.tentor-load-more {
  min-width: 220px;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .tentor-directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .tentor-directory-heading {
    display: block;
  }

  .tentor-directory-heading > strong {
    display: inline-flex;
    margin: 18px 0 0;
  }

  .tentor-search-row {
    grid-template-columns: 1fr;
  }

  .tentor-toolbar {
    margin-inline: -4px;
    padding: 14px;
    border-radius: 14px;
  }

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

  .tentor-card-copy {
    min-height: 101px;
    padding: 13px;
  }

  .tentor-directory-grid .tentor-card h2 {
    min-height: 40px;
    font-size: 17px;
  }

  .tentor-directory-grid .tentor-card span {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .tentor-directory-grid {
    grid-template-columns: 1fr;
  }
}
