/* Existing experts layout reconciled with the shared V2 palette. */

/* =========================================================
   EXPERTWOKA EXPERT DIRECTORY FACELIFT
   Existing class names are retained intentionally so that
   AJAX-loaded cards from experts/_card.php inherit the design.
   ========================================================= */

.experts-page {
  background:var(--ew-canvas);
}

.experts-hero {
  position:relative;
  overflow:hidden;
  background:var(--ew-hero-gradient);
}

.experts-hero::before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);
  background-size:46px 46px;
  -webkit-mask-image:linear-gradient(to bottom,black,transparent 95%);
  mask-image:linear-gradient(to bottom,black,transparent 95%);
}

.experts-hero-inner {
  position:relative;
  z-index:2;
  width:min(calc(100% - 40px),1200px) !important;
  margin:0 auto !important;
  padding:92px 0 52px !important;
  text-align:left;
}

.experts-hero-copy-wrap {
  max-width:780px;
}

.experts-kicker {
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:16px;
  padding:7px 11px;
  border:1px solid rgba(118,184,255,.22);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:var(--ew-blue);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.experts-kicker-dot {
  width:6px;
  height:6px;
  border-radius:999px;
  background:var(--ew-action);
  box-shadow:0 0 0 5px rgba(53,199,244,.10);
}

.experts-hero-title {
  display:block;
  margin:0;
  max-width:780px;
  color:var(--ew-text);
  font-size:clamp(38px,5vw,64px);
  font-weight:850;
  line-height:1.02;
  letter-spacing:-.055em;
}

.experts-hero-title span {
  color:var(--ew-blue);
}

.experts-hero-copy {
  max-width:690px;
  margin:18px 0 0;
  color:var(--ew-muted);
  font-size:16px;
  line-height:1.75;
}

.experts-search-shell {
  max-width:960px;
  margin-top:34px;
  padding:14px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  background:var(--ew-elevated);
  box-shadow:0 20px 55px rgba(0,0,0,.16);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.experts-search-form {
  display:grid;
  grid-template-columns:2fr 1fr 1fr auto;
  gap:10px;
  align-items:stretch;
  max-width:none;
  margin:0;
}

.experts-search-field {
  position:relative;
}

.experts-search-field i {
  position:absolute;
  left:14px;
  top:50%;
  z-index:2;
  transform:translateY(-50%);
  color:var(--ew-muted);
  font-size:13px;
}

.experts-search-form input,
.experts-search-form select {
  width:100%;
  min-height:48px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:11px;
  background:var(--ew-surface);
  color:var(--ew-text);
  padding:10px 12px;
  font-family:inherit;
  font-size:13px;
  box-shadow:none;
}

.experts-search-field input {
  padding-left:40px;
}

.experts-search-actions {
  grid-column:auto;
  display:flex;
  justify-content:stretch;
  gap:10px;
}

.experts-search-actions .btn-primary {
  min-height:48px;
  padding:0 20px;
  white-space:nowrap;
}

.experts-search-access-note {
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  margin-top:2px;
  color:var(--ew-muted);
  font-size:12px;
  line-height:1.5;
}

.experts-search-access-note i {
  color:var(--ew-blue);
  font-size:12px;
}

.experts-directory-section {
  width:min(calc(100% - 40px),1200px) !important;
  margin:0 auto !important;
  padding:38px 0 72px !important;
}

.experts-directory-header {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:24px;
}

.experts-directory-title {
  margin:0;
  color:var(--ew-text);
  font-size:25px;
  font-weight:800;
  letter-spacing:-.035em;
}

.experts-directory-copy {
  margin:6px 0 0;
  color:var(--ew-muted);
  font-size:13px;
}

.experts-directory-side-note {
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 10px;
  border:1px solid var(--ew-border);
  border-radius:999px;
  background:var(--ew-surface);
  color:var(--ew-muted);
  font-size:12px;
  font-weight:700;
}

.experts-directory-side-note i {
  color:var(--ew-blue);
}

.experts-grid {
  display:grid;
  grid-auto-rows:1fr;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.expert-directory-card {
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:100%;
  padding:20px;
  overflow:hidden;
  border:1px solid var(--ew-border);
  border-radius:18px;
  background:var(--ew-surface);
  color:inherit;
  text-decoration:none;
  box-shadow:0 1px 2px rgba(15,23,42,.03),0 3px 12px rgba(15,23,42,.025);
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease;
}

.expert-directory-card:hover {
  transform:translateY(-4px);
  border-color:var(--ew-border);
  box-shadow:0 16px 38px rgba(15,23,42,.09);
}

.expert-directory-top {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.expert-directory-identity {
  display:flex;
  align-items:center;
  gap:13px;
  min-width:0;
}

.expert-directory-photo,
.expert-directory-placeholder {
  width:58px;
  height:58px;
  min-width:58px;
  border:1px solid var(--ew-border);
  border-radius:15px;
  background:var(--ew-surface);
}

.expert-directory-photo {
  object-fit:cover;
}

.expert-directory-placeholder {
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--ew-blue);
  font-size:19px;
}

.expert-directory-name {
  color:var(--ew-text);
  font-size:16px;
  font-weight:800;
  line-height:1.3;
  letter-spacing:-.02em;
}

.expert-directory-headline {
  display:-webkit-box;
  margin-top:4px;
  overflow:hidden;
  color:var(--ew-muted);
  font-size:12px;
  line-height:1.5;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.expert-directory-featured {
  display:inline-flex;
  align-items:center;
  gap:5px;
  flex-shrink:0;
  padding:5px 8px;
  border-radius:999px;
  background:var(--ew-blue-light);
  color:var(--ew-warning);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.expert-directory-meta {
  display:flex;
  flex-wrap:wrap;
  gap:8px 13px;
  margin-top:16px;
  color:var(--ew-muted);
  font-size:12px;
  font-weight:600;
}

.expert-directory-meta span {
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.expert-directory-meta i {
  color:var(--ew-muted);
}

.expert-directory-availability {
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:fit-content;
  margin-top:14px;
  padding:6px 9px;
  border-radius:999px;
  background:var(--ew-blue-light);
  color:var(--ew-success);
  font-size:12px;
  font-weight:800;
}

.expert-directory-availability-dot {
  width:6px;
  height:6px;
  border-radius:999px;
  background:var(--ew-blue-light);
  box-shadow:0 0 0 3px rgba(25,167,104,.10);
}

.expert-directory-section-label {
  margin:17px 0 7px;
  color:var(--ew-muted);
  font-size:12px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.expert-directory-tags {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.expert-directory-expertise-tag,
.expert-directory-skill-tag {
  display:inline-flex;
  align-items:center;
  padding:5px 8px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
}

.expert-directory-expertise-tag {
  background:var(--ew-surface);
  color:var(--ew-blue);
}

.expert-directory-skill-tag {
  background:var(--ew-surface);
  color:var(--ew-muted);
  display:block;
  max-width:100%;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  border:1px solid var(--ew-border);
}

.expert-directory-skills-more { align-self:center; font-size:12px; color:var(--ew-muted); }

.expert-directory-footer {
  margin-top:auto;
  padding-top:20px;
}

.expert-directory-view {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-top:14px;
  border-top:1px solid var(--ew-border);
  color:var(--ew-blue);
  font-size:12px;
  font-weight:800;
}

.expert-directory-view i {
  transition:transform .2s ease;
}

.expert-directory-card:hover .expert-directory-view i {
  transform:translateX(2px);
}

.experts-empty {
  grid-column:1 / -1;
  padding:58px 25px;
  border:1px dashed var(--ew-border);
  border-radius:18px;
  background:var(--ew-surface);
  text-align:center;
}

.experts-empty-icon {
  display:flex;
  align-items:center;
  justify-content:center;
  width:52px;
  height:52px;
  margin:0 auto;
  border-radius:14px;
  background:var(--ew-surface);
  color:var(--ew-blue);
  font-size:18px;
}

.experts-empty-title {
  margin-top:14px;
  color:var(--ew-text);
  font-size:18px;
  font-weight:800;
}

.experts-empty-copy {
  margin:7px auto 0;
  color:var(--ew-muted);
  font-size:13px;
}

.experts-load-more-wrap {
  display:flex;
  justify-content:center;
  margin-top:34px;
}

.experts-load-more-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:46px;
  padding:11px 22px;
  border:1px solid var(--ew-border);
  border-radius:11px;
  background:var(--ew-surface);
  color:var(--ew-text);
  font-family:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(15,23,42,.04);
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.experts-load-more-button:hover {
  transform:translateY(-1px);
  border-color:var(--ew-border);
  box-shadow:0 9px 24px rgba(15,23,42,.08);
}

.experts-load-more-button:disabled {
  opacity:.65;
  cursor:wait;
  transform:none;
}

.experts-load-more-button i {
  color:var(--ew-blue);
  font-size:12px;
}

/* Partner access modal */
.talent-access-modal {
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(2,12,27,.72);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}

.talent-access-modal.is-open {
  display:flex;
}

.talent-access-card {
  position:relative;
  width:100%;
  max-width:480px;
  padding:34px;
  border:1px solid var(--ew-border);
  border-radius:20px;
  background:var(--ew-surface);
  box-shadow:0 28px 80px rgba(0,0,0,.25);
  text-align:center;
  animation:talentModalIn .18s ease-out;
}

@keyframes talentModalIn {
  from { opacity:0; transform:translateY(8px) scale(.985); }
  to { opacity:1; transform:translateY(0) scale(1); }
}

.talent-access-close {
  position:absolute;
  top:15px;
  right:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border:0;
  border-radius:10px;
  background:var(--ew-surface);
  color:var(--ew-muted);
  cursor:pointer;
  font-size:14px;
}

.talent-access-close:hover {
  background:var(--ew-blue-light);
  color:var(--ew-text);
}

.talent-access-icon {
  display:flex;
  align-items:center;
  justify-content:center;
  width:62px;
  height:62px;
  margin:0 auto 18px;
  border-radius:16px;
  background:var(--ew-blue-light);
  color:var(--ew-blue);
  font-size:22px;
}

.talent-access-title {
  margin:0;
  color:var(--ew-text);
  font-size:23px;
  font-weight:850;
  line-height:1.25;
  letter-spacing:-.03em;
}

.talent-access-copy {
  max-width:390px;
  margin:12px auto 0;
  color:var(--ew-muted);
  font-size:13px;
  line-height:1.7;
}

.talent-access-highlight {
  margin-top:18px;
  padding:13px 15px;
  border:1px solid var(--ew-border);
  border-radius:12px;
  background:var(--ew-surface);
  color:var(--ew-muted);
  font-size:12px;
  line-height:1.6;
}

.talent-access-actions {
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:22px;
}

.talent-access-primary {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:11px 18px;
  border-radius:11px;
  background:var(--ew-action);
  color:var(--ew-on-action);
  font-size:13px;
  font-weight:800;
  text-decoration:none;
  transition:background .18s ease,transform .18s ease;
}

.talent-access-primary:hover {
  transform:translateY(-1px);
  background:var(--ew-action);
}

.talent-access-secondary {
  border:0;
  background:transparent;
  color:var(--ew-muted);
  font-family:inherit;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  padding:7px;
}

.talent-access-secondary:hover {
  color:var(--ew-text);
}

body.talent-access-open {
  overflow:hidden;
}

@media (max-width:900px) {
  .experts-search-form {
    grid-template-columns:1fr 1fr;
  }

  .experts-search-field {
    grid-column:1 / -1;
  }

  .experts-search-actions {
    grid-column:1 / -1;
  }

  .experts-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:700px) {
  .experts-hero-inner,
  .experts-directory-section {
    width:calc(100% - 28px) !important;
  }

  .experts-hero-inner {
    padding:66px 0 38px !important;
  }

  .experts-hero-title {
    font-size:39px;
  }

  .experts-hero-copy {
    font-size:14px;
  }

  .experts-search-shell {
    margin-top:27px;
    padding:11px;
    border-radius:15px;
  }

  .experts-search-form {
    grid-template-columns:1fr;
  }

  .experts-search-field,
  .experts-search-actions,
  .experts-search-access-note {
    grid-column:auto;
  }

  .experts-search-actions .btn-primary {
    width:100%;
  }

  .experts-directory-section {
    padding-top:28px !important;
  }

  .experts-directory-header {
    align-items:flex-start;
    flex-direction:column;
  }
}

@media (max-width:560px) {
  .experts-grid {
    grid-template-columns:1fr;
  }

  .expert-directory-card {
    padding:18px;
  }

  .talent-access-card {
    padding:30px 20px 24px;
  }

  .talent-access-title {
    font-size:21px;
  }

  .experts-load-more-button {
    width:100%;
    max-width:280px;
  }
}
