/**
 * PBC Hero — главный экран с градиент-оверлеем под header
 * + модалка «Оставить заявку» (свёрстана кодом, без Elementor Popup).
 */

:root {
	/* высота header темы на разных брейкпоинтах (меняется в media-queries ниже) */
	--pbc-hero-header-height: 160px;         /* desktop >1440px */
	--pbc-hero-header-height-mobile: 51px;   /* mobile <=767px */

	--pbc-hero-min-height: 720px;
	--pbc-hero-min-height-mobile: 560px;
	--pbc-hero-max-width: 1170px;

	/* отступ от верха hero до крошек = высота header + «воздух» под ним */
	--pbc-hero-padding-top: calc(var(--pbc-hero-header-height) + 32px);
	--pbc-hero-padding-top-mobile: calc(var(--pbc-hero-header-height-mobile) + 20px);

	/* глубина плотной «подложки под header» в градиенте */
	--pbc-hero-header-overlay-height: 380px;
	--pbc-hero-header-overlay-height-mobile: 200px;

	/* высота виджета бронирования (визуально измерена по TL-форме) */
	--pbc-hero-booking-height: 170px;
	--pbc-hero-booking-height-mobile: 260px;

	/* виджет свешивается за низ hero — половина его высоты */
	--pbc-hero-booking-overlap: 85px;
	--pbc-hero-booking-overlap-mobile: 130px;

	/* зазор между контентом и виджетом */
	--pbc-hero-booking-gap: 40px;
	--pbc-hero-booking-gap-mobile: 32px;

	/* padding-bottom = видимая часть виджета внутри hero + воздух */
	--pbc-hero-padding-bottom: calc(
		var(--pbc-hero-booking-height) - var(--pbc-hero-booking-overlap) + var(--pbc-hero-booking-gap)
	);
	--pbc-hero-padding-bottom-mobile: calc(
		var(--pbc-hero-booking-height-mobile) - var(--pbc-hero-booking-overlap-mobile) + var(--pbc-hero-booking-gap-mobile)
	);
}

/* Высота header по брейкпоинтам — на ноуте 140px, на планшете 100px */
@media (max-width: 1440px) {
	.pbc-hero {
		--pbc-hero-header-height: 140px;
	}
}

@media (max-width: 1024px) {
	.pbc-hero {
		--pbc-hero-header-height: 100px;
	}
}

/* --- Секция --- */

.pbc-hero {
	position: relative;
	margin-bottom: 0;
	min-height: calc(var(--pbc-hero-min-height) + var(--pbc-hero-header-height));
	padding: 0 3% calc(var(--pbc-hero-booking-height) / 2 + var(--pbc-hero-booking-gap));
	background-color: var(--color-primary, #002554);
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	color: #fff;
	/* overflow visible — чтобы виджет бронирования свешивался за границу вниз */
	overflow: visible;
	isolation: isolate;
}

/* Без виджета бронирования — убираем margin-bottom */
.pbc-hero--no-booking {
	margin-bottom: 0;
}


/* --- Оверлей: верхний градиент "подложка header" + общее притемнение снизу --- */

.pbc-hero__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
	background:
		/* подложка под header — плавный переход от плотного к прозрачному */
		linear-gradient(
			to bottom,
			rgba(0, 37, 84, 0.9) 0,
			rgba(0, 37, 84, 0) var(--pbc-hero-header-overlay-height)
		),
		/* общее приглушение всего фото для контраста текста */
		linear-gradient(
			180deg,
			rgba(0, 0, 0, 0.3) 0%,
			rgba(0, 0, 0, 0.5) 60%,
			rgba(0, 0, 0, 0.62) 100%
		);
}

/* --- Контент поверх оверлея --- */

.pbc-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--pbc-hero-max-width);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	justify-content: space-between;
	height: 80svh;
	min-height: inherit;
}

/* Контент занимает всё свободное место и центрируется по вертикали;
   крошки остаются прижатыми к верху */
/* Распорка снизу: уравновешивает крошки сверху,
   чтобы контент вставал ровно по центру hero */
.pbc-hero__spacer {
	flex: 0 0 auto;
	height: calc(var(--pbc-hero-padding-top) - var(--pbc-hero-booking-height) / 2);
}

/* --- Крошки --- */

.pbc-hero__breadcrumbs {
	margin-top: var(--pbc-hero-padding-top);
	padding-bottom: 40px;
}

/* Крошки не выравнены по центру контента — идут по левому краю */
.pbc-hero--align-center .pbc-hero__breadcrumbs {
	text-align: left;
}

.pbc-hero__breadcrumbs .pbc-breadcrumbs {
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0;
}

