/* ==========================================================================
   AR Header (old site: white bar 93px, menus left/right of the centered logo,
   search + flag, red phone bar 44px below; bar stays on top when scrolling).
   ========================================================================== */

.ar-header {
	position: relative;
	z-index: 990;
}
.ar-header .ar-header__main {
	position: relative;
	z-index: 2;
	background: var(--ar-white);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
	transition: box-shadow .2s;
}
.ar-header.is-stuck .ar-header__main {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.ar-header .ar-header__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	max-width: 1200px;
	min-height: 93px;
	margin: 0 auto;
	padding: 0 var(--ar-gutter);
}

/* Logo */
.ar-header .ar-header__logo {
	display: block;
	grid-column: 2;
	grid-row: 1;
}
.ar-header .ar-header__logo img {
	width: 132px;
	height: auto;
}
.ar-header .ar-header__sitename {
	color: var(--ar-red);
	font-size: 26px;
	font-weight: 700;
}

/* Desktop menus */
.ar-header .ar-header__nav--left {
	grid-column: 1;
	grid-row: 1;
	justify-self: end;
}
.ar-header .ar-header__right {
	display: flex;
	grid-column: 3;
	grid-row: 1;
	align-items: center;
	justify-content: flex-start;
	gap: 60px;
}
.ar-header .ar-menu--main {
	display: flex;
	align-items: center;
	gap: 40px;
}
.ar-header .ar-menu--main > .ar-menu__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ar-header .ar-menu--main > .ar-menu__item > .ar-menu__link {
	display: block;
	padding: 10px 0;
	color: var(--ar-ink);
	font-size: 18px;
	font-weight: 400;
	line-height: 26px;
	white-space: nowrap;
}
.ar-header .ar-menu--main > .ar-menu__item > .ar-menu__link:hover,
.ar-header .ar-menu--main > .ar-menu__item.is-current > .ar-menu__link,
.ar-header .ar-menu--main > .ar-menu__item:focus-within > .ar-menu__link {
	color: var(--ar-red);
}
.ar-header .ar-menu--main .ar-menu__toggle {
	display: inline-flex;
	align-items: center;
	color: var(--ar-ink);
	font-size: 10px;
	line-height: 1;
}
.ar-header .ar-menu--main .ar-menu__toggle .ar-icon {
	width: 11px;
	height: 7px;
}
.ar-header .ar-menu--main > .ar-menu__item:hover > .ar-menu__toggle,
.ar-header .ar-menu--main > .ar-menu__item.is-current > .ar-menu__toggle {
	color: var(--ar-red);
}

/* Dropdown */
.ar-header .ar-menu--main .ar-menu__sub {
	position: absolute;
	top: 100%;
	left: -20px;
	z-index: 5;
	min-width: 240px;
	padding: 8px 0;
	background: var(--ar-white);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.ar-header .ar-menu--main > .ar-menu__item:hover > .ar-menu__sub,
.ar-header .ar-menu--main > .ar-menu__item:focus-within > .ar-menu__sub,
.ar-header .ar-menu--main > .ar-menu__item.is-open > .ar-menu__sub {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .2s, transform .2s;
}
.ar-header .ar-menu--main .ar-menu__sub .ar-menu__link {
	display: block;
	padding: 10px 20px;
	color: var(--ar-ink);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	white-space: nowrap;
}
.ar-header .ar-menu--main .ar-menu__sub .ar-menu__link:hover,
.ar-header .ar-menu--main .ar-menu__sub .is-current > .ar-menu__link {
	color: var(--ar-red);
}

/* Tools: search + flag + burger */
.ar-header .ar-header__tools {
	display: flex;
	align-items: center;
	gap: 40px;
}
.ar-header .ar-header__search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	color: var(--ar-ink);
}
.ar-header .ar-header__search-btn .ar-icon {
	width: 20px;
	height: 20px;
}
.ar-header .ar-header__search-btn:hover {
	color: var(--ar-red);
}
.ar-header .ar-header__burger {
	display: none;
	width: 28px;
	height: 28px;
	align-items: center;
	justify-content: center;
	color: var(--ar-ink);
}
.ar-header .ar-header__burger .ar-icon {
	width: 26px;
	height: 26px;
}

