/* Public specialists directory — editorial grid */

.sp-page {
  --sp-ink: var(--na-ink, #0c1222);
  --sp-muted: var(--na-muted, #64748b);
  --sp-line: rgba(15, 23, 42, 0.09);
  --sp-surface: #fff;
  --sp-page: #f7f5f1;
  --sp-teal: var(--na-teal, #0d9488);
  --sp-teal-dark: var(--na-teal-dark, #0f766e);
  --sp-serif: var(--na-serif, "Cormorant Garamond", Georgia, serif);
  --sp-sans: var(--na-font, "Plus Jakarta Sans", system-ui, sans-serif);
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
  font-family: var(--sp-sans);
  color: var(--sp-ink);
  isolation: isolate;
}

.sp-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 12% -5%, rgba(13, 148, 136, 0.09), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(180, 83, 9, 0.05), transparent 50%),
    linear-gradient(180deg, #faf8f3 0%, #f3f0ea 48%, #eef2f4 100%);
}

.sp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
  gap: 24px 40px;
  align-items: end;
  margin-bottom: 28px;
  padding: 28px 30px;
  border-radius: 22px;
  border: 1px solid var(--sp-line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 100%);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  position: relative;
}

.sp-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.14), transparent 70%);
  pointer-events: none;
}

.sp-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sp-teal-dark);
}

.sp-hero h1 {
  margin: 0 0 10px;
  font-family: var(--sp-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--sp-ink);
}

.sp-hero__lead {
  margin: 0;
  max-width: 48ch;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--sp-muted);
}

.sp-hero__aside {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.sp-stat {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--sp-line);
  background: rgba(255, 255, 255, 0.75);
}

.sp-stat__n {
  display: block;
  font-family: var(--sp-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--sp-teal-dark);
}

.sp-stat__l {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sp-muted);
}

.sp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.sp-filters--city {
  margin-bottom: 18px;
}

.sp-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sp-pill:hover {
  border-color: rgba(13, 148, 136, 0.35);
  color: var(--sp-teal-dark);
  transform: translateY(-1px);
}

.sp-pill.is-active {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #115e59;
}

.sp-pill--luxury.is-active {
  background: #fffbeb;
  border-color: rgba(180, 83, 9, 0.35);
  color: #92400e;
}

.sp-pill--city {
  font-weight: 600;
}

.sp-pill--city.is-active {
  background: #f0fdfa;
  border-color: #5eead4;
  color: #0f766e;
}

.sp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.sp-toolbar__count {
  margin: 0;
  font-size: 0.86rem;
  color: var(--sp-muted);
}

.sp-toolbar__count strong {
  color: var(--sp-ink);
  font-weight: 700;
}

.sp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.sp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 18px;
  border: 1px solid var(--sp-line);
  background: var(--sp-surface);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 148, 136, 0.28);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.sp-card--luxury:hover {
  border-color: rgba(180, 83, 9, 0.28);
  box-shadow: 0 18px 40px rgba(120, 53, 15, 0.1);
}

.sp-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
  min-height: 100%;
}

.sp-card__media {
  position: relative;
  aspect-ratio: 4 / 3.2;
  background:
    linear-gradient(160deg, #134e4a 0%, #0f766e 45%, #1c1917 100%);
  overflow: hidden;
}

.sp-card--plots .sp-card__media {
  background: linear-gradient(160deg, #57534e 0%, #78716c 50%, #44403c 100%);
}

.sp-card--villas .sp-card__media {
  background: linear-gradient(160deg, #115e59 0%, #0d9488 50%, #134e4a 100%);
}

.sp-card--apartments .sp-card__media {
  background: linear-gradient(160deg, #0f766e 0%, #334155 55%, #1e293b 100%);
}

.sp-card--luxury .sp-card__media {
  background: linear-gradient(160deg, #1c1917 0%, #44403c 48%, #92400e 100%);
}

.sp-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sp-card__initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--sp-serif);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 700;
  color: rgba(255, 253, 248, 0.92);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.sp-card__badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.sp-card--luxury .sp-card__badge {
  background: rgba(28, 25, 23, 0.88);
  color: #fde68a;
  border-color: rgba(253, 230, 138, 0.35);
}

.sp-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 16px 16px 18px;
}

.sp-card__name {
  margin: 0;
  font-family: var(--sp-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--sp-ink);
  overflow-wrap: anywhere;
}

.sp-card__company {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sp-teal-dark);
}

.sp-card--luxury .sp-card__company {
  color: #92400e;
}

.sp-card__city {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.sp-card__city i {
  color: var(--sp-teal);
  font-size: 0.7rem;
}

.sp-card__tag {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--sp-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
}

.sp-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sp-card__meta i {
  font-size: 0.68rem;
  color: var(--sp-teal-dark);
  opacity: 0.85;
}

.sp-card--luxury .sp-card__meta i {
  color: #b45309;
}

.sp-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sp-teal-dark);
}

.sp-card--luxury .sp-card__cta {
  color: #92400e;
}

.sp-card:hover .sp-card__cta {
  gap: 10px;
}

.sp-empty {
  padding: 48px 28px;
  border-radius: 18px;
  border: 1px dashed #cbd5e1;
  background: rgba(255, 255, 255, 0.7);
  color: var(--sp-muted);
  text-align: center;
}

.sp-empty a {
  color: var(--sp-teal-dark);
  font-weight: 700;
}

@media (max-width: 980px) {
  .sp-hero {
    grid-template-columns: 1fr;
  }

  .sp-hero__aside {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 720px) {
  .sp-hero {
    padding: 22px 18px;
  }

  .sp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .sp-page {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .sp-grid {
    grid-template-columns: 1fr;
  }

  .sp-hero__aside {
    grid-template-columns: 1fr;
  }
}
