/* ComplianceHub accessibility overrides. Loaded in the footer so it follows Divi's own CSS. */

.ch-sr-only,
.wp-block-search__label {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
	display: block !important;
}

/* Skip links (2.4.1) */
.ch-skip-links {
	position: relative;
	z-index: 100001;
}

.ch-skip {
	position: absolute;
	left: 8px;
	top: -60px;
	background: #ffffff;
	color: #0c4da2;
	padding: 8px 12px;
	border: 2px solid #0c4da2;
	text-decoration: none;
	font-weight: 700;
}

.ch-skip:focus {
	top: 8px;
}

/* Visible keyboard focus (2.4.7). Outline and shadow do not change layout. */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
summary:focus,
[role="button"]:focus,
[tabindex]:not([tabindex="-1"]):focus {
	outline: 3px solid #0c4da2 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #ffffff !important;
}

#moove_gdpr_cookie_info_bar a:focus,
#moove_gdpr_cookie_info_bar button:focus,
#main-footer a:focus,
#main-footer button:focus,
#main-footer input:focus,
#top-header a:focus {
	outline-color: #ffffff !important;
	box-shadow: 0 0 0 2px #112446 !important;
}

/* The logo link was an inline box only one text-line tall, so most of the image could not be clicked. */
.logo_container > a {
	display: inline-block;
	height: 100%;
	line-height: 0;
	padding-bottom: 0;
	vertical-align: top;
}

.logo_container > a > img {
	display: block;
	width: auto;
	max-width: none;
	max-height: 100%;
}

.logo_container > a:focus {
	outline: 3px solid #0c4da2 !important;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #ffffff !important;
}

.logo_container > a:focus > img {
	outline: none;
	box-shadow: none;
}

/* Image links wrap their image, so focus is drawn around the image instead of a thin line below it (2.4.3, 2.4.7). */
.et_pb_image > a,
.et_pb_text_inner a:has(> img) {
	display: inline-block;
	max-width: 100%;
}

/* Current page in the main menu, its submenus and the mobile menu is not shown by colour alone (1.4.1). */
#top-menu > li.current-menu-item > a,
#top-menu > li.current-menu-ancestor > a,
#top-menu > li.current_page_item > a,
#top-menu .sub-menu li.current-menu-item > a,
#top-menu .sub-menu li.current-menu-ancestor > a,
#mobile_menu li.current-menu-item > a,
#mobile_menu li.current-menu-ancestor > a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* Keep Divi's submenu arrow glyph and position; only hide it from assistive technology (4.1.2). */
#top-menu .menu-item-has-children > a:first-child:after,
#et-secondary-nav .menu-item-has-children > a:first-child:after {
	content: "3";
	content: "3" / "";
}

/* Keyboard-opened submenus (2.1.1, 1.4.13). Closed submenus stay out of the Tab order. */
#top-menu li.ch-submenu-open > ul {
	opacity: 1;
	visibility: visible;
}

/* The tooltip is moved to the page body, so the pointer leaves the menu item while it is over the bubble.
   Keep every ancestor submenu open until the pointer leaves the bubble too (1.4.13). */
#top-menu li.ch-tip-hold:not(.ch-submenu-dismissed) > ul,
#mobile_menu li.ch-tip-hold:not(.ch-submenu-dismissed) > ul {
	opacity: 1 !important;
	visibility: visible !important;
}

/* The menu wraps onto a second line. A dropdown from the first line opens over Kapcsolat,
   Partnereink and EN. Those later items were able to take the pointer and close the dropdown. */
#top-menu > li:hover,
#top-menu > li:focus-within,
#top-menu > li.et-hover,
#top-menu > li.ch-submenu-open,
#top-menu > li.ch-tip-hold {
	z-index: 40;
}

#top-menu > li.menu-item-has-children > ul.sub-menu {
	margin-top: -8px;
	padding-top: 28px;
}

/* A nested submenu opens to the right. On a narrow window, or at 125% zoom, that runs off the page. */
#top-menu ul.sub-menu {
	max-width: calc(100vw - 16px);
	box-sizing: border-box;
}

#main-header #top-menu > li.ch-sub-flip > ul.sub-menu {
	left: auto !important;
	right: 0 !important;
}

#main-header #top-menu .sub-menu li.ch-sub-flip > ul.sub-menu {
	left: auto !important;
	right: 100% !important;
}

/* Parents that are also links: the arrow is drawn by the separate toggle button instead of the link, so the link's
   focus outline does not include it (2.1.1, 2.4.7). The margin keeps Divi's spacing; the colour comes from a11y.js. */
#top-menu li.ch-has-toggle > a:first-child {
	padding-right: 0 !important;
	margin-right: 20px;
}

