.oftalmix-navigation {
	--oft-nav-ink: var(--ast-global-color-2, #0f172a);
	--oft-nav-accent: var(--ast-global-color-0, #9f0280);
	--oft-nav-muted: var(--ast-global-color-3, #454f5e);
	--oft-nav-tint: var(--ast-global-color-4, #f2f0fe);
	--oft-nav-line: #e8e3eb;
	--oft-nav-shadow: 0 14px 38px rgb(29 18 45 / 15%);
}

/* Astra supplies the header background, sticky blur and the white logo. */
#masthead #ast-desktop-header .ast-below-header-bar {
	position: relative;
}

#ast-mobile-popup .ast-header-social-wrap .ast-builder-social-element {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	margin-inline: 2px;
	border-radius: 8px;
	color: var(--oft-nav-ink);
	background: var(--oft-nav-tint);
}

#ast-mobile-popup .ast-header-social-wrap .ast-builder-social-element:hover {
	color: #fff;
	background: var(--oft-nav-accent);
}

#ast-mobile-popup .ast-header-social-wrap svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
}

#masthead :is(a, button):focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

#primary-site-navigation-desktop .sub-menu a:focus-visible,
#ast-mobile-popup :is(a, button):focus-visible {
	outline: 2px solid var(--oft-nav-accent);
	outline-offset: -3px;
}

:is(#primary-site-navigation-desktop, #ast-mobile-popup) .ast-menu-toggle:focus:not(:focus-visible) {
	outline: none;
}

:is(#primary-site-navigation-desktop, #ast-mobile-popup) .menu-link > .menu-text {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
	white-space: normal;
}

.oftalmix-navigation .oftalmix-nav-icon {
	display: grid;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	place-items: center;
	border-radius: 7px;
	background: var(--oft-nav-tint);
	color: var(--oft-nav-accent);
}

.oftalmix-navigation .oftalmix-nav-icon svg {
	display: block;
	width: 16px;
	height: 16px;
	fill: currentColor;
}

