.ddp-directory {
  --ddp-bg: #f5f7fb;
  --ddp-surface: #ffffff;
  --ddp-surface-soft: #f8fafc;
  --ddp-text: #163047;
  --ddp-muted: #5f7082;
  --ddp-border: #dbe4ee;
  --ddp-border-strong: #c5d3e2;
  --ddp-primary: #1766d1;
  --ddp-primary-dark: #0f4ea7;
  --ddp-accent: #139081;
  --ddp-accent-soft: #e7f7f4;
  --ddp-shadow: 0 18px 45px rgba(18, 48, 71, 0.08);
  background:
    radial-gradient(circle at top left, rgba(23, 102, 209, 0.08), transparent 32%),
    linear-gradient(180deg, #fbfcfe 0%, var(--ddp-bg) 100%);
  color: var(--ddp-text);
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding: 24px 0 44px;
  overflow-x: hidden;
}

.ddp-directory-shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

.ddp-directory h1,
.ddp-directory h2,
.ddp-directory h3,
.ddp-directory h4,
.ddp-directory h5,
.ddp-directory h6 {
  color: var(--ddp-text);
  letter-spacing: -0.02em;
}

.ddp-directory p {
  color: var(--ddp-muted);
}

.ddp-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--ddp-primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ddp-directory-hero,
.ddp-filters-card,
.ddp-results-panel,
.ddp-map-panel {
  background: var(--ddp-surface);
  border: 1px solid var(--ddp-border);
  border-radius: 24px;
  box-shadow: var(--ddp-shadow);
}

.ddp-directory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.95fr);
  gap: 28px;
  padding: 32px;
  margin-bottom: 24px;
  align-items: stretch;
}

.ddp-hero-copy h1 {
  margin: 14px 0 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
  font-weight: 900;
  max-width: 16ch;
}

.ddp-hero-copy p {
  margin: 0;
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.7;
}

.ddp-hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}

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

.ddp-stat-card,
.ddp-hero-note {
  background: var(--ddp-surface-soft);
  border: 1px solid var(--ddp-border);
  border-radius: 18px;
}

.ddp-stat-card {
  padding: 18px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.ddp-stat-value {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  font-weight: 900;
}

.ddp-stat-label {
  color: var(--ddp-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.ddp-hero-note {
  padding: 16px 18px;
  color: var(--ddp-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.ddp-filters-card {
  padding: 26px;
  margin-bottom: 24px;
}

.ddp-filters-head,
.ddp-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ddp-filters-head {
  margin-bottom: 22px;
}

.ddp-filters-head h2,
.ddp-panel-head h2 {
  margin: 12px 0 8px;
  font-size: 1.45rem;
  font-weight: 900;
}

.ddp-filters-head p,
.ddp-panel-head p {
  margin: 0;
  line-height: 1.6;
}

.ddp-clear-btn {
  border-radius: 999px !important;
  padding-inline: 18px !important;
  min-height: 42px;
  font-weight: 700 !important;
  border-color: var(--ddp-border-strong) !important;
  color: var(--ddp-text) !important;
}

.ddp-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ddp-filter-subgrid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.ddp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ddp-field-wide {
  min-width: 0;
}

.ddp-field-search {
  grid-column: span 2;
}

.ddp-field label {
  color: var(--ddp-text);
  font-size: 0.84rem;
  font-weight: 800;
}

.ddp-directory .form-control,
.ddp-directory .form-select {
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--ddp-border);
  background: #ffffff;
  color: var(--ddp-text);
  box-shadow: none !important;
  padding-inline: 14px;
}

.ddp-directory .form-control::placeholder {
  color: #8796a7;
}

.ddp-directory .form-control:focus,
.ddp-directory .form-select:focus {
  border-color: rgba(23, 102, 209, 0.45);
  box-shadow: 0 0 0 0.25rem rgba(23, 102, 209, 0.12) !important;
}

.ddp-alpha-strip,
.ddp-toggle-list,
.ddp-active-filters,
.ddp-badge-row,
.ddp-map-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ddp-alpha-btn,
.ddp-check,
.ddp-active-chip,
.ddp-active-note,
.ddp-badge,
.ddp-map-chip {
  border-radius: 999px;
}

.ddp-alpha-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ddp-border);
  background: var(--ddp-surface-soft);
  color: var(--ddp-muted);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ddp-alpha-btn:hover,
.ddp-alpha-btn.is-active {
  background: var(--ddp-text);
  border-color: var(--ddp-text);
  color: #ffffff;
}

.ddp-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--ddp-border);
  background: var(--ddp-surface-soft);
  color: var(--ddp-text);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ddp-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ddp-primary);
}

.ddp-check:focus-within {
  border-color: rgba(23, 102, 209, 0.45);
  box-shadow: 0 0 0 0.25rem rgba(23, 102, 209, 0.12);
}

