/* ─────────────────────────────────────────────────────────────────────
   ПОТОК — страница /team/.
   Скоупируется под `.tp-page` так же, как главная под `.mp-page`.
   Стили из дизайна (specialists.html inline + базовый styles.css).
   Бейджи формата «очно/онлайн» намеренно НЕ переносим — у клиники
   только очный приём.
   ───────────────────────────────────────────────────────────────────── */

.tp-page {
  --gold: #bba88c;
  --gold-dark: #8f7a5e;
  --graphite-text: #30323D;

  --bg: #ffffff;
  --bg-soft: #f7f5f1;
  --border: #e6e3dd;

  --text: #30323D;
  --text-muted: #6b6f78;
  --text-dim: #8a8e96;

  --shadow-card: 0 8px 24px rgba(45, 50, 60, 0.08);
  --shadow-card-hover: 0 14px 32px rgba(143, 122, 94, 0.18);

  --r-card: 16px;
  --r-pill: 999px;

  --tp-container: 1200px;

  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
.tp-page *, .tp-page *::before, .tp-page *::after { box-sizing: border-box; }
.tp-page img, .tp-page svg { display: block; max-width: 100%; }
.tp-page a { color: inherit; text-decoration: none; }
.tp-page h1, .tp-page h2, .tp-page h3, .tp-page h4 { margin: 0; }

.tp-container {
  max-width: var(--tp-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Кнопки (повтор из mp-page, чтобы не зависеть от загрузки её CSS) ── */
.tp-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  transition: all .18s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}
.tp-page .btn-gold { background: var(--gold); color: #fff; }
.tp-page .btn-gold:hover { background: var(--gold-dark); color: #fff; }
.tp-page .btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold-dark);
}
.tp-page .btn-outline:hover { background: var(--gold); color: #fff; }
.tp-page .btn-lg { padding: 15px 28px; font-size: 15px; }

/* ── Hero ────────────────────────────────────────────────────────── */
.tp-page .page-hero {
  padding: 56px 0 36px;
  background: var(--bg);
}
.tp-page .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-family: 'Roboto Mono', monospace;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.tp-page .breadcrumb a { color: var(--text-muted); transition: color .15s; }
.tp-page .breadcrumb a:hover { color: var(--gold-dark); }
.tp-page .breadcrumb .sep { color: var(--text-dim); }
.tp-page .page-hero h1 {
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.tp-page .page-hero h1 .accent {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  color: var(--gold);
  font-size: 1.15em;
}
.tp-page .page-hero .lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 0 12px;
}

.tp-page .team-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px 48px;
  padding: 26px 0 0;
  margin-top: 28px;
  border-top: 1px solid var(--border);
}
.tp-page .team-stat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  min-width: 130px;
}
.tp-page .team-stat .num {
  font-family: 'Roboto Mono', monospace;
  font-size: 24px;
  color: var(--gold-dark);
  letter-spacing: -0.4px;
  font-weight: 500;
  line-height: 1;
}
.tp-page .team-stat .label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Filterbar ───────────────────────────────────────────────────── */
.tp-page .team-filterbar {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.tp-page .team-filterbar-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 24px;
  padding: 16px 0;
}
.tp-page .team-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tp-page .team-filter-group .group-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 4px;
}
.tp-page .chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.tp-page .chip:hover { border-color: var(--gold); color: var(--gold-dark); }
.tp-page .chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.tp-page .team-filterbar select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%238f7a5e' stroke-width='2'><path d='M1 1l5 5 5-5'/></svg>") right 14px center no-repeat;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 38px 8px 16px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}
.tp-page .team-filterbar select:hover { border-color: var(--gold); }
.tp-page .team-counter {
  flex-basis: 100%;
  text-align: center;
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  order: -1;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}
.tp-page .team-counter strong { color: var(--gold-dark); font-weight: 500; }

