/* ─────────────────────────────────────────────────────────────────────
   ПОТОК — редизайн страницы /work/young/ «Услуги для детей и подростков».
   Источник дизайна: Claude Design handoff (см. memory/reference_design_bundle.md,
   файл project/detyam.html). Скоуп — `.yw-page`, чтобы не задевать
   остальные страницы, которые ещё на MDB.
   ───────────────────────────────────────────────────────────────────── */

.yw-page {
  --gold: #bba88c;
  --gold-dark: #8f7a5e;
  --graphite-nav: #2d323c;
  --graphite-text: #30323D;
  --graphite-top: #1f2129;

  --bg: #ffffff;
  --bg-soft: #f7f5f1;
  --bg-cool: #f8f9fa;
  --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-input: 12px;
  --r-pill: 999px;

  --aw-container: 1200px;
  --aw-gutter: 24px;
  /* Сколько отступать у sticky-якорей, чтобы заголовок секции не        */
  /* прятался под навбаром (72px) + section-nav (56px) + воздух.         */
  --aw-anchor-offset: 148px;

  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.yw-page *,
.yw-page *::before,
.yw-page *::after { box-sizing: border-box; }

.yw-page img,
.yw-page svg { display: block; max-width: 100%; }
.yw-page a { color: inherit; text-decoration: none; }

.yw-container {
  max-width: var(--aw-container);
  margin: 0 auto;
  padding: 0 var(--aw-gutter);
}

.yw-page h1,
.yw-page h2,
.yw-page h3,
.yw-page h4 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.yw-page h1 { font-size: 44px; letter-spacing: -0.5px; }
.yw-page h2 { font-size: 32px; letter-spacing: -0.3px; }
.yw-page h3 { font-size: 20px; font-weight: 500; }
.yw-page h4 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  margin: 0 0 12px;
}

.yw-page .accent {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  color: var(--gold);
  font-size: 1.1em;
  font-style: italic;
  /* Dancing Script italic у заглавных букв имеет широкий росчерк,
     который заходит на хвост соседней буквы — разводим небольшим
     лево-правым padding-ом. См. правку на /booking/. */
  display: inline-block;
  padding: 0 0.12em;
}

.yw-page .eyebrow {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.yw-page p { margin: 0 0 1em; }
.yw-page p:last-child { margin-bottom: 0; }

.yw-page .text-link {
  color: var(--gold-dark);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px dashed currentColor;
  transition: color .15s;
}
.yw-page .text-link:hover { color: var(--gold); border-bottom-color: transparent; }

/* ── Кнопки (повторяем токены брендбука) ─────────────────────────── */
.yw-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;
  text-align: center;
}
.yw-page .btn:focus { box-shadow: none; }
.yw-page .btn-gold { background: var(--gold); color: #fff; }
.yw-page .btn-gold:hover {
  background: var(--gold-dark);
  box-shadow: 0 8px 18px rgba(143, 122, 94, 0.3);
  color: #fff;
}
.yw-page .btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold-dark);
}
.yw-page .btn-outline:hover { background: var(--gold); color: #fff; }
.yw-page .btn-lg { padding: 15px 28px; font-size: 15px; }

/* ── HERO ─────────────────────────────────────────────────────────── */
.yw-hero {
  background: var(--bg);
  padding: 64px 0 40px;
}
.yw-hero h1 { margin: 8px 0 16px; max-width: 880px; }
.yw-hero .lede {
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.6;
  margin: 0 0 28px;
}
.yw-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.yw-breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.yw-breadcrumb a {
  color: var(--gold-dark);
  border-bottom: 1px dashed transparent;
  transition: border-color .15s;
}
.yw-breadcrumb a:hover { border-bottom-color: currentColor; }
.yw-breadcrumb .sep { color: var(--border); }

/* ── STICKY DIRECTION NAV ─────────────────────────────────────────── */
.yw-section-nav {
  position: sticky;
  /* Прилипает прямо под основным навбаром (72px). На мобиле сам          */
  /* основной навбар короче, но 72 — безопасный максимум.                */
  top: 72px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.yw-section-nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.yw-section-nav .label {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 8px;
}
.yw-section-nav .chip {
  font-size: 14px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--text-muted);
  transition: all .15s;
  cursor: pointer;
}
.yw-section-nav .chip:hover { color: var(--text); border-color: var(--gold); }
.yw-section-nav .chip.is-active {
  background: var(--graphite-text);
  color: #fff;
  border-color: var(--graphite-text);
}

/* ── SECTION BLOCK ────────────────────────────────────────────────── */
.yw-svc-block {
  padding: 72px 0;
  scroll-margin-top: var(--aw-anchor-offset);
  background: var(--bg);
}
.yw-svc-block.alt { background: var(--bg-soft); }

.svc-head {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}
.svc-intro h2 { margin: 4px 0 16px; }
.svc-intro p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0 0 12px;
  max-width: 580px;
}

.svc-aside {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px 24px 22px;
  box-shadow: 0 1px 0 rgba(45, 50, 60, 0.02);
}
.yw-svc-block.alt .svc-aside { background: #fff; }
.svc-aside ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.svc-aside li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
}
.svc-aside .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 7px;
  flex: none;
}