/* Language flags */
.ar-header .ar-lang {
	position: relative;
}
.ar-header .ar-lang__current {
	display: flex;
	align-items: center;
	padding: 6px 0;
}
.ar-header .ar-lang__flag {
	flex: none;
	width: 22px;
	max-width: none;
	height: 16px;
	object-fit: cover;
}
.ar-header .ar-lang__code {
	font-size: 15px;
	font-weight: 500;
}
.ar-header .ar-lang__list {
	position: absolute;
	top: 100%;
	left: 50%;
	z-index: 5;
	min-width: 47px;
	padding: 8px 0;
	background: var(--ar-white);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%);
	transition: opacity .2s, visibility 0s .2s;
}
.ar-header .ar-lang:hover .ar-lang__list,
.ar-header .ar-lang:focus-within .ar-lang__list,
.ar-header .ar-lang.is-open .ar-lang__list {
	opacity: 1;
	visibility: visible;
	transition: opacity .2s;
}
.ar-header .ar-lang__list a {
	display: flex;
	justify-content: center;
	padding: 6px 12px;
}

/* Red phone bar */
.ar-header .ar-header__phones {
	position: relative;
	z-index: 1;
	background: var(--ar-red);
	color: var(--ar-white);
}
.ar-header .ar-header__phones ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px 35px;
	max-width: var(--ar-box);
	margin: 0 auto;
	padding: 9px 10px;
}
.ar-header .ar-header__phones li {
	color: var(--ar-white);
	font-size: 16px;
	font-weight: 300;
	line-height: 26px;
}
.ar-header .ar-header__phones a:hover {
	text-decoration: underline;
}

/* Full-screen search */
.ar-header .ar-search {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .87);
}
.ar-header .ar-search[hidden] {
	display: none;
}
.ar-header .ar-search__form {
	display: flex;
	align-items: center;
	width: min(800px, 100%);
	border-bottom: 1px solid rgba(255, 255, 255, .6);
}
.ar-header .ar-search__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
.ar-header .ar-search__input,
.ar-header .ar-search__input:focus {
	flex: 1;
	min-width: 0;
	padding: 10px 0;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: var(--ar-white);
	font-family: var(--ar-font);
	font-size: 40px;
	font-weight: 300;
	line-height: 1.3;
}
.ar-header .ar-search__input::placeholder {
	color: rgba(255, 255, 255, .6);
}
.ar-header .ar-search__submit {
	display: inline-flex;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	color: var(--ar-white);
}
.ar-header .ar-search__submit .ar-icon {
	width: 28px;
	height: 28px;
}
.ar-header .ar-search__close {
	position: absolute;
	top: 30px;
	right: 30px;
	display: inline-flex;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	color: var(--ar-white);
}
.ar-header .ar-search__close .ar-icon {
	width: 26px;
	height: 26px;
}

