/* PerformanceHub public styles — loads only when [performance_hub] is rendered. */

.ph-directory {
  --ph-navy: #0f1c2e;
  --ph-navy-light: #1c2f4a;
  --ph-gold: #b3873f;
  --ph-gold-light: #d9ac66;
  --ph-cream: #faf7f1;
  --ph-paper: #ffffff;
  --ph-ink: #16202f;
  --ph-muted: #6b7280;
  --ph-border: #e7e2d6;
  --ph-green: #1f7a54;
  --ph-red: #b3261e;
  --ph-amber: #a8760b;
  --ph-slate: #667085;
  --ph-radius: 16px;
  --ph-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --ph-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  box-sizing: border-box;
  width: 100%;
  font-family: var(--ph-sans);
  color: var(--ph-ink);
  background: var(--ph-cream);
}
.ph-directory *,
.ph-directory *::before,
.ph-directory *::after { box-sizing: border-box; }

.ph-container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 0 0 56px; }
.ph-header .ph-container { padding: 0; }
.ph-header { padding-top: 44px; }

/* ---------- Header ---------- */
.ph-header {
  position: relative;
  width: 100%;
  margin: 0 0 32px;
  padding: 46px 20px 40px;
  overflow: hidden;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(160deg, var(--ph-navy) 0%, var(--ph-navy-light) 100%);
  text-align: center;
}

.ph-header::before {
  content: "";
  position: absolute;
  inset: -60% -10%;
  background:
    repeating-radial-gradient(
      circle at 15% 20%,
      rgba(217,172,102,.09) 0 1px,
      transparent 1px 7px
    ),
    repeating-radial-gradient(
      circle at 85% 80%,
      rgba(217,172,102,.07) 0 1px,
      transparent 1px 9px
    );
  pointer-events: none;
}

/* Isolate the header from WordPress/theme/page-builder layout rules. */
.ph-header > .ph-container {
  position: relative;
  z-index: 1;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box;
}

/* ---------- Brand ---------- */
.ph-brand {
  position: relative;
  z-index: 1;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto 26px !important;
  padding: 0 !important;
  text-align: center !important;
}

.ph-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 0 12px;
  color: var(--ph-gold-light);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ph-eyebrow svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.ph-brand h2 {
  margin: 0;
  font-family: var(--ph-serif);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: .2px;
  color: #fff;
}

.ph-brand p {
  margin: 10px 0 0;
  color: #b7c2d6;
  font-size: 13px;
  letter-spacing: .02em;
}
/* =========================================================
   PERFORMANCEHUB — SEARCH BAR
   Desktop: perfectly centered
   Mobile: responsive
   ========================================================= */

.ph-search-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    max-width: 100% !important;
    height: 46px !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;
    clear: both !important;
    text-align: center !important;
}

/* Search container */
.ph-search-inner {
    position: relative !important;

    display: flex !important;
    align-items: center !important;

    flex: 0 0 420px !important;
    width: 420px !important;
    max-width: calc(100% - 32px) !important;

    height: 46px !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;

    transform: none !important;
}

/* Search icon */
.ph-search-inner svg {
    position: absolute !important;

    left: 15px !important;
    top: 50% !important;

    width: 15px !important;
    height: 15px !important;

    margin: 0 !important;

    transform: translateY(-50%) !important;

    color: #8b98ad !important;

    pointer-events: none !important;
    z-index: 5 !important;
}

/* Search input */
.ph-search {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: 46px !important;
    min-height: 46px !important;

    margin: 0 !important;
    padding: 0 16px 0 40px !important;

    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 999px !important;

    background: rgba(255, 255, 255, 0.07) !important;

    color: #fff !important;

    font-family: var(--ph-sans) !important;
    font-size: 14px !important;
    line-height: 46px !important;

    outline: none !important;

    box-sizing: border-box !important;
    appearance: none !important;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease !important;
}

/* Placeholder */
.ph-search::placeholder {
    color: #94a1b8 !important;
    opacity: 1 !important;
}

