/* v4 — 21.09.2026. Единая типосистема (Jeko для всего + рукописный Vasek для подписей),
   ритм секций, заметная форма, квиз без перебора оранжевого, попап «спасибо».
   Подключается последним, после v3.css. */

:root {
	/* шкала: 14 / 16 / 18 / 20 / 24 / h2 / display — и ничего между */
	--fs-display: clamp(34px, 4.6vw, 60px);
	--fs-h2: clamp(30px, 3.6vw, 46px);
	--fs-h3: 24px;
	--fs-lead: 20px;
	--fs-body: 18px;
	--fs-s: 16px;
	--fs-xs: 14px;
	--fs-hand: 28px;
	--lh-tight: 1.15;
	--lh-body: 1.55;
	--sp-sec: clamp(40px, 5vw, 64px);
	--sp-title: clamp(22px, 3vw, 36px);
	--field-bg: #F4F8F9;
	--field-border: #C5D8DE;
	--field-border-hover: #9CC3CC;
	--field-placeholder: #5F7780;
	--ring: 0 0 0 4px rgba(14, 116, 144, .15);
}

/* ---------- 1. Один шрифт везде: кнопки, поля, селекты наследуют Jeko ---------- */
button, input, select, textarea, optgroup { font-family: inherit; font-size: inherit; line-height: inherit; }
.quiz__loading-text, .quiz__loading-subtext { font-family: inherit; }
.quiz__loading-text { font-weight: 700; color: var(--ink); }
.quiz__loading-subtext { color: var(--gray-text); }

/* ---------- 2. Шкала размеров ---------- */
body { font-size: var(--fs-body); line-height: var(--lh-body); }
.hero__title { font-size: var(--fs-display); line-height: 1.06; }
.hero__text, .hero__text p { font-size: var(--fs-lead); line-height: 1.45; }
.title { font-size: var(--fs-h2); line-height: var(--lh-tight); margin-bottom: var(--sp-title); }
.tour-item__title, .step-item__title, .quiz__title, .thx__title { font-size: var(--fs-h3); line-height: 1.2; }
.pick__title, .pick__name, .quiz__expert-name, .tour-item__price-val { font-size: var(--fs-lead); }
.office__lead, .tg__lead, .request__note, .information__intro, .pick__price { font-size: var(--fs-body); }
.tour-item__desc, .step-item__description, .tg__list li, .tour-item__price, .information-item__text,
.quiz__option-text, .quiz__consultant-bubble, .quiz__contact, .quiz__accounting-item, .pick__foot,
.wish__input, .wish__select, .wish__textarea, .quiz__input, .footer, .thx__text { font-size: var(--fs-s); }
.tour-item__note, .tour-item__price-from, .pick__meta, .pick__tag, .directions__swipe, .tg__hint,
.wish__checkbox-text, .quiz__agreement-text, .quiz__no-spam, .quiz__progress-text, .quiz__expert-position,
.quiz__accounting-title, .wish__error-text, .quiz__input-error, .thx__hint, .wish__form-response { font-size: var(--fs-xs); }
.btn, .buttons__btn, .tour-item__button, .wish__submit-btn, .tg__btn, .quiz__form-submit, .quiz__button, .quiz__back, .thx__btn {
	font-size: var(--fs-s); font-weight: 700; letter-spacing: .01em;
}
.wish__form-detail { font-size: var(--fs-hand); line-height: .95; }
.quiz__skip { font-size: 26px; line-height: .95; }

/* ---------- 3. Ритм секций: одинаковый воздух, полосы фона чередуются ---------- */
.section { margin-block: 0; padding-block: var(--sp-sec); }
.hero.section { padding-top: clamp(12px, 2vw, 24px); }
.section.office { padding-block: var(--sp-sec); }
.office__head { margin-bottom: var(--sp-title); }

