.tp-directory { background: var(--tp-bg); min-height: 70vh; padding: clamp(138px, 11vw, 174px) 0 clamp(68px, 8vw, 110px); }
.tp-directory__header { margin-bottom: 48px; max-width: 900px; }
.tp-directory__header .tp-display { font-size: clamp(46px, 6vw, 76px); }
.tp-directory__header .tp-lead { margin-top: 20px; }

.tp-directory__controls { margin: 0; }
.tp-search { align-items: center; background: #fff; border: 1px solid var(--tp-border); border-radius: var(--tp-radius-md); display: flex; max-width: none; padding: 0 22px; transition: border-color 180ms ease, box-shadow 180ms ease; }
.tp-search:focus-within { border-color: rgba(145,10,154,.5); box-shadow: 0 0 0 4px rgba(145,10,154,.08); }
.tp-search svg { fill: none; flex: 0 0 auto; height: 23px; stroke: var(--tp-purple); stroke-linecap: round; stroke-width: 1.7; width: 23px; }
.tp-search input { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; color: var(--tp-text) !important; font: inherit !important; font-size: 17px !important; height: 70px; outline: 0 !important; padding: 0 17px !important; width: 100%; }
.tp-search input::placeholder { color: #8a7e7a; opacity: 1; }

.tp-type-tabs { align-items: center; border-bottom: 1px solid var(--tp-border); display: flex; gap: 32px; margin-top: 28px; overflow-x: auto; scrollbar-width: none; }
.tp-type-tabs::-webkit-scrollbar { display: none; }
.tp-type-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--tp-muted); cursor: pointer; flex: 0 0 auto; font: inherit; font-size: 14px; font-weight: 700; margin: 0; padding: 0 1px 17px; }
.tp-type-tabs button:hover { color: var(--tp-text); }
.tp-type-tabs button.is-active { border-color: var(--tp-orange); color: var(--tp-purple); }
.tp-type-tabs button:focus-visible { outline: 3px solid rgba(145,10,154,.2); outline-offset: 4px; }