/* ── Grid ────────────────────────────────────────────────────────── */
.tp-page .team-grid-section {
  background: var(--bg-soft);
  padding: 56px 0 80px;
  min-height: 60vh;
}
.tp-page .team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.tp-page .spec-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px 20px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all .2s ease;
  cursor: pointer;
}
.tp-page .spec-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(187, 168, 140, 0.5);
  transform: translateY(-3px);
}
.tp-page .spec-photo,
.tp-page .spec-photo-placeholder {
  width: 130px;
  height: 130px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  margin-bottom: 18px;
}
.tp-page .spec-photo-placeholder {
  background: repeating-linear-gradient(135deg, #efeae0 0 8px, #e6e0d3 8px 16px);
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  font-family: 'Roboto Mono', monospace;
  font-size: 26px;
  font-weight: 700;
}
.tp-page .spec-card .name-last {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
}
.tp-page .spec-card .name-first {
  font-size: 15px;
  font-weight: 400;
  margin-top: 2px;
  color: var(--text);
}
.tp-page .spec-card .spec-title {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 12px 0 14px;
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.45em * 3);
}
.tp-page .spec-stage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gold-dark);
  font-family: 'Roboto Mono', monospace;
  margin-bottom: 6px;
}
.tp-page .spec-stage svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
}
/* «С кем работает» — Взрослые · Подростки · Дети. Серым шрифтом без моно, */
/* чтобы стаж выше оставался основным акцентом карточки. */
.tp-page .spec-audience {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.tp-page .spec-audience svg { width: 14px; height: 14px; color: var(--gold); flex: none; }
.tp-page .spec-card .btn { width: 100%; padding: 10px 16px; font-size: 13.5px; margin-top: auto; }

.tp-page .team-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.tp-page .team-empty h3 { color: var(--text); font-weight: 500; margin: 0 0 8px; font-size: 22px; }
.tp-page .team-empty p { margin: 0 0 24px; font-size: 15px; }

/* ── CTA-band «Не знаете, кого выбрать?» ─────────────────────────── */
.tp-page .tp-cta-band {
  background: var(--bg);
  padding: 64px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
/* Тонкая золотая полоска по центру верхней границы — акцентный штрих, */
/* такой же, как у CTA-band на странице «Цены» (.pp-cta-band::before). */
.tp-page .tp-cta-band::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--gold);
}
.tp-page .tp-cta-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
.tp-page .tp-cta-text h3 {
  font-size: 26px;
  font-weight: 700;
  margin: 6px 0 10px;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.tp-page .tp-cta-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 520px;
}
.tp-page .tp-cta-eyebrow {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.tp-page .tp-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 991px) {
  .tp-page .team-grid { grid-template-columns: repeat(2, 1fr); }
  .tp-page .team-stats { flex-direction: row; gap: 20px; }
  .tp-page .tp-cta-inner { grid-template-columns: 1fr; }
  .tp-page .tp-cta-actions { justify-content: flex-start; }
}
@media (max-width: 576px) {
  /* Сетка 2 в ряд на мобилке (как на главной). Жертвуем размером фото и */
  /* шрифтов, чтобы влезало две карточки рядом и не было пустого экрана. */
  .tp-page .team-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tp-page .spec-card { padding: 22px 14px 18px; }
  .tp-page .spec-photo,
  .tp-page .spec-photo-placeholder { width: 100px; height: 100px; margin-bottom: 14px; }
  .tp-page .spec-card .name-last { font-size: 15.5px; }
  .tp-page .spec-card .name-first { font-size: 13.5px; }
  .tp-page .spec-card .spec-title { font-size: 12.5px; margin: 10px 0 12px; }
  .tp-page .spec-stage { font-size: 12px; margin-bottom: 4px; }
  .tp-page .spec-audience { font-size: 12px; margin-bottom: 14px; }
  .tp-page .spec-card .btn { font-size: 12.5px; padding: 9px 10px; }

  .tp-page .team-stats { flex-direction: column; gap: 16px; }
  .tp-page .team-filterbar-inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 0; }

  /* «Кому» — на мобилке одна линия с горизонтальным скроллом. */
  /* Скролл скоупим строго внутри chip-row, без отрицательных margin (они */
  /* создавали горизонтальный скролл всей странице). Лейбл «Кому» — отдельной */
  /* строкой сверху, под ним - сама лента чипов. */
  .tp-page .team-filter-group[data-group="aud"] {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    overflow: hidden;
  }
  .tp-page .team-filter-group[data-group="aud"] .group-label {
    margin: 0;
    text-align: center;
  }
  /* Wrapper для скроллящихся чипов: position:relative — для абсолютного */
  /* фейда справа. overflow-x: auto живёт здесь, не на родителе. */
  .tp-page .team-filter-group[data-group="aud"] .chips-scroll {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding: 2px 28px 4px 2px;
  }
  .tp-page .team-filter-group[data-group="aud"] .chips-scroll::-webkit-scrollbar { display: none; }
  .tp-page .team-filter-group[data-group="aud"] .chips-scroll .chip {
    flex: none;
    scroll-snap-align: start;
  }
  /* Фейд-индикатор справа от chips-scroll. Прибит к chip-row, а не к */
  /* filterbar-inner — чтобы не пересекался с другими элементами. */
  .tp-page .team-filter-group[data-group="aud"] {
    position: relative;
  }
  .tp-page .team-filter-group[data-group="aud"]::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 4px;
    top: calc(1.6em + 8px);
    width: 28px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.94) 30%, rgba(255, 255, 255, 0));
    pointer-events: none;
  }

  .tp-page .team-filter-group[data-group="type"] { flex-direction: column; gap: 8px; align-items: stretch; }
  .tp-page .team-filter-group[data-group="type"] .group-label { text-align: center; }
  .tp-page .team-filterbar select { width: 100%; }

  .tp-page .tp-cta-band { padding: 48px 0; }
  .tp-page .tp-cta-actions .btn { width: 100%; }
}