/* ── Тэг-облако заболеваний ──────────────────────────────────────── */
.svc-conditions { margin-bottom: 48px; }
.svc-conditions .label {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-cloud .tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  color: var(--text);
  transition: all .15s;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.yw-svc-block.alt .tag-cloud .tag { background: #fff; }
.tag-cloud a.tag:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(143, 122, 94, 0.15);
}
.tag-cloud .tag-static {
  cursor: default;
  color: var(--text-muted);
}

/* ── Карточки специалистов ───────────────────────────────────────── */
.svc-team { margin-bottom: 48px; }
.svc-team-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.svc-team-head h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}
/* Карточки специалистов 1-в-1 как в .mp-page (главная) и .tp-page  */
/* (/team/) — единый визуал по всему сайту: фамилия 17px bold, имя  */
/* 15px regular, специализация 13.5px text-muted с hard-clamp в     */
/* 3 строки (чтобы у соседних карточек кнопки и стаж выстраивались  */
/* в одну линию). См. main_page_redesign.css:900–1010.              */
.svc-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.yw-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;
}
.yw-svc-block.alt .spec-card { background: #fff; }
.yw-page .spec-card:hover {
  border-color: rgba(187, 168, 140, 0.5);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.yw-page .spec-photo-wrap {
  display: block;
  margin-bottom: 18px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-soft);
}
.yw-page .spec-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yw-page .spec-photo-placeholder {
  width: 100%;
  height: 100%;
  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: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.yw-page .spec-card .name-last {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  color: var(--text);
}
.yw-page .spec-card .name-first {
  font-size: 15px;
  font-weight: 400;
  margin-top: 2px;
  color: var(--text);
}
.yw-page .spec-card .spec-title {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 12px 0 14px;
  line-height: 1.45;
  font-weight: 400;
  /* macOS/iOS antialiased даёт слишком тонкую кириллицу — отключаем. */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  /* Hard-clamp 3 строки: соседние карточки выравниваются по высоте,    */
  /* кнопки «Подробнее» и блоки стажа на одной линии.                   */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.45em * 3);
}
.yw-page .spec-card .spec-stage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  color: var(--gold-dark);
  margin-bottom: 18px;
}
.yw-page .spec-card .spec-stage .icon { width: 14px; height: 14px; }
/* Кнопка прижата к низу через margin-top: auto — независимо от длины */
/* spec-title и наличия spec-stage низ карточек выровнен между соседями. */
.yw-page .spec-card .btn-outline { margin-top: auto; align-self: stretch; }

/* ── Цены направления ────────────────────────────────────────────── */
.svc-pricing { margin-top: 8px; }
.svc-pricing-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.svc-pricing-head h3 { font-size: 22px; font-weight: 700; }
.price-group {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(45, 50, 60, 0.02);
}
.yw-svc-block.alt .price-group { background: #fff; }
.price-group-head {
  padding: 16px 24px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.yw-svc-block.alt .price-group-head { background: var(--bg-cool); }
.price-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  transition: background .15s;
}
.price-row:first-of-type { border-top: 0; }
.price-row:hover { background: rgba(187, 168, 140, 0.04); }
.price-row .price-name {
  font-size: 15px;
  color: var(--text);
  line-height: 1.4;
}
.price-row .price-amount {
  font-family: 'Roboto Mono', monospace;
  font-size: 17px;
  color: var(--gold-dark);
  font-weight: 500;
  white-space: nowrap;
}
.price-row .price-duration {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 70px;
  text-align: right;
}

/* ── CTA-band ────────────────────────────────────────────────────── */
.yw-cta-band {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 56px 0;
  position: relative;
}
.yw-cta-band::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--gold);
}
.yw-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.yw-cta-text { flex: 1 1 320px; }
.yw-cta-text h3 { font-size: 24px; font-weight: 700; margin: 4px 0 8px; }
.yw-cta-text p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0;
}
.yw-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── АДАПТИВ ──────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .yw-page h1 { font-size: 34px; }
  .yw-page h2 { font-size: 26px; }
  .yw-hero { padding: 48px 0 32px; }
  .yw-hero .lede { font-size: 15.5px; }

  .yw-svc-block { padding: 56px 0; }
  .svc-head { grid-template-columns: 1fr; gap: 28px; }
  .svc-intro p { max-width: none; }

  .svc-team-grid { grid-template-columns: 1fr 1fr; }
  .spec-card:last-child {
    grid-column: 1 / -1;
    max-width: 360px;
    justify-self: center;
    width: 100%;
  }

  .yw-cta-inner { flex-direction: column; align-items: flex-start; }
  .yw-cta-actions { width: 100%; }
  .yw-cta-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 576px) {
  .yw-page h1 { font-size: 28px; }
  .yw-hero { padding: 36px 0 24px; }
  .yw-hero-ctas { flex-direction: column; align-items: stretch; }
  .yw-hero-ctas .btn { width: 100%; }

  .yw-section-nav {
    top: 64px;
  }
  .yw-section-nav-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .yw-section-nav-inner::-webkit-scrollbar { display: none; }
  .yw-section-nav .chip { flex: none; padding: 7px 14px; font-size: 13.5px; }

  .yw-svc-block { padding: 40px 0; }
  .svc-aside { padding: 18px 18px 16px; }

  .svc-team-grid { grid-template-columns: 1fr; }
  .spec-card:last-child { max-width: none; }
  .spec-photo-wrap { width: 110px; height: 110px; }

  .price-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 18px;
    text-align: center;
    justify-items: center;
  }
  .price-row .price-amount { order: -1; font-size: 22px; }
  .price-row .price-duration { text-align: center; min-width: 0; font-size: 11px; }

  .yw-cta-band { padding: 44px 0; }
  /* На мобилке кнопки переносятся под текст. Дефолтный flex-gap 32px */
  /* в этом случае превращается в большой вертикальный пропуск между */
  /* «Звонок бесплатный.» и первой кнопкой — выглядит как баг вёрстки. */
  /* Сжимаем до 16px и убираем min-width у text-колонки. */
  .yw-cta-inner { gap: 16px; }
  .yw-cta-text { flex: 1 1 auto; }
  .yw-cta-text h3 { font-size: 22px; }
  .yw-cta-actions { flex-direction: column; }
  .yw-cta-actions .btn { width: 100%; }
}