.pbc-hero__breadcrumbs .pbc-breadcrumbs,
.pbc-hero__breadcrumbs .pbc-breadcrumbs__list {
	background: transparent;
}

.pbc-hero__breadcrumbs .pbc-breadcrumbs__text,
.pbc-hero__breadcrumbs .pbc-breadcrumbs__link {
	color: rgba(255, 255, 255, 0.85);
}

.pbc-hero__breadcrumbs .pbc-breadcrumbs__link:hover {
	color: #fff;
}

.pbc-hero__breadcrumbs .pbc-breadcrumbs__item--current .pbc-breadcrumbs__text {
	color: #fff;
}

/* --- Контент: заголовок, описание, кнопки --- */

.pbc-hero__content {
	max-width: 720px;
}

.pbc-hero--align-center .pbc-hero__content {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.pbc-hero--align-center .pbc-hero__actions {
	justify-content: center;
}

.pbc-hero__title {
	margin: 0 0 20px;
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: clamp(32px, 5vw, 56px);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: #fff;
	text-wrap: balance;
}

.pbc-hero__subtitle {
	margin: 0 0 32px;
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: clamp(16px, 1.6vw, 20px);
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.9);
	max-width: 620px;
}

.pbc-hero--align-center .pbc-hero__subtitle {
	margin-left: auto;
	margin-right: auto;
}

/* --- Кнопки --- */

.pbc-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
}

.pbc-hero__btn,
.pbc-hero__btn > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 28px;
	min-height: 56px;
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	border: none;
	border-radius: var(--radius-md, 8px);
	transition: background-color var(--transition-fast, 0.2s ease),
	            color var(--transition-fast, 0.2s ease),
	            transform var(--transition-fast, 0.2s ease),
	            border-color var(--transition-fast, 0.2s ease);
	cursor: pointer;
	box-sizing: border-box;
	font: inherit;
	font-size: 16px;
	font-weight: 500;
}

button.pbc-hero__btn {
	appearance: none;
}

