/**
 * Шапка Wimpole US для страниц Unbounce.
 *
 * Копия шапки сайта wimpole.com/us/ (Astra + style.css темы, блоки 1–7):
 * десктоп — логотип, меню по центру, кнопка справа; ниже 1200px, как на
 * сайте, — логотип, маленькая кнопка и бургер, меню в стеклянной панели
 * на весь экран, подменю выезжают справа налево.
 *
 * Разметка шапки — в элементе Custom HTML на странице Unbounce
 * (<header id="wcub-header">…). header.js переносит её в начало <body>,
 * вне абсолютной раскладки Unbounce, и строит мобильную панель. Секция
 * Unbounce, в которой лежит разметка, скрывается (класс .wcub-host).
 *
 * Все правила — под префиксом wcub-, чтобы не пересекаться со стилями
 * Unbounce и старого меню.
 */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&display=swap");

.wcub-header,
.wcub-nav,
.wcub-popup {
	--wcub-accent: #8cd0e5;
	--wcub-on-accent: #16435a;
	--wcub-panel-border: rgba(255, 255, 255, 0.5);
	--wcub-divider: rgba(255, 255, 255, 0.35);
	--wcub-glass-tint: 45, 93, 112;
	--wcub-glass-filter: blur(24px) saturate(140%) brightness(105%);
	--wcub-radius: 8px;
	--wcub-radius-panel: 24px;
	--wcub-vw: min(1vw, 16px);
	--wcub-gutter: clamp(20px, calc(5 * var(--wcub-vw)), 80px);
	--wcub-nav-pad: clamp(7px, calc(0.9375 * var(--wcub-vw)), 15px);
	--wcub-submenu-offset: 13px;

	--wcub-icon-burger: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='31' height='24' viewBox='0 0 31 24'%3E%3Cpath d='M1.5 1.5H29.5M1.5 12H29.5M1.5 22.5H29.5' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	--wcub-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 42 42'%3E%3Cpath d='M31.5 10.5L10.5 31.5M10.5 10.5L31.5 31.5' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	--wcub-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='12' viewBox='0 0 7 12'%3E%3Cpath d='M1 1L6 6L1 11' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
	--wcub-icon-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='12' viewBox='0 0 18 12'%3E%3Cpath d='M17 6H1M1 6L6 1M1 6L6 11' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
	--wcub-icon-caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 3.5L5 7L8.5 3.5' stroke='%23fff' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

/* Секция Unbounce, из которой взята разметка, — не показываем: шапка уже
   в начале страницы. :has — чтобы старая секция не мелькнула до скрипта. */
.wcub-host,
.lp-pom-block:has(#wcub-header) {
	display: none !important;
}

/* Сброс: Unbounce и старое меню задают свои правила спискам и ссылкам. */
.wcub-header *,
.wcub-nav *,
.wcub-popup * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: "Roboto", sans-serif;
	text-decoration: none;
	border: 0;
	background: none;
	box-shadow: none;
}

.wcub-header a:focus:not(:focus-visible),
.wcub-header button:focus:not(:focus-visible),
.wcub-nav a:focus:not(:focus-visible),
.wcub-popup a:focus:not(:focus-visible),
.wcub-popup button:focus:not(:focus-visible) {
	outline: 0;
}

/* ---------- Шапка ---------- */

.wcub-header {
	position: relative;
	z-index: 1000;
	width: 100%;
	background: var(--wcub-bg, #00394a);
	-webkit-font-smoothing: antialiased;
}

.wcub-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	max-width: 1600px;
	margin: 0 auto;
	padding: 59px var(--wcub-gutter) var(--wcub-bottom, 20px);
}

.wcub-logo {
	justify-self: start;
	display: block;
	line-height: 0;
}

.wcub-logo img {
	display: block;
	width: 147px;
	height: auto;
	max-width: none;
}

.wcub-actions {
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 14px;
}

.wcub-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 25px;
	border-radius: var(--wcub-radius);
	background: var(--wcub-accent) !important;
	color: var(--wcub-on-accent) !important;
	font: 600 14px/1 "Roboto", sans-serif !important;
	white-space: nowrap;
	transition: background-color 0.2s ease;
}

.wcub-btn:hover,
.wcub-btn:focus {
	background: #a3dcec !important;
	color: var(--wcub-on-accent) !important;
}

.wcub-burger {
	display: none;
}

/* ---------- Меню (десктоп) ---------- */

/* Элемент Custom HTML у Unbounce обрезает всё, что выходит за его рамки
   (overflow: hidden), и стоит по z-index наравне с соседними элементами —
   выпадающие панели меню иначе не видны или уходят под следующую секцию. */
.lp-element:has(> .wcub-nav--inline),
.lp-element:has(> * > .wcub-nav--inline) {
	overflow: visible !important;
	z-index: 1000 !important;
}