.ddp-mobile-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.ddp-mobile-switch button {
  flex: 1;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--ddp-border);
  background: #ffffff;
  color: var(--ddp-muted);
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ddp-mobile-switch button.is-active {
  background: var(--ddp-text);
  border-color: var(--ddp-text);
  color: #ffffff;
}

.ddp-directory-body {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 0;
  margin: 0 !important;
  align-items: stretch;
  height: 100vh; /* or any fixed height you want */

}

.ddp-directory-body > .ddp-results-col,
.ddp-directory-body > .ddp-map-col {
  width: 100%;
  max-width: none;
  flex: none;
  padding: 0;
  min-width: 0;
}

.ddp-results-panel,
.ddp-map-panel {
  padding: 24px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ddp-map-panel {
  position: sticky;
  top: 24px;
}

.ddp-results-meta {
  min-width: 100px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f2f7fe;
  border: 1px solid #d8e6fb;
  text-align: center;
}

.ddp-results-count {
  display: block;
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 900;
}

.ddp-results-count-label {
  display: block;
  margin-top: 4px;
  color: var(--ddp-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ddp-active-filters {
  min-height: 18px;
  margin: 0;
}

.ddp-active-chip,
.ddp-active-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--ddp-border);
  background: var(--ddp-surface-soft);
  color: var(--ddp-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.ddp-active-chip strong {
  color: var(--ddp-text);
}

.ddp-results-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.ddp-results-wrap.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.ddp-results-wrap.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: ddp-loading-sheen 1.1s infinite linear;
  pointer-events: none;
}

.ddp-results-wrap::-webkit-scrollbar {
  width: 8px;
}

.ddp-results-wrap::-webkit-scrollbar-thumb {
  background: rgba(22, 48, 71, 0.15);
  border-radius: 999px;
}

.ddp-map-canvas {
  width: 100%;
  flex: 1;
  min-height: min(74vh, 820px);
  border: 1px solid var(--ddp-border);
  border-radius: 20px;
  overflow: hidden;
  background: #eef3f8;
}

.ddp-map-empty,
.ddp-noscript-note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 20px;
  color: var(--ddp-muted);
  text-align: center;
  font-weight: 600;
}

#ddp_results .ddp-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--ddp-border);
  box-shadow: 0 12px 28px rgba(18, 48, 71, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

#ddp_results .ddp-card:hover {
  transform: translateY(-2px);
  border-color: #cfe0f3;
  box-shadow: 0 18px 34px rgba(18, 48, 71, 0.08);
}

.ddp-card.ddp-active {
  border-color: rgba(23, 102, 209, 0.4) !important;
  box-shadow: 0 0 0 0.25rem rgba(23, 102, 209, 0.1), 0 18px 34px rgba(18, 48, 71, 0.08) !important;
}

#ddp_results .ddp-card-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  align-items: start;
}

#ddp_results .ddp-card-media {
  position: relative;
  width: 100%;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  overflow: hidden;
  border-radius: 16px;
  align-self: start;
  background:
    linear-gradient(135deg, rgba(23, 102, 209, 0.06), rgba(19, 144, 129, 0.08)),
    #eff4fa;
}

#ddp_results .ddp-card-media img,
#ddp_results .ddp-card-placeholder {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  object-fit: cover !important;
  object-position: center top !important;
  border-radius: inherit;
}

.ddp-card-placeholder {
  background:
    linear-gradient(135deg, rgba(23, 102, 209, 0.1), rgba(19, 144, 129, 0.14)),
    #eff4fa;
}

#ddp_results .ddp-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-self: start;
}

.ddp-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ddp-card-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--ddp-primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ddp-card-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.ddp-card-subtitle {
  margin: 8px 0 0;
  color: var(--ddp-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.ddp-card-stat {
  flex-shrink: 0;
  min-width: 92px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--ddp-accent-soft);
  border: 1px solid #cdeee8;
  text-align: center;
}

.ddp-card-stat-value {
  display: block;
  font-size: 1.15rem;
  line-height: 1.1;
  font-weight: 900;
}

.ddp-card-stat-label {
  display: block;
  margin-top: 4px;
  color: var(--ddp-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ddp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--ddp-border);
  background: var(--ddp-surface-soft);
  color: var(--ddp-text);
  font-size: 0.8rem;
  font-weight: 800;
}

.ddp-badge-accent {
  background: var(--ddp-accent-soft);
  border-color: #cdeee8;
  color: var(--ddp-accent);
}

.ddp-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ddp-detail {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--ddp-border);
  background: var(--ddp-surface-soft);
  min-width: 0;
}