/* Focus */
.ph-search:focus {
    border-color: var(--ph-gold-light) !important;

    background: rgba(255, 255, 255, 0.12) !important;

    box-shadow:
        0 0 0 4px rgba(217, 172, 102, 0.18) !important;
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 769px) {

    .ph-search-wrap {
        width: 100% !important;
        justify-content: center !important;
    }

    .ph-search-inner {
        width: 420px !important;
        max-width: 420px !important;
        flex: 0 0 420px !important;

        margin-left: auto !important;
        margin-right: auto !important;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 768px) {

    .ph-search-wrap {
        width: 100% !important;
    }

    .ph-search-inner {
        width: 100% !important;
        max-width: calc(100% - 32px) !important;
        flex: 1 1 auto !important;

        margin-left: 16px !important;
        margin-right: 16px !important;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .ph-search-wrap {
        height: 44px !important;
    }

    .ph-search-inner {
        height: 44px !important;
        max-width: calc(100% - 24px) !important;

        margin-left: 12px !important;
        margin-right: 12px !important;
    }

    .ph-search {
        height: 44px !important;
        min-height: 44px !important;

        line-height: 44px !important;

        padding-left: 38px !important;
        padding-right: 14px !important;
    }

    .ph-search-inner svg {
        left: 14px !important;
        width: 14px !important;
        height: 14px !important;
    }

}

/* ---------- Results meta ---------- */

.ph-results-meta {
  min-height: 20px;
  margin: 0 0 14px;
  color: var(--ph-muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* ---------- Grid & cards ---------- */
.ph-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.ph-card {
  position: relative;
  overflow: hidden;
  background: var(--ph-paper);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 24px rgba(16,28,48,.06);
  transition: transform .22s ease, box-shadow .22s ease;
  animation: ph-rise .35s ease both;
}
.ph-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(16,28,48,.13); }
@keyframes ph-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.ph-card-status-rail {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--ph-slate);
}
.ph-card[data-status="active"] .ph-card-status-rail { background: var(--ph-green); }
.ph-card[data-status="suspended"] .ph-card-status-rail { background: var(--ph-red); }
.ph-card[data-status="inactive"] .ph-card-status-rail { background: var(--ph-amber); }
.ph-card[data-status="end"] .ph-card-status-rail { background: var(--ph-slate); }

.ph-card-cover {
  height: 72px;
  background: linear-gradient(150deg, var(--ph-navy), var(--ph-navy-light));
  position: relative;
}
.ph-card-hole {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ph-cream);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.25);
}

.ph-avatar-ring {
  position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%);
  width: 76px; height: 76px; border-radius: 50%;
  padding: 3px;
  display: flex; align-items: center; justify-content: center;
}
.ph-avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: #fff; padding: 3px;
  display: flex; align-items: center; justify-content: center;
}
.ph-avatar img, .ph-avatar-fallback { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ph-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--ph-navy); color: var(--ph-gold-light);
  font-family: var(--ph-serif); font-weight: 700; font-size: 20px;
}

.ph-card-body { padding: 44px 16px 18px; text-align: center; }

.ph-verified {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px 3px 7px; border-radius: 999px;
  background: #fbf3e6; color: var(--ph-gold);
  border: 1px solid #eddbb6;
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  margin-bottom: 8px;
}
.ph-verified svg { width: 11px; height: 11px; }

.ph-name {
  font-family: var(--ph-serif);
  font-size: 19px; line-height: 1.25; margin: 0; font-weight: 700; color: var(--ph-navy);
}
.ph-position {
  margin: 5px 0 16px; color: var(--ph-muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}

.ph-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.ph-stat {
  min-width: 0; padding: 10px 5px 8px; background: var(--ph-cream);
  border: 1px solid var(--ph-border); border-radius: 10px;
}
.ph-stat-value {
  display: block; font-weight: 700; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ph-ink);
}
.ph-stat-value.ph-status-active { color: var(--ph-green); }
.ph-stat-value.ph-status-suspended { color: var(--ph-red); }
.ph-stat-value.ph-status-inactive { color: var(--ph-amber); }
.ph-stat-label {
  display: block; margin-top: 4px; font-size: 9px; color: var(--ph-slate);
  text-transform: uppercase; letter-spacing: .05em;
}

.ph-report-btn {
  width: 100%; border: 1.5px solid var(--ph-navy); border-radius: 999px;
  background: var(--ph-navy); color: #fff;
  padding: 10px 10px; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .12s;
}
.ph-report-btn:hover { background: var(--ph-navy-light); }
.ph-report-btn:active { transform: scale(.98); }
.ph-report-btn:focus-visible,
.ph-search:focus-visible,
.ph-page:focus-visible,
.ph-modal-close:focus-visible { outline: 2px solid var(--ph-gold); outline-offset: 2px; }

/* ---------- Loading / skeleton / empty ---------- */
.ph-loading, .ph-empty {
  text-align: center; padding: 48px 16px; color: var(--ph-muted); font-size: 14px;
}
.ph-empty-icon { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--ph-gold); opacity: .8; }