/* Mobile side menu */
.ar-header .ar-offcanvas {
	position: fixed;
	inset: 0;
	z-index: 99999;
}
.ar-header .ar-offcanvas[hidden] {
	display: none;
}
.ar-header .ar-offcanvas__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .2);
	opacity: 0;
	transition: opacity .3s;
}
.ar-header .ar-offcanvas__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 300px;
	max-width: 85vw;
	padding: 60px 30px 30px;
	overflow-y: auto;
	background: var(--ar-white);
	transform: translateX(100%);
	transition: transform .3s ease;
}
.ar-header .ar-offcanvas.is-open .ar-offcanvas__backdrop {
	opacity: 1;
}
.ar-header .ar-offcanvas.is-open .ar-offcanvas__panel {
	transform: none;
}
.ar-header .ar-offcanvas__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: inline-flex;
	width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	color: var(--ar-red);
}
.ar-header .ar-offcanvas__close .ar-icon {
	width: 22px;
	height: 22px;
}
.ar-header .ar-menu--side > .ar-menu__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	border-bottom: 1px solid #d4d4d4;
}
.ar-header .ar-menu--side .ar-menu__link {
	flex: 1;
	display: block;
	padding: 13px 0;
	color: var(--ar-ink);
	font-size: 16px;
	font-weight: 500;
	line-height: 22px;
}
.ar-header .ar-menu--side .is-current > .ar-menu__link,
.ar-header .ar-menu--side .ar-menu__link:hover {
	color: var(--ar-red);
}
.ar-header .ar-menu--side .ar-menu__toggle {
	display: inline-flex;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	color: var(--ar-red);
	transition: transform .2s;
}
.ar-header .ar-menu--side .ar-menu__toggle .ar-icon {
	width: 10px;
	height: 6px;
}
.ar-header .ar-menu--side .is-open > .ar-menu__toggle {
	transform: rotate(180deg);
}
.ar-header .ar-menu--side .ar-menu__sub {
	display: none;
	flex-basis: 100%;
}
.ar-header .ar-menu--side .is-open > .ar-menu__sub {
	display: block;
}
.ar-header .ar-menu--side .ar-menu__sub .ar-menu__item {
	border-top: 1px solid #ececec;
}
.ar-header .ar-menu--side .ar-menu__sub .ar-menu__link {
	padding: 12px 0;
	color: #999999;
	font-size: 14px;
	font-weight: 400;
}
.ar-header .ar-menu--side .ar-menu__sub .ar-menu__link:hover,
.ar-header .ar-menu--side .ar-menu__sub .is-current > .ar-menu__link {
	color: var(--ar-red);
}

body.ar-noscroll {
	overflow: hidden;
}

/* Desktop: the old logo sits 14px left of the page center (its right side holds menu + icons). */
@media (min-width: 1025px) {
	.ar-header .ar-header__inner {
		padding-right: calc(var(--ar-gutter) + 28px);
	}
}

/* ≤1440: menu text 16px (old site) */
@media (max-width: 1440px) {
	.ar-header .ar-menu--main > .ar-menu__item > .ar-menu__link {
		font-size: 16px;
	}
	.ar-header .ar-menu--main {
		gap: 30px;
	}
	.ar-header .ar-header__right {
		gap: 40px;
	}
}

/* Tablet + phone: logo left, search + burger right */
@media (max-width: 1024px) {
	.ar-header .ar-header__inner {
		display: flex;
		justify-content: space-between;
		gap: 20px;
		min-height: 70px;
	}
	.ar-header .ar-header__nav {
		display: none;
	}
	.ar-header .ar-header__logo img {
		width: 110px;
	}
	.ar-header .ar-header__tools {
		gap: 24px;
	}
	.ar-header .ar-header__burger {
		display: inline-flex;
	}
	.ar-header .ar-lang {
		display: none;
	}
	.ar-header:not(.ar-header--phones-mobile) .ar-header__phones {
		display: none;
	}
	.ar-header .ar-header__phones ul {
		justify-content: center;
	}
	.ar-header .ar-search__input,
	.ar-header .ar-search__input:focus {
		font-size: 26px;
	}
}
@media (max-width: 767px) {
	.ar-header .ar-header__inner {
		min-height: 60px;
	}
	.ar-header .ar-header__logo img {
		width: 96px;
	}
	.ar-header .ar-header__search-btn .ar-icon {
		width: 17px;
		height: 17px;
	}
}

/* ---- Keep header buttons the same on mouse-over / focus (the general button reset in
   ar-base.css used to win on hover: flag button jumped, popup icons turned black). ---- */
.ar-header .ar-lang__current.ar-lang__current:is(:hover, :focus) {
	padding: 6px 0;
}
.ar-header .ar-header__burger.ar-header__burger:is(:hover, :focus) {
	color: var(--ar-ink);
}
.ar-header .ar-offcanvas__close.ar-offcanvas__close:is(:hover, :focus) {
	color: var(--ar-red);
}
.ar-header .ar-search__close.ar-search__close:is(:hover, :focus),
.ar-header .ar-search__submit.ar-search__submit:is(:hover, :focus) {
	color: var(--ar-white);
}

/* ---- 0.6.2: search popup like the old site – small white text on one thin line, × right after the line,
   no magnifier, no browser "×". Classes doubled so the site's form-field style (Site Settings → Form Fields,
   e.g. ".elementor-kit-6 input:focus:not(...)") can never make it a big white box again. ---- */
