/*
 * Адаптивная вёрстка шаблона sol2020 для телефонов и планшетов (Claude, 2026-11)
 * Все правила — только для экранов уже 1024 px: на десктопе ничего не меняется.
 * Вместо отдельного мобильного шаблона russ_travel_mob.
 */
.sol-burger { display: none; }

@media (max-width: 1023px) {

	/* ---------- основа ---------- */
	#container { overflow-x: clip; }
	body { padding-left: 0 !important; padding-right: 0 !important; -webkit-text-size-adjust: 100%; }
	#container { background-size: 100%, auto; background-position: center 49px, center 0; }
	.centerpart,
	#position11-WideLine1 > div, #position11-WideLine2 > div, #position11-WideLine3 > div {
		max-width: 100%;
		padding-left: 14px;
		padding-right: 14px;
		box-sizing: border-box;
	}
	img { max-width: 100%; height: auto; }
	iframe, video, embed, object { max-width: 100%; }
	.table { display: block; table-layout: auto; }
	.table > div, .table > form { display: block; }

	/* ---------- верхняя полоса: телефоны + меню-гамбургер ---------- */
	.topline { margin-bottom: 16px; }
	.top1line .centerpart { padding-left: 10px; padding-right: 0; }
	.topcontainer { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
	#position01-TopLeft { margin: 0; }
	#position01-TopLeft .moduletable.topcall { padding-left: 40px; background-size: 30px; }
	.moduletable.topcall a { font-size: 15px; line-height: 1.6; margin-right: 0; }

	.sol-burger {
		display: block;
		order: 3;
		flex: 0 0 auto;
		width: 52px;
		height: 52px;
		padding: 14px 12px;
		margin: 0;
		background: transparent;
		border: 0;
		cursor: pointer;
	}
	.sol-burger span {
		display: block;
		height: 3px;
		margin: 0 0 6px;
		background: #fbefbd;
		border-radius: 2px;
		transition: transform .2s, opacity .2s;
	}
	.sol-burger span:last-child { margin-bottom: 0; }
	.sol-menu-open .sol-burger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
	.sol-menu-open .sol-burger span:nth-child(2) { opacity: 0; }
	.sol-menu-open .sol-burger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

	/* меню: выпадает на всю ширину под полосой */
	#position02-TopRight {
		display: none;
		float: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 1000;
		background-image: url(/images/menubg.png);
		border-top: 2px solid #fbefbd;
		box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
	}
	.top1line { position: relative; }
	.sol-menu-open #position02-TopRight { display: block; }
	#position02-TopRight > div { margin: 0; }
	ul.main_nav { margin: 0; padding: 6px 0 10px; }
	.main_nav li { float: none; display: block; }
	.main_nav > li { padding: 0; border-bottom: 1px solid rgba(251, 239, 189, .18); }
	.main_nav > li > a, .main_nav > li > span {
		display: block;
		padding: 12px 20px;
		font-size: 17px;
		border-bottom: 0 !important;
	}
	.main_nav > li.parent > span:after {
		content: '';
		float: right;
		margin-top: 6px;
		border: 6px solid transparent;
		border-top-color: #fbefbd;
	}
	.main_nav > li.parent.sol-open > span:after { margin-top: 0; border-top-color: transparent; border-bottom-color: #fbefbd; }
	.main_nav > li:last-child { border: 0; border-radius: 0; }
	.main_nav li ul,
	.main_nav li:hover > ul {
		position: static;
		visibility: visible;
		opacity: 1;
		display: none;
		width: auto;
		padding: 0 0 8px;
		transition: none;
	}
	.main_nav li.sol-open > ul { display: block; }
	.nav-child li, .nav-child li:first-child { border: 0; }
	.nav-child li:first-child:before { display: none; }
	.nav-child li a {
		display: block;
		padding: 9px 20px 9px 36px;
		font-size: 16px;
		color: #fbefbd;
		text-decoration: none;
		background: none;
	}

	/* ---------- логотип ---------- */
	.top2line { padding-top: 12px; }
	#position03-LogoLeft { display: block; width: auto; }
	a#logo { width: 100%; height: 0; padding-bottom: 14.46%; background-size: contain; }
	/* логотип старой мобильной версии (images/logomob.png: ★★★★, «парк-отель» прямым шрифтом) — крупнее и читаемее
	   десктопного; фон шапки (зелёный градиент с орнаментом) остаётся десктопным */
	#position03-LogoLeft .custom a {
		display: block;
		max-width: 560px;
		margin: 0 auto;
		aspect-ratio: 494 / 100; /* только видимая часть картинки: x 30–524 из 650 */
		background: url(/images/logomob.png) no-repeat 19.2% center / 131.6% auto;
		filter: drop-shadow(0 1px 1px rgba(40, 70, 20, .45)); /* «парк-отель» светлый — тень для читаемости на светлом фоне */
	}
	#position03-LogoLeft .custom a img { display: none; }
	#position04-LogoRight { display: block; float: none; }

	/* ---------- форма «Бронирование онлайн» ---------- */
	.top3line { margin-top: 14px; }
	.moduletable.widetitle h3:before, .moduletable.widetitle h3:after { width: calc(50% - 110px); }

	/* ---------- главная: порядок блоков на телефоне ----------
	   логотип → фотографии → «Бронирование онлайн» → «Добро пожаловать» → остальное.
	   Только на главной (там есть .slidercontainer); контейнеры «растворяются» (display: contents),
	   их блоки выстраиваются через order. Браузеры без :has() покажут прежний порядок. */
	#pagecontent:has(.slidercontainer) { display: flex; flex-direction: column; }
	#pagecontent:has(.slidercontainer) > *,
	#pagecontent:has(.slidercontainer) > .topline > *,
	#pagecontent:has(.slidercontainer) > .centerpart > *,
	#pagecontent:has(.slidercontainer) .slidercontainer > * { order: 10; }
	#pagecontent:has(.slidercontainer) > .topline,
	#pagecontent:has(.slidercontainer) > .centerpart:has(.slidercontainer),
	#pagecontent:has(.slidercontainer) .slidercontainer { display: contents; }
	#pagecontent:has(.slidercontainer) > .centerpart:has(.slidercontainer) > * { padding-left: 14px; padding-right: 14px; box-sizing: border-box; }
	#pagecontent:has(.slidercontainer) .top1line { order: 1; }
	#pagecontent:has(.slidercontainer) .top2line { order: 2; }
	#pagecontent:has(.slidercontainer) #position06-SliderRight { order: 3; margin: 14px 0 0; padding: 0 14px; }
	#pagecontent:has(.slidercontainer) .top3line { order: 4; margin-top: 24px; }
	#pagecontent:has(.slidercontainer) .slidercontainer.separ:before { order: 5; margin-top: -10px; }
	#pagecontent:has(.slidercontainer) #position05-SliderLeft { order: 5; padding: 0 14px; }

	/* ---------- главная: приветствие и галерея ---------- */
	#position05-SliderLeft, #position06-SliderRight { display: block; width: auto; float: none; }
	.slidercontainer { margin-bottom: 30px; }
	#position06-SliderRight { margin-top: 20px; }
	.gallery { grid-template-rows: repeat(5, 74px); grid-gap: 8px; }
	.aditional-gallery { grid-template-rows: repeat(3, 1fr); grid-gap: 8px; }
	.bottom-gallery { grid-template-rows: repeat(2, 1fr); grid-gap: 8px; }
	.gallery-img, .main-gallery > div, .bottom-gallery-item > div {
		background-size: cover !important;
		background-position: center !important;
		background-repeat: no-repeat !important;
	}

	/* ---------- основная колонка ---------- */
	/* страницы без формы в шапке (бронирование, расчёты на даты): без орнамента-разделителя под логотипом */
	#pagecontent > .topline:not(:has(.top3line)) ~ .centerpart > .separ { border-top: 0; margin-top: 12px; }
	#pagecontent > .topline:not(:has(.top3line)) ~ .centerpart > .separ:before { display: none; }
	#position08-MainLeft, #content, #position10-MainRight { display: block; width: auto; }
	div#content { padding: 16px 14px; width: auto; }
	.item-page h1, h1 { font-size: 26px; line-height: 1.2; }
	.item-page h2 { font-size: 21px; line-height: 1.25; }
	/* номера */
	.room-block h4 { font-size: 21px; }
	.room-block-body {
		grid-template-areas: "photo" "place" "services" "price";
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		padding: 14px;
		margin: 14px 0 36px;
	}
	.roomplace, .roomservices, .roomprise { margin-right: 0; }
	.roomplace { padding-top: 14px; }
	.roomservices { padding: 10px 0; }
	.roomprise { padding-top: 12px; }
	.roomfoto { height: 210px !important; }
	/* корпоративным клиентам */
	p.corp.rightalign { float: none; width: auto; }
	.corp-img { display: block; width: auto; margin: 0 0 12px; }
	.corp-img-txt { display: block; max-width: none; margin-bottom: 24px; }
	.corp-img-txt h2 { font-size: 22px !important; line-height: 1.2; }
	.custom.corpform { width: auto; }
	h3.corp { font-size: 26px; line-height: 1.15; }
	.corpform .calendario, .corpform .field-period { width: auto; max-width: 100%; }
	.corpform .field-period input { width: 100%; max-width: 100%; box-sizing: border-box; }
	ul.two-columns { column-count: 1; -webkit-column-count: 1; -moz-column-count: 1; }
	/* галереи (Simple Image Gallery, например СПА-центр): ровная сетка с промежутками 8 px вместо 1 px */
	ul.sigFreeClassic {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 8px;
		margin: 0 0 18px;
		padding: 0;
	}
	ul.sigFreeClassic li.sigFreeThumb { float: none; margin: 0; }
	ul.sigFreeClassic li.sigFreeClear { display: none; }
	/* Claude 2026-11-05: и для :hover — иначе правило плагина a.sigFreeLink:hover {float:left} при касании схлопывает ссылку
	   до нулевой ширины, нажатие попадает в li и увеличенное фото не открывается */
	ul.sigFreeClassic li.sigFreeThumb a.sigFreeLink,
	ul.sigFreeClassic li.sigFreeThumb a.sigFreeLink:hover {
		float: none;
		width: auto !important;
		height: auto !important;
		aspect-ratio: 4 / 3;
		border-radius: 4px;
		overflow: hidden;
	}
	ul.sigFreeClassic li.sigFreeThumb a.sigFreeLink img.sigFreeImg { width: 100% !important; height: 100% !important; background-size: cover; }
	/* тарифы */
	.quick-calc-info { column-count: 1; }
	a.quick-calc {
		height: auto;
		line-height: 1.3;
		padding: 11px 12px 11px 0;
		margin-bottom: 12px;
		display: flex;
		align-items: center;
	}
	a.quick-calc i { margin: 0 14px; }
	.item-page table:not([class*="month"]) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

	/* ---------- формы расчёта и бронирования (мобильная разметка controls/css/mob_style.css) ---------- */
	/* убрать влияние стилей настольной формы из template.css — как было в мобильном шаблоне */
	form.room .consult { position: static; width: auto; left: auto; right: auto; bottom: auto; }
	form.room .br_hint, form.room .za_hint, form.room .fa-question-circle { display: none; }
	/* кнопки в карточках номеров: «Бронь онлайн» — основная (сплошная зелёная), «Отправить заявку» — вторая (контурная) */
	form.room .butt_zabron { height: auto; margin-top: 10px; }
	form.room input.button-buy {
		display: block;
		width: 100%;
		height: 46px;
		padding: 0 12px;
		border: 0;
		border-radius: 8px;
		background: #4ca61a;
		box-shadow: 0 2px 6px rgba(60, 120, 20, .3);
		color: #fff;
		font-family: 'Fira Sans', sans-serif;
		font-size: 17px;
		font-weight: 500;
		letter-spacing: .3px;
		text-shadow: none;
		-webkit-appearance: none;
		appearance: none;
		transition: background-color .15s;
	}
	form.room input.button-buy:hover, form.room input.button-buy:active { background: #3d8c12; }
	form.room .consult {
		display: flex;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		height: 42px;
		margin: 8px 0 4px;
		padding: 0 12px;
		border: 1.5px solid #4ca61a;
		border-radius: 8px;
		background: #fff;
		cursor: pointer;
	}
	form.room .consult a {
		color: #3d8c12;
		font-family: 'Fira Sans', sans-serif;
		font-size: 16px;
		font-weight: 500;
		text-decoration: none;
	}
	form.room .consult:active { background: #f0f8ea; }
, .clicker_header, .form-pricing .underline { text-transform: none; }
	.item-page h2.clicker_header { font-size: 17px; line-height: 1; }
	.date-picker-wrapper table { font-family: 'Fira Sans Extra Condensed', sans-serif; font-size: 13px; }
	.date-picker-wrapper th { font-weight: 400; }

	/* форма подбора номера на странице бронирования и страницах расчёта на даты —
	   в том же виде, что форма «Бронирование онлайн» на главной (поля, подписи, зелёная кнопка) */
	#FormPriciHotel.form-pricing { background: transparent; padding: 0; margin: 0 0 24px; font-size: 13px; }
	#FormPriciHotel .formheader { display: none; } /* заголовок «Подбор номера (не более 12 гостей…)» не нужен (решение владельца) */
	#FormPriciHotel .form-line-1, #FormPriciHotel .form-line-2, #FormPriciHotel .form-line-3 {
		display: flex;
		justify-content: center;
		gap: 12px;
		margin: 0 0 10px;
		border: 0;
	}
	#FormPriciHotel .form-line-1 > div, #FormPriciHotel .form-line-2 > div {
		display: block;
		flex: 1 1 0;
		max-width: 160px;
		width: auto;
		border: 0;
	}
	#FormPriciHotel .pricing-item { background: transparent; }
	#FormPriciHotel .pricing-item label { display: block; margin: 0; text-align: center; line-height: 20px; }
	#FormPriciHotel .label-pricing { color: #4e7d40; font-size: 13px; font-family: 'Fira Sans', sans-serif; }
	#FormPriciHotel .date-range, #FormPriciHotel .formselect {
		box-sizing: border-box;
		width: 100%;
		height: 36px;
		padding: 0 6px 0 28px;
		border: 1px solid #c2dac5 !important;
		border-radius: 5px;
		background-color: #fff;
		color: #555;
		font-size: 15px;
		text-align: center;
	}
	#FormPriciHotel .pricing-item > i {
		position: absolute;
		left: 10px;
		top: 30px;
		z-index: 1;
		color: #4ab00b;
		font-size: 16px;
		line-height: 16px;
		pointer-events: none;
	}
	#FormPriciHotel .form-line-3 { flex-direction: column; align-items: center; gap: 6px; margin-top: 18px; }
	#FormPriciHotel .form-line-3 > div { display: block; width: 230px; max-width: 100%; border: 0; }
	#FormPriciHotel #form-button { order: 1; }
	#FormPriciHotel #button-submit { border: 0; }
	#FormPriciHotel .form-line-3 input#SubmitFPH {
		height: 36px;
		border: 1px solid #c2dac5;
		border-radius: 5px;
		font-family: Cuprum, sans-serif;
		font-size: 15px;
		font-weight: 400;
		text-transform: uppercase;
		letter-spacing: 1px;
		background: linear-gradient(#8deb8d 0%, #17ba17 50%, #119e14 51%, #5acc5a 100%);
	}
	#FormPriciHotel .pricing-item.age { order: 2; min-height: 0; margin: 0; text-align: center; }
	#FormPriciHotel #enterChildrenAge { color: #609d11; font-size: 14px; text-decoration: underline; }
	#FormPriciHotel #enterChildrenAge.a_disabled { display: none; }

	/* ---------- широкие полосы и низ страницы ---------- */
	#position11-WideLine1 { display: block; margin: 20px 0 30px; }
	#position11-WideLine1 > div { display: block; }
	/* блок «Гарантии бронирования / безопасности / Способы оплаты» (страница бронирования) */
	.moduletable.garant { padding-left: 0; }
	.custom.garant {
		padding: 16px 14px 4px;
		border: 1px solid #c2dac5;
		background: #f7fdf2;
	}
	.custom.garant > div {
		display: block;
		max-width: none;
		margin: 0 0 14px;
		font-family: 'Fira Sans', sans-serif;
		font-size: 14px;
		line-height: 1.45;
	}
	.moduletable.garant h3 { font-size: 17px; font-weight: 500; color: #57a000; margin: 0 0 6px; }
	.custom.garant ul { margin: 0 0 0 18px; }
	.custom.garant .sposoby-oplaty ul { margin-left: 0; }
	.custom.garant .sposoby-oplaty li { margin-bottom: 4px; }
	.custom.garant .garant-secure img { max-width: 200px; }
	#position11-WideLine2 { margin: 30px 0 24px; padding: 16px 0; }
	.custom.wideline { display: flex; align-items: flex-start; }
	.custom.wideline > div { display: block; margin: 0; }
	.custom.wideline > div:first-child { flex: 0 0 auto; margin-right: 14px; }
	.custom.wideline > div:first-child img { width: 44px; }
	.custom.wideline h4 { font-size: 18px; line-height: 1.25; margin: 0 0 6px; }
	.custom.wideline .call_phone_2 { display: block; margin-top: 4px; white-space: normal; }
	.custom.wideline .inside { display: none; }
	.moduletable .links_elem_list { column-count: 1; }
	.links_elem a { font-size: 19px; line-height: 1.7; }
	#position12-BottomLeft, #position13-BottomCenter, #position14-BotoomRight {
		display: block;
		width: auto;
		min-width: 0;
		float: none;
	}
	.mapcontainer { width: 100%; height: 360px; }
	#position12-BottomLeft { margin-top: 10px; }
	#position12-BottomLeft iframe { width: 100%; height: 320px; }
	#position14-BotoomRight { margin-top: 20px; }
	#container > div.footer { height: auto !important; }
}