#top-menu li.ch-has-toggle > a:first-child::after {
	content: none !important;
}

#top-menu .ch-subtoggle {
	position: absolute;
	top: -5px;
	right: 16px;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	transition: opacity 0.4s ease-in-out;
}

#top-menu .ch-subtoggle::before {
	content: "3";
	content: "3" / "";
	display: block;
	width: 16px;
	height: 14px;
	margin: 5px 4px;
	font-family: ETmodules;
	font-size: 16px;
	font-weight: 800;
	line-height: 14px;
	text-align: center;
}

#top-menu li.ch-has-toggle > a:first-child:hover + .ch-subtoggle,
#top-menu .ch-subtoggle:hover {
	opacity: 0.7;
}

#top-menu li.ch-submenu-dismissed > ul {
	opacity: 0 !important;
	visibility: hidden !important;
}

/* New-window icon in menus; the meaning is announced by hidden text and explained in the footer legend (3.2.2). */
.ch-ext {
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	margin-left: 0.3em;
	vertical-align: baseline;
}

#top-menu > li:not(.menu-item-has-children) > a {
	position: relative;
}

/* The icon sits inside the link box, so it is inside the focus outline; the item keeps its width (2.4.7). */
#top-menu > li.ch-newwin:not(.menu-item-has-children) {
	padding-right: 6px;
}

#top-menu > li.ch-newwin:not(.menu-item-has-children) > a {
	padding-right: 16px !important;
}

#top-menu > li > a .ch-ext-wrap {
	position: absolute;
	right: 1px;
	top: 0;
	margin-left: 0;
}

#top-menu > li > a .ch-ext {
	position: static;
	margin-left: 0;
}

/* Image links that open a new window carry the same icon as a visible badge (3.2.2). */
a:has(> .ch-img-ext) {
	position: relative;
	display: inline-block;
	max-width: 100%;
}

.ch-img-ext {
	position: absolute;
	top: 6px;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	box-sizing: border-box;
	background: #ffffff;
	border: 2px solid #0c4da2;
	border-radius: 3px;
	color: #0c4da2;
	line-height: 0;
	pointer-events: none;
	z-index: 2;
}

/* Contact-page social icons: the new-window mark sits on the top-right corner, like a superscript, at half size.
   The header logo is not included: it has no .ch-img-ext. */
a:has(> img):has(> .ch-img-ext) {
	display: inline-block;
	vertical-align: top;
	overflow: visible;
}

a:has(> img):has(> .ch-img-ext) > .ch-img-ext {
	top: 0;
	right: 0;
	bottom: auto;
	left: auto;
	width: 11px;
	height: 11px;
	border-width: 1px;
	transform: translate(35%, -35%);
}

a:has(> img):has(> .ch-img-ext) > .ch-img-ext .ch-ext {
	width: 6px;
	height: 6px;
}

img[src*="banner_300x250.png"] {
	height: auto !important;
	aspect-ratio: auto !important;
}

.ch-img-ext .ch-ext {
	width: 12px;
	height: 12px;
	margin: 0;
}

.ch-ext-wrap {
	position: relative;
	display: inline-block;
	line-height: 0;
	vertical-align: baseline;
}

.ch-ext-tip {
	display: none;
	position: absolute;
	z-index: 40;
	right: 0;
	left: auto;
	bottom: calc(100% + 8px);
	width: max-content;
	max-width: min(14rem, calc(100vw - 16px));
	padding: 6px 8px;
	border-radius: 3px;
	background: #112446;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	white-space: normal;
	text-align: center;
	pointer-events: auto;
}

.ch-ext-tip::after {
	content: "";
	position: absolute;
	right: 10px;
	left: auto;
	top: 100%;
	border: 5px solid transparent;
	border-top-color: #112446;
}

.ch-ext-tip.ch-tip-open {
	z-index: 100000;
}

.ch-ext-tip.ch-tip-open::after,
#top-menu .ch-ext-tip.ch-tip-open::after {
	top: 100%;
	bottom: auto;
	right: auto;
	left: var(--ch-arrow, 50%);
	transform: translateX(-50%);
	border-color: transparent;
	border-top-color: #112446;
}

.ch-ext-tip.ch-tip-open.ch-tip-below::after,
#top-menu .ch-ext-tip.ch-tip-open.ch-tip-below::after {
	top: auto;
	bottom: 100%;
	border-color: transparent;
	border-bottom-color: #112446;
}

a:hover .ch-ext-tip,
a:focus-within .ch-ext-tip,
.ch-ext-wrap:hover > .ch-ext-tip,
.ch-ext-wrap:focus-within > .ch-ext-tip,
.ch-ext-tip.ch-tip-open {
	display: block;
}

