/* ============================================================
   TERAPEUTA-PUBLICA.CSS — Perfil público de terapeuta
   Centir · Centro de Psicología
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:         #9cc3c0;
  --primary-light:   #c5dedd;
  --primary-lighter: #eef6f5;
  --primary-dark:    #7aaba8;
  --primary-darker:  #5a8a87;
  --text:            #2c2c3d;
  --text-medium:     #6e6e85;
  --text-light:      #9e9eaf;
  --bg:              #f7f5fa;
  --surface:         #ffffff;
  --border-light:    #f0ecf6;
  --border:          #e6e1ed;
  --shadow-sm:       0 2px 6px rgba(151,135,163,0.08);
  --shadow-md:       0 4px 14px rgba(151,135,163,0.12);
  --shadow-lg:       0 8px 28px rgba(151,135,163,0.16);
  --radius-md:       12px;
  --radius-lg:       16px;
  --radius-xl:       20px;
  --radius-full:     9999px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── Page layout ─────────────────────────────────────────────── */
.tp-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ─────────────────────────────────────────────────── */
.tp-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.tp-topbar-logo {
  height: 32px;
  width: auto;
}

.tp-topbar-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.4px;
}

/* ── Hero banner ─────────────────────────────────────────────── */
.tp-hero-banner {
  height: 180px;
  background: linear-gradient(135deg, var(--color-dark, #5a8a87), var(--color, #9cc3c0));
  position: relative;
  flex-shrink: 0;
}

/* ── Main container ──────────────────────────────────────────── */
.tp-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px 60px;
  width: 100%;
  flex: 1;
}

/* ── Profile card ────────────────────────────────────────────── */
.tp-profile-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 0 0 32px;
  margin-top: -72px;
  position: relative;
}

/* Avatar */
.tp-avatar-row {
  padding: 0 32px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
  transform: translateY(-40px);
  margin-bottom: -20px;
}

.tp-avatar {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}

.tp-avatar-fallback {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}

/* Name & specialty */
.tp-identity {
  padding: 0 32px 24px;
  border-bottom: 1px solid var(--border-light);
}

.tp-name {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 8px;
}

.tp-titulo {
  font-size: 0.9375rem;
  color: var(--text-medium);
  margin-bottom: 8px;
}

.tp-especialidad {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Modalidad + ubicación chips */
.tp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tp-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-medium);
}

.tp-chip svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  color: var(--text-light);
}

.tp-chip--modalidad {
  background: var(--primary-lighter);
  border-color: var(--primary-light);
  color: var(--primary-darker);
}

.tp-chip--modalidad svg { color: var(--primary-dark); }

/* Chip variants by modalidad type */
.tp-chip--virtual {
  background: color-mix(in srgb, #6366f1 8%, transparent);
  border-color: color-mix(in srgb, #6366f1 25%, transparent);
  color: #4338ca;
}

.tp-chip--virtual svg { color: #4f46e5; }

/* .tp-chip--presencial and .tp-chip--ambas inherit from .tp-chip--modalidad */

/* Contact strip */
.tp-contact-strip {
  padding: 20px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border-bottom: 1px solid var(--border-light);
}

.tp-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--text-medium);
  transition: color 0.15s;
}

.tp-contact-item:hover { color: var(--primary-dark); }

.tp-contact-item svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  color: var(--text-light);
}

/* ── Sections ────────────────────────────────────────────────── */
.tp-section {
  padding: 28px 32px;
}

.tp-section + .tp-section {
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.tp-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.tp-section-title svg {
  width: 18px; height: 18px;
  stroke: var(--primary-dark); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Bio */
.tp-bio {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-medium);
  padding-left: 16px;
  border-left: 3px solid var(--primary-light);
}

.tp-bio b, .tp-bio strong { font-weight: 700; color: var(--text); }
.tp-bio i, .tp-bio em { font-style: italic; }
.tp-bio u { text-decoration: underline; }
.tp-bio br + br { display: block; margin-top: 0.4em; }

.tp-bio ul {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tp-bio li { display: flex; align-items: baseline; gap: 10px; }
.tp-bio li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary-dark);
  flex-shrink: 0;
  margin-top: 7px;
}

/* Certifications */
.tp-certs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tp-cert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-medium);
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  transition: border-color 0.15s, background 0.15s;
}

.tp-cert-item:hover {
  background: var(--primary-lighter);
  border-color: var(--primary-light);
  color: var(--text);
}

.tp-cert-item svg {
  width: 16px; height: 16px;
  stroke: var(--primary-dark); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────────────────── */
.tp-footer {
  text-align: center;
  padding: 32px 20px;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.tp-footer a {
  color: var(--primary-dark);
  font-weight: 500;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.tp-spinner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.tp-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary-dark);
  border-radius: 50%;
  animation: tp-spin 0.7s linear infinite;
}

@keyframes tp-spin { to { transform: rotate(360deg); } }

.tp-error {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-medium);
}

.tp-error h3 { font-size: 1.125rem; margin-bottom: 8px; color: var(--text); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 520px) {
  .tp-hero-banner  { height: 130px; }
  .tp-profile-card { margin-top: -52px; }
  .tp-avatar-row   { padding: 0 20px; transform: translateY(-30px); }
  .tp-avatar, .tp-avatar-fallback { width: 86px; height: 86px; font-size: 1.75rem; }
  .tp-identity, .tp-contact-strip, .tp-section { padding-left: 20px; padding-right: 20px; }
  .tp-name { font-size: 1.375rem; }
  .tp-container { padding-left: 12px; padding-right: 12px; }
}