/* НяняПоиск — единая таблица стилей.
   Палитру можно перекрасить целиком, поменяв переменные ниже. */
/* Шрифт Golos Text (SIL OFL 1.1, см. fonts/OFL.txt) — локально, без запросов к Google */
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/golos-text-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/golos-text-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/golos-text-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/golos-text-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/golos-text-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/golos-text-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 800; font-display: swap;
  src: url(/assets/fonts/golos-text-cyrillic-800-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 800; font-display: swap;
  src: url(/assets/fonts/golos-text-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --ink: #1e2a38;          /* основной текст — глубокий сине-серый, не чёрный */
  --ink-soft: #66707d;     /* вторичный текст */
  --primary: #0b8478;      /* фирменный бирюзовый: спокойствие и доверие */
  --primary-dark: #086a60;
  --primary-tint: #e7f5f2; /* выбранные варианты, баннеры */
  --primary-glow: rgba(11, 132, 120, .35);
  --cta: #e2513c;          /* тёплый коралловый акцент — счётчики, важные метки */
  --cta-dark: #c7412e;
  --ok: #1cc98a;           /* зелёный — онлайн, успех, проверенные документы */
  --warn: #f2b63f;
  --danger: #d93f4c;
  --bg: #f6f4f0;           /* тёплый светлый фон */
  --card: #ffffff;
  --line: #e9e5df;
  --chip: #f0ede8;
  --chip-hover: #e6e1d9;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 100px;
  --shadow: 0 2px 16px rgba(30, 42, 56, .06);
  --font: "Golos Text", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
/* атрибут hidden всегда скрывает элемент, даже если у класса задан display: flex/grid */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.55; overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 .8em; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.danger { color: var(--danger); }
.center { text-align: center; }
.pre { white-space: pre-line; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 440px; margin: 0 auto; padding: 0 16px; }
.narrow-lg { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------- Шапка ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.logo { font-weight: 800; font-size: 1.35rem; color: var(--ink); letter-spacing: -.02em; }
.logo span { color: var(--ink); }
.logo:hover { text-decoration: none; }
.header-city-wrap { position: relative; }
.header-city {
  display: flex; align-items: center; gap: 5px; background: var(--chip); border: 0; cursor: pointer;
  border-radius: var(--radius-pill); padding: 7px 14px 7px 10px; font: inherit; font-size: .9rem;
  font-weight: 500; color: var(--ink); white-space: nowrap;
}
.header-city:hover { background: var(--chip-hover); }
.hc-pin { display: inline-flex; color: var(--primary); }
.city-popover {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 260px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 12px;
}
.city-popover input { margin: 0; }
.city-popover .suggest-list { position: static; margin-top: 6px; box-shadow: none; border-color: var(--line); }
.city-banner { background: var(--primary-tint); border-bottom: 1px solid var(--line); }
.city-banner-row { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 16px; flex-wrap: wrap; text-align: center; }
.city-banner-actions { display: flex; align-items: center; gap: 8px; }
.city-banner-x { border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ink-soft); padding: 0 2px; }
.top-nav { display: flex; gap: 22px; flex: 1; }
.top-nav a { color: var(--ink-soft); font-weight: 400; font-size: .95rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.top-nav a[aria-current] { border-color: var(--primary); color: var(--ink); font-weight: 500; }
.top-nav a:hover { text-decoration: none; color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.top-nav a, .header-actions a { white-space: nowrap; }
/* «Стать няней» в шапке — только на широких экранах, на узких хватает кнопки на главной */
@media (max-width: 1000px) { .header-actions .header-join { display: none; } }
.header-actions::before {
  content: ""; width: 1px; height: 24px; background: var(--line); margin-right: 2px;
}
.icon-link { color: var(--ink-soft); font-weight: 400; font-size: .95rem; position: relative; }
.icon-link:hover { color: var(--ink); text-decoration: none; }
.badge {
  background: var(--cta); color: #fff; border-radius: 99px; font-size: .7rem;
  padding: 1px 6px; margin-left: 4px; font-weight: 600; vertical-align: top;
}

/* ---------- Кнопки, формы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer; font: inherit; font-weight: 600;
  border-radius: var(--radius-pill); padding: 10px 22px; transition: background .15s, transform .05s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--chip); color: var(--ink); }
.btn-ghost:hover { background: var(--chip-hover); }
.btn-light { background: #fff; color: var(--primary); }
.btn-sm { padding: 7px 16px; font-size: .9rem; }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

input[type=text], input[type=tel], input[type=password], input[type=email],
input[type=url], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
label { display: block; font-weight: 500; margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 5px; font-weight: 400; }
textarea { resize: vertical; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: 3px; }
.check.inline { display: inline-flex; margin: 0 14px 8px 0; }
.fieldset { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
.fieldset legend { font-weight: 600; padding: 0 6px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
.form-error { color: var(--danger); font-weight: 500; margin: 10px 0; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.stack-form > * { margin-bottom: 10px; }
.subject-checks { display: flex; flex-wrap: wrap; }

/* ---------- Карточки, алерты ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px; }
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin: 14px 0; font-weight: 500; }
.alert-ok { background: #e2f7ee; color: #0d7a53; }
.alert-err { background: #fde8ec; color: #b01c3d; }

/* ---------- Главная ---------- */
.hero { background: var(--card); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; align-items: center; padding: 46px 16px; }
.hero-copy h1 { font-size: 2.6rem; margin-bottom: .4em; }
.hero-actions { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 8px; }
.hero-stats b { font-size: 1.5rem; display: block; }
.hero-stats span { color: var(--ink-soft); font-size: .9rem; }
.hero-art { display: flex; justify-content: center; }
/* Схематичная «анкета няни» в hero: без выдуманных имён и цифр — только то, что проверяется на сервисе */
.hero-card {
  position: relative; z-index: 1; width: min(330px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 22px; box-shadow: 0 18px 40px rgba(30, 42, 56, .10); transform: rotate(-1.5deg);
}
.hero-art { position: relative; }
.hero-art::before {
  content: ""; position: absolute; top: -26px; right: 8%; width: 150px; height: 150px; border-radius: 50%;
  background: var(--primary-tint);
}
.hero-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.hero-card-ava {
  width: 58px; height: 58px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), #3fb5a6); color: #fff;
}
.hero-card-ava svg { width: 30px; height: 30px; }
.hero-line { height: 10px; border-radius: 99px; background: var(--chip); margin: 6px 0; }
.hero-line.w60 { width: 60%; } .hero-line.w40 { width: 40%; } .hero-line.w80 { width: 80%; } .hero-line.w90 { width: 90%; }
.hero-card-badges { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.hero-badge {
  display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; color: var(--ink);
  background: var(--primary-tint); border-radius: 12px; padding: 8px 12px;
}
.hero-badge i { font-style: normal; color: var(--primary); font-weight: 800; }
.section { padding: 34px 0; }
.section-alt { background: var(--card); border-block: 1px solid var(--line); }
.section-title { margin-bottom: 18px; }
.section-title small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .95rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps li b {
  display: flex; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
  align-items: center; justify-content: center; margin-bottom: 8px; font-size: 1.05rem;
}
.cta-banner {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff;
  border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow);
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255, 255, 255, .88); max-width: 480px; }

/* ---------- Чипы ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chips-sm { gap: 6px; margin: 6px 0; }
.chip {
  background: var(--chip); border-radius: 99px; padding: 7px 15px; color: var(--ink);
  font-size: .92rem; font-weight: 500;
}
a.chip:hover { background: var(--chip-hover); text-decoration: none; color: var(--primary); }
.chip-more { color: var(--primary); }
.chip-static { cursor: default; }
.chip-xs { padding: 2px 9px; font-size: .78rem; }
.chip-tg { background: #229ED9; color: #fff; font-weight: 700; }
.chip-vk { background: #0077FF; color: #fff; font-weight: 700; }

/* ---------- Услуги по группам (главная) ---------- */
.subject-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 26px;
}
.subject-col-icon {
  width: 34px; height: 34px; color: var(--primary); margin-bottom: 6px;
}
.subject-col-icon svg { width: 100%; height: 100%; }
.subject-col h3 { font-size: 1.05rem; margin-bottom: 10px; }
.subject-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.subject-col a { color: var(--ink-soft); font-size: .95rem; }
.subject-col a:hover { color: var(--primary); text-decoration: none; }
.subject-col-more {
  display: inline-block; margin-top: 10px; font-weight: 700; color: var(--ink);
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left;
}
.subject-col-more:hover { color: var(--primary); text-decoration: none; }
.subject-grid + .btn { margin-top: 26px; }

/* Мини-карточки нянь на главной */
.tutor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tutor-mini {
  display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; color: var(--ink); box-shadow: var(--shadow);
}
.tutor-mini:hover { text-decoration: none; border-color: var(--primary); }
.tm-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: .92rem; }
.tm-body b { font-size: 1rem; }

/* ---------- Аватары ---------- */
.avatar {
  width: 48px; height: 48px; flex: none; border-radius: 50%; overflow: hidden; position: relative;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 40px; height: 40px; font-size: 1rem; }
.avatar-md { width: 76px; height: 76px; font-size: 1.7rem; }
.avatar-lg { width: 110px; height: 110px; font-size: 2.4rem; border-radius: 18px; }
.online-dot {
  position: absolute; right: 2px; bottom: 2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ok); border: 2px solid #fff;
}
.verified { color: var(--ok); font-size: .85em; }

/* ---------- Поиск ---------- */
.page-title { margin: 22px 0 14px; }
.h1-count { font-size: .6em; font-weight: 600; vertical-align: middle; }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 18px;
}
.filter-bar select, .filter-bar input[type=text] { width: auto; min-width: 140px; }
.tutor-list { display: flex; flex-direction: column; gap: 4px; }
.tutor-card { display: flex; gap: 18px; position: relative; }
.tutor-card-actions { position: absolute; top: 14px; right: 16px; display: flex; align-items: center; gap: 6px; z-index: 2; }
.js-fav-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.js-fav-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.js-fav-btn:hover { background: #ffe1e6; color: var(--cta); }
.js-fav-btn.active { color: var(--cta); }
.js-fav-btn.active svg { fill: var(--cta); stroke: var(--cta); }
.tutor-card-menu { position: relative; }
.js-menu-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink-soft);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.js-menu-btn:hover { background: var(--chip-hover); }
.tutor-card-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 10; min-width: 200px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 6px;
}
.tutor-card-dropdown button {
  display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: .9rem; padding: 9px 10px; border-radius: 6px; color: var(--ink);
}
.tutor-card-dropdown button:hover { background: var(--chip); }
.tutor-card-body { flex: 1; min-width: 0; }
.tutor-card-body h3 a { color: var(--ink); }
.tutor-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .9rem; margin-bottom: 4px; }
.rating { color: #e8a11c; font-weight: 600; }
.tutor-about { color: var(--ink-soft); font-size: .93rem; margin: 6px 0 0; }
.tutor-card-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 150px; }
.price { font-size: 1.15rem; font-weight: 800; text-align: right; }
.price span { font-size: .8rem; color: var(--ink-soft); font-weight: 400; }
.empty-state { text-align: center; padding: 40px 22px; }
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 20px 0; }
.page { padding: 7px 13px; border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--shadow); }
.page.current { background: var(--primary); color: #fff; }
.page-ellipsis { padding: 0 4px; color: var(--ink-soft); }
.breadcrumbs { margin-top: 16px; }
.geo-cta { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.seo-text { margin-top: 24px; }

/* подсказки городов */
.city-suggest { position: relative; }
.suggest-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-height: 260px; overflow: auto;
}
.suggest-list button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 9px 12px; font: inherit; cursor: pointer;
}
.suggest-list button:hover { background: var(--chip); }

/* ---------- Профиль ---------- */
.profile-card { padding: 28px; position: relative; margin-top: 24px; }
.profile-head { display: flex; gap: 22px; margin-bottom: 8px; }
.profile-head-body h1 { font-size: 1.6rem; margin-bottom: 4px; }
.profile-head-body .btn { margin-top: 10px; }
.rating-line { font-weight: 600; color: #e8a11c; }
.rating-line .muted { font-weight: 400; }
.profile-sec { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius-sm); overflow: hidden; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Лента миниатюр галереи анкеты */
.gallery-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gallery-thumb {
  position: relative; flex: none; width: 130px; height: 90px; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--chip); border: 0; padding: 0; cursor: pointer;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; background: rgba(18,43,70,.35);
}

/* Просмотрщик (лайтбокс): фото/видео/эмбед на весь экран, с перелистыванием */
.modal-lightbox { background: none; }
.modal-lightbox .modal-backdrop { background: rgba(10, 16, 26, .92); }
.lightbox-body {
  position: relative; z-index: 1; width: min(900px, 92vw); height: min(600px, 80vh);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-body img, .lightbox-body video { max-width: 100%; max-height: 100%; border-radius: var(--radius-sm); }
.lightbox-body iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; z-index: 2; border: 0; background: none;
  color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; border: 0; cursor: pointer;
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.8rem;
}
.lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-counter { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; font-size: .9rem; }

