/* Wealth Experts Member Directory */

.wed-directory [hidden],
.wed-directory [hidden=''] {
  display: none !important;
}

.wed-directory {
  --wed-red: #c20000;
  --wed-red-dark: #a00000;
  --wed-navy: #1a2744;
  --wed-muted: #6b7280;
  --wed-line: #e5e7eb;
  --wed-bg: #f7f8fa;
  --wed-radius: 999px;
  font-family: "Outfit", sans-serif;
  color: var(--wed-navy);
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px 48px;
  box-sizing: border-box;
}

.wed-directory *,
.wed-directory *::before,
.wed-directory *::after {
  box-sizing: border-box;
}

.wed-directory__intro {
  text-align: center;
  margin-bottom: 28px;
  animation: wedFadeUp 0.55s ease both;
}

.wed-directory__icon {
  display: inline-flex;
  margin-bottom: 8px;
}

.wed-directory__title {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.wed-directory__subtitle {
  margin: 0 auto;
  max-width: 42rem;
  color: var(--wed-muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.wed-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--wed-line);
  border-radius: var(--wed-radius);
  padding: 4px;
  gap: 4px;
  margin: 0 auto 16px;
  box-shadow: 0 6px 20px rgba(26, 39, 68, 0.06);
  max-width: 100%;
}

.wed-directory__search {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 50;
  animation: wedFadeUp 0.65s ease 0.05s both;
}

.wed-directory button,
.wed-directory .wed-toggle__btn,
.wed-directory .wed-search-btn,
.wed-directory .wed-load-more,
.wed-directory .wed-map-toggle {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.wed-toggle__btn {
  appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--wed-navy) !important;
  font: inherit;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: var(--wed-radius) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none !important;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.wed-toggle__btn:hover {
  background: #f3f5f8 !important;
  color: var(--wed-navy) !important;
  transform: translateY(-1px);
}

.wed-toggle__btn:focus-visible {
  background: #f3f5f8 !important;
  color: var(--wed-navy) !important;
  box-shadow: 0 0 0 3px rgba(194, 0, 0, 0.28) !important;
}

.wed-toggle__btn:active {
  background: #e8ebf0 !important;
  color: var(--wed-navy) !important;
  transform: translateY(0);
}

.wed-toggle__btn.is-active,
.wed-toggle__btn.is-active:hover,
.wed-toggle__btn.is-active:focus,
.wed-toggle__btn.is-active:focus-visible,
.wed-toggle__btn.is-active:active {
  background: var(--wed-navy) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.wed-toggle__btn.is-active:focus-visible {
  box-shadow: 0 0 0 3px rgba(194, 0, 0, 0.35) !important;
}

.wed-search-form {
  width: 100%;
}

.wed-search-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

.wed-search-bar[data-mode="specialty"] {
  grid-template-columns: 1.1fr 1fr auto auto;
}

.wed-search-bar[data-mode="name"] {
  grid-template-columns: 1fr auto;
}

.wed-search-hint {
  margin: 10px 0 0;
  color: var(--wed-muted);
  font-size: 0.9rem;
  text-align: center;
}

.wed-search-bar__field {
  position: relative;
  z-index: 40;
}

.wed-search-input,
.wed-radius select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--wed-line);
  border-radius: var(--wed-radius);
  padding: 0 18px;
  font: inherit;
  background: #fff;
  color: var(--wed-navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wed-search-input:focus,
.wed-search-input:focus-visible,
.wed-radius select:focus,
.wed-radius select:focus-visible {
  outline: none !important;
  border-color: var(--wed-red) !important;
  box-shadow: 0 0 0 3px rgba(194, 0, 0, 0.18) !important;
}

.wed-radius select {
  min-width: 110px;
  padding-right: 32px;
  cursor: pointer;
}

.wed-search-btn {
  appearance: none !important;
  border: 0 !important;
  min-width: 128px;
  height: 52px;
  border-radius: var(--wed-radius) !important;
  background: var(--wed-red) !important;
  color: #fff !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(194, 0, 0, 0.22) !important;
}

.wed-search-btn:hover,
.wed-search-btn:focus {
  background: var(--wed-red-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.wed-search-btn:focus-visible {
  background: var(--wed-red-dark) !important;
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(194, 0, 0, 0.35), 0 8px 18px rgba(194, 0, 0, 0.22) !important;
}

.wed-search-btn:active {
  background: #8a0000 !important;
  color: #fff !important;
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(194, 0, 0, 0.25) !important;
}

.wed-search-btn.is-loading .wed-search-btn__label {
  opacity: 0;
}

.wed-search-btn.is-loading .wed-search-btn__spinner {
  opacity: 1;
}

.wed-search-btn__spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  opacity: 0;
  animation: wedSpin 0.7s linear infinite;
}

.wed-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--wed-line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(26, 39, 68, 0.12);
  z-index: 10050;
  overflow: auto;
  max-height: min(320px, 50vh);
  animation: wedFadeUp 0.2s ease;
}

.wed-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  font: inherit;
  color: var(--wed-navy);
  cursor: pointer;
}

.wed-suggest button:hover,
.wed-suggest button.is-active {
  background: #fff5f5;
  color: var(--wed-red);
}


.wed-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px 0 12px;
  animation: wedFadeUp 0.3s ease;
}

.wed-results-count {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

.wed-map-toggle {
  appearance: none !important;
  border: 1px solid var(--wed-line) !important;
  background: #fff !important;
  color: var(--wed-navy) !important;
  border-radius: var(--wed-radius) !important;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
  box-shadow: none !important;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.wed-map-toggle:hover,
.wed-map-toggle:focus {
  border-color: var(--wed-red) !important;
  color: var(--wed-red) !important;
  background: #fff5f5 !important;
}

.wed-map-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(194, 0, 0, 0.28) !important;
}

.wed-map-toggle:active {
  background: #ffe8e8 !important;
  color: var(--wed-red-dark) !important;
  border-color: var(--wed-red-dark) !important;
}

.wed-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
  align-items: start;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.wed-layout.is-map-hidden {
  grid-template-columns: 1fr;
}

.wed-layout.is-map-hidden .wed-layout__map {
  display: none;
}

.wed-layout.is-map-hidden .wed-layout__results {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

.wed-layout.is-map-hidden .wed-results {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.wed-layout__map {
  position: sticky;
  top: 96px;
  z-index: 1;
}

.wed-layout__results {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.wed-map-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--wed-line);
  box-shadow: 0 10px 30px rgba(26, 39, 68, 0.08);
  margin-bottom: 0;
  min-height: 420px;
  animation: wedFadeUp 0.4s ease;
  background: #edf1f6;
}

.wed-map {
  height: min(68vh, 560px);
  min-height: 420px;
  width: 100%;
  background: #dbe3ef;
}

.wed-map-wrap.is-hidden {
  display: none !important;
}

.wed-map-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 500;
}

.wed-map-loader[hidden] {
  display: none !important;
}

.wed-map-loader__text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--wed-navy);
}

