/**
 * Alygio reklama — site header (widget `ar-site-header` + site-part wrapper).
 *
 * Reference (DESIGN-SPECIFICATION §4.1): 76px bar, sticky, overlays the hero,
 * transparent with a black 0.7→0 gradient; from scrollY ≥ 1 the wrapper gets
 * rgba(0,28,31,.8) + blur(20px) (0.2s). Menu collapses at ≤1200px; the CTA is
 * hidden at ≤600px. Hello Elementor's reset styles `button`/`a` globally, so
 * interactive elements below use ≥ 3-class selectors on purpose.
 */

/* ---------------------------------------------------------------------------
 * Site-part wrapper (printed by the plugin around the Elementor header
 * template). Sticky must live here: it is a direct child of <body>.
 * ------------------------------------------------------------------------ */

.ar-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	margin-bottom: calc(-1 * var(--ar-header-height));
	transition: background var(--ar-transition-header), border-color var(--ar-transition-header), box-shadow var(--ar-transition-header), -webkit-backdrop-filter var(--ar-transition-header), backdrop-filter var(--ar-transition-header);
}

.ar-site-header.is-scrolled {
	background-color: var(--ar-header-scrolled-bg);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
}

/* Task 07 — pages whose first section is light (Klientai; registry
   'header' => 'solid' → body class `ar-header-solid`, printed by Site_Parts).
   The bar takes its own 76px instead of overlaying the content and starts on
   primary-950, the top colour of the reference inner-page banner under the
   transparent header. From scrollY ≥ 1 it uses the normal scrolled state.
   Every other page keeps the overlay (D1). */
.ar-header-solid .ar-site-header {
	margin-bottom: 0;
	background-color: var(--ar-primary-950);
}

.ar-header-solid .ar-site-header.is-scrolled {
	background-color: var(--ar-header-scrolled-bg);
}

/* A backdrop-filter creates a containing block for position:fixed children,
   which would trap the full-screen mobile menu inside the 76px bar. */
.ar-site-header.is-menu-open {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

/* The WP admin bar is not fixed on small screens. */
@media (max-width: 600px) {

	.ar-site-header {
		top: 0;
	}
}

/* Elementor editor preview: no overlap, no sticky, so page content and the
   editor's own handles are never covered. */
.ar-site-header.is-editor-preview {
	position: relative;
	top: 0;
	margin-bottom: 0;
}

/* Elementor containers default to 10px padding; the template sets 0, this is
   a safety net so the bar keeps its 76px height. */
.ar-site-header > .elementor > .e-con,
.ar-site-header .elementor-widget-ar-site-header {
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
}

/* ---------------------------------------------------------------------------
 * Bar
 * ------------------------------------------------------------------------ */

.ar-header__bar {
	box-sizing: border-box;
	width: 100%;
	padding-inline: var(--ar-gutter);
	background-image: var(--ar-gradient-header);
	color: var(--ar-neutral-000);
}

/* Readable while editing the template on Elementor's light canvas. */
.elementor-editor-active .ar-header__bar {
	background-color: var(--ar-primary-950);
}

.ar-header__inner {
	display: flex;
	box-sizing: border-box;
	min-height: var(--ar-header-height);
	padding-block: 8px;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

/* Logo: reference box 170 × 30.81, vertically centred. */
.ar-header .ar-header__logo,
.ar-header .ar-header__logo:visited,
.ar-header .ar-header__logo:hover {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	color: var(--ar-neutral-000);
	text-decoration: none;
}

.ar-header__logo-text {
	font-size: var(--ar-font-size-title-5);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: var(--ar-letter-spacing-tight);
	white-space: nowrap;
}

.ar-header__logo img {
	display: block;
	width: var(--ar-logo-width, 170px);
	max-width: 100%;
	height: auto;
}

.ar-header__actions {
	display: flex;
	align-items: center;
	gap: 32px;
}

/* ---------------------------------------------------------------------------
 * Desktop navigation
 * ------------------------------------------------------------------------ */

.ar-header .ar-nav {
	display: flex;
	margin: 0;
	padding: 0;
	align-items: center;
	gap: 28px;
	list-style: none;
}

.ar-nav__item {
	position: relative;
	margin: 0;
	padding: 0;
}

.ar-header .ar-nav__link,
.ar-header .ar-nav__link:visited,
.ar-header .ar-nav__link:hover,
.ar-header .ar-nav__link:focus {
	display: inline-flex;
	position: relative;
	align-items: center;
	color: var(--ar-neutral-000);
	font-size: var(--ar-font-size-md);
	font-weight: 500;
	line-height: 1.7;
	text-decoration: none;
	white-space: nowrap;
}

/* Underline: 2px primary-600 at bottom −2px, opacity 0 → 1 in 0.1s. */
.ar-header .ar-nav__link::after {
	position: absolute;
	right: 0;
	bottom: -2px;
	left: 0;
	height: 2px;
	background-color: var(--ar-primary-600);
	content: "";
	opacity: 0;
	transition: opacity var(--ar-transition-fast);
}

.ar-header .ar-nav__item:hover > .ar-nav__link::after,
.ar-header .ar-nav__link:focus-visible::after {
	opacity: 1;
}

.ar-header .ar-nav__link:focus-visible {
	outline: 2px solid var(--ar-focus-ring-dark);
	outline-offset: 4px;
}

.ar-nav__chevron {
	display: block;
	flex-shrink: 0;
	width: 9.6px;
	height: 9.6px;
	margin-left: 4px;
}

/* Dropdown: #002a2e, min-width 200, padding 8px 0, 10px below the link. */
.ar-header .ar-nav__sub {
	position: absolute;
	top: calc(100% + 10px);
	left: -1px;
	z-index: 2;
	box-sizing: border-box;
	min-width: 200px;
	margin: 0;
	padding: 8px 0;
	border: 1px solid rgba(0, 0, 0, 0.15);
	background-color: var(--ar-primary-900);
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--ar-transition-fast) linear, visibility 0s linear var(--ar-transition-fast);
}

/* Hover bridge across the 10px gap. */
.ar-header .ar-nav__sub::before {
	position: absolute;
	right: 0;
	bottom: 100%;
	left: 0;
	height: 11px;
	content: "";
}

.ar-header .ar-nav__item:hover > .ar-nav__sub,
.ar-header .ar-nav__item:focus-within > .ar-nav__sub {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--ar-transition-fast) linear, visibility 0s;
}