/* Вариант «только меню»: элемент Custom HTML в ряду шапки Unbounce.
   Раскладка Unbounce на десктопе фиксированная (1200), поэтому размеры
   фиксированные — как на сайте при ширине окна ~1500: 17px, 28px между
   пунктами. Элемент занимает всё место между логотипом и кнопкой,
   меню — по его центру; высота элемента 54px. */
.wcub-nav--inline {
	--wcub-nav-pad: 14px;

	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	-webkit-font-smoothing: antialiased;
}

.wcub-nav--inline .wcub-menu > li > a {
	font-size: 17px;
}

.wcub-menu {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	min-height: 54px;
}

.wcub-menu > li {
	position: relative;
	white-space: nowrap;
}

.wcub-menu > li > a {
	display: flex;
	align-items: center;
	height: 54px;
	padding: 0 var(--wcub-nav-pad);
	color: #fff !important;
	font-weight: 500;
	font-size: clamp(14px, calc(1.125 * var(--wcub-vw)), 18px);
	line-height: 1.15;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s ease;
}

.wcub-menu > li:first-child > a {
	padding-inline-start: 0;
}

.wcub-menu > li:last-child > a {
	padding-inline-end: 0;
}

.wcub-menu > li > a:hover,
.wcub-menu > li:hover > a,
.wcub-menu > li:focus-within > a,
.wcub-menu > li.is-current > a {
	color: var(--wcub-accent) !important;
}

.wcub-caret {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	margin-inline-start: 5px;
	background-color: currentColor;
	-webkit-mask: var(--wcub-icon-caret) no-repeat center / contain;
	mask: var(--wcub-icon-caret) no-repeat center / contain;
}

/* Выпадающая панель: стекло, как подменю на сайте. */
.wcub-menu > li > .wcub-sub {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 10;
	min-width: 230px;
	margin-top: var(--wcub-submenu-offset);
	padding: 21px 30px;
	border-top: 1px solid var(--wcub-panel-border);
	border-radius: 0 var(--wcub-radius-panel) var(--wcub-radius-panel) var(--wcub-radius-panel);
	background-color: rgba(var(--wcub-glass-tint), 0.5);
	-webkit-backdrop-filter: var(--wcub-glass-filter);
	backdrop-filter: var(--wcub-glass-filter);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.wcub-menu > li > .wcub-sub {
		background-color: rgba(var(--wcub-glass-tint), 0.94);
	}
}

/* Мостик над панелью: курсор не теряет наведение в зазоре 13px. */
.wcub-menu > li > .wcub-sub::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 100%;
	height: calc(var(--wcub-submenu-offset) + 2px);
}

.wcub-menu > li:hover > .wcub-sub,
.wcub-menu > li:focus-within > .wcub-sub,
.wcub-menu > li.is-open > .wcub-sub {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.22s ease, visibility 0s;
}

.wcub-sub a {
	display: block;
	color: #fff !important;
	font-weight: 500;
	font-size: 18px;
	line-height: 2;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.wcub-sub a:hover,
.wcub-sub li:hover > a {
	color: var(--wcub-accent) !important;
}

.wcub-sub > li + li {
	margin-top: 10px;
}

/* Второй уровень (Locations → North America → Miami / New York):
   как на сайте, колонка справа внутри той же панели, за вертикальной
   чертой. Сетка: левая колонка — пункты, правая — открытый уровень. */
.wcub-menu > li > .wcub-sub:has(.wcub-sub) {
	display: grid;
	grid-template-columns: 174px auto;
	grid-template-rows: 31px auto;
	row-gap: 10px;
	align-items: start;
	width: max-content;
	min-width: 234px;
	padding: 19px 30px 20px;
}

.wcub-sub:has(.wcub-sub) > li {
	grid-column: 1;
}

.wcub-sub:has(.wcub-sub) > li + li {
	margin-top: 0;
}

.wcub-sub > li.has-sub {
	display: contents;
}

.wcub-sub > li.has-sub > a {
	grid-column: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	height: 31px;
	line-height: normal;
	cursor: pointer;
}

.wcub-sub > li.has-sub > a .wcub-caret {
	width: 12px;
	height: 12px;
	margin: 0 0 0 auto;
	transform: rotate(-90deg);
}

.wcub-sub > li.has-sub:hover > a,
.wcub-sub > li.has-sub:focus-within > a {
	color: var(--wcub-accent) !important;
}

.wcub-sub .wcub-sub {
	grid-column: 2;
	grid-row: 1 / -1;
	align-self: stretch;
	display: grid;
	align-content: start;
	gap: 10px;
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: max-width 0.22s ease, padding 0.22s ease, opacity 0.22s ease, visibility 0s linear 0.22s;
}

.wcub-sub > li.has-sub:hover > .wcub-sub,
.wcub-sub > li.has-sub:focus-within > .wcub-sub {
	max-width: 157px;
	padding-left: 57px;
	background: linear-gradient(var(--wcub-panel-border), var(--wcub-panel-border)) left 30px top 5px / 1px calc(100% - 10px) no-repeat;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: max-width 0.22s ease, padding 0.22s ease, opacity 0.22s ease, visibility 0s;
}

.wcub-sub .wcub-sub > li + li {
	margin-top: 0;
}

/* ---------- До 1200px: мобильная шапка (как Astra на сайте) ---------- */

@media (max-width: 1199px) {
	.wcub-header__inner {
		grid-template-columns: 1fr auto;
		padding: 23px 20px var(--wcub-bottom-mobile, 16px);
	}

	.wcub-header .wcub-nav {
		display: none;
	}

	.wcub-logo img {
		width: 116px;
	}

	.wcub-actions {
		gap: 20px;
	}

	.wcub-actions .wcub-btn {
		padding: 8px 14px;
		border-radius: 4px;
		font-size: 12px !important;
		line-height: 14px !important;
	}

	.wcub-burger {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 42px;
		height: 42px;
		color: #fff;
		cursor: pointer;
	}

	.wcub-burger::before {
		content: "";
		width: 31px;
		height: 24px;
		background-color: currentColor;
		-webkit-mask: var(--wcub-icon-burger) no-repeat center / contain;
		mask: var(--wcub-icon-burger) no-repeat center / contain;
	}
}

/* ---------- Мобильная панель ---------- */

.wcub-popup {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.28s ease, visibility 0.28s ease;
	-webkit-font-smoothing: antialiased;
}

.wcub-popup.is-active {
	visibility: visible;
	opacity: 1;
}

.wcub-popup__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background-color: rgba(var(--wcub-glass-tint), 0.7);
	-webkit-backdrop-filter: var(--wcub-glass-filter);
	backdrop-filter: var(--wcub-glass-filter);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
	transform: translateY(-12px);
	transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.wcub-popup__inner {
		background-color: rgba(var(--wcub-glass-tint), 0.95);
	}
}