.tp-filter-panel { align-items: end; display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; }
.tp-filter-panel label > span { color: var(--tp-muted); display: block; font-size: 11px; font-weight: 700; letter-spacing: .09em; margin-bottom: 8px; text-transform: uppercase; }
.tp-filter-panel select,
.tp-sort select { appearance: none; background-color: #fff; background-image: linear-gradient(45deg, transparent 50%, var(--tp-muted) 50%), linear-gradient(135deg, var(--tp-muted) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 13px) calc(50% - 2px); background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; border: 1px solid var(--tp-border); border-radius: var(--tp-radius-sm); box-shadow: none; color: var(--tp-text); font: inherit; font-size: 14px; height: 52px; outline: 0; padding: 0 42px 0 16px; width: 100%; }
.tp-filter-panel select:focus,
.tp-sort select:focus { border-color: var(--tp-purple); box-shadow: 0 0 0 3px rgba(145,10,154,.08); }
.tp-filter-panel__mobile-head,
.tp-filter-apply,
.tp-filter-backdrop,
.tp-mobile-control-row { display: none; }

.tp-directory__summary { align-items: center; display: flex; justify-content: space-between; margin: 46px 0 24px; }
.tp-directory__summary p { color: var(--tp-muted); font-size: 14px; }
.tp-directory__summary strong { color: var(--tp-text); font-size: 16px; }
.tp-summary-actions { align-items: center; display: flex; gap: 22px; }
.tp-clear-filters { background: transparent; border: 0; color: var(--tp-purple); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.tp-sort { align-items: center; display: flex; gap: 8px; }
.tp-sort > span { color: var(--tp-muted); font-size: 13px; }
.tp-sort select { background-color: transparent; border: 0; height: 42px; min-width: 156px; padding-left: 2px; }
.tp-directory__status { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; width: 1px; }

.tp-professional-grid { display: grid; gap: 26px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tp-professional-card { background: var(--tp-surface); border-radius: var(--tp-radius-md); margin: 0; min-width: 0; overflow: hidden; padding: 1px; position: relative; }
.tp-professional-card::before { background: var(--tp-border); border-radius: inherit; content: ""; inset: 0; position: absolute; transition: background 250ms ease; }
.tp-professional-card:hover::before,
.tp-professional-card:focus-within::before { background: var(--tp-gradient); }
.tp-professional-card__link { background: var(--tp-surface); border-radius: calc(var(--tp-radius-md) - 1px); display: flex; flex-direction: column; height: 100%; overflow: hidden; position: relative; text-decoration: none !important; z-index: 1; }
.tp-professional-card__link:focus-visible { outline: 4px solid rgba(145,10,154,.28); outline-offset: -5px; }
.tp-professional-card__media { aspect-ratio: 1 / 1.04; background: #eee7df; overflow: hidden; position: relative; }
.tp-professional-card__media::after { background: linear-gradient(to top, rgba(28,24,32,.25), transparent 35%); content: ""; inset: 0; pointer-events: none; position: absolute; }
.tp-professional-card__media img { height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(.2,.7,.2,1); width: 100%; }
.tp-professional-card:hover .tp-professional-card__media img { transform: scale(1.035); }
.tp-professional-card__fallback { align-items: center; background: linear-gradient(145deg, var(--tp-purple-soft), var(--tp-orange-soft)); color: var(--tp-purple-deep); display: flex; font-family: Nunito, sans-serif; font-size: clamp(44px, 6vw, 68px); font-weight: 800; height: 100%; justify-content: center; letter-spacing: -.04em; width: 100%; }
.tp-professional-card .tp-license-badge { bottom: 16px; left: 16px; position: absolute; z-index: 2; }
.tp-professional-card__body { display: flex; flex: 1; flex-direction: column; padding: 24px 24px 23px; }
.tp-professional-card__body h3 { font-size: 25px; font-weight: 800; }
.tp-professional-card__title { color: var(--tp-muted); font-size: 14px; line-height: 1.45; margin-top: 6px !important; min-height: 41px; }
.tp-professional-card__specialties { color: var(--tp-text); font-size: 13px; line-height: 1.5; margin-top: 20px !important; }
.tp-professional-card__meta { color: var(--tp-muted); font-size: 12px; margin-top: 9px !important; }
.tp-professional-card__cta { align-items: center; border-top: 1px solid var(--tp-border); color: var(--tp-purple); display: flex; font-size: 13px; font-weight: 700; justify-content: space-between; margin-top: 24px; padding-top: 17px; }
.tp-professional-card__cta span { color: var(--tp-orange); font-size: 20px; transition: transform 180ms ease; }
.tp-professional-card:hover .tp-professional-card__cta span { transform: translateX(4px); }
.tp-professional-grid--featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tp-directory__pagination { display: flex; justify-content: center; padding-top: 44px; }
.tp-directory__pagination button { cursor: pointer; }
.tp-directory__pagination button[disabled] { cursor: wait; opacity: .55; }

.tp-card-skeleton { background: #fff; border: 1px solid var(--tp-border); border-radius: var(--tp-radius-md); overflow: hidden; }
.tp-card-skeleton > div { aspect-ratio: 1/1.04; background: #eee9e4; }
.tp-card-skeleton > span { background: #eee9e4; border-radius: 5px; display: block; height: 14px; margin: 14px 24px; overflow: hidden; position: relative; }
.tp-card-skeleton > span:nth-child(2) { height: 22px; margin-top: 24px; width: 54%; }
.tp-card-skeleton > span:nth-child(3) { width: 76%; }
.tp-card-skeleton > span:nth-child(4) { margin-bottom: 28px; width: 64%; }
.tp-card-skeleton > div::after,
.tp-card-skeleton > span::after { animation: tp-shimmer 1.3s infinite; background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent); content: ""; inset: 0; position: absolute; transform: translateX(-100%); }
.tp-card-skeleton > div { overflow: hidden; position: relative; }
@keyframes tp-shimmer { to { transform: translateX(100%); } }

.tp-directory-empty { align-items: center; background: #fff; border: 1px solid var(--tp-border); border-radius: var(--tp-radius-md); display: flex; flex-direction: column; grid-column: 1/-1; justify-content: center; min-height: 380px; padding: 42px; text-align: center; }
.tp-directory-empty__mark { color: var(--tp-orange); font-size: 52px; line-height: 1; }
.tp-directory-empty h2 { font-size: 31px; margin-top: 14px; }
.tp-directory-empty p { color: var(--tp-muted); margin: 12px 0 24px; max-width: 430px; }

@media (max-width: 960px) {
  .tp-professional-grid,
  .tp-professional-grid--featured { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .tp-directory { padding-top: 118px; }
  .tp-directory__header { margin-bottom: 34px; }
  .tp-search { border-radius: 17px; padding-inline: 15px; }
  .tp-search input { font-size: 15px !important; height: 58px; padding-right: 0 !important; }
  .tp-type-tabs { gap: 25px; margin-top: 22px; }
  .tp-mobile-control-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 20px; }
  .tp-filter-toggle,
  .tp-sort--mobile { align-items: center; background: #fff; border: 1px solid var(--tp-border); border-radius: 13px; color: var(--tp-text); display: flex; font: inherit; font-size: 13px; font-weight: 700; height: 48px; justify-content: center; }
  .tp-filter-toggle { cursor: pointer; gap: 5px; padding: 0 12px; }
  .tp-sort--mobile select { background-color: transparent; font-size: 13px; height: 46px; padding-left: 15px; width: 100%; }
  .tp-sort--desktop { display: none; }
  .tp-directory__summary { margin-top: 28px; }

  .tp-filter-panel { background: #fff; border-radius: 26px 26px 0 0; bottom: 0; display: flex; flex-direction: column; gap: 19px; left: 0; margin: 0; max-height: 82vh; overflow-y: auto; padding: 23px 20px calc(22px + env(safe-area-inset-bottom)); position: fixed; transform: translateY(105%); transition: transform 260ms cubic-bezier(.2,.8,.2,1); width: 100%; z-index: 100002; }
  .tp-filter-panel label { width: 100%; }
  .tp-filter-panel select { height: 54px; }
  .tp-filter-panel__mobile-head { align-items: center; display: flex; justify-content: space-between; width: 100%; }
  .tp-filter-panel__mobile-head h2 { font-size: 25px; }
  .tp-filter-panel__mobile-head button { background: #f4f0eb; border: 0; border-radius: 50%; color: var(--tp-text); cursor: pointer; font-size: 25px; height: 38px; line-height: 1; width: 38px; }
  .tp-filter-apply { background: var(--tp-gradient); border: 0; border-radius: 999px; color: #fff; display: block; font: inherit; font-size: 14px; font-weight: 700; min-height: 52px; width: 100%; }
  .tp-filter-backdrop { background: rgba(28,24,32,.48); bottom: 0; display: block; left: 0; opacity: 0; pointer-events: none; position: fixed; right: 0; top: 0; transition: opacity 220ms ease; z-index: 100001; }
  .tp-directory.is-filter-open .tp-filter-panel { transform: translateY(0); }
  .tp-directory.is-filter-open .tp-filter-backdrop { opacity: 1; pointer-events: auto; }
  body.tp-filter-lock { overflow: hidden; }

  .tp-professional-grid,
  .tp-professional-grid--featured { grid-template-columns: 1fr; }
  .tp-professional-card__media { aspect-ratio: 1 / .98; }
  .tp-professional-card__body { padding: 22px 20px; }
  .tp-professional-card__title { min-height: 0; }
  .tp-directory-empty { min-height: 330px; padding: 30px 22px; }
}