/* ---------- 4. Форма «под ваши пожелания»: поля, которые видно ---------- */
.wish__input, .wish__textarea, .wish__select {
	background-color: var(--field-bg); border: 1.5px solid var(--field-border); border-radius: 12px;
	padding: 15px 18px; color: var(--ink); box-shadow: inset 0 1px 2px rgba(15, 57, 68, .05);
	transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.wish__input::placeholder, .wish__textarea::placeholder { color: var(--field-placeholder); opacity: 1; }
.wish__select { color: var(--field-placeholder); }
.wish__select.has-value { color: var(--ink); }
.wish__input:hover, .wish__textarea:hover, .wish__select:hover { border-color: var(--field-border-hover); }
.wish__input:focus, .wish__textarea:focus, .wish__select:focus { background-color: #fff; border-color: var(--secondary); box-shadow: var(--ring); outline: none; }
.wish__input.error, .wish__textarea.error { border-color: #D92D20; }
.wish__textarea { min-height: 132px; }
.wish__form-body, .wish__form-row { gap: 14px; }
.wish__custom-checkbox { width: 22px; height: 22px; margin-top: 0; border: 1.5px solid var(--field-border); border-radius: 6px; background: var(--field-bg); }
.wish__checkbox:checked + .wish__custom-checkbox { background: var(--secondary); border-color: var(--secondary); }
.wish__checkbox:checked + .wish__custom-checkbox::after {
	top: 3px; left: 7px; width: 6px; height: 11px; background: none; border-radius: 0;
	border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.wish__checkbox-text { color: var(--gray-text); line-height: 1.4; }
.wish__submit-btn { border-radius: 12px; padding: 17px 20px; box-shadow: 0 12px 26px -14px rgba(240, 116, 28, .75); }
.wish__form-response--ok { background: #E6F4F7; border-color: var(--secondary); color: var(--teal-deep); }

/* ---------- 5. Квиз: бирюза и графит, оранжевый — только у «Далее» и «Получить подборку» ---------- */
.quiz-overlay .quiz-wrapper { border-radius: 20px; }
.quiz__sidebar { background: var(--light-gray); }
.quiz__title { color: var(--ink); }
.quiz__options { gap: 14px; }
.quiz__option {
	gap: 12px; padding: 14px 18px; background: #fff;
	border: 1.5px solid var(--field-border); border-radius: 14px;
	transition: border-color .2s, background-color .2s, transform .2s, box-shadow .2s;
}
.quiz__option:hover { border-color: var(--secondary); background: #F3FAFB; transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(15, 57, 68, .35); }
.quiz__option.selected { border-color: var(--secondary); background: #E6F4F7; box-shadow: 0 0 0 3px rgba(14, 116, 144, .14); }
.quiz__radio { width: 22px; height: 22px; margin-right: 0; border: 1.5px solid var(--field-border); background: #fff; }
.quiz__option.selected .quiz__radio { border-color: var(--secondary); }
.quiz__option.selected .quiz__radio::after { width: 12px; height: 12px; background: var(--secondary); }
.quiz__emoji { font-size: 22px; line-height: 1; width: 30px; text-align: center; flex-shrink: 0; }
.quiz__option-text { color: var(--ink); font-weight: 600; line-height: 1.25; }
.quiz__own { margin-top: 14px; }
.quiz__skip { color: var(--secondary); opacity: .75; }
.quiz__progress-text { color: var(--gray-text); font-weight: 500; }
.quiz__progress-bar { border: 0; height: 8px; background: #E3EDF0; border-radius: 8px; }
.quiz__progress-fill { background: var(--secondary); border-radius: 8px; }
.quiz__button { background: var(--primary); padding: 14px 28px; text-transform: none; }
.quiz__button:hover { background: var(--pac-orange-hover); opacity: 1; }
.quiz__back { color: var(--gray-text); text-transform: none; }
.quiz__consultant-bubble { color: var(--ink); border-radius: 14px; box-shadow: 0 6px 18px -10px rgba(15, 57, 68, .35); }
.quiz__expert-name, .quiz__expert-position { color: var(--ink); }
.quiz__expert-status { border-color: #fff; background: #22C55E; }
.quiz__accounting-title { color: var(--gray-text); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.quiz__accounting-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; color: var(--ink); font-weight: 500; line-height: 1.3; }
.quiz__accounting-item b { font-weight: 700; color: var(--teal-deep); }
.quiz__accounting-item .quiz__emoji { font-size: 18px; width: 24px; }
.quiz__input { background-color: var(--field-bg); border: 1.5px solid var(--field-border); border-radius: 12px; padding: 14px 18px; color: var(--ink); }
.quiz__input::placeholder { color: var(--field-placeholder); opacity: 1; }
.quiz__select { color: var(--field-placeholder); background-color: var(--field-bg); }
.quiz__select.has-value { color: var(--ink); }
.quiz__input:focus { background-color: #fff; border-color: var(--secondary); box-shadow: var(--ring); }
.quiz__form-submit { background: var(--primary); border-radius: 12px; text-transform: none; padding: 16px 30px; }
.quiz__form-submit:hover { background: var(--pac-orange-hover); }
.quiz__checkbox-custom { border-radius: 6px; border-color: var(--field-border); }
.quiz__checkbox-input:checked + .quiz__checkbox-custom { background: var(--secondary); border-color: var(--secondary); }
.quiz__agreement-text a { color: var(--secondary); }
.quiz__close::before, .quiz__close::after { background: #9CB3BA; }
/* ошибка — тост внизу окна, а не полотно на весь квиз */
.quiz__error-container {
	top: auto; left: 50%; bottom: 16px; width: auto; max-width: calc(100% - 40px); height: auto;
	transform: translateX(-50%); padding: 10px 16px; border-radius: 12px;
	background: #FFF1F0; color: #B42318; font-size: var(--fs-xs); font-weight: 600;
	box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .35); z-index: 5;
}

/* ---------- 6. Попап «спасибо» — общий для квиза и формы ---------- */
.thx {
	position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 20px;
	background: rgba(10, 25, 45, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
	opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.thx.is-on { opacity: 1; visibility: visible; }
.thx__card {
	position: relative; display: grid; grid-template-columns: 300px 1fr; width: min(840px, 100%); max-height: 92vh; overflow: auto;
	background: #fff; border-radius: 24px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5);
	transform: translateY(16px) scale(.98); transition: transform .45s var(--ease-out);
}
.thx.is-on .thx__card { transform: none; }
.thx__media { position: relative; min-height: 380px; background: var(--teal-deep); }
.thx__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.thx__body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.thx__badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: #E6F4F7; color: var(--secondary); font-weight: 700; font-size: var(--fs-xs); }
.thx__title { margin: 0; color: var(--ink); }
.thx__title span { color: var(--secondary); }
.thx__text { margin: 0; color: var(--gray-text); line-height: 1.5; }
.thx__sub { margin: 6px 0 0; color: var(--ink); font-weight: 600; font-size: var(--fs-s); }
.thx__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.thx__btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 12px; color: #fff; text-decoration: none; transition: transform .25s var(--ease-out), filter .2s; }
.thx__btn:hover { transform: translateY(-2px); filter: brightness(1.06); color: #fff; }
.thx__btn svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.thx__btn--tg { background: #229ED9; }
.thx__btn--max { background: linear-gradient(135deg, #2D6BE4, #9A2FD6); }
.thx__hint { margin: 0; color: var(--gray-text); }
.thx__hint a { color: var(--secondary); font-weight: 600; text-decoration: none; }
.thx__close {
	position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; z-index: 2;
	background: rgba(255, 255, 255, .92); cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.thx__close::before, .thx__close::after { content: ''; position: absolute; width: 16px; height: 2px; background: var(--ink); }
.thx__close::before { transform: rotate(45deg); }
.thx__close::after { transform: rotate(-45deg); }

/* ---------- адаптив ---------- */
@media (max-width: 767px) {
	:root { --fs-h3: 22px; --fs-lead: 19px; --fs-body: 17px; --fs-hand: 26px; }
	.quiz__option { padding: 12px 14px; }
	.quiz__emoji { font-size: 20px; width: 26px; }
}
@media (max-width: 720px) {
	.thx__card { grid-template-columns: 1fr; }
	.thx__media { min-height: 0; height: 210px; }
	.thx__media img { object-position: center 22%; }
	.thx__actions .thx__btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- 7. Добивка шкалы: случайные кегли → в сетку ---------- */
.step-item__number { font-size: var(--fs-display); line-height: 1; }
.tour-item__price .tour-item__price-val { font-size: var(--fs-lead); }
.tour-item__price .tour-item__price-from { font-size: var(--fs-xs); }
.buttons__detail-text, .request__content-item p, .wish__form-detail, .quiz__skip { font-size: var(--fs-hand); }
.footer-phones__phone { font-size: var(--fs-h2); }
.quiz__emoji { white-space: nowrap; }

/* шаги: маршрут самолётиков — в своей полосе между заголовком и карточками */
@media (min-width: 768px) {
	.steps__title { margin-bottom: 118px; }
	.steps__planes { z-index: 0; top: calc(50% + 12px); }   /* ≥16px до заголовка и до карточек с учётом покачивания ±7px */
}

@media (max-width: 880px) {
	.cta__image img { object-position: center top; }   /* на узких экранах не резать голову менеджеру */
}
@media (max-width: 580px) {
	.quiz__skip { right: 34px; }   /* не наезжать на крестик */
}
@media (max-width: 460px) {
	.wish__form-body { margin-top: 0; }   /* подпись уже статична (extra.css ≤1180) — дыра в 110px не нужна */
}
.footer__company-text, .footer__policy-link { font-size: var(--fs-xs); color: var(--gray-text); }

/* ---------- 8. Мобила: карточка направления в один экран, квиз без скролла ---------- */
@media (max-width: 767px) {
	.tour-item__figure { aspect-ratio: 16 / 9; }
	.tour-item__content { padding: 16px 18px 18px; gap: 10px; }
	.tour-item__title { font-size: 22px; }
	.tour-item__price-list { margin: 2px 0 4px; gap: 6px; }
	.tour-item__price { padding: 8px 12px; }
	.tour-item__desc { font-size: 15px; line-height: 1.45; }
	.tour-item__note { font-size: 13px; line-height: 1.4; }
	.tour-item__button { padding: 14px 20px; }

	/* квиз: без сайдбара (подсказки менеджера и «Учитываю» — только на десктопе), всё в один экран */
	.quiz-overlay { padding: 8px; }
	.quiz-overlay .quiz-wrapper { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
	.quiz__main { grid-template-columns: 1fr; }
	.quiz__sidebar { display: none; }
	.quiz { min-height: 0; }
	.quiz__content { padding: 20px 16px 16px; }
	.quiz__title { font-size: 20px; margin-bottom: 12px; max-width: 100%; padding-right: 28px; }
	.quiz__skip { position: static; transform: none; width: auto; text-align: right; margin: 10px 0 0; font-size: 20px; line-height: 1; opacity: .8; }
	.quiz__options { gap: 10px; }
	.quiz__option { padding: 11px 12px; }
	.quiz__emoji { font-size: 20px; width: 26px; }
	.quiz__footer { flex-direction: row; align-items: center; gap: 12px; margin-top: 14px; }
	.quiz__progress-container { flex: 1; margin: 0; }
	.quiz__progress-text { margin-bottom: 4px; }
	.quiz__nav { gap: 8px; }
	.quiz__button { padding: 12px 18px; }
	.quiz__back { padding-inline: 6px; }
	.quiz__contact { margin-bottom: 8px; }
	.quiz__form { margin-top: 0; }
	.quiz__form-fields { gap: 8px; margin-bottom: 6px; }
	.quiz__input { padding: 11px 14px; }
	.quiz__form-submit { padding: 13px 20px; }
	.quiz__agreement { margin: 10px 0 6px; }
	.quiz__security { display: none; }
	.quiz__close { top: 12px; right: 12px; }
}

/* ---------- 9. Шапка: компактнее и ровнее ----------
   Текст «С 2007 года…» при body 18px ломался на три строки, иконки висели по верху,
   под шапкой оставалась пустая полоса 32px + отступ hero. */
.header { padding: 14px 0; }
.header__container { align-items: center; gap: clamp(14px, 2vw, 32px); }
.achievements-item { align-items: center; gap: 9px; max-width: none; }
.achievements-item__icon { width: 22px; height: 22px; margin-top: 0; flex-shrink: 0; }
.achievements-item__text, .contacts-address__text { font-size: 15px; line-height: 1.35; margin: 0; color: var(--gray-text); }
.header__achievements .achievements-item { max-width: 236px; }          /* ровно две строки */
.contacts-address { max-width: 260px; }
.contacts-address__text:first-child { font-weight: 600; color: var(--ink); }
.contacts-address__list { display: flex; flex-direction: column; gap: 1px; }
.contacts-phones__phone { font-size: 17px; }
.header__social { gap: 12px; margin-left: 0; }
.social__icon { width: 40px; height: 40px; }
.hero.section { padding-top: 10px; }
@media (max-width: 1280px) {
	.header__achievements .achievements-item { max-width: 200px; }
	.achievements-item__text, .contacts-address__text { font-size: 14px; }
}
@media (max-width: 1000px) {
	.header { padding: 12px 0; }
}
@media (max-width: 767px) {
	.header { padding: 10px 0; }
	.hero.section { padding-top: 6px; }
}

/* 9b. Пункты шапки сжимались флексом (текст «С 2007 года…» ужимался до 148px и ломался на три строки) —
   фиксируем ширину колонок, а на планшете прячем достижение раньше, чем всё начнёт налезать */
.header__achievements, .contacts-address, .contacts-phones, .header__social { flex: 0 0 auto; }
.header__achievements .achievements-item { width: 236px; max-width: none; }
.contacts-address { width: 248px; max-width: none; }
.header__logo { flex: 0 0 auto; }
@media (max-width: 1280px) {
	.header__container { gap: 16px; }
	.header__achievements .achievements-item { width: 206px; }
	.contacts-address { width: 226px; }
	.social__icon { width: 36px; height: 36px; }
	.header__social { gap: 10px; }
}
@media (max-width: 1180px) {
	.header__achievements { display: none; }
}

/* 9c. Сумма колонок не влезала в контейнер 1160 на 1440 (соцкнопки выезжали на 38px за край):
   шапке — контейнер 1240, логотип 50px, тексты 14px, зазоры 12–20px; страховка — сжатие, а не переполнение */
.header__container.container { max-width: 1240px; gap: clamp(12px, 1.4vw, 20px); }
@media (min-width: 768px) { .logo__image { height: 50px; } }
.achievements-item__text, .contacts-address__text { font-size: 14px; }
.header__achievements .achievements-item { width: 196px; }
.contacts-address { width: 216px; }
.social__icon { width: 36px; height: 36px; }
.header__social { gap: 10px; }
.header__achievements, .contacts-address { flex: 0 1 auto; min-width: 150px; }
@media (max-width: 1280px) {
	.header__achievements .achievements-item { width: 196px; }
	.contacts-address { width: 216px; }
}
/* 9d. Строки текста «С 2007 года…» заданы явно через <br>, колонка по контенту */
.header__achievements .achievements-item { width: auto; }
.achievements-item__text { white-space: nowrap; }

/* ---------- 10. Бургер не сжимать ---------- */
.burger { flex-shrink: 0; }   /* на узких реальных экранах текст рядом отбирал ширину у 40×40 кнопки — она сплющивалась */

/* ---------- 11. Карусель «Подборка»: подсказки-стрелки прятали кнопки, точек не было ---------- */
@media (max-width: 767px) {
	.request__content-item { display: none; }   /* пунктирные подписи не помещались и закрывали стрелки слайдера */
}
.slider-controls .slider-pagination { margin-top: 0; text-align: left; display: flex; align-items: center; gap: 8px; }
.slider-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--border-color); cursor: pointer; transition: background-color .2s, width .2s; }
.slider-dot.is-on { width: 20px; border-radius: 4px; background: var(--secondary); }

/* точки под карточками направлений — только там, где карточки едут горизонтально (мобила) */
.directions__dots { display: none; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; }
@media (max-width: 767px) { .directions__dots { display: flex; } }

/* ---------- 12. Карусель «Подборка»: карточки разной длины текста растягивались до высоты самой длинной,
   лишняя высота проваливалась пустотой под футером (Турция/Египет/ОАЭ — на 821/797/754px натурально).
   Отдаём лишнее место списку отелей: он выравнивает ряды по центру, а не бросает пустоту внизу. ---------- */
.pick { display: flex; flex-direction: column; }
.pick__list { flex: 1 1 auto; align-content: center; }

/* ---------- 13. Стрелки/точки «Подборки» вынесены из-под горизонтального скролла (см. правку page.php) —
   но .request__wrapper на мобиле был column-reverse (из эталона, под другую вёрстку), и стрелки
   заодно перевернулись выше карточки. Возвращаем обычный порядок, подпись сверху — через order. ---------- */
@media (max-width: 768px) {
	.request__wrapper { flex-direction: column; }
	.request__note { order: -1; }
}

/* ---------- 06.10 — мессенджер после заявки (afterLead в v2.js) ---------- */
[data-tg-nick][hidden], [data-max-hint][hidden], [data-next][hidden] { display: none !important; }
.nt-max-hint { margin: 0; padding: 8px 12px; border-radius: 8px; background: #E6F4F7; color: var(--teal-deep); font-size: 13px; line-height: 1.4; }
.thx__next { margin: 4px 0 6px; padding: 14px 16px; border-radius: 12px; background: #E6F4F7; border-left: 4px solid var(--teal-deep); font-size: 15px; line-height: 1.45; }
.thx__next span { display: block; margin-top: 8px; }
.thx__next .thx__next-main { display: flex; justify-content: center; width: 100%; margin-top: 12px; font-weight: 700; animation: nt-beat 1.6s ease-in-out infinite; }
.thx__next-timer { font-size: 13px; color: #5b6b6e; }
.thx__next-timer a { color: inherit; text-decoration: underline; }
@keyframes nt-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@media (max-width: 767px) { .thx--next .thx__media { display: none; } }
@media (prefers-reduced-motion: reduce) { .thx__next .thx__next-main { animation: none; } }
