/**
 * Avada Child — custom chrome (header, footer, shared primitives).
 *
 * Design tokens mirror the Figma variables of the Air Care One design:
 *   Matisse #155F9A, Mariner #1E73BE, Endeavour #0066A4, Azure #15609A,
 *   Tundora #4E4E4E, Boulder #747474, Alabaster #F9F9F9, Swiss Coffee #D4D1CF.
 */

:root {
	--avia-blue: #155f9a;
	--avia-blue-alt: #1e73be;
	--avia-blue-deep: #0066a4;
	--avia-azure: #15609a;
	--avia-teal: #00a890;
	--avia-text: #4e4e4e;
	--avia-muted: #747474;
	--avia-light: #f9f9f9;
	--avia-grey-97: #f7f7f7;
	--avia-border: #d4d1cf;
	--avia-white: #fff;

	--avia-font-head: "Open Sans", "Helvetica Neue", Arial, sans-serif;
	--avia-font-body: "Roboto", "Open Sans", Arial, sans-serif;

	--avia-container: 1400px;
	--avia-gutter: 30px;

	--avia-header-h: 121px;
	--avia-logo-h: 73px;
	--avia-footer-bg: var(--avia-blue);
	--avia-radius: 4px;
}

/* ---------------------------------------------------------------- Layout */

/* Positioning context for the transparent overlay header. */
.avia-wrapper {
	position: relative;
}

.avia-container {
	width: 100%;
	max-width: var(--avia-container);
	margin-inline: auto;
	padding-inline: var(--avia-gutter);
	box-sizing: border-box;
}

/*
 * Иконки-картинки (SVG/PNG из медиабиблиотеки), которые avia_get_fa() выводит
 * как <img class="avia-icon-img"> вместо Font Awesome <i>. По умолчанию размер
 * берётся от font-size контейнера (1em) — ровно как вёл себя FA-глиф. Точные
 * размеры по секциям главной доопределены в home.css.
 */
.avia-icon-img {
	display: inline-block;
	width: auto;
	height: 1em;
	max-width: 100%;
	object-fit: contain;
	vertical-align: middle;
}

.avia-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 12px 20px;
	background: var(--avia-blue);
	color: #fff;
}

.avia-skip-link:focus {
	left: 0;
}

.avia-home #main,
.avia-home .avia-main {
	padding: 0;
	max-width: none;
}

/* ---------------------------------------------------------------- Type */

.avia-section__head {
	max-width: 900px;
	margin: 0 auto 48px;
}

.avia-section__head--center {
	text-align: center;
}

.avia-section__head--left {
	margin-inline: 0;
	text-align: left;
}

.avia-section__title {
	margin: 0;
	font-family: var(--avia-font-head);
	font-weight: 700;
	font-size: 34px;
	line-height: 1.25;
	color: var(--avia-blue);
}

.avia-section__subtitle {
	margin: 16px 0 0;
	font-family: var(--avia-font-head);
	font-size: 16px;
	line-height: 24px;
	color: var(--avia-muted);
}

.avia-eyebrow {
	margin: 0 0 8px;
	font-family: var(--avia-font-head);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.1px;
	text-transform: uppercase;
	color: var(--avia-blue-alt);
}

/* ---------------------------------------------------------------- Buttons */

.avia-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 17px 40px;
	border: 0;
	background: var(--avia-blue);
	color: #fff;
	font-family: var(--avia-font-head);
	font-weight: 700;
	font-size: 18px;
	line-height: 21px;
	letter-spacing: 1.1px;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.avia-btn:hover,
.avia-btn:focus {
	background: var(--avia-blue-deep);
	color: #fff;
}

.avia-btn--teal {
	background: var(--avia-teal);
}

.avia-btn--teal:hover,
.avia-btn--teal:focus {
	background: #009a84;
}

.avia-btn--ghost {
	background: transparent;
	border: 2px solid #fff;
}

.avia-btn--ghost:hover,
.avia-btn--ghost:focus {
	background: #fff;
	color: var(--avia-blue);
}

.avia-btn--sm {
	padding: 11px 23px;
	font-size: 13px;
	line-height: 16px;
}

.avia-btn--block {
	width: 100%;
}

.avia-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.avia-icon svg {
	display: block;
	width: 1em;
	height: 1em;
}

/* ---------------------------------------------------------------- Header */

.avia-header {
	position: relative;
	z-index: 100;
	background: #fff;
	font-family: var(--avia-font-head);
}

/* Transparent overlay header, as designed on the front page. */
.avia-header-transparent .avia-header {
	position: absolute;
	inset: 0 0 auto;
	background: rgba(255, 255, 255, 0.75);
}

.avia-header__bar {
	width: 100%;
}

.avia-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: none;
	padding: 24px var(--avia-gutter);
}

.avia-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.avia-logo__img {
	display: block;
	width: auto;
	height: var(--avia-logo-h);
	max-width: 100%;
}

.avia-logo__text {
	font-size: 24px;
	font-weight: 700;
	color: var(--avia-blue);
}

/* Navigation ---------------------------------------------------- */

.avia-nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
}

.avia-menu,
.avia-menu ul {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.avia-menu > li {
	position: relative;
}

.avia-menu > li > a {
	display: flex;
	align-items: center;
	gap: 9px;
	height: 95px;
	padding: 0 25px;
	font-size: 18px;
	line-height: 18px;
	color: var(--avia-text);
	text-decoration: none;
	white-space: nowrap;
}

.avia-menu > li:first-child > a {
	padding-left: 0;
}

.avia-menu > li > a:hover,
.avia-menu > li.current-menu-item > a,
.avia-menu > li.current-menu-ancestor > a {
	color: var(--avia-blue);
}

/* Caret for items with children — exported Figma glyph at its designed size. */
.avia-menu .menu-item-has-children > a::after {
	content: "";
	flex: 0 0 auto;
	width: 10.02px;
	height: 5.85px;
	background-color: currentColor;
	-webkit-mask: url("../img/caret-down.svg") no-repeat center / 10.02px 5.85px;
	mask: url("../img/caret-down.svg") no-repeat center / 10.02px 5.85px;
	transition: transform 0.2s ease;
}

.avia-menu .menu-item-has-children:hover > a::after,
.avia-menu .menu-item-has-children:focus-within > a::after {
	transform: rotate(180deg);
}

.avia-menu ul.sub-menu {
	position: absolute;
	top: 100%;
	left: 25px;
	z-index: 10;
	display: block;
	min-width: 260px;
	padding: 8px 0;
	background: #fff;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.avia-menu li:hover > ul.sub-menu,
.avia-menu li:focus-within > ul.sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.avia-menu ul.sub-menu li {
	position: relative;
	width: 100%;
}

.avia-menu ul.sub-menu a {
	display: block;
	padding: 10px 22px;
	font-size: 16px;
	line-height: 22px;
	color: var(--avia-text);
	text-decoration: none;
}

.avia-menu ul.sub-menu a:hover {
	background: var(--avia-grey-97);
	color: var(--avia-blue);
}

.avia-menu ul.sub-menu ul.sub-menu {
	top: 0;
	left: 100%;
}

/* Header actions ------------------------------------------------ */

.avia-header__actions {
	display: flex;
	align-items: center;
	gap: 24px;
}

.avia-header__phones {
	display: flex;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.avia-header__phone {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 18px;
	color: var(--avia-text);
	text-decoration: none;
	white-space: nowrap;
}

.avia-header__phone:hover {
	color: var(--avia-blue);
}

.avia-header__phone .avia-icon,
.avia-header__phone i {
	width: 25px;
	font-size: 20px;
	color: var(--avia-blue-alt);
}

.avia-header__phone-label {
	display: block;
	font-size: 12px;
	color: var(--avia-muted);
}

/* Sticky -------------------------------------------------------- */

.avia-header.is-stuck {
	position: fixed;
	inset: 0 0 auto;
	background: #fff;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
	animation: avia-slide-down 0.25s ease;
}

.avia-header.is-stuck .avia-header__inner {
	padding-top: 12px;
	padding-bottom: 12px;
}

.avia-header.is-stuck .avia-logo__img {
	height: calc(var(--avia-logo-h) * 0.72);
}

.avia-header.is-stuck .avia-menu > li > a {
	height: 64px;
}

@keyframes avia-slide-down {
	from {
		transform: translateY(-100%);
	}
	to {
		transform: none;
	}
}

/* Top bar ------------------------------------------------------- */

.avia-topbar {
	background: var(--avia-blue);
	color: #fff;
	font-size: 14px;
}

.avia-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 42px;
	max-width: none;
}

.avia-topbar__text {
	margin: 0;
}

.avia-topbar__aside {
	display: flex;
	align-items: center;
	gap: 20px;
}

.avia-topbar__contacts {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.avia-topbar__contacts li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.avia-topbar a {
	color: inherit;
	text-decoration: none;
}

/* Socials ------------------------------------------------------- */

.avia-socials {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.avia-socials a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: inherit;
	font-size: 16px;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.avia-socials a:hover {
	background: rgba(255, 255, 255, 0.28);
}

/* Burger + mobile panel ---------------------------------------- */

.avia-burger {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.avia-burger__box {
	position: relative;
	display: block;
	width: 26px;
	height: 2px;
	margin: 0 auto;
	background: var(--avia-blue);
}

.avia-burger__box::before,
.avia-burger__box::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--avia-blue);
}

.avia-burger__box::before {
	top: -8px;
}

.avia-burger__box::after {
	top: 8px;
}

.avia-mobile {
	position: fixed;
	inset: 0;
	z-index: 200;
}

.avia-mobile__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.avia-mobile__dialog {
	position: absolute;
	inset: 0 0 0 auto;
	width: min(400px, 92vw);
	display: flex;
	flex-direction: column;
	background: var(--avia-light);
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.25s ease;
}

.avia-mobile.is-open .avia-mobile__dialog {
	transform: none;
}

.avia-mobile__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 20px;
	background: #fff;
}

.avia-mobile__head .avia-logo__img {
	height: 48px;
}

.avia-mobile__close {
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	font-size: 20px;
	color: var(--avia-text);
	cursor: pointer;
}

.avia-mobile__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 24px 20px 40px;
}

.avia-mobile-menu,
.avia-mobile-menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.avia-mobile-menu a {
	display: block;
	padding: 14px 0;
	border-bottom: 1px solid var(--avia-border);
	font-size: 18px;
	color: var(--avia-text);
	text-decoration: none;
}

.avia-mobile-menu .sub-menu {
	display: none;
	padding-left: 16px;
}

.avia-mobile-menu .is-expanded > .sub-menu {
	display: block;
}

.avia-submenu-toggle {
	position: absolute;
	right: 0;
	top: 6px;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	color: var(--avia-blue);
	font-size: 18px;
	cursor: pointer;
}

.avia-mobile-menu .menu-item-has-children {
	position: relative;
}

.avia-mobile__contacts {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.avia-mobile__contact {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 17px;
	color: var(--avia-blue);
	text-decoration: none;
}

body.avia-nav-open {
	overflow: hidden;
}

/* ---------------------------------------------------------------- Footer */

.avia-footer {
	position: relative;
	display: flex;
	flex-direction: column;
	/*
	 * clear обязателен: на страницах Avada секция #content идёт с float: left,
	 * а подвал лежит за ней. Как flex-контейнер он образует BFC, а BFC не
	 * заходит под float — без clear подвал сжимался в остаток ширины и
	 * прилипал к правому краю.
	 */
	clear: both;
	overflow: hidden;
	padding: 144px 0 48px;
	background: var(--avia-footer-bg);
	color: #fff;
	font-family: var(--avia-font-head);
	box-sizing: border-box;
}

/*
 * Высота подвала по макету (Figma 36:42524 — 1920 × 967). Фон-фотографию нужно
 * показать целиком, поэтому лишнюю высоту забирает не контент, а промежуток
 * между колонками ссылок и нижней строкой: .avia-footer__inner растягивается,
 * а margin-top: auto у .avia-footer__bottom прижимает её к низу.
 */
@media (min-width: 1025px) {
	.avia-footer {
		min-height: 967px;
	}
}

.avia-footer__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.avia-footer__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

/* Matisse wash fading downwards, exactly as designed. */
.avia-footer__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		var(--avia-footer-overlay, #155f9a) 0%,
		rgba(21, 95, 154, 0) 100%
	);
}

.avia-footer__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
}

