.ptd {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .ptd {
    grid-template-columns: 1fr;
  }
}

.ptd__sidebarTitle {
  margin: 0 0 12px;
  font-weight: 700;
}
.ptd__locations {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ptd__locItem {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ptd__locRow {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.ptd__locBtn {
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  width: 100%;
  flex: 1 1 auto;
}
.ptd__locBtn.is-active {
  outline: 2px solid #0a7bdc;
  border-color: transparent;
}
.ptd__locLabel {
  display: block;
  line-height: 1.35;
  word-break: break-word;
}
.ptd__locToggle {
  width: 44px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ptd__locToggleIcon {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;
  transition: transform 0.18s ease;
}
.ptd__locToggle[aria-expanded="false"] .ptd__locToggleIcon {
  transform: rotate(-45deg);
  margin-top: 2px;
}
.ptd__locChildren {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid #e5e7eb;
  margin-left: 14px;
}
.ptd__locChildren[hidden] {
  display: none;
}

.ptd__title {
  margin: 0;
}

@media (max-width: 480px) {
  .ptd__title {
    font-size: 24px;
  }
}

.ptd__subtitle {
  margin: 8px 0 16px;
  color: #6b7280;
}

.ptd__topbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 10px 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.ptd__search {
  max-width: none;
  box-sizing: border-box;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
}

.ptd__filters {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  align-items: flex-start;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ptd__filterGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  flex: 1 1 0;
  min-width: 0;
}

.ptd__filterGroup--certs {
  min-width: 260px;
}

.ptd__filterTitle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #374151;
}

.ptd__certs,
.ptd__specs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  max-width: none;
}
.ptd__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.ptd__toggle input {
  appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  cursor: pointer;
}
.ptd__toggle input:after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.15s ease;
}
.ptd__toggle input:checked {
  background: #0a7bdc;
}
.ptd__toggle input:checked:after {
  left: 20px;
}

.ptd__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1024px) {
  .ptd__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .ptd__grid {
    grid-template-columns: 1fr;
  }
}

.ptd-card {
  background: #f5f7fb;
  border-radius: 14px;
  padding: 18px;
}
.ptd-card__header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.ptd-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #e5e7eb;
}
.ptd-card__avatar.is-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a7bdc, #074b86);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ptd-card__meta {
  flex: 1 1 auto;
  min-width: 0;
}
.ptd-card__name {
  font-weight: 700;
  font-size: 16px;
}
.ptd-card__badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.ptd-card__badgesGroup {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  align-items: center;
}

.ptd-card__badgesGroup + .ptd-card__badgesGroup {
  margin-left: 10px;
}

.ptd-card__badgesGroup--certs + .ptd-card__badgesGroup--specialties {
  padding-left: 12px;
  border-left: 1px solid rgba(0, 0, 0, 0.14);
}

.ptd-card__badgesGroup .ptd-badge:not(:first-child) {
  margin-left: -4px;
  border: 1px solid #fff;
}

.ptd-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ptd-badge--special {
  background: #6b7280;
}

.ptd-badge--mi,
.ptd-badge--mat-i,
.ptd-badge--mat-basic {
  background: #facc15;
}

.ptd-badge--mii,
.ptd-badge--mat-ii,
.ptd-badge--mat-advanced {
  background: #22c55e;
}

.ptd-badge--ri,
.ptd-badge--reformer-i {
  background: #3b82f6;
}

.ptd-badge--rii,
.ptd-badge--reformer-ii {
  background: #1e3a8a;
}

.ptd-badge--pilates-zwangerschap-clinic,
.ptd-badge--pilates-pregnancy-clinic {
  background: #fce7f3;
  color: #be185d;
}

.ptd-badge--pilates-back-care-clinic,
.ptd-badge--back-care-clinic {
  background: #fff7ed;
  color: #c2410c;
}

.ptd-card__btn {
  margin-left: auto;
  background: #0a7bdc;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-weight: 600;
}

.ptd-card__btn:hover {
  transform: translateY(-2px);
  color: #fff;
}

.ptd-card__spacer {
  height: 20px;
}

.ptd-card__details {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ptd-card__detailGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ptd-card__detailTitle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #374151;
}

.ptd-card__pillList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ptd-card__pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.ptd-card__pill--special {
  background: #e5e7eb;
}

