/* ============================================================
   Trainer Directory & Profile — public pages
   Light theme, FPA brand v3: pink #C0428B, navy #0D1B2A
   ============================================================ */

/* ── Top nav bar (all public pages — directory, profile, book) ─ */
.td-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.td-topnav-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #C0428B;
  text-decoration: none;
  letter-spacing: .02em;
}
.td-topnav-brand span { color: #0D1B2A; font-weight: 500; }
.td-topnav-back {
  font-size: .85rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: background .12s, color .12s;
}
.td-topnav-back:hover { background: #f1f5f9; color: #0D1B2A; }

/* ── Wrapper ───────────────────────────────────────────────── */
.td-public-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  font-family: 'DM Sans', 'Outfit', system-ui, sans-serif;
  color: #0D1B2A;
}

/* ── Brand header (reuse from book.ejs style) ─────────────── */
.public-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #C0428B;
  letter-spacing: .02em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.public-brand span { color: #0D1B2A; font-weight: 500; }

/* ── Directory header ─────────────────────────────────────── */
.td-dir-header { margin-bottom: 36px; }
.td-dir-title  { font-size: 2rem; font-weight: 700; margin: 0 0 8px; color: #0D1B2A; }
.td-dir-sub    { color: #64748b; font-size: 1rem; margin: 0; }

/* ── Register CTA on directory ────────────────────────────── */
.td-register-cta {
  font-size: .85rem;
  font-weight: 500;
  color: #C0428B;
  text-decoration: none;
  padding: 8px 16px;
  border: 1.5px solid #C0428B;
  border-radius: 8px;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.td-register-cta:hover { background: #C0428B; color: #fff; }

/* ── Card grid ────────────────────────────────────────────── */
.td-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.td-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.td-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); transform: translateY(-2px); }

.td-card-photo {
  width: 100%;
  aspect-ratio: 1;
  max-height: 200px;
  overflow: hidden;
  background: #f0f9f8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.td-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.td-card-initials {
  font-size: 2.4rem;
  font-weight: 700;
  color: #C0428B;
  background: #e6f4f2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.td-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.td-card-name     { font-weight: 700; font-size: 1.05rem; color: #0D1B2A; }
.td-card-headline { font-size: .85rem; color: #475569; }

.td-card-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}
.td-view-link { font-size: .8rem; color: #C0428B; font-weight: 500; }

/* ── Tags / specializations ───────────────────────────────── */
.td-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.td-tag {
  background: #e6f4f2;
  color: #C0428B;
  font-size: .75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 99px;
}

/* ── Star rating ──────────────────────────────────────────── */
.td-stars     { display: flex; align-items: center; gap: 2px; font-size: .9rem; }
.td-rating-num { font-weight: 600; color: #0D1B2A; margin-left: 4px; }
.td-review-count { color: #94a3b8; font-size: .8rem; }

/* ── Profile page ─────────────────────────────────────────── */
.td-profile-back { margin-bottom: 20px; }
.td-profile-back a { color: #C0428B; text-decoration: none; font-size: .9rem; }
.td-profile-back a:hover { text-decoration: underline; }

.td-profile-hero {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.td-profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #e6f4f2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.td-profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.td-profile-initials {
  font-size: 2.4rem;
  font-weight: 700;
  color: #C0428B;
}

.td-profile-meta  { flex: 1; min-width: 220px; }
.td-profile-name  { font-size: 1.8rem; font-weight: 700; margin: 0 0 4px; }
.td-profile-headline { color: #475569; font-size: 1rem; margin: 0; }

.td-profile-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.td-contact-btn, .td-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s;
}
.td-contact-btn {
  background: #C0428B;
  color: #fff;
}
.td-contact-btn:hover { background: #00796b; }
.td-link-btn {
  background: #f1f5f9;
  color: #0D1B2A;
}
.td-link-btn:hover { background: #e2e8f0; }

/* ── Certification badges (public profile) ────────────────── */
.td-cert-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.td-cert-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  background: var(--cert-color);
  color: #fff;
  cursor: default;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.td-cert-badge:hover { opacity: .88; }

/* ── Sections ─────────────────────────────────────────────── */
.td-section { margin-bottom: 40px; }
.td-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0D1B2A;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e6f4f2;
}
.td-bio { font-size: .95rem; line-height: 1.7; color: #334155; white-space: pre-line; }

/* ── Review cards ─────────────────────────────────────────── */
.td-reviews       { display: flex; flex-direction: column; gap: 16px; }
.td-review-card   { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 20px; }
.td-review-top    { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.td-review-stars  { font-size: 1rem; }
.td-review-name   { font-weight: 600; font-size: .9rem; color: #0D1B2A; }
.td-review-text   { font-size: .9rem; color: #475569; line-height: 1.6; margin: 0; }

/* ── Review form ──────────────────────────────────────────── */
.td-review-form {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 600px;
}

/* ── Footer ───────────────────────────────────────────────── */
.td-dir-footer {
  margin-top: 60px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
  text-align: center;
  font-size: .8rem;
  color: #94a3b8;
}
.td-dir-footer a { color: #C0428B; text-decoration: none; }
.td-dir-footer a:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .td-profile-hero { flex-direction: column; align-items: center; text-align: center; }
  .td-profile-links { justify-content: center; }
  .td-review-form { padding: 16px; }
  .td-review-form > div[style*="grid"] { grid-template-columns: 1fr !important; }
}