.ar-header .ar-search.ar-search {
	gap: 14px;
	background: rgba(0, 0, 0, .87);
}
.ar-header .ar-search .ar-search__form.ar-search__form {
	width: min(1090px, calc(100% - 60px));
	margin: 0;
	padding: 0;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, .85);
	background: transparent;
}
.ar-header .ar-search .ar-search__input.ar-search__input,
.ar-header .ar-search .ar-search__input.ar-search__input:is(:hover, :focus, :active) {
	flex: 1;
	width: 100%;
	min-width: 0;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: var(--ar-white);
	font-family: var(--ar-font);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.5;
	-webkit-appearance: none;
	appearance: none;
}
.ar-header .ar-search .ar-search__submit.ar-search__submit {
	display: none;
}
.ar-header .ar-search .ar-search__close.ar-search__close,
.ar-header .ar-search .ar-search__close.ar-search__close:is(:hover, :focus, :active) {
	position: static;
	flex: none;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--ar-white);
}
.ar-header .ar-search .ar-search__close .ar-icon {
	width: 18px;
	height: 18px;
}
@media (max-width: 767px) {
	.ar-header .ar-search .ar-search__form.ar-search__form {
		width: calc(100% - 50px);
	}
	.ar-header .ar-search .ar-search__input.ar-search__input,
	.ar-header .ar-search .ar-search__input.ar-search__input:is(:hover, :focus, :active) {
		font-size: 18px;
	}
}

/* ---- 0.6.5: search popup exactly like the old site – text centered on one thin white line (no box),
   big white × at the right side of the screen, browser's own small × kept (old site has it). ---- */
.ar-header .ar-search .ar-search__form.ar-search__form {
	width: min(70%, 1010px);
}
.ar-header .ar-search .ar-search__input.ar-search__input,
.ar-header .ar-search .ar-search__input.ar-search__input:is(:hover, :focus, :active) {
	padding: 4px 0 8px;
	font-size: 26px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
}
.ar-header .ar-search .ar-search__close.ar-search__close,
.ar-header .ar-search .ar-search__close.ar-search__close:is(:hover, :focus, :active) {
	position: absolute;
	top: 50%;
	right: 30px;
	width: 40px;
	height: 40px;
	transform: translateY(-50%);
}
.ar-header .ar-search .ar-search__close .ar-icon {
	width: 20px;
	height: 20px;
}
@media (max-width: 767px) {
	.ar-header .ar-search .ar-search__form.ar-search__form {
		width: calc(100% - 90px);
	}
	.ar-header .ar-search .ar-search__input.ar-search__input,
	.ar-header .ar-search .ar-search__input.ar-search__input:is(:hover, :focus, :active) {
		font-size: 20px;
	}
	.ar-header .ar-search .ar-search__close.ar-search__close,
	.ar-header .ar-search .ar-search__close.ar-search__close:is(:hover, :focus, :active) {
		right: 12px;
	}
}

/* ---- 0.6.5: flag button – no frame / background from the site's button style (Site Settings → Buttons) ---- */
.ar-header .ar-lang .ar-lang__current.ar-lang__current,
.ar-header .ar-lang .ar-lang__current.ar-lang__current:is(:hover, :focus, :active) {
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
}
.ar-header .ar-lang .ar-lang__current.ar-lang__current:focus:not(:focus-visible) {
	outline: none;
}

/* ---- 0.6.6: search popup + flag with ID strength (:not(#ar)) so no Site Settings / theme / other plugin
   style can make the white box, the centered big text or the two flags side by side again. ---- */
.ar-header:not(#ar) .ar-search .ar-search__form,
.ar-header:not(#ar) .ar-search .ar-search__form:is(:hover, :focus-within) {
	display: flex;
	align-items: center;
	width: min(70%, 1010px);
	margin: 0;
	padding: 0;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, .85);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}