.ph-skeleton-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ph-skel-card {
  border-radius: var(--ph-radius); overflow: hidden; border: 1px solid var(--ph-border); background: var(--ph-paper);
}
.ph-skel-cover { height: 72px; background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%; animation: ph-shimmer 1.4s ease infinite; }
.ph-skel-body { padding: 44px 16px 18px; }
.ph-skel-line { height: 10px; border-radius: 6px; margin: 0 auto 10px; background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%; animation: ph-shimmer 1.4s ease infinite; }
.ph-skel-line.w60 { width: 60%; }
.ph-skel-line.w40 { width: 40%; }
.ph-skel-line.w90 { width: 90%; height: 34px; border-radius: 999px; margin-top: 16px; }
@keyframes ph-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- Pagination ---------- */
.ph-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 30px; }
.ph-page {
  min-width: 36px; height: 36px; border: 1px solid var(--ph-border); background: var(--ph-paper);
  border-radius: 999px; padding: 0 11px; color: var(--ph-navy); cursor: pointer; font-size: 12.5px; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.ph-page:hover:not(:disabled) { border-color: var(--ph-navy); }
.ph-page.is-current { background: var(--ph-navy); border-color: var(--ph-navy); color: #fff; }
.ph-page:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Modal ---------- */
.ph-modal[hidden] { display: none; }
.ph-modal {
  position: fixed; inset: 0; z-index: 999999; display: flex;
  align-items: center; justify-content: center; padding: 20px;
}
.ph-modal-backdrop { position: absolute; inset: 0; background: rgba(10,16,26,.62); backdrop-filter: blur(3px); }
.ph-modal-dialog {
  position: relative; z-index: 2; width: min(680px, 100%); max-height: min(88vh, 760px);
  overflow: auto; background: var(--ph-paper); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.32);
  animation: ph-pop .22s ease both;
}
@keyframes ph-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.ph-modal-close {
  position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--ph-cream); color: var(--ph-navy); font-size: 22px; line-height: 1; cursor: pointer; z-index: 3;
  transition: background .15s;
}
.ph-modal-close:hover { background: #f0ece0; }

.ph-report-head {
  display: flex; gap: 18px; align-items: center; padding: 28px 30px 20px;
  background: linear-gradient(150deg, var(--ph-navy), var(--ph-navy-light));
  color: #fff;
}
.ph-report-avatar-wrap { flex: none; }
.ph-report-avatar, .ph-report-avatar-fallback {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: #fff; border: 3px solid rgba(255,255,255,.25);
}
.ph-report-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  color: var(--ph-navy); font-family: var(--ph-serif); font-size: 24px; font-weight: 700;
}
.ph-report-title h3 { margin: 0 0 6px; font-family: var(--ph-serif); font-size: 25px; }
.ph-report-title p { margin: 0; color: #b7c2d6; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

.ph-modal-content-inner { padding: 26px 30px 30px; }
.ph-report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
.ph-report-item { background: var(--ph-cream); border: 1px solid var(--ph-border); border-radius: 12px; padding: 12px 14px; }
.ph-report-item strong {
  display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ph-slate); margin-bottom: 5px;
}
.ph-report-item span { font-size: 13.5px; font-weight: 600; color: var(--ph-ink); }
.ph-score { font-size: 18px !important; color: var(--ph-gold); font-family: var(--ph-serif); }
.ph-evaluation { border-top: 1px solid var(--ph-border); padding-top: 20px; }
.ph-evaluation h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ph-navy); }
.ph-evaluation p { margin: 0; color: #475467; font-size: 13.5px; line-height: 1.75; white-space: pre-line; }
.ph-reference { margin-top: 18px; padding: 13px 15px; border-left: 3px solid var(--ph-gold); background: var(--ph-cream); color: #475467; font-size: 12.5px; line-height: 1.7; border-radius: 0 8px 8px 0; }

/* ---------- Search responsive safeguards ---------- */
@media (max-width: 768px) {
  .ph-search-inner {
    width: 420px !important;
    max-width: calc(100% - 24px) !important;
  }
}

@media (max-width: 560px) {
  .ph-search-inner {
    width: 100% !important;
    max-width: 420px !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ph-grid, .ph-skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 560px) {
  .ph-header { padding: 36px 16px 34px; }
  .ph-brand h2 { font-size: 26px; }
  .ph-grid, .ph-skeleton-grid { grid-template-columns: 1fr; gap: 14px; }
  .ph-card-body { padding-left: 16px; padding-right: 16px; }
  .ph-modal { padding: 0; align-items: flex-end; }
  .ph-modal-dialog { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }
  .ph-report-head { padding: 24px 20px 18px; align-items: flex-start; }
  .ph-report-title h3 { font-size: 21px; }
  .ph-modal-content-inner { padding: 22px 20px 26px; }
  .ph-report-grid { grid-template-columns: 1fr; }
}

.ph-directory .screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.ph-directory.ph-loading-state .ph-grid { opacity: .5; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .ph-directory *, .ph-directory *::before, .ph-directory *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important;
  }
}