.ddp-detail-label {
  display: block;
  margin-bottom: 5px;
  color: var(--ddp-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ddp-detail-value {
  display: block;
  color: var(--ddp-text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.ddp-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.ddp-directory .view-profile-btn,
.ddp-directory .ddp-action-btn,
.ddp-map-primary-btn,
.ddp-map-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.ddp-directory .view-profile-btn,
.ddp-map-primary-btn {
  background: var(--ddp-primary);
  border: 1px solid var(--ddp-primary);
  color: #ffffff;
}

.ddp-directory .view-profile-btn:hover,
.ddp-map-primary-btn:hover {
  background: var(--ddp-primary-dark);
  border-color: var(--ddp-primary-dark);
  color: #ffffff;
}

.ddp-directory .ddp-action-btn,
.ddp-map-secondary-btn {
  background: #ffffff;
  border: 1px solid var(--ddp-border-strong);
  color: var(--ddp-text);
}

.ddp-alpha-btn:focus-visible,
.ddp-mobile-switch button:focus-visible,
.ddp-directory .view-profile-btn:focus-visible,
.ddp-directory .ddp-action-btn:focus-visible,
.ddp-map-primary-btn:focus-visible,
.ddp-map-secondary-btn:focus-visible,
.ddp-clear-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(23, 102, 209, 0.18);
}

.ddp-empty-state {
  padding: 28px;
  border: 1px dashed var(--ddp-border-strong);
  border-radius: 20px;
  background: var(--ddp-surface-soft);
}

.ddp-empty-state h3 {
  margin: 12px 0 8px;
  font-size: 1.15rem;
  font-weight: 900;
}

.ddp-empty-state p {
  margin: 0;
  max-width: 56ch;
}

.ddp-map-card {
  max-width: 320px;
  color: var(--ddp-text);
}

.ddp-map-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ddp-map-card-photo-wrap {
  flex: 0 0 64px;
}

.ddp-map-card-photo-wrap img,
.ddp-map-card-photo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
}

.ddp-map-card-photo-placeholder {
  background:
    linear-gradient(135deg, rgba(23, 102, 209, 0.12), rgba(19, 144, 129, 0.16)),
    #eff4fa;
}

.ddp-map-card-main h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.ddp-map-card-main p {
  margin: 5px 0 0;
  color: var(--ddp-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.ddp-map-card-chips {
  margin-top: 12px;
}

.ddp-map-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  background: var(--ddp-surface-soft);
  border: 1px solid var(--ddp-border);
  color: var(--ddp-text);
  font-size: 0.76rem;
  font-weight: 800;
}

.ddp-map-card-details {
  margin-top: 12px;
  color: var(--ddp-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.ddp-map-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ddp-noscript-note {
  min-height: auto;
  margin-top: 16px;
  border: 1px solid var(--ddp-border);
  border-radius: 16px;
  background: var(--ddp-surface);
}

@keyframes ddp-loading-sheen {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 1399px) {
  .ddp-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ddp-directory-body {
    grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.3fr);
  }

  .ddp-filter-subgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1199px) {
  .ddp-directory-hero {
    grid-template-columns: 1fr;
  }

  .ddp-directory-body {
    grid-template-columns: 1fr;
  }

  .ddp-results-panel,
  .ddp-map-panel {
    min-height: auto;
  }

  .ddp-map-panel {
    position: static;
  }

  .ddp-results-wrap,
  .ddp-map-canvas {
    min-height: 62vh;
  }
}

@media (max-width: 991px) {
  .ddp-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #ddp_results .ddp-card-shell {
    grid-template-columns: 1fr;
  }

  #ddp_results .ddp-card-media {
    height: 240px;
    min-height: 240px;
    max-height: 240px;
  }

  .ddp-directory-body.is-map-view .ddp-results-col {
    display: none;
  }

  .ddp-directory-body:not(.is-map-view) .ddp-map-col {
    display: none;
  }
}

@media (max-width: 767px) {
  .ddp-directory {
    padding-top: 16px;
  }

  .ddp-directory-shell {
    width: 100%;
  }

  .ddp-directory-hero,
  .ddp-filters-card,
  .ddp-results-panel,
  .ddp-map-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .ddp-stat-grid,
  .ddp-filter-grid,
  .ddp-card-grid {
    grid-template-columns: 1fr;
  }

  .ddp-field-search {
    grid-column: auto;
  }

  .ddp-filters-head,
  .ddp-panel-head,
  .ddp-card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .ddp-results-meta,
  .ddp-card-stat {
    width: 100%;
  }

  .ddp-map-canvas {
    min-height: 52vh;
  }

  .ddp-card-actions,
  .ddp-map-card-actions {
    flex-direction: column;
  }

  .ddp-directory .view-profile-btn,
  .ddp-directory .ddp-action-btn,
  .ddp-map-primary-btn,
  .ddp-map-secondary-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ddp-alpha-btn,
  .ddp-check,
  .ddp-mobile-switch button,
  #ddp_results .ddp-card,
  .ddp-results-wrap.is-loading::after {
    animation: none !important;
    transition: none !important;
  }

  html:focus-within {
    scroll-behavior: auto;
  }
}