.ar-header:not(#ar) .ar-search input.ar-search__input,
.ar-header:not(#ar) .ar-search input.ar-search__input:is(:hover, :focus, :active, :focus-visible) {
	flex: 1;
	width: 100%;
	min-width: 0;
	height: auto;
	min-height: 0;
	max-width: none;
	margin: 0;
	padding: 4px 0 8px;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: #ffffff;
	font-family: var(--ar-font);
	font-size: 26px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
}
.ar-header:not(#ar) .ar-search input.ar-search__input::placeholder {
	color: rgba(255, 255, 255, .6);
}
.ar-header:not(#ar) .ar-search .ar-search__submit {
	display: none;
}
.ar-header:not(#ar) .ar-search .ar-search__close,
.ar-header:not(#ar) .ar-search .ar-search__close:is(:hover, :focus, :active) {
	position: absolute;
	top: 50%;
	right: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #ffffff;
	transform: translateY(-50%);
}
.ar-header:not(#ar) .ar-search .ar-search__close .ar-icon {
	width: 20px;
	height: 20px;
}
@media (max-width: 767px) {
	.ar-header:not(#ar) .ar-search .ar-search__form,
	.ar-header:not(#ar) .ar-search .ar-search__form:is(:hover, :focus-within) {
		width: calc(100% - 90px);
	}
	.ar-header:not(#ar) .ar-search input.ar-search__input,
	.ar-header:not(#ar) .ar-search input.ar-search__input:is(:hover, :focus, :active, :focus-visible) {
		font-size: 20px;
	}
	.ar-header:not(#ar) .ar-search .ar-search__close,
	.ar-header:not(#ar) .ar-search .ar-search__close:is(:hover, :focus, :active) {
		right: 12px;
	}
}

/* flag: one flag + dropdown (old site), never two flags in a row, never a frame */
.ar-header:not(#ar) .ar-lang {
	position: relative;
	display: block;
}
.ar-header:not(#ar) .ar-lang .ar-lang__current,
.ar-header:not(#ar) .ar-lang .ar-lang__current:is(:hover, :focus, :active) {
	display: flex;
	align-items: center;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
}
.ar-header:not(#ar) .ar-lang .ar-lang__current:focus:not(:focus-visible) {
	outline: none;
}
.ar-header:not(#ar) .ar-lang .ar-lang__list {
	position: absolute;
	top: 100%;
	left: 50%;
	z-index: 5;
	display: block;
	min-width: 47px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: var(--ar-white);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%);
}
.ar-header:not(#ar) .ar-lang:is(:hover, :focus-within, .is-open) .ar-lang__list {
	opacity: 1;
	visibility: visible;
}
.ar-header:not(#ar) .ar-lang .ar-lang__list li {
	display: block;
	margin: 0;
	padding: 0;
}
.ar-header:not(#ar) .ar-lang .ar-lang__list a {
	display: flex;
	justify-content: center;
	padding: 6px 12px;
	border: 0;
	background: transparent;
}

/* ---- 0.6.8: header always on top while scrolling (white bar, clickable). Elementor containers can make their
   own layer, which trapped the header under the page content (looked see-through, clicks went to the page).
   Every block that holds the AR Header is lifted above the page. :where() keeps it weak, so a position set
   in Elementor (e.g. sticky) still wins – only the layer order is added. ---- */
body :where(:has(.ar-header)) {
	position: relative;
	z-index: 990;
}
body :where(:has(.ar-header)) .ar-header.is-stuck .ar-header__main {
	z-index: 990;
}

/* ---- 0.6.9: search popup – the × sits right after the thin line (same height as the line text),
   not far away at the right edge of the screen. Line + × are centered together. ---- */
.ar-header:not(#ar) .ar-search {
	gap: 14px;
}
.ar-header:not(#ar) .ar-search .ar-search__close,
.ar-header:not(#ar) .ar-search .ar-search__close:is(:hover, :focus, :active) {
	position: static;
	top: auto;
	right: auto;
	flex: none;
	align-self: center;
	transform: none;
}
@media (max-width: 767px) {
	.ar-header:not(#ar) .ar-search {
		gap: 8px;
	}
	.ar-header:not(#ar) .ar-search .ar-search__close,
	.ar-header:not(#ar) .ar-search .ar-search__close:is(:hover, :focus, :active) {
		right: auto;
	}
}