.ptd-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.ptd-card__social {
  display: flex;
  gap: 10px;
}
.ptd-card__social a {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.ptd-card__location {
  font-size: 13px;
  opacity: 0.8;
  display: inline-flex;
  font-weight: 600;
}
.ptd-card__location svg {
  width: 20px;
}

.ptd-card__location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
}

.ptd-locationIcon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ptd-locationText {
  white-space: nowrap;
}

/* Flag */
.ptd-flag {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ptd-flag--nl {
  background-image: url("/wp-content/themes/jupiter-child/assets/flags/nl.svg");
}
.ptd-flag--be {
  background-image: url("/wp-content/themes/jupiter-child/assets/flags/be.svg");
}
.ptd-flag--lu {
  background-image: url("/wp-content/themes/jupiter-child/assets/flags/lu.svg");
}
.ptd-flag--de {
  background-image: url("/wp-content/themes/jupiter-child/assets/flags/de.svg");
}
.ptd-flag--fr {
  background-image: url("/wp-content/themes/jupiter-child/assets/flags/fr.svg");
}

.ptd__empty {
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.ptd__results {
  position: relative;
}

.ptd__results.is-loading {
  min-height: 180px;
}

.ptd__results.is-loading .ptd__grid,
.ptd__results.is-loading .ptd__empty {
  opacity: 0.4;
}

.ptd__results.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 3px solid #d1d5db;
  border-top-color: #0a7bdc;
  border-radius: 999px;
  animation: ptd-spin 0.8s linear infinite;
  z-index: 2;
}

@keyframes ptd-spin {
  to {
    transform: rotate(360deg);
  }
}

/* FORCE the directory to behave like a centered container */
body .ptd {
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 50px 24px 0 24px !important;
  /* min-height: 100vh; */
}

/* Sidebar spacing (Jupiter rows often have zero padding) */
body .ptd__sidebar {
  padding-top: 0 !important;
}

/* Make the topbar not “stretch to the edges” awkwardly */
body .ptd__topbar {
  justify-content: flex-start !important;
  gap: 24px !important;
}

/* Keep toggles grouped together; push them to the right but within the container */
body .ptd__certs {
  margin-left: auto !important;
  justify-content: flex-end !important;
}

/* IMPORTANT: collapse empty grid tracks (fixes the “two cards far apart” issue) */
body .ptd__grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)) !important;
  justify-items: stretch !important;
}
@media (max-width: 1024px) {
  body .ptd__grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  }
  .ptd-card__header {
    gap: 10px !important;
  }

  .ptd-card__badgesGroup .ptd-badge:not(:first-child) {
    margin-left: -5px !important;
  }

  .ptd-card__name {
    font-size: 12px !important;
  }

  .ptd-card__btn {
    font-size: 11px !important;
  }
}

/* Mobile filter button (hidden on desktop) */
.ptd__filterBtn {
  display: none; /* still hidden on desktop */
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  background: #0a7bdc;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  margin: 0 0 16px;
}

.ptd__filterBtn:hover {
  transform: translateY(-2px);
}

/* Overlay (mobile only) */
.ptd__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}

/* Sidebar header row */
.ptd__sidebarHeader {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ptd__closeBtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
}

/* Mobile behavior */
@media (max-width: 900px) {
  body .ptd {
    min-height: 0 !important;
  }
  .ptd {
    grid-template-columns: 1fr !important;
  }

  .ptd__filterBtn {
    display: inline-flex;
  }

  /* turn sidebar into a drawer */
  .ptd__sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 92vw);
    height: 100vh;
    overflow: auto;
    background: #fff;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    padding: 18px;
    border-left: 1px solid #e5e7eb;
  }

  .ptd__sidebarHeader {
    display: flex;
  }

  .ptd__filters {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
  }

  .ptd__filterGroup,
  .ptd__filterGroup--certs {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }

  body .ptd__certs {
    margin-left: 0 !important;
    justify-content: flex-start !important;
  }

  /* when open */
  body.ptd-filters-open .ptd__sidebar {
    transform: translateX(0);
  }
}

.trainer-banner {
  margin: 80px auto;
  max-width: 1280px;
  padding: 60px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.trainer-banner__inner {
  max-width: 900px;
  margin: 0 auto;
}

.trainer-banner h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.trainer-banner p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 28px;
}

.trainer-banner__btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  background: #0a7bdc;
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.trainer-banner__btn:hover {
  transform: translateY(-2px);
}