@media (min-width: 922px) {
	#primary-site-navigation-desktop #ast-hf-menu-1 {
		position: static;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item > .menu-link {
		padding-inline: clamp(9px, 1.15vw, 15px);
		background: transparent;
		color: #fff;
		font-weight: 700;
		font-size: 15px;
		transition-property: color, background-color;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item:is(:hover, :focus-within, .current-menu-item, .current-menu-ancestor, [data-oftalmix-open]) > .menu-link {
		color: #fff;
		background: rgb(255 255 255 / 13%);
		box-shadow: inset 0 -1px #fff;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 .menu-link::before {
		content: none;
	}

	/* Reserve space for the native menu buttons before the navigation script runs. */
	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item-has-children {
		flex-direction: row;
		align-items: center;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item-has-children > .menu-link {
		padding-inline-end: 36px;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item-has-children > .menu-link .dropdown-menu-toggle,
	#primary-site-navigation-desktop .sub-menu .dropdown-menu-toggle {
		display: none;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item-has-children > .ast-menu-toggle {
		position: relative;
		inset: auto;
		transform: none;
		z-index: 1;
		display: grid;
		place-items: center;
		align-self: center;
		flex: 0 0 32px;
		width: 32px;
		height: 36px;
		margin-inline-start: -32px;
		padding: 0;
		border: 0;
		border-radius: 7px;
		background: transparent;
		/* Astra resets the toggle color with !important on Elementor pages. */
		color: #fff !important;
		line-height: 1;
	}

	#primary-site-navigation-desktop .menu-item-has-children > .ast-menu-toggle[aria-expanded="true"] .ast-icon {
		transform: rotate(180deg);
	}

	#primary-site-navigation-desktop .menu-item-has-children > .ast-menu-toggle .ast-icon {
		display: grid;
		place-items: center;
		pointer-events: none;
	}

	#primary-site-navigation-desktop .menu-item-has-children > .ast-menu-toggle svg {
		display: block;
		width: 11px;
		height: 11px;
		margin: 0;
		fill: currentColor;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item > .sub-menu {
		position: absolute;
		inset: 100% auto auto var(--oft-nav-left, 0px);
		box-sizing: border-box;
		width: min(330px, calc(100vw - 32px));
		max-height: var(--oft-nav-room, min(580px, 72vh));
		margin: 0;
		padding: 8px;
		background: #fff;
		border: 1px solid var(--oft-nav-line);
		border-top: 3px solid var(--oft-nav-accent);
		border-radius: 0 0 12px 12px;
		box-shadow: var(--oft-nav-shadow);
		overflow: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item > .sub-menu::before {
		content: none;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item-5427 > .sub-menu {
		width: min(365px, calc(100vw - 32px));
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 .sub-menu .menu-item {
		width: auto;
		min-width: 0;
		border: 0;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 .sub-menu .menu-link {
		display: flex;
		align-items: center;
		min-height: 46px;
		padding: 6px 9px;
		border: 0;
		border-radius: 7px;
		background: #fff;
		color: var(--oft-nav-ink);
		font-size: 15px;
		font-weight: 650;
		line-height: 1.36;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 .sub-menu .menu-link > .ast-icon {
		display: none;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 .sub-menu :is(.menu-link:hover, .menu-link:focus-visible, .current-menu-item > .menu-link) {
		background: var(--oft-nav-tint);
		color: var(--oft-nav-accent);
	}

	/* Keep the third level with its parent inside the same scrollable dropdown. */
	#primary-site-navigation-desktop #ast-hf-menu-1 .sub-menu .sub-menu {
		position: static;
		display: block;
		width: auto;
		margin: 0 0 0 20px;
		padding: 0;
		border: 0;
		border-left: 1px solid var(--oft-nav-line);
		background: transparent;
		box-shadow: none;
		opacity: 1;
		visibility: inherit;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 .sub-menu .sub-menu .menu-link {
		font-size: 14px;
	}

	/* Preserve the existing full-width panel and the editorial order of its 24 links. */
	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item-5217 {
		position: static;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item-5217 > .sub-menu {
		left: 50%;
		transform: translateX(-50%);
		width: min(1180px, calc(100% - 36px));
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		align-items: stretch;
		gap: 6px 10px;
		padding: 16px;
	}

	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item-5217 > .sub-menu > .menu-item > .menu-link {
		height: 100%;
		min-height: 53px;
		border: 1px solid #eeebf0;
	}

	#primary-site-navigation-desktop .menu-item-5217 .sub-menu > .menu-item:nth-child(-n+12) .oftalmix-nav-icon {
		background: #ecf1f9;
		color: #305784;
	}

	#primary-site-navigation-desktop .menu-item-5217 .sub-menu > .menu-item:nth-child(n+20):nth-child(-n+22) .oftalmix-nav-icon {
		background: #e7f3ee;
		color: #246254;
	}

	#primary-site-navigation-desktop:not(.oftalmix-nav-enhanced) #ast-hf-menu-1 > .menu-item:is(:hover, :focus-within) > .sub-menu,
	#primary-site-navigation-desktop.oftalmix-nav-enhanced #ast-hf-menu-1 > [data-oftalmix-open] > .sub-menu {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	#primary-site-navigation-desktop.oftalmix-nav-enhanced #ast-hf-menu-1 > .oftalmix-nav-disclosure:not([data-oftalmix-open]) > .sub-menu {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}
}

@media (min-width: 922px) and (max-width: 1150px) {
	#primary-site-navigation-desktop #ast-hf-menu-1 > .menu-item-5217 > .sub-menu {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 921px) {
	#masthead #ast-mobile-header .site-branding .custom-logo {
		width: clamp(114px, 36vw, 156px);
		height: auto;
	}

	#masthead #ast-mobile-header .main-header-menu-toggle {
		box-sizing: border-box;
		align-items: center;
		justify-content: center;
		width: 46px;
		height: 46px;
		padding: 0;
		border-radius: 50%;
	}

	#masthead #ast-mobile-header .mobile-menu-toggle-icon {
		display: grid;
		place-items: center;
		width: 22px;
		height: 22px;
		margin: 0;
	}

	#masthead #ast-mobile-header .mobile-menu-toggle-icon > .ahfb-svg-iconset {
		grid-area: 1 / 1;
		margin: 0;
	}

	#masthead #ast-mobile-header .mobile-menu-toggle-icon .ast-mobile-svg {
		width: 22px;
		height: 22px;
		margin: 0;
		fill: currentColor;
	}
}

/* Astra's existing drawer also owns the mobile contact block and social links. */
#ast-mobile-popup:not(.active) {
	visibility: hidden;
}

#ast-mobile-popup .ast-mobile-popup-inner,
#ast-mobile-popup .ast-mobile-popup-content,
#ast-mobile-popup .ast-desktop-popup-content {
	background: #fff;
	color: var(--oft-nav-ink);
}

#ast-mobile-popup .ast-mobile-popup-header {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 62px;
	padding: 6px 17px;
	border-top: 4px solid var(--oft-nav-accent);
	border-bottom: 1px solid var(--oft-nav-line);
	background: #fff;
}

#ast-mobile-popup .ast-mobile-popup-header::before {
	content: 'Meniu';
	font-family: Montserrat, sans-serif;
	font-size: 18px;
	font-weight: 700;
}

#ast-mobile-popup .ast-mobile-popup-header #menu-toggle-close {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 8px;
	background: var(--oft-nav-tint);
	color: var(--oft-nav-accent);
}