a.ch-tip-dismissed .ch-ext-tip {
	display: none !important;
}

#top-menu .ch-ext-tip:not(.ch-tip-open) {
	bottom: auto;
	top: calc(100% + 8px);
}

#top-menu .ch-ext-tip:not(.ch-tip-open)::after {
	top: auto;
	bottom: 100%;
	border-top-color: transparent;
	border-bottom-color: #112446;
}

/* Top bar: DOM order now matches visual order (EN, e-mail, social icons) without moving anything (2.4.3, 1.3.2). */
#top-header .container {
	display: flex;
	justify-content: flex-end;
	align-items: flex-start;
}

#top-header .container::before,
#top-header .container::after {
	display: none;
}

#top-header #et-secondary-menu {
	flex: 0 1 auto;
	min-width: 0;
}

#top-header #et-info {
	flex: 0 0 auto;
}

@media (max-width: 767px) {
	#top-header .container {
		justify-content: space-between;
	}

	#top-header #et-secondary-menu {
		margin-top: 0 !important;
	}
}

/* Link and button colour on white (1.4.3); inline links in text get an underline because the new colour is close to the body text (1.4.1). */
a {
	color: #0c71c3;
}

.et_pb_button,
#commentform .et_pb_button {
	color: #0c71c3;
	border-color: #0c71c3;
}

.et_pb_text_inner p a,
.et_pb_text_inner li a,
.entry-content p a,
.entry-content li a {
	text-decoration: underline;
}

/* Author, category and comment links in post meta lines (1.4.1). */
.post-meta a,
#left-area .post-meta a,
.et_pb_post .post-meta a {
	text-decoration: underline !important;
	text-underline-offset: 2px;
}

.post-meta a:hover,
.post-meta a:focus {
	text-decoration-thickness: 2px !important;
}

/* Sidebar title is an h2 after the page h1 (1.3.1); it keeps the measured look of the former h3. */
.ch-aside-posts .entry-title {
	font-size: 16px !important;
	line-height: 16px !important;
	font-weight: 500;
	padding-bottom: 10px;
	margin: 0;
}

.et_pb_text_inner h2.ch-aside-title {
	font-size: 20px;
	line-height: 20px;
	font-weight: 500;
	padding-bottom: 10px;
	margin-bottom: 0;
}

/* Search results page heading (2.4.5, 2.4.6) */
.ch-search-title {
	padding-bottom: 20px;
}

/* The footer menu title became an h2 (1.3.1); keep the look of Divi's h4.title. */
#footer-widgets .footer-widget h2.title {
	font-size: 16px;
	line-height: 16px;
	font-weight: 700;
	text-transform: uppercase;
	margin: 0;
	padding: 0 0 10px;
}

@media (max-width: 767px) {
	#footer-widgets .footer-widget h2.title {
		font-size: 18px;
		line-height: 18px;
	}
}

/* Footer text contrast on #4d4d4d and #343434 (1.4.3) */
#footer-widgets h2,
#footer-widgets h4,
#footer-widgets .title,
#footer-widgets .widgettitle {
	color: #c4c4c4 !important;
}

#footer-info,
#footer-info a {
	color: #a6a6a6 !important;
}

/* A fixed-width image with a negative right margin sticks out at 400% zoom (1.4.10). */
@media (max-width: 980px) {
	.et_pb_image,
	.et_pb_image .et_pb_image_wrap,
	.et_pb_image img {
		max-width: 100% !important;
		margin-right: 0 !important;
		height: auto !important;
	}
}

/* Sidebar link hover was #82c0c7, about 2:1 on white (1.4.3). */
#sidebar a:hover,
#sidebar a:focus {
	color: #0c4da2 !important;
	opacity: 1 !important;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* The mobile menu icon is #2ea3f2 on the 5% gray bar, about 2.5:1 (1.4.11). */
.mobile_menu_bar:before,
.mobile_menu_bar:after {
	color: #0c4da2 !important;
}

/* Divi fades menu and footer links to opacity 0.7 on hover. On white that is about 3:1,
   and on the footer bar it falls below 4.5:1 (1.4.3). Keep a solid colour instead. */
#top-menu-nav > ul > li > a:hover,
#top-menu-nav > ul > li > a:focus,
#top-menu .sub-menu a:hover,
#top-menu .sub-menu a:focus,
.et_mobile_menu li a:hover,
.et_mobile_menu li a:focus {
	opacity: 1 !important;
	color: #333333 !important;
}

#footer-info a:hover,
#footer-info a:focus {
	opacity: 1 !important;
	color: #e6e6e6 !important;
}

/* Sidebar search: field border 3:1 (1.4.11), button text 4.5:1 (1.4.3) */
.wp-block-search__input {
	border-color: #8c8c8c !important;
}