.price-table { width: 100%; border-collapse: collapse; }
.price-table td { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.price-cell { text-align: right; font-weight: 600; white-space: nowrap; }
.review { border-bottom: 1px solid var(--line); padding: 12px 0; }
.review-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.stars { color: #e8a11c; letter-spacing: .1em; }
.review-form { margin-top: 16px; }
.star-input { display: inline-flex; flex-direction: row-reverse; font-size: 1.7rem; margin-bottom: 8px; }
.star-input input { display: none; }
.star-input label { color: #cfd8e6; cursor: pointer; margin: 0; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #e8a11c; }

/* ---------- Визард ---------- */
.wizard { max-width: 640px; margin: 26px auto; padding: 26px; }
.wizard-note { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.wizard-progress { height: 6px; background: var(--chip); border-radius: 99px; overflow: hidden; margin-bottom: 22px; }
.wizard-progress-fill { height: 100%; width: 10%; background: var(--primary); border-radius: 99px; transition: width .25s; }
.wz-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.wz-step h1 { font-size: 1.7rem; margin-bottom: 18px; }
.wz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.wz-opt {
  display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px; font-weight: 500;
  transition: border-color .12s, background .12s;
}
.wz-opt:hover { border-color: var(--primary); }
.wz-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.wz-opt input { width: 18px; height: 18px; accent-color: var(--primary); }
.wz-city { margin-top: 6px; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.wizard-done { text-align: center; padding: 30px 0; }
.done-ring {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
  border: 5px solid var(--ok); color: var(--ok); font-size: 2.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
#wzSubjects { max-height: 320px; overflow: auto; }

/* ---------- Заявки (список) ---------- */
.order-list { display: flex; flex-direction: column; gap: 4px; }
.order-card header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.order-facts { list-style: none; padding: 0; margin: 6px 0; color: var(--ink-soft); font-size: .93rem; }
.order-comment { background: var(--chip); border-radius: var(--radius-sm); padding: 10px 13px; font-size: .93rem; }
.apply-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.apply-form textarea { flex: 1; min-width: 220px; }

/* ---------- Чат ---------- */
.dialog-list { display: flex; flex-direction: column; gap: 4px; }
.dialog-item { display: flex; gap: 14px; align-items: center; padding: 14px 18px; color: var(--ink); }
.dialog-item:hover { text-decoration: none; box-shadow: 0 2px 14px rgba(22,35,59,.13); }
.dialog-item.has-unread { border-left: 3px solid var(--cta); }
.dialog-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dialog-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-box { display: flex; flex-direction: column; height: calc(100vh - 140px); min-height: 420px; padding: 0; overflow: hidden; margin-top: 18px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-back { font-size: 1.3rem; color: var(--ink); }
.chat-head-body { flex: 1; display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 76%; align-self: flex-start; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg-bubble {
  display: inline-block; background: #fff; border-radius: 14px 14px 14px 4px;
  padding: 9px 13px; box-shadow: var(--shadow); text-align: left;
}
.msg.mine .msg-bubble { background: var(--primary); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg-time { font-size: .72rem; color: var(--ink-soft); margin-top: 2px; }
.ticks { margin-left: 4px; color: var(--ink-soft); letter-spacing: -3px; font-size: .8rem; }
.ticks-read { color: var(--primary); }
.chat-input { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; max-height: 120px; }

/* ---------- Модалка ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(22, 35, 59, .5); }
.modal-card {
  position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  width: min(520px, calc(100vw - 32px)); padding: 24px;
}
.modal-x { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: var(--ink-soft); }
.modal-head { display: flex; gap: 12px; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Модалка «Все услуги»: слева группы, справа услуги */
.modal-card-lg { width: min(760px, calc(100vw - 32px)); padding: 0; display: flex; flex-direction: column; max-height: min(640px, calc(100vh - 64px)); }
.modal-card-lg h2 { padding: 22px 24px 12px; margin: 0; }
.subjects-modal-body { display: grid; grid-template-columns: 240px 1fr; flex: 1; min-height: 0; border-top: 1px solid var(--line); }
.subjects-modal-cats {
  overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg);
  border-radius: 0 0 0 var(--radius);
}
.subjects-modal-cat {
  display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font: inherit; padding: 10px 18px; color: var(--ink-soft); border-left: 3px solid transparent;
}
.subjects-modal-cat:hover { color: var(--ink); background: #fff; }
.subjects-modal-cat.active { color: var(--primary); background: #fff; border-left-color: var(--primary); font-weight: 600; }
.subjects-modal-list { overflow-y: auto; padding: 18px 24px; }
.subjects-modal-list h3 { margin-bottom: 12px; }
.subjects-modal-list ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.subjects-modal-list li { break-inside: avoid; margin-bottom: 8px; }
.subjects-modal-list a { color: var(--ink-soft); font-size: .93rem; }
.subjects-modal-list a:hover { color: var(--primary); text-decoration: none; }

/* ---------- Кабинет ---------- */
.cab-form h2 { margin-top: 18px; }
.cab-avatar-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.upload-label input { margin-top: 6px; }
.confirm-card { border-left: 4px solid var(--warn); display: flex; flex-direction: column; gap: 8px; }

/* ---------- Админ ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { text-align: center; margin: 0; }
.stat b { display: block; font-size: 1.8rem; }
/* ---------- Админка: боковое меню ---------- */
.admin-mobile-bar { display: none; }
.admin-sidebar-backdrop { display: none; }
.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }
.admin-sidebar {
  flex: none; width: 232px; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 0; position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .logo { padding: 0 20px 18px; display: block; }
.admin-nav-vertical { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-nav-vertical a {
  padding: 10px 20px; color: var(--ink-soft); font-weight: 500; border-left: 3px solid transparent;
}
.admin-nav-vertical a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.admin-nav-vertical a[aria-current] { background: var(--bg); color: var(--primary); border-left-color: var(--primary); }
.admin-sidebar-footer { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.admin-sidebar-footer .icon-link { padding: 10px 20px; color: var(--ink-soft); font-weight: 500; }
.admin-sidebar-footer .icon-link:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.admin-content { flex: 1; min-width: 0; overflow-x: auto; padding: 28px 0; }

@media (max-width: 860px) {
  .admin-mobile-bar {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
  }
  .admin-burger {
    border: 0; background: var(--chip); width: 38px; height: 38px; border-radius: var(--radius-sm);
    font-size: 1.2rem; line-height: 1; flex: none;
  }
  .admin-mobile-bar .logo { padding: 0; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; z-index: 50; width: 250px; max-width: 82vw;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow);
  }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-sidebar .logo { padding: 0 20px 18px; margin-top: 4px; }
  .admin-sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(10, 16, 26, .45); z-index: 45; opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  .admin-sidebar-backdrop.is-open { display: block; opacity: 1; pointer-events: auto; }
  .admin-content { padding: 16px 0; }
}

/* ---------- Входящие (единый инбокс) ---------- */
.inbox-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.inbox-list { display: flex; flex-direction: column; gap: 4px; }
.inbox-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 8px; border-radius: var(--radius-sm); color: var(--ink); }
.inbox-row:hover { background: var(--bg); text-decoration: none; }
.inbox-row.has-unread { background: #fff8e6; }
.inbox-row .avatar { margin-top: 2px; }
.inbox-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.inbox-row-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.inbox-row-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; margin-top: 2px; }
.channel-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.channel-card code { display: inline-block; background: var(--chip); padding: 2px 6px; border-radius: 4px; font-size: .82rem; word-break: break-all; }

.admin-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--ink-soft); font-weight: 600; }
.table td, .table th { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.row-pending { background: #fff8e6; }

/* ---------- Футер и мобильная навигация ---------- */
.site-footer { background: var(--card); border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 90px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-copy { margin-top: 20px; font-size: .85rem; }
.logo-footer { margin-bottom: 8px; }
.bottom-nav { display: none; }
.center-page { text-align: center; padding: 60px 16px; }
.err-code { font-size: 4.5rem; color: var(--primary); }
.doc h2 { margin-top: 20px; }
.auth-card { margin-top: 30px; }
.role-switch { display: flex; gap: 10px; margin-bottom: 16px; }
.role-opt { flex: 1; margin: 0; cursor: pointer; }
.role-opt input { display: none; }
.role-opt span {
  display: block; text-align: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 8px; font-weight: 600;
}
.role-opt input:checked + span { border-color: var(--primary); background: var(--primary-tint); color: var(--primary); }
.feed-card h3 { margin-bottom: 2px; }

/* ---------- НяняПоиск: доверие, документы, услуги ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trust-item { margin: 0; }
.trust-item b { display: block; margin-bottom: 6px; }
.trust-item p { margin: 0; font-size: .95rem; }
.cta-split { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-split h2 { margin-bottom: 4px; }
.cta-split p { margin: 0; max-width: 560px; }

.doc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.doc-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600;
  color: var(--primary-dark); background: var(--primary-tint); border-radius: 99px; padding: 3px 10px;
}
.doc-badge.off { color: var(--ink-soft); background: var(--chip); font-weight: 500; }
.doc-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.doc-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.doc-row .doc-ico {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--chip); color: var(--ink-soft); font-size: .8rem; font-weight: 800; flex: none; align-self: center;
}
.doc-row.ok .doc-ico { background: var(--primary-tint); color: var(--primary); }
.doc-row.ok { font-weight: 600; }
.profile-prices { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0 10px; }
.profile-prices .price { text-align: left; }
.price-sub { font-size: .95rem; }

.card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-head-row h2 { margin: 0; }
.my-order {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.card-note { background: var(--primary-tint); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; font-size: .95rem; }
.service-group { margin-bottom: 10px; }
.service-group-name { font-weight: 600; color: var(--ink-soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; margin: 8px 0 4px; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.service-row .check.inline { margin: 0; flex: 1; min-width: 0; }
.service-price { width: 110px !important; flex: none; padding: 6px 10px !important; margin: 0 !important; }
.gallery-edit { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.gallery-edit-item { position: relative; width: 96px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; background: var(--chip); margin: 0; }
.gallery-edit-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-del {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(30, 42, 56, .7); color: #fff; font-size: 1rem; line-height: 1;
}

.wz-group { margin-bottom: 6px; }
.wz-group-name { font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin: 10px 0 6px; }
.wz-group .wz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wz-sub { font-size: 1.15rem; margin: 18px 0 10px; }
.segmented { display: inline-flex; background: var(--chip); border-radius: 99px; padding: 4px; margin-bottom: 14px; }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { display: none; }
.segmented span { display: block; padding: 7px 18px; border-radius: 99px; font-weight: 600; color: var(--ink-soft); }
.segmented input:checked + span { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.geo-groups { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding: 30px 16px; }
  .hero-art { display: none; }
  .steps { grid-template-columns: 1fr; }
  .admin-cols, .footer-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .tutor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  h1 { font-size: 1.5rem; }
  .hero-copy h1 { font-size: 2rem; }
  .top-nav { display: none; }
  /* Все пункты справа дублируются нижней навигацией — убираем, чтобы шапка не распирала экран */
  .header-actions { display: none; }
  .header-row { min-height: 56px; justify-content: center; }
  .tutor-card { flex-wrap: wrap; }
  .tutor-card-side { flex-direction: row; width: 100%; min-width: 0; align-items: center; }
  .tutor-card-side .price { margin-right: auto; }
  .tutor-card-side .price-sub { margin-right: 0; }
  .wz-group .wz-options { grid-template-columns: minmax(0, 1fr); }
  .profile-head { flex-direction: column; align-items: center; text-align: center; }
  .profile-head-body { display: flex; flex-direction: column; align-items: center; }
  .rating-line, .modal-head { justify-content: center; }
  .chat-box { height: calc(100vh - 270px); border-radius: var(--radius); }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
    color: var(--ink-soft); font-size: .68rem; font-weight: 500; position: relative;
  }
  .bottom-nav a[aria-current], .bottom-nav a:hover { color: var(--primary); text-decoration: none; }
  .bn-ico { font-size: 1.25rem; line-height: 1.1; }
  .bn-accent .bn-ico {
    background: var(--primary); color: #fff; width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin-top: -14px;
    box-shadow: 0 3px 8px var(--primary-glow);
  }
  .bottom-nav .badge { position: absolute; top: -2px; right: 16%; }
  .wizard { padding: 18px; margin: 10px auto; }
  .wizard-nav { flex-wrap: wrap; }
  .wizard-nav button { flex: 1; min-width: 0; }
  .filter-bar select, .filter-bar input[type=text] { min-width: calc(50% - 6px); flex: 1; }
  .cab-avatar-row { flex-direction: column; text-align: center; }
  .hero-stats { gap: 18px; }
  .modal-card { padding: 18px; }
  .modal-card-lg { padding: 0; max-height: calc(100vh - 32px); }
  .subjects-modal-body { grid-template-columns: 1fr; grid-template-rows: 140px 1fr; }
  .subjects-modal-cats { border-right: 0; border-bottom: 1px solid var(--line); }
  .subjects-modal-list ul { columns: 1; }
  .subject-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .tutor-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .wizard-nav { flex-direction: column-reverse; }
  .wizard-nav button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