.avia-footer__top {
	display: grid;
	grid-template-columns: 460px repeat(3, minmax(0, 1fr));
	gap: 32px;
	padding-bottom: 44px;
}

.avia-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding-right: 144px;
}

.avia-footer__brand .avia-logo__img {
	height: 73px;
}

.avia-footer__about {
	font-size: 15px;
	line-height: 24px;
	color: rgba(255, 255, 255, 0.8);
}

.avia-footer__about p {
	margin: 0;
}

.avia-footer__col-title {
	margin: 0 0 24px;
	font-size: 14px;
	font-weight: 700;
	line-height: 15.4px;
	letter-spacing: 1.12px;
	text-transform: uppercase;
	color: #fff;
}

.avia-footer__cols {
	display: contents;
}

.avia-footer__col:not(:first-child),
.avia-footer__dispatch {
	padding-left: 32px;
}

.avia-footer__links {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 24px;
}

.avia-footer__links a,
.avia-footer__link {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
}

.avia-footer__links a:hover,
.avia-footer__link:hover {
	color: #fff;
	text-decoration: underline;
}

/* Dispatch column ---------------------------------------------- */

.avia-footer__dispatch-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.avia-footer__phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 22px;
	font-weight: 800;
	line-height: 35.2px;
	color: #fff;
	text-decoration: none;
}