.wp-block-search__button {
	color: #555555 !important;
}

/* Footer search: second way to find pages (2.4.5) */
#footer-bottom .ch-footer-search {
	float: right;
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
}

#footer-bottom .ch-footer-search input[type="search"] {
	width: 180px;
	height: 32px;
	padding: 4px 8px;
	border: 1px solid #ffffff;
	background: #ffffff;
	color: #333333;
	font-size: 14px;
}

#footer-bottom .ch-footer-search button {
	height: 32px;
	padding: 0 12px;
	border: 1px solid #ffffff;
	background: transparent;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

#footer-bottom .ch-legend,
#footer-bottom .ch-statement {
	clear: both;
	color: #a6a6a6;
	font-size: 13px;
	padding-bottom: 10px;
}

#footer-bottom .ch-statement {
	margin: 0;
}

#footer-bottom .ch-statement a {
	color: #a6a6a6;
	text-decoration: underline;
}

#footer-bottom .ch-statement a:hover,
#footer-bottom .ch-statement a:focus {
	opacity: 1;
	color: #e6e6e6;
}

#footer-bottom .ch-cookie-reopen-wrap {
	clear: both;
	padding-bottom: 10px;
}

#footer-bottom .ch-cookie-reopen {
	padding: 0;
	border: 0;
	background: transparent;
	color: #c4c4c4;
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 980px) {
	#footer-bottom .ch-footer-search {
		float: none;
		justify-content: center;
	}

	#footer-bottom .ch-legend,
	#footer-bottom .ch-statement,
	#footer-bottom .ch-cookie-reopen-wrap {
		text-align: center;
	}
}

/* Cookie bar: links keep their white colour on hover/focus (1.4.3) and the bar scrolls when zoomed (1.4.4, 1.4.10). */
#moove_gdpr_cookie_info_bar {
	max-height: 100vh;
	max-height: 100dvh;
	overflow-y: auto;
	box-sizing: border-box;
}

/* While the consent dialog is open it sits above the fixed header and dims the inert page behind it (2.4.3, 1.3.2). */
html.ch-consent-open #moove_gdpr_cookie_info_bar {
	z-index: 100002;
	box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
}

#moove_gdpr_cookie_info_bar:focus {
	outline: none;
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container a:hover,
#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container a:focus {
	color: #ffffff !important;
	text-decoration: underline !important;
	opacity: 1 !important;
}

/* Comment form: visible labels (1.3.1, 4.1.2), readable entered text (1.4.3), heading level h2 keeps the h3 size (1.3.1). */
#commentform label {
	display: block !important;
	margin: 0 0 4px;
}

#commentform .comment-form-cookies-consent label {
	display: inline !important;
}

/* Field borders: #767676 is 4.5:1 on the white page and 3.9:1 on the field fill (1.4.11). */
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
	color: #4d4d4d !important;
	border: 1px solid #767676 !important;
}

#reply-title {
	font-size: 22px;
	line-height: 22px;
}

.ch-field-hint {
	display: block;
	margin: 4px 0 0;
	font-size: 14px;
	color: #4d4d4d;
}

#ch-comment-errors:empty {
	border: 0;
	padding: 0;
	margin: 0;
}

#ch-comment-errors {
	border: 2px solid #a61b1b;
	background: #fff5f5;
	color: #4d0b0b;
	padding: 12px 14px;
	margin: 0 0 16px;
}

#ch-comment-errors ul {
	margin: 0;
	padding-left: 1.2em;
}

#commentform [aria-invalid="true"] {
	outline: 2px solid #a61b1b;
	border-color: #a61b1b !important;
}

/* Infoalap banner under the homepage partner row. The image is wrapped so the
   shared new-window badge applies, the same one as on the row 5 image link. */
a.ch-infoalap-link {
	display: block;
	width: 100%;
	max-width: 100%;
	position: relative;
	line-height: 0;
	overflow: visible;
}

.ch-infoalap-frame {
	display: block;
	width: 100%;
	max-width: 100%;
}

.ch-infoalap-link img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 970 / 250;
}

.ch-infoalap-figure {
	margin: 0;
	width: 100%;
}

.ch-infoalap-caption {
	margin: 14px 0 0;
	padding: 0;
	color: #112446;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.45;
	text-align: center;
	overflow-wrap: anywhere;
}

@media (max-width: 767px) {
	body.home .et_pb_row.et_pb_row_5 {
		display: none !important;
	}
}

/* Review site notice (only rendered when COMPLIANCEHUB_REVIEW is defined) */
.ch-review-banner {
	background: #112446;
	color: #ffffff;
	text-align: center;
	padding: 8px 12px;
	font-weight: 700;
}