.wcub-popup.is-active .wcub-popup__inner {
	transform: none;
}

.wcub-popup__inner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 28%, rgba(255, 255, 255, 0) 55%);
}

.wcub-popup__head,
.wcub-popup__content {
	position: relative;
	z-index: 1;
}

.wcub-popup__head {
	display: flex;
	flex: none;
	justify-content: flex-end;
	padding: 24px 20px 0;
}

.wcub-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	color: #fff;
	cursor: pointer;
}

.wcub-close::before {
	content: "";
	width: 42px;
	height: 42px;
	background-color: currentColor;
	-webkit-mask: var(--wcub-icon-close) no-repeat center / contain;
	mask: var(--wcub-icon-close) no-repeat center / contain;
}

.wcub-popup__content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	padding: 19px 35px 36px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.wcub-popup__content > .wcub-btn {
	width: 100%;
	margin-top: auto;
	padding: 16px 25px;
}

.wcub-mmenu {
	margin-bottom: 30px !important;
}

.wcub-mmenu li {
	position: relative;
}

.wcub-mmenu > li > a,
.wcub-mmenu .wcub-msub > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: #fff !important;
	font-weight: 500;
	font-size: 18px;
	border-bottom: 0.5px solid var(--wcub-divider);
	transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.wcub-mmenu > li > a {
	padding: 30px 0;
	line-height: 1.15;
}

.wcub-mmenu .wcub-msub > li > a {
	padding: 21px 0;
	line-height: 2;
}

.wcub-mmenu > li:last-child > a,
.wcub-mmenu .wcub-msub > li:last-child > a {
	border-bottom: 0;
}

.wcub-mmenu li.has-sub > a::after {
	content: "";
	flex: none;
	width: 7px;
	height: 12px;
	margin-left: 12px;
	background-color: currentColor;
	-webkit-mask: var(--wcub-icon-chevron) no-repeat center / contain;
	mask: var(--wcub-icon-chevron) no-repeat center / contain;
}

/* Подменю — отдельный экран, выезжает справа налево. */
.wcub-msub {
	position: fixed;
	top: 66px;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	padding: 19px 35px 36px !important;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	visibility: hidden;
	opacity: 0;
	transform: translateX(100%);
	transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.wcub-msub.is-open {
	visibility: visible;
	opacity: 1;
	transform: none;
}

/* Уровень, поверх которого открыт следующий, гаснет. */
.wcub-mmenu.has-open > li > a,
.wcub-msub.has-open > li > a,
.wcub-msub.has-open > .wcub-back > button {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.wcub-back > button {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 30px 0;
	color: #fff;
	font-weight: 400;
	font-size: 18px;
	line-height: 42px;
	text-align: left;
	cursor: pointer;
	transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.wcub-back > button::before {
	content: "";
	flex: none;
	width: 18px;
	height: 12px;
	background-color: currentColor;
	-webkit-mask: var(--wcub-icon-back) no-repeat center / contain;
	mask: var(--wcub-icon-back) no-repeat center / contain;
}

html.wcub-locked,
html.wcub-locked body {
	overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
	.wcub-popup__inner,
	.wcub-msub {
		transition: opacity 0.2s ease, visibility 0.2s ease;
		transform: none;
	}
}