.ar-header .ar-nav__sub-link,
.ar-header .ar-nav__sub-link:visited,
.ar-header .ar-nav__sub-link:hover,
.ar-header .ar-nav__sub-link:focus {
	display: block;
	padding: 7.5px 15px;
	color: var(--ar-neutral-000);
	font-size: var(--ar-font-size-sm);
	font-weight: 400;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}

.ar-header .ar-nav__sub-link:hover {
	color: var(--ar-primary-300);
}

.ar-header .ar-nav__sub-link:focus-visible {
	outline: 2px solid var(--ar-focus-ring-dark);
	outline-offset: -2px;
}

/* ---------------------------------------------------------------------------
 * CTA and hamburger
 * ------------------------------------------------------------------------ */

.ar-header__cta {
	flex-shrink: 0;
	white-space: nowrap;
}

.ar-header .ar-header__toggle,
.ar-mobile-menu .ar-mobile-menu__close {
	display: none;
	box-sizing: border-box;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--ar-neutral-000);
	line-height: 0;
	cursor: pointer;
}

.ar-header .ar-header__toggle:hover,
.ar-header .ar-header__toggle:focus,
.ar-mobile-menu .ar-mobile-menu__close:hover,
.ar-mobile-menu .ar-mobile-menu__close:focus {
	background: transparent;
	color: var(--ar-neutral-000);
}

.ar-header .ar-header__toggle:focus-visible,
.ar-mobile-menu .ar-mobile-menu__close:focus-visible {
	outline: 2px solid var(--ar-focus-ring-dark);
	outline-offset: 2px;
}

.ar-header__toggle svg,
.ar-mobile-menu__close svg {
	width: 30px;
	height: 30px;
	fill: currentColor;
}

@media (max-width: 1200px) {

	.ar-header .ar-header__nav {
		display: none;
	}

	.ar-header .ar-header__toggle {
		display: block;
	}
}

@media (max-width: 600px) {

	.ar-header .ar-header__cta {
		display: none;
	}
}

/* ---------------------------------------------------------------------------
 * Mobile navigation dialog (full screen, #002a2e, fade-in 0.1s)
 * ------------------------------------------------------------------------ */

.ar-mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 100000;
	box-sizing: border-box;
	padding: var(--ar-gutter);
	overflow-y: auto;
	background-color: var(--ar-primary-900);
	color: var(--ar-neutral-000);
}

.ar-mobile-menu[hidden] {
	display: none;
}

.ar-mobile-menu.is-open {
	animation: ar-menu-fade-in var(--ar-transition-fast) ease-out forwards;
}

@keyframes ar-menu-fade-in {
	from {
		opacity: 0;
		transform: translateY(0.5em);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {

	.ar-mobile-menu.is-open {
		animation: none;
	}
}

/* Close button: top/right = dialog padding (5vw), as measured on the reference. */
.ar-mobile-menu .ar-mobile-menu__close {
	display: block;
	position: absolute;
	top: var(--ar-gutter);
	right: var(--ar-gutter);
}

.ar-mobile-menu__list,
.ar-mobile-menu__sub {
	display: flex;
	margin: 0;
	padding: 0;
	flex-direction: column;
	gap: 16px;
	list-style: none;
}

.ar-mobile-menu__list {
	margin-top: 40px;
}

/* Measured pitch: top items 27.2 + 16; sub-list starts 24px below its parent
   and ends 8px before the 16px gap to the next top item. */
.ar-mobile-menu__sub {
	margin-top: 24px;
	padding-bottom: 8px;
	padding-left: 32px;
}

.ar-mobile-menu__list li {
	margin: 0;
	padding: 0;
	line-height: 0;
}

.ar-mobile-menu .ar-mobile-menu__link,
.ar-mobile-menu .ar-mobile-menu__link:visited,
.ar-mobile-menu .ar-mobile-menu__link:hover,
.ar-mobile-menu .ar-mobile-menu__link:focus {
	display: block;
	width: fit-content;
	color: var(--ar-neutral-000);
	font-size: var(--ar-font-size-md);
	font-weight: 500;
	line-height: 1.7;
	text-decoration: none;
}

.ar-mobile-menu .ar-mobile-menu__sub .ar-mobile-menu__link {
	font-size: var(--ar-font-size-sm);
	font-weight: 400;
	line-height: 1.3;
}

.ar-mobile-menu .ar-mobile-menu__link:focus-visible {
	outline: 2px solid var(--ar-focus-ring-dark);
	outline-offset: 3px;
}
