/* ==========================================================================
   Homepage — directory layout (specialty sidebar + doctor grid).
   Scoped entirely under .page-home so the rest of the site is untouched.
   Palette sampled from the reference: teal header, sky pre-footer band,
   muted ink text, amber stars.
   ========================================================================== */

/* Colour tokens, header and footer live in teal.css (shared with the
   doctor profile); everything below is specific to the homepage. */


/* --------------------------------------------------------------- filter bar */
.nh-filter {
  background: #fff;
  border-bottom: 1px solid var(--nh-line);
  padding: 0.75rem 0;
}
.nh-filter__inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.nh-filter select {
  min-width: 168px;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--nh-line);
  border-radius: var(--nh-radius);
  background: #fff;
  color: var(--nh-ink-soft);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.nh-filter select:focus {
  outline: none;
  border-color: var(--nh-teal);
  box-shadow: 0 0 0 3px rgba(0, 191, 214, 0.15);
}
.nh-filter__search {
  position: relative;
  /* Grow into the leftover space instead of sitting at a fixed 280px with a
     dead gap between it and the selects. */
  flex: 1 1 260px;
  min-width: 200px;
  max-width: 100%;
}
.nh-filter__search input {
  width: 100%;
  padding: 0.5rem 2.4rem 0.5rem 0.9rem;
  border: 1px solid var(--nh-line);
  border-radius: var(--nh-radius);
  background: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--nh-ink);
}
.nh-filter__search input:focus {
  outline: none;
  border-color: var(--nh-teal);
  box-shadow: 0 0 0 3px rgba(0, 191, 214, 0.15);
}
.nh-filter__search button {
  position: absolute;
  inset-inline-start: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 0.25rem;
  color: var(--nh-ink-faint);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.nh-filter__search button:hover { color: var(--nh-teal-dark); }

/* ------------------------------------------------------------------ layout */
.nh-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  align-items: start;
  padding-block: 1.5rem 2.5rem;
}

/* --------------------------------------------------------------- sidebar */
.nh-sidebar h2 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nh-ink-faint);
  margin: 0 0 0.5rem;
  padding-inline-start: 0.85rem; /* line the heading up with the item text */
}
.nh-specialties {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nh-specialties a {
  display: block;
  position: relative;
  padding: 0.32rem 0.85rem;
  font-size: 0.83rem;
  color: var(--nh-ink-soft);
  line-height: 1.9;
  transition: color 0.15s;
}
.nh-specialties a::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; /* RTL: the right-hand edge, before the text */
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c3ced6;
  transform: translateY(-50%);
}
.nh-specialties a:hover { color: var(--nh-teal-dark); }
.nh-specialties a:hover::before { background: var(--nh-teal); }

/* ---------------------------------------------------------------- results */
.nh-results__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.nh-results__head h1 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--nh-ink);
}
.nh-results__head span {
  font-size: 0.8rem;
  color: var(--nh-ink-faint);
}

.nh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.nh-card {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid var(--nh-line);
  border-radius: var(--nh-radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nh-card:hover {
  border-color: #cfe3ec;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.nh-card__photo {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: var(--nh-radius);
  overflow: hidden;
  background: #eef2f5;
  display: grid;
  place-items: center;
  color: var(--nh-blue);
  font-weight: 700;
  font-size: 1.3rem;
}
.nh-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nh-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.nh-card__name {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--nh-blue);
  margin-bottom: 0.2rem;
}
.nh-card__name:hover { color: var(--nh-blue-deep); }
.nh-verified {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--nh-blue);
  color: #fff;
  font-size: 9px;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}
.nh-card__spec {
  font-size: 0.78rem;
  color: var(--nh-blue-deep);
  line-height: 1.9;
  margin-bottom: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nh-card__sub {
  font-size: 0.75rem;
  color: var(--nh-ink-soft);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nh-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--nh-ink-faint);
}
.nh-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--nh-ink-faint);
}
.nh-card__rating .stars .star { width: 11px; height: 11px; }
.nh-card__rating .stars .star.is-full,
.nh-card__rating .stars .star.is-half { background: var(--nh-star); }
.nh-card__rating.is-empty { color: #b9c3ca; }

.nh-more {
  display: block;
  margin: 1.4rem auto 0;
  width: fit-content;
  padding: 0.55rem 2rem;
  border: 1px solid var(--nh-line);
  border-radius: var(--nh-radius);
  color: var(--nh-blue);
  font-size: 0.85rem;
  font-weight: 600;
  background: #fff;
}
.nh-more:hover {
  border-color: var(--nh-teal);
  color: var(--nh-teal-dark);
}

.nh-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--nh-ink-faint);
  border: 1px dashed var(--nh-line);
  border-radius: var(--nh-radius);
}
.nh-empty strong { display: block; color: var(--nh-ink); margin-bottom: 0.3rem; }

/* --------------------------------------------------------- popular cities */
.nh-cities {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--nh-line);
  font-size: 0.76rem;
  line-height: 2.4;
  color: var(--nh-ink-faint);
}
.nh-cities__label { margin-inline-end: 0.4rem; }
.nh-cities a {
  color: var(--nh-ink-soft);
  margin-inline-end: 0.85rem;
  white-space: nowrap;
}
.nh-cities a:hover { color: var(--nh-teal-dark); }

/* -------------------------------------------------------------- pre-footer */
.nh-prefooter {
  background: var(--nh-sky);
  padding: 1.1rem 0;
}
.nh-prefooter__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}
.nh-prefooter__inner a {
  display: block;
  padding: 0.55rem 1rem;
  background: #fff;
  border: 1px solid #d8eef7;
  border-radius: 4px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--nh-ink-soft);
}
.nh-prefooter__inner a:hover {
  border-color: var(--nh-teal);
  color: var(--nh-teal-dark);
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .nh-layout { grid-template-columns: 1fr; gap: 1.25rem; }
  .nh-sidebar {
    order: 2;
    border-top: 1px solid var(--nh-line);
    padding-top: 1rem;
  }
  .nh-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .nh-specialties a {
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--nh-line);
    border-radius: 999px;
    font-size: 0.8rem;
  }
  .nh-specialties a::before { display: none; }
}
@media (max-width: 720px) {
  .nh-grid { grid-template-columns: 1fr; }
  .nh-filter__search { width: 100%; margin-inline-start: 0; }
  .nh-filter select { flex: 1 1 45%; min-width: 0; }
  .nh-prefooter__inner { grid-template-columns: 1fr; gap: 0.5rem; }
}