.pbc-hero__btn--primary,
.pbc-hero__btn--primary > a {
	background-color: #fff;
	color: var(--color-primary, #002554);
}

.pbc-hero__btn--primary:hover,
.pbc-hero__btn--primary > a:hover {
	background-color: #f1f4f8;
	color: var(--color-primary-hover, #00377d);
}

.pbc-hero__btn--primary:active,
.pbc-hero__btn--primary > a:active {
	transform: translateY(1px);
}

.pbc-hero__btn--secondary {
	background-color: rgba(255, 255, 255, 0.08);
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.6);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.pbc-hero__btn--secondary:hover {
	background-color: #fff;
	color: var(--color-primary, #002554);
	border-color: #fff;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.pbc-hero__btn--secondary:active {
	transform: translateY(1px);
}

.pbc-hero__btn-icon {
	flex-shrink: 0;
}

/* Обёртка .call--btn — у неё нет фона, стили едут на <a> внутри */

.pbc-hero__btn.call--btn {
	padding: 0;
	background: transparent;
	min-height: 0;
}

/* --- Виджет бронирования TravelLine — свешивается за низ секции --- */

.pbc-hero__booking {
	position: relative;
	z-index: 10;
	margin-top: calc(-1 * var(--pbc-hero-booking-height) / 2);
	padding: 0 3%;
	pointer-events: none;
}

.pbc-hero__booking-inner {
	max-width: var(--pbc-hero-max-width);
	margin: 0 auto;
	background-color: #ffffffd1;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border-radius: var(--radius-lg, 12px);
	border: 2px solid #ffffff8a;
	box-shadow: 0 12px 40px rgba(0, 20, 45, 0.18);
	padding: 0;
	pointer-events: auto;
}

.pbc-hero__booking #block-search,
.pbc-hero__booking #block-search * {
	box-sizing: border-box;
}

.pbc-hero__booking .tl-container {
	padding: 0 20px;
}

/* --- Мобилка --- */

@media (max-width: 767px) {

	.pbc-hero {
		min-height: 70svh;
		padding: var(--pbc-hero-padding-top-mobile) 16px calc(var(--pbc-hero-booking-height-mobile) / 2 + var(--pbc-hero-booking-gap-mobile));
		margin-bottom: 0;
	}

	.pbc-hero--no-booking {
		padding-bottom: 48px;
		margin-bottom: 0;
	}

	.pbc-hero__booking {
		margin-top: calc(-1 * var(--pbc-hero-booking-height-mobile) / 2);
		padding: 0 16px;
	}

	.pbc-hero__booking-inner {
		padding: 0;
		border-radius: var(--radius-md, 8px);
	}

	.pbc-hero__booking .tl-container {
		padding: 0 12px;
	}

	.pbc-hero__overlay {
		background:
			linear-gradient(
				to bottom,
				rgba(0, 37, 84, 0.9) 0,
				rgba(0, 37, 84, 0) var(--pbc-hero-header-overlay-height-mobile)
			),
			linear-gradient(
				180deg,
				rgba(0, 0, 0, 0.42) 0%,
				rgba(0, 0, 0, 0.6) 60%,
				rgba(0, 0, 0, 0.72) 100%
			);
	}

	/* На мобиле контент центрируется по вертикали, крошки прижаты вверх */
	.pbc-hero {
		display: flex;
		flex-direction: column;
	}

	.pbc-hero__spacer {
		height: 0;
	}

	/* Снизу hero резервирует место под форму, сверху — только под header.
	   Разницу компенсируем, чтобы контент встал ровно по центру секции. */
	.pbc-hero__content {
		margin-top: calc((
			var(--pbc-hero-booking-height-mobile) / 2
			+ var(--pbc-hero-booking-gap-mobile)
			- var(--pbc-hero-padding-top-mobile)
		) / 2);
	}


	.pbc-hero__inner {
		flex: 1 1 auto;
		height: auto;
		min-height: 0;
	}



	.pbc-hero__breadcrumbs {
		margin-top: 0;
		padding-bottom: 28px;
	}

	.pbc-hero__actions {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 12px;
	}

	.pbc-hero__btn,
	.pbc-hero__btn > a {
		width: 100%;
	}

	.pbc-hero--align-center .pbc-hero__play-btn {
		align-self: center;
	}
}

/* =====================================================================
   Модалка «Оставить заявку» (свёрстана кодом, без Elementor Popup)
   ===================================================================== */

body.pbc-hero-modal-lock {
	overflow: hidden;
}

.pbc-hero-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background-color: rgba(0, 20, 45, 0.7);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.pbc-hero-modal-backdrop[hidden] {
	display: none;
}

.pbc-hero-modal-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

.pbc-hero-modal {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 40px 32px 32px;
	background-color: #fff;
	color: #222;
	border-radius: var(--radius-lg, 12px);
	box-shadow: var(--shadow-modal, 0 10px 30px rgba(0, 0, 0, 0.15));
	transform: translateY(16px);
	transition: transform 0.25s ease;
	box-sizing: border-box;
}

.pbc-hero-modal-backdrop.is-open .pbc-hero-modal {
	transform: translateY(0);
}

.pbc-hero-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 50%;
	color: #6b7280;
	cursor: pointer;
	transition: background-color var(--transition-fast, 0.2s ease),
	            color var(--transition-fast, 0.2s ease);
}

.pbc-hero-modal__close:hover {
	background-color: var(--color-gray-light, #eef2f6);
	color: var(--color-primary, #002554);
}

.pbc-hero-modal__close:focus-visible {
	outline: 2px solid var(--color-primary, #002554);
	outline-offset: 2px;
}

.pbc-hero-modal__title {
	margin: 0 0 8px;
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--color-primary, #002554);
	padding-right: 40px;
}

.pbc-hero-modal__description {
	margin: 0 0 24px;
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: 15px;
	line-height: 1.5;
	color: #555;
}

.pbc-hero-modal__form {
	margin: 0;
}

/* На мобилке — чуть компактнее */
@media (max-width: 480px) {

	.pbc-hero-modal-backdrop {
		padding: 12px;
	}

	.pbc-hero-modal {
		padding: 36px 20px 24px;
	}

	.pbc-hero-modal__title {
		font-size: 20px;
	}
}

/* =====================================================================
   Форма внутри модалки — имя, телефон, согласие
   ===================================================================== */

.pbc-hero-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pbc-hero-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pbc-hero-form__label {
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	color: #555;
}

.pbc-hero-form .pbc-hero-form__input {
	width: 100%;
	padding: 14px 16px;
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: 16px;
	line-height: 1.3;
	color: #222;
	background-color: #f6f8fb;
	border: 1.5px solid #e5ebf2;
	border-radius: var(--radius-md, 8px);
	transition: border-color var(--transition-fast, 0.2s ease),
	            background-color var(--transition-fast, 0.2s ease);
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.pbc-hero-form .pbc-hero-form__input:focus {
	outline: none;
	border-color: var(--color-primary, #002554);
	background-color: #fff;
}

.pbc-hero-form .pbc-hero-form__input::placeholder {
	color: #9aa4b2;
}

/* Honeypot — невидимое поле для ботов */
.pbc-hero-form__hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.pbc-hero-form__submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 24px;
	min-height: 52px;
	margin-top: 4px;
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	color: #fff;
	background-color: var(--color-primary, #002554);
	border: none;
	border-radius: var(--radius-md, 8px);
	cursor: pointer;
	transition: background-color var(--transition-fast, 0.2s ease),
	            transform var(--transition-fast, 0.2s ease);
	-webkit-appearance: none;
	appearance: none;
}

.pbc-hero-form__submit:hover {
	background-color: var(--color-primary-hover, #00377d);
}

.pbc-hero-form__submit:active {
	transform: translateY(1px);
}

.pbc-hero-form__submit:disabled {
	opacity: 0.7;
	cursor: progress;
}

.pbc-hero-form__submit-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: pbc-hero-spin 0.7s linear infinite;
}

.pbc-hero-form__submit.is-loading .pbc-hero-form__submit-spinner {
	display: inline-block;
}

@keyframes pbc-hero-spin {
	to { transform: rotate(360deg); }
}

.pbc-hero-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: 12px;
	line-height: 1.45;
	color: #6b7280;
	cursor: pointer;
}

.pbc-hero-form__consent-input {
	flex: none;
	width: 16px;
	height: 16px;
	margin: 1px 0 0;
	accent-color: var(--color-primary, #002554);
}

.pbc-hero-form__consent a {
	color: var(--color-primary, #002554);
	text-decoration: underline;
}

.pbc-hero-form__consent a:hover {
	color: var(--color-primary-hover, #00377d);
}

.pbc-hero-form__status {
	margin: 0;
	font-family: var(--font-primary, "Roboto", sans-serif);
	font-size: 14px;
	line-height: 1.4;
	min-height: 1.4em;
}

.pbc-hero-form__status:empty {
	min-height: 0;
}

.pbc-hero-form__status--success {
	color: #0a7a42;
}

.pbc-hero-form__status--error {
	color: #c0392b;
}

/* Фоновое видео (как на главной) */
.pbc-hero--has-video .pbc-hero__video-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	z-index: 0;
}

.pbc-hero--has-video .pbc-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	filter: brightness(0.7);
	transform: scale(1.08);
	transition:
		opacity 0.6s ease 0.2s,
		filter 2s ease 0.4s,
		transform 6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.pbc-hero--has-video .pbc-hero__video.playing {
	opacity: 1;
	filter: brightness(1);
	transform: scale(1);
	cursor: pointer;
}

.pbc-hero--has-video .pbc-hero__overlay,
.pbc-hero--has-video .pbc-hero__inner {
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

.pbc-hero--has-video.is-playing .pbc-hero__inner {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.pbc-hero--has-video.is-playing .pbc-hero__overlay {
	opacity: 0;
}

/* Кнопка «Смотреть видео» */
.pbc-hero__play-btn,
.pbc-hero__play-btn:hover,
.pbc-hero__play-btn:focus,
.pbc-hero__play-btn:focus-visible,
.pbc-hero__play-btn:active {
	background: none;
	box-shadow: none;
}

.pbc-hero__play-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 0;
	border: 0;
	background: none;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	cursor: pointer;
	transition: color 0.3s ease;
}

.pbc-hero__play-btn:hover,
.pbc-hero__play-btn:focus-visible {
	color: var(--pbc-gold, #c8b478);
}

.pbc-hero__play-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 50%;
	transition: border-color 0.3s ease, background 0.3s ease;
}

.pbc-hero__play-btn:hover .pbc-hero__play-icon,
.pbc-hero__play-btn:focus-visible .pbc-hero__play-icon {
	border-color: var(--pbc-gold, #c8b478);
	background: rgba(200, 180, 120, 0.15);
}

.pbc-hero__play-icon svg {
	width: 14px;
	height: 14px;
	margin-left: 2px;
	fill: #fff;
}

.pbc-hero__play-btn:hover .pbc-hero__play-icon svg {
	fill: var(--pbc-gold, #c8b478);
}

/* Автокрошки после шапки не нужны, если hero вывел свои.
   Актуально для архивов CPT: там PHP-проверка не находит шорткод,
   потому что страницу рендерит шаблон Elementor Theme Builder. */
body:has(.pbc-hero__breadcrumbs) .pbc-breadcrumbs--auto {
	display: none;
}

.pbc-hero__booking-inner {
	min-height: 138px;
}

@media (max-width: 950px) {
	.pbc-hero__booking-inner {
		min-height: 204px;
	}
}

@media (max-width: 681px) {
	.pbc-hero__booking-inner {
		min-height: 198px;
	}
}

@media (max-width: 556px) {
	.pbc-hero__booking-inner {
		min-height: 318px;
	}
}

@media (max-width: 411px) {
	.pbc-hero__booking-inner {
		min-height: 324px;
	}
}

@media (max-width: 330px) {
	.pbc-hero__booking-inner {
		min-height: 348px;
	}
}
