/* tcard — the v2 therapist card, extracted verbatim from css/directory.css so
   the landing-page carousel can render the SAME card (markup built by
   js/tcard-template.js). Loaded BEFORE directory.css on the directory page.
   :root values mirror directory.css — keep the two in sync if the palette moves.
   `.tcard-link` is the landing-page wrapper anchor: index.html must NOT reuse
   `.therapist-card-link` (css/styles.css's legacy card rules would clip/animate
   the v2 card; the directory page neutralizes those page-scoped). */
:root {
  --ink: #13302C;
  --ink-soft: #4A5C58;
  --teal-900: #03494B;
  --teal-700: #1F5A55;
  --teal: #447569;
  --teal-300: #8FB5AD;
  --mint: #EBF3F1;
  --mint-deep: #DFEBE8;
  --amber: #DD9444;
  --line: rgba(3, 73, 75, 0.12);
  --line-strong: rgba(3, 73, 75, 0.22);
  --r-card: 20px;
  --r-pill: 999px;
  --shadow: 0 16px 44px -4px rgba(3, 73, 75, 0.16);
  --shadow-sm: 0 8px 24px -6px rgba(3, 73, 75, 0.28);
}

.tcard-link {
  position: relative;
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.tcard {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s, border-color 0.28s;
}

.tcard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.tcard-media {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: var(--mint-deep);
}

.tcard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tcard:hover .tcard-img {
  transform: scale(1.05);
}

/* Default-avatar SVG fallback absolutely fills the (position:relative)
   media box — same mechanism as the old .therapist-card-default-avatar. */
.tcard-default-avatar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.tcard-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* flex-wrap so a long name doesn't push the verified badge off the card
   (spec §1: "姓名行flex-wrap防勾徽脱轨"). */
.tcard-namerow {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.tcard .tcard-name {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.15;
  color: var(--teal-900);
}

/* "Verified by TMind" full-text pill (DOM contract #1) — checkmark via
   ::before per Task 3 vocabulary; the text itself is emitted by Task 4's
   renderCard() so it stays byte-identical to directory.js:394 today. */
.tcard-verified {
  /* Overlaid on the photo's bottom-right (operator directive 2026-07-19) —
     frees the name row; .tcard-media is the position:relative box. */
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--teal-900);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(3, 73, 75, 0.35);
}

.tcard-verified::before {
  content: "✓";
  margin-right: 4px;
  font-weight: 700;
}

.tcard-title {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 3px;
}

.tcard-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 13px;
}

.tcard-tag {
  font-size: 12px;
  color: var(--teal-700);
  background: var(--mint);
  padding: 5px 11px;
  border-radius: var(--r-pill);
}

.tcard-details {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 15px;
}

.tcard-detail {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.tcard-detail-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
  .tcard,
  .tcard-img {
    transition: none;
  }

  .tcard:hover {
    transform: none;
  }

  .tcard:hover .tcard-img {
    transform: none;
  }
}