.wed-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(194, 0, 0, 0.2);
  border-top-color: var(--wed-red);
  animation: wedSpin 0.75s linear infinite;
}

.wed-cluster {
  background: #1a2744;
  color: #fff;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: "Outfit", sans-serif;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(26, 39, 68, 0.28);
  transition: transform 0.15s ease;
}

.wed-cluster span {
  line-height: 1;
}

.wed-cluster--small {
  width: 40px !important;
  height: 40px !important;
  margin-left: -20px !important;
  margin-top: -20px !important;
  font-size: 0.85rem;
}

.wed-cluster--medium {
  width: 48px !important;
  height: 48px !important;
  margin-left: -24px !important;
  margin-top: -24px !important;
  font-size: 0.95rem;
  background: #c20000;
}

.wed-cluster--large {
  width: 58px !important;
  height: 58px !important;
  margin-left: -29px !important;
  margin-top: -29px !important;
  font-size: 1.05rem;
  background: #c20000;
}

.wed-cluster:hover {
  transform: scale(1.08);
}

.wed-cluster-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #f0c2c2;
  background: #fff5f5;
  border-radius: 12px;
}

.wed-cluster-filter[hidden] {
  display: none !important;
}

.wed-cluster-filter__text {
  margin: 0;
  font-weight: 600;
  color: var(--wed-navy);
  font-size: 0.95rem;
}

.wed-cluster-filter__clear {
  appearance: none !important;
  border: 1px solid var(--wed-red) !important;
  background: #fff !important;
  color: var(--wed-red) !important;
  border-radius: 999px !important;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none !important;
}

.wed-cluster-filter__clear:hover,
.wed-cluster-filter__clear:focus {
  background: var(--wed-red) !important;
  color: #fff !important;
}

.wed-pin-icon {
  background: transparent !important;
  border: 0 !important;
}

.wed-pin-icon img {
  display: block;
  filter: drop-shadow(0 4px 6px rgba(26, 39, 68, 0.28));
  transition: transform 0.2s ease;
}

.wed-pin-icon.is-active img,
.wed-pin-icon:hover img {
  transform: scale(1.12) translateY(-2px);
}

.wed-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.wed-card {
  background: #fff;
  border: 1px solid var(--wed-line);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 18px rgba(26, 39, 68, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: wedCardIn 0.45s ease both;
  cursor: pointer;
}

.wed-card:hover,
.wed-card.is-active {
  transform: translateY(-3px);
  border-color: rgba(194, 0, 0, 0.35);
  box-shadow: 0 14px 28px rgba(194, 0, 0, 0.12);
}

.wed-card__top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.wed-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--wed-bg);
  border: 1px solid var(--wed-line);
  flex-shrink: 0;
}

.wed-card__avatar--placeholder {
  display: grid;
  place-items: center;
  color: var(--wed-red);
  font-weight: 700;
}

.wed-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.wed-card__role,
.wed-card__company,
.wed-card__city,
.wed-card__distance {
  margin: 0;
  color: var(--wed-muted);
  font-size: 0.92rem;
}

.wed-card__distance {
  color: var(--wed-red);
  font-weight: 600;
}

.wed-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.wed-chip {
  background: #fff0f0;
  color: var(--wed-red);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
}

.wed-card__link {
  margin-top: auto;
  align-self: flex-start;
  color: var(--wed-red);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}

.wed-card__link:hover {
  text-decoration: underline;
}

.wed-skeleton {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.wed-skeleton[hidden] {
  display: none !important;
}

.wed-skeleton__card {
  min-height: 148px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.wed-skeleton__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(247, 248, 250, 0.9) 45%, transparent 100%);
  transform: translateX(-100%);
  animation: wedShimmerSlide 1.2s ease-in-out infinite;
}

.wed-skeleton__card::after {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #eef0f4;
  box-shadow:
    72px 8px 0 0 #eef0f4,
    72px 28px 0 -18px #f3f4f6,
    0 72px 0 -20px #eef0f4,
    120px 72px 0 -20px #eef0f4,
    0 100px 0 -24px #f3f4f6,
    160px 100px 0 -24px #f3f4f6;
}

.wed-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--wed-muted);
  animation: wedFadeUp 0.3s ease;
}

.wed-pagination {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.wed-load-more {
  appearance: none !important;
  border: 1px solid var(--wed-red) !important;
  background: #fff !important;
  color: var(--wed-red) !important;
  border-radius: var(--wed-radius) !important;
  padding: 12px 28px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wed-load-more:hover,
.wed-load-more:focus {
  background: var(--wed-red) !important;
  color: #fff !important;
  border-color: var(--wed-red) !important;
}

.wed-load-more:focus-visible {
  box-shadow: 0 0 0 3px rgba(194, 0, 0, 0.3) !important;
}

.wed-load-more:active {
  background: var(--wed-red-dark) !important;
  border-color: var(--wed-red-dark) !important;
  color: #fff !important;
}

.wed-card__link:focus-visible {
  outline: 2px solid var(--wed-red);
  outline-offset: 3px;
  border-radius: 4px;
}


.wed-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--wed-navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  z-index: 9999;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  animation: wedFadeUp 0.25s ease;
}

.screen-reader-text {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

@keyframes wedSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wedFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wedCardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wedShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

@keyframes wedShimmerSlide {
  100% {
    transform: translateX(100%);
  }
}

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

  .wed-layout__map {
    position: relative;
    top: auto;
  }

  .wed-map {
    height: 320px;
    min-height: 280px;
  }

  .wed-map-wrap {
    min-height: 280px;
  }
}

@media (max-width: 900px) {
  .wed-search-bar,
  .wed-search-bar[data-mode="specialty"],
  .wed-search-bar[data-mode="name"] {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .wed-toggle {
    width: 100%;
  }

  .wed-toggle__btn {
    flex: 1;
    justify-content: center;
    font-size: 0.85rem;
    padding: 10px 8px;
  }

  .wed-results-meta {
    flex-wrap: wrap;
  }
}