#ast-mobile-popup .ast-mobile-popup-content > *,
#ast-mobile-popup .ast-desktop-popup-content > * {
	width: min(620px, 100%);
	margin-inline: auto;
}

#ast-mobile-popup :is(#ast-mobile-site-navigation, #ast-desktop-site-navigation) {
	padding: 8px 14px;
}

#ast-mobile-popup .main-header-menu .menu-item {
	border: 0;
}

#ast-mobile-popup .main-header-menu > .menu-item + .menu-item {
	border-top: 1px solid var(--oft-nav-line);
}

#ast-mobile-popup .main-header-menu .menu-item > .menu-link {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 6px 8px;
	border: 0;
	border-radius: 7px;
	background: #fff;
	color: var(--oft-nav-ink);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.38;
}

#ast-mobile-popup .main-header-menu .menu-item > .menu-link > .ast-icon,
#ast-mobile-popup .main-header-menu .menu-item > .menu-link .dropdown-menu-toggle {
	display: none;
}

#ast-mobile-popup .main-header-menu .menu-item-has-children > .menu-link {
	padding-inline-end: 48px;
}

#ast-mobile-popup .main-header-menu :is(.menu-link:hover, .current-menu-item > .menu-link, .current-menu-ancestor > .menu-link, .ast-submenu-expanded > .menu-link) {
	background: var(--oft-nav-tint);
	color: var(--oft-nav-accent);
}

#ast-mobile-popup .main-header-menu .menu-item-has-children > .ast-menu-toggle {
	position: absolute;
	inset: 2px 1px auto auto;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--oft-nav-accent);
	overflow: visible;
	transform: none;
}

#ast-mobile-popup .main-header-menu .ast-menu-toggle .ast-icon {
	pointer-events: none;
}

#ast-mobile-popup .main-header-menu .ast-submenu-expanded > .ast-menu-toggle .ast-icon {
	transform: rotate(180deg);
}

#ast-mobile-popup .main-header-menu .ast-menu-toggle svg {
	width: 12px;
	height: 12px;
	margin: 0;
	fill: currentColor;
}

#ast-mobile-popup .main-header-menu .sub-menu {
	margin: 2px 0 6px 17px;
	padding: 3px 0 3px 8px;
	border: 0;
	border-left: 1px solid var(--oft-nav-line);
	background: #fff;
}

#ast-mobile-popup .main-header-menu .sub-menu .menu-link {
	min-height: 44px;
	font-size: 15px;
	font-weight: 600;
}

#ast-mobile-popup .main-header-menu .sub-menu .oftalmix-nav-icon {
	flex-basis: 30px;
	width: 30px;
	height: 30px;
}

#ast-mobile-popup .ast-mobile-popup-content > :is(.ast-header-button-1, .ast-header-html-2, .ast-header-html-3, [data-section="section-hb-social-icons-1"]) {
	display: block;
	box-sizing: border-box;
	padding-inline: 22px;
}

#ast-mobile-popup .ast-header-button-1 .ast-custom-button {
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid var(--oft-nav-accent);
	border-radius: 7px;
	background: var(--oft-nav-accent);
	color: #fff;
	font-weight: 700;
	line-height: 1.45;
	text-align: center;
}

#ast-mobile-popup .ast-header-button-1 a:hover .ast-custom-button {
	background: var(--oft-nav-tint);
	color: var(--oft-nav-accent);
}

#ast-mobile-popup .ast-mobile-popup-content > .ast-header-button-1 {
	padding-block: 6px 0;
}

#ast-mobile-popup .ast-mobile-popup-content > .ast-header-html-2 {
	margin-block: 15px 8px;
	padding-block: 0;
}

#ast-mobile-popup .ast-header-html-2 .ast-builder-html-element {
	padding: 13px 15px;
	border: 1px solid var(--oft-nav-line);
	border-radius: 10px;
	background: var(--oft-nav-tint);
	color: var(--oft-nav-ink);
	font-size: 14px;
	line-height: 1.7;
}

#ast-mobile-popup .ast-header-html-2 p {
	margin: 0;
}

#ast-mobile-popup .ast-header-html-2 p + p {
	margin-top: 8px;
}

#ast-mobile-popup .ast-header-html-2 hr {
	width: 100% !important;
	margin: 10px 0;
	background: var(--oft-nav-line) !important;
}

#ast-mobile-popup .ast-header-html-2 :is(a, i) {
	color: var(--oft-nav-accent);
}

#ast-mobile-popup .ast-header-html-2 a {
	display: inline-block;
	padding-block: 3px;
	margin-inline-start: 2px;
	font-weight: 700;
	text-underline-offset: 3px;
}

#ast-mobile-popup .ast-mobile-popup-content > [data-section="section-hb-social-icons-1"] {
	margin-block: 9px 4px;
}

#ast-mobile-popup .ast-header-html-3 p {
	margin: 10px 0 20px;
}