.avia-footer__phone:hover,
.avia-footer__phone:focus {
	color: #fff;
}

.avia-footer__phone i,
.avia-footer__phone .avia-icon {
	font-size: 20px;
	color: #6fa8dc;
}

.avia-footer__phone .avia-icon-img {
	height: 20px;
}

.avia-footer__meta {
	margin: 0;
	font-size: 14.5px;
	line-height: 23.2px;
	color: rgba(255, 255, 255, 0.8);
}

.avia-footer__meta a {
	color: inherit;
	text-decoration: none;
}

/* Bottom bar --------------------------------------------------- */

.avia-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 24px;
	margin-top: auto;
	padding-top: 48px;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	font-size: 13.5px;
	line-height: 21.6px;
	color: #fff;
}

.avia-footer__copy {
	margin: 0;
}

.avia-footer__badges {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.avia-footer__badges a {
	color: inherit;
	text-decoration: none;
}

.avia-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 150;
	width: 46px;
	height: 46px;
	border: 0;
	background: var(--avia-blue);
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.avia-to-top.is-visible {
	opacity: 1;
	transform: none;
}

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 1400px) {
	.avia-menu > li > a {
		padding: 0 16px;
	}

	.avia-header__phones {
		gap: 16px;
	}
}

@media (max-width: 1200px) {
	.avia-nav {
		display: none;
	}

	.avia-burger {
		display: block;
	}

	.avia-header__phones {
		display: none;
	}

	.avia-footer {
		padding-top: 80px;
	}

	.avia-footer__top {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 48px;
	}

	.avia-footer__brand {
		grid-column: 1 / -1;
		padding-right: 0;
	}

	.avia-footer__col:not(:first-child),
	.avia-footer__dispatch {
		padding-left: 0;
	}
}

@media (max-width: 782px) {
	:root {
		--avia-gutter: 20px;
		--avia-logo-h: 52px;
	}

	.avia-header__inner {
		padding-block: 14px;
	}

	.avia-header__cta {
		display: none;
	}

	.avia-topbar__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding-block: 10px;
	}

	.avia-footer {
		padding: 56px 0 32px;
	}

	.avia-footer__top {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}

	.avia-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
		padding-top: 28px;
	}

	.avia-footer__badges {
		flex-wrap: wrap;
		gap: 12px 20px;
	}

	.avia-section__title {
		font-size: 26px;
	}

	.avia-btn {
		padding: 15px 24px;
		font-size: 14px;
	}
}