/* ---------- компьютер (от 1024 px): форма подбора номера на /bronirovanie и страницах расчёта на даты —
   в том же виде, что форма «Бронирование онлайн» на главной (поручение владельца 06.11.2026) ---------- */
@media (min-width: 1024px) {
	#FormPriciHotel.form-pricing {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: flex-end;
		gap: 14px;
		width: 100%;
		background: transparent;
		padding: 0;
		margin: 6px 0 36px;
		box-shadow: none;
	}
	#FormPriciHotel .formheader { display: none; }
	#FormPriciHotel .form-line-1, #FormPriciHotel .form-line-2 {
		display: flex;
		align-items: flex-end;
		gap: 14px;
		width: auto;
		border: 0;
	}
	#FormPriciHotel .pricing-item {
		display: block;
		position: relative;
		margin: 0;
		padding: 0;
		border: 0;
		background: transparent;
	}
	#FormPriciHotel #calendar { width: 232px; }
	#FormPriciHotel #adults, #FormPriciHotel #children { width: 150px; }
	#FormPriciHotel .pricing-item label {
		display: block;
		margin: 0;
		padding: 0;
		background: transparent;
		line-height: 20px;
		text-align: left;
	}
	#FormPriciHotel .label-pricing {
		color: #4e7d40;
		font-family: 'Fira Sans', sans-serif;
		font-size: 13px;
		text-transform: none;
	}
	#FormPriciHotel .date-range, #FormPriciHotel .formselect {
		box-sizing: border-box;
		float: none;
		width: 100%;
		margin: 0;
		padding: 0 6px 0 28px;
		border: 1px solid #c2dac5 !important;
		border-radius: 5px;
		background-color: #fff;
		color: #555;
		font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
		font-size: 15px;
		text-align: center;
	}
	#FormPriciHotel .date-range { height: 38px; color: #000; }
	#FormPriciHotel .formselect { height: 36px; }
	#FormPriciHotel #mask { top: 20px; left: 0; width: 100%; height: 38px; }
	#FormPriciHotel #mask::before { position: absolute; left: 10px; top: 11px; margin: 0; color: #4ab00b; font-size: 16px; line-height: 16px; }
	#FormPriciHotel #adults::before, #FormPriciHotel #children::before { left: 10px; top: 30px; margin: 0; color: #4ab00b; font-size: 16px; line-height: 16px; z-index: 1; pointer-events: none; }
	#FormPriciHotel .pricing-item.age { width: auto; min-height: 0; padding: 0 0 8px; }
	#FormPriciHotel #enterChildrenAge { color: #609d11; font-size: 14px; text-decoration: underline; cursor: pointer; }
	#FormPriciHotel #enterChildrenAge.a_disabled { display: none; }
	#FormPriciHotel #form-button, #FormPriciHotel #button-submit { display: block; border: 0; }
	#FormPriciHotel input#SubmitFPH {
		width: 230px;
		height: 36px;
		padding: 0;
		line-height: 34px;
		border: 1px solid #c2dac5;
		border-radius: 5px;
		font-family: Cuprum, sans-serif;
		font-size: 15px;
		font-weight: 400;
		text-transform: uppercase;
		letter-spacing: 1px;
		background: linear-gradient(#8deb8d 0%, #17ba17 50%, #119e14 51%, #5acc5a 100%);
	}
}
