/* Intercultural 360 — specialist directory (/specialists/). WCAG AA: brand #0F6E56, text #0f172a, muted #475569 on white. */
html { scroll-padding-top: 80px; } /* keeps focused elements clear of the fixed nav */
.sp-body { background: #f8fafc; color: #0f172a; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; overflow-x: hidden; }
.sp-body h1, .sp-body h2, .sp-body h3 { font-family: 'Lexend', 'Inter', sans-serif; }
.sp-wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
@media (min-width: 640px) { .sp-wrap { padding: 0 24px; } }
.sp-body *, .sp-body *::before, .sp-body *::after { box-sizing: border-box; }
.sp-body :focus-visible { outline: 2px solid #0F6E56; outline-offset: 2px; }

/* Hero */
.sp-hero { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 28px 0 24px; }
.sp-hero-logo { width: 40px; height: 40px; border-radius: 10px; display: block; margin-bottom: 12px; }
.sp-hero h1 { font-size: 1.6rem; line-height: 1.2; font-weight: 800; margin: 0 0 8px; color: #0f172a; }
.sp-sub { font-size: 0.95rem; line-height: 1.6; color: #475569; margin: 0; max-width: 46rem; }
@media (min-width: 768px) { .sp-hero { padding: 40px 0 32px; } .sp-hero h1 { font-size: 2.2rem; } .sp-sub { font-size: 1.05rem; } }

/* Personal line + notices */
.sp-personal, .sp-notice { margin-top: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 12px; padding: 10px 12px; font-size: 0.9rem; font-weight: 600; }
.sp-notice { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.sp-personal[hidden], .sp-notice[hidden] { display: none; }
.sp-personal #sp-personal-text { flex: 1 1 auto; min-width: 0; }
.sp-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: #0F6E56; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.sp-x { background: none; border: 0; font-size: 24px; line-height: 1; color: #475569; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sp-x:hover { background: #f1f5f9; color: #0f172a; }

/* Layout */
.sp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; padding-bottom: 24px; }
@media (min-width: 1024px) { .sp-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; padding-top: 24px; } }
.sp-toolbar { display: flex; }
@media (min-width: 1024px) { .sp-toolbar { display: none; } }
.sp-filter-open { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #cbd5e1; border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 700; color: #0f172a; cursor: pointer; min-height: 44px; }
.sp-filter-open svg { width: 18px; height: 18px; }
.sp-count-pill { background: #0F6E56; color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; }
.sp-count-pill[hidden] { display: none; }

/* Filters: sidebar on desktop, bottom sheet on mobile */
.sp-filters { background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 18px; align-self: start; }
@media (min-width: 1024px) { .sp-filters { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; } }
.sp-sheet-head { display: none; }
.sp-sheet-only { display: none; }
@media (max-width: 1023px) {
  .sp-filters { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10001; max-height: 88vh; overflow-y: auto; border-radius: 20px 20px 0 0; border: 0; box-shadow: 0 -12px 40px rgba(15,23,42,.25);
    transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; padding-bottom: 0; }
  .sp-filters.open { transform: translateY(0); visibility: visible; transition: transform .25s ease; }
  .sp-sheet-head { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 8px; }
  .sp-sheet-head h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }
  .sp-sheet-only { display: inline-flex; }
  .sp-filter-foot { position: sticky; bottom: 0; background: #fff; padding: 12px 0 16px; margin-top: 4px; border-top: 1px solid #e2e8f0; }
}
@media (prefers-reduced-motion: reduce) { .sp-filters, .sp-drawer { transition: none !important; } }
.sp-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 10000; }
.sp-backdrop[hidden] { display: none; }

.sp-group { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.sp-group legend, .sp-label { display: block; font-size: 0.8rem; font-weight: 700; color: #0f172a; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; padding: 0; }
.sp-mt { margin-top: 12px; }
.sp-hint { font-size: 0.8rem; color: #475569; margin: 6px 0 0; line-height: 1.45; }
.sp-input { width: 100%; min-height: 44px; border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 0.95rem; color: #0f172a; background: #fff; }
.sp-input:focus { outline: 2px solid #0F6E56; outline-offset: 1px; border-color: #0F6E56; }
.sp-input:disabled { background: #f1f5f9; color: #64748b; }

.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 12px; border: 1.5px solid #cbd5e1; border-radius: 999px; background: #fff; color: #0f172a; font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; text-align: left; line-height: 1.2; }
.sp-chip svg { width: 16px; height: 16px; color: #0F6E56; flex-shrink: 0; }
.sp-chip:hover { border-color: #0F6E56; }
.sp-chip[aria-pressed="true"] { background: #0F6E56; border-color: #0F6E56; color: #fff; }
.sp-chip[aria-pressed="true"] svg { color: #fff; }
@media (min-width: 1024px) { .sp-chips-col .sp-chip { width: 100%; border-radius: 12px; } }

.sp-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 0.95rem; color: #0f172a; min-height: 44px; }
.sp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sp-switch-ui { width: 44px; height: 26px; border-radius: 999px; background: #94a3b8; position: relative; flex-shrink: 0; transition: background .15s; }
.sp-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.sp-switch input:checked + .sp-switch-ui { background: #0F6E56; }
.sp-switch input:checked + .sp-switch-ui::after { transform: translateX(18px); }
.sp-switch input:focus-visible + .sp-switch-ui { outline: 2px solid #0F6E56; outline-offset: 2px; }

.sp-filter-foot { display: flex; gap: 8px; }
.sp-filter-foot .sp-btn { flex: 1; }

/* Buttons */
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 12px; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; text-decoration: none; border: 1.5px solid transparent; text-align: center; }
.sp-btn-primary { background: #0F6E56; color: #fff; }
.sp-btn-primary:hover { background: #0b5744; }
.sp-btn-ghost { background: #fff; color: #0F6E56; border-color: #0F6E56; }
.sp-btn-ghost:hover { background: #f0fdf9; }

/* Results */
.sp-results { min-width: 0; }
.sp-active { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sp-active:empty { display: none; }
.sp-active-chip { display: inline-flex; align-items: center; gap: 4px; background: #e6f4f0; color: #065f46; border: 0; border-radius: 999px; padding: 5px 6px 5px 12px; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.sp-active-chip span[aria-hidden] { font-size: 16px; line-height: 1; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.sp-active-chip:hover span[aria-hidden] { background: #a7f3d0; }
.sp-count { font-size: 0.9rem; color: #475569; margin: 0 0 12px; font-weight: 600; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 720px) { .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sp-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 2px 8px rgba(15,23,42,.04); min-width: 0; }
.sp-card-top { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.sp-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #0F6E56; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; border: 2px solid #d1fae5; }
.sp-card-id { min-width: 0; flex: 1; }
.sp-name { font-size: 1.05rem; font-weight: 800; margin: 0; color: #0f172a; overflow-wrap: anywhere; }
.sp-disc { font-size: 0.875rem; font-weight: 600; color: #0F6E56; margin: 2px 0 0; overflow-wrap: anywhere; }
.sp-place { font-size: 0.85rem; color: #475569; margin: 2px 0 0; overflow-wrap: anywhere; }
.sp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.sp-badge-verified { background: #dcfce7; color: #166534; }
.sp-badge-online { background: #e0f2fe; color: #075985; }
.sp-langs { display: flex; flex-wrap: wrap; gap: 4px; }
.sp-lang { font-size: 0.75rem; font-weight: 600; background: #f1f5f9; color: #334155; border-radius: 999px; padding: 2px 9px; }
.sp-lang.match { background: #ccfbf1; color: #134e4a; }
.sp-text { font-size: 0.9rem; color: #334155; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.sp-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: auto; }
@media (min-width: 400px) { .sp-actions { grid-template-columns: auto 1fr; } }

/* Empty state */
.sp-empty { background: #fff; border: 1.5px dashed #cbd5e1; border-radius: 20px; padding: 28px 20px; text-align: center; }
.sp-empty[hidden] { display: none; }
.sp-empty-icon { width: 52px; height: 52px; border-radius: 50%; background: #ecfdf5; color: #0F6E56; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.sp-empty-icon svg { width: 24px; height: 24px; }
.sp-empty h2 { font-size: 1.2rem; font-weight: 800; margin: 0 0 6px; color: #0f172a; }
.sp-empty p { color: #475569; margin: 0 0 16px; font-size: 0.95rem; }
.sp-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 14px; }
.sp-quick:empty { display: none; }

.sp-join { margin: 24px 0 0; font-size: 0.9rem; text-align: center; }
.sp-join a { color: #0F6E56; font-weight: 700; text-decoration: none; }
.sp-join a:hover { text-decoration: underline; }

/* Profile drawer: right panel on desktop, full-height sheet on mobile */
.sp-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: #fff; z-index: 10002; box-shadow: -12px 0 40px rgba(15,23,42,.25); display: flex; flex-direction: column; }
.sp-drawer[hidden] { display: none; }
.sp-drawer-head { display: flex; justify-content: flex-end; padding: 8px 8px 0; }
.sp-drawer-body { padding: 0 20px 24px; overflow-y: auto; flex: 1; }
.sp-d-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.sp-d-top .sp-av { width: 84px; height: 84px; font-size: 28px; }
.sp-d-name { font-size: 1.35rem; font-weight: 800; margin: 0; color: #0f172a; overflow-wrap: anywhere; }
.sp-d-sec { margin: 16px 0 0; }
.sp-d-sec h3 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #475569; margin: 0 0 6px; }
.sp-d-bio { white-space: pre-line; font-size: 0.95rem; line-height: 1.65; color: #1e293b; margin: 0; overflow-wrap: anywhere; }
.sp-d-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-d-tag { font-size: 0.8rem; font-weight: 600; background: #f0fdf9; color: #065f46; border: 1px solid #a7f3d0; border-radius: 999px; padding: 2px 10px; }
.sp-d-cta { position: sticky; bottom: 0; background: #fff; padding: 14px 0 0; margin-top: 20px; border-top: 1px solid #e2e8f0; }
.sp-d-cta .sp-btn { width: 100%; }
.sp-d-note { font-size: 0.8rem; color: #475569; margin: 8px 0 0; text-align: center; }
.sp-loading { color: #475569; }
