/* MedSkill – header menu as a two-pane mega menu (desktop only).
   Left: level-2 items. Right: the hovered item's groups (level 3 headings,
   level 4 links, max 6 + "Vezi toate"). Built by meniu-mega.js. */
@media (min-width: 981px) {
	body.ms-menu-mega .msw-header .et_pb_row { position: relative; }
	body.ms-menu-mega .msw-header .et_pb_column,
	body.ms-menu-mega .msw-header .et_pb_menu,
	body.ms-menu-mega .msw-header .et_pb_menu_inner_container,
	body.ms-menu-mega .msw-header .et_pb_menu__wrap,
	body.ms-menu-mega .msw-header .et_pb_menu__menu,
	body.ms-menu-mega .msw-header .et-menu-nav,
	body.ms-menu-mega .msw-header .et-menu-nav > ul > li.ms-hm-top { position: static !important; }

	/* Divi's own dropdown is replaced by the panel */
	body.ms-menu-mega .msw-header .et-menu-nav > ul > li.ms-hm-top > ul.sub-menu { display: none !important; }

	/* Hover bridge under the link (does not change its size) */
	body.ms-menu-mega .msw-header li.ms-hm-top > a { position: relative; }
	body.ms-menu-mega .msw-header li.ms-hm-top > a::before {
		content: '';
		position: absolute;
		left: -10px;
		right: -10px;
		top: 100%;
		height: 28px;
	}

	.ms-hm {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 100001;
		display: grid;
		grid-template-columns: 300px minmax(0, 1fr);
		max-height: min(560px, calc(100vh - 150px));
		overflow: hidden;
		border: 1px solid #e4e9f5;
		border-top: 3px solid #e5232e;
		border-radius: 0 0 22px 22px;
		background: #fff;
		box-shadow: 0 30px 70px rgba(14, 27, 77, .2);
		font-family: 'DM Sans', system-ui, sans-serif;
		text-align: left;
		visibility: hidden;
		opacity: 0;
		transform: translateY(6px);
		transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
	}
	/* Opened by meniu-mega.js (hover intent: one panel at a time) */
	li.ms-hm-top.ms-hm-open > .ms-hm,
	li.ms-hm-top:focus-within > .ms-hm {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition-delay: 0s;
	}
	.ms-hm--flat { grid-template-columns: 1fr; }

	.ms-hm-list {
		margin: 0 !important;
		padding: 14px !important;
		overflow-y: auto;
		list-style: none !important;
		border-right: 1px solid #e4e9f5;
		background: #f4f7fd;
	}
	.ms-hm-list li { display: block !important; width: auto !important; padding: 0 !important; }
	.ms-hm a.ms-hm-item {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		min-height: 46px;
		padding: 10px 14px !important;
		border-radius: 12px;
		color: #0e1b4d !important;
		font-size: 15px !important;
		font-weight: 600;
		line-height: 1.3;
		opacity: 1 !important;
		transition: background .15s, color .15s;
	}
	.ms-hm a.ms-hm-item i {
		flex: none;
		width: 8px;
		height: 8px;
		border-top: 2px solid currentColor;
		border-right: 2px solid currentColor;
		transform: rotate(45deg);
		opacity: .6;
	}
	.ms-hm a.ms-hm-item:hover,
	.ms-hm a.ms-hm-item.is-active {
		background: #fff;
		color: #c4141f !important;
		box-shadow: 0 6px 18px rgba(14, 27, 77, .08);
	}

	.ms-hm-panes { min-width: 0; overflow-x: hidden; overflow-y: auto; padding: 24px 30px; }
	.ms-hm-pane { display: none; }
	.ms-hm-pane.is-active { display: block; animation: msHmIn .18s ease; }
	@keyframes msHmIn { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
	.ms-hm-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		margin-bottom: 18px;
		padding-bottom: 14px;
		border-bottom: 1px solid #e4e9f5;
	}
	.ms-hm-head p {
		margin: 0 !important;
		padding: 0 !important;
		color: #0e1b4d;
		font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
		font-size: 20px;
		font-weight: 800;
		line-height: 1.25;
	}
	.ms-hm a.ms-hm-all {
		display: inline-flex !important;
		align-items: center;
		gap: 6px;
		flex: none;
		padding: 11px 20px !important;
		border-radius: 999px;
		background: #e5232e;
		color: #fff !important;
		font-size: 14px !important;
		font-weight: 700;
		white-space: nowrap;
		box-shadow: 0 8px 20px rgba(229, 35, 46, .25);
	}
	.ms-hm a.ms-hm-all:hover { background: #c4141f; }
	/* Divi prints "#menu-module ul li a { color: … !important }" for the header
	   menu; the red button keeps white text above it. */
	html body .et_pb_menu .ms-hm a.ms-hm-all,
	html body .et_pb_menu .ms-hm a.ms-hm-all:hover,
	html body .et_pb_menu .ms-hm a.ms-hm-all * { color: #fff !important; -webkit-text-fill-color: #fff; }

	.ms-hm-grid {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
		gap: 22px 28px;
	}
	.ms-hm-group ul { margin: 0 !important; padding: 0 !important; list-style: none !important; }
	.ms-hm-group li { display: block !important; width: auto !important; padding: 0 !important; }
	.ms-hm a.ms-hm-gh {
		display: block !important;
		margin-bottom: 6px;
		padding: 0 0 6px !important;
		border-bottom: 2px solid #f0f3fa;
		color: #0b1f6e !important;
		font-size: 15px !important;
		font-weight: 800;
	}
	.ms-hm .ms-hm-group li a {
		display: block !important;
		padding: 6px 0 !important;
		color: #333d5c !important;
		font-size: 14px !important;
		line-height: 1.35;
		white-space: normal;
	}
	.ms-hm .ms-hm-group li a:hover, .ms-hm a.ms-hm-gh:hover { color: #c4141f !important; }
	.ms-hm .ms-hm-group li a.ms-hm-more { color: #c4141f !important; font-weight: 700; }

	.ms-hm-simple { grid-column: 1 / -1; }
	.ms-hm-simple ul, .ms-hm-flat { display: flex !important; flex-wrap: wrap; gap: 10px; }
	.ms-hm-flat { padding: 22px 26px; }
	.ms-hm a.ms-hm-chip,
	.ms-hm .ms-hm-group li a.ms-hm-chip {
		display: inline-flex !important;
		align-items: center;
		padding: 11px 18px !important;
		border: 1px solid #e4e9f5;
		border-radius: 999px;
		background: #f4f7fd;
		color: #0e1b4d !important;
		font-size: 14px !important;
		font-weight: 600;
	}
	.ms-hm a.ms-hm-chip:hover { border-color: #e5232e; background: #fde8ea; color: #b3101b !important; }

	.ms-hm a.ms-hm-cta {
		position: relative;
		display: block !important;
		padding: 26px 76px 26px 26px !important;
		border-radius: 18px;
		background: linear-gradient(120deg, #0b1f6e, #142c94);
		color: #fff !important;
	}
	.ms-hm a.ms-hm-cta b { display: block; color: #fff; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 20px; }
	.ms-hm a.ms-hm-cta span { color: #fff; font-size: 14px; }
	.ms-hm a.ms-hm-cta i {
		position: absolute;
		right: 22px;
		top: 50%;
		width: 42px;
		height: 42px;
		margin-top: -21px;
		border-radius: 50%;
		background: #e5232e;
		font-style: normal;
		line-height: 42px;
		text-align: center;
	}
	.ms-hm a:focus-visible { outline: 2px solid #e5232e; outline-offset: 2px; }
}
@media (max-width: 980px) { .ms-hm { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
	.ms-hm, .ms-hm-pane.is-active { transition: none; animation: none; }
}
/* Divi's ".nav li ul" (hidden absolute dropdown) must not touch the panel lists */
@media (min-width: 981px) {
	.msw-header .ms-hm ul {
		position: static !important;
		visibility: inherit !important; /* hidden with the panel: never catch the mouse while closed */
		opacity: 1 !important;
		width: auto !important;
		box-shadow: none !important;
		border: 0 !important;
		transform: none !important;
		z-index: auto !important;
	}
	.msw-header .ms-hm ul.ms-hm-list { border-right: 1px solid #e4e9f5 !important; background: #f4f7fd !important; padding: 14px !important; }
	.msw-header .ms-hm li { float: none !important; }
}
@media (min-width: 981px) { .msw-header .et-menu-nav .ms-hm li { padding: 0 !important; } }

/* A closed panel never receives the mouse */
@media (min-width: 981px) {
	.ms-hm { pointer-events: none; }
	li.ms-hm-top.ms-hm-open > .ms-hm,
	li.ms-hm-top:focus-within > .ms-hm { pointer-events: auto; }
}

/* Section without subsections: compact card + quick links to the others */
@media (min-width: 981px) {
	.ms-hm-leaf {
		display: grid;
		grid-template-columns: minmax(280px, 420px) 1fr;
		gap: 28px;
		align-items: start;
	}
	.ms-hm a.ms-hm-card {
		position: relative;
		display: flex !important;
		flex-direction: column;
		gap: 14px;
		padding: 24px !important;
		border-radius: 20px;
		background:
			radial-gradient(260px 160px at 100% 0%, rgba(229, 35, 46, .45), transparent 70%),
			linear-gradient(135deg, #0b1f6e, #142c94);
		color: #fff !important;
		box-shadow: 0 16px 36px rgba(11, 31, 110, .28);
		transition: transform .2s ease, box-shadow .2s ease;
	}
	.ms-hm a.ms-hm-card:hover { transform: translateY(-3px); box-shadow: 0 22px 44px rgba(11, 31, 110, .34); }
	.ms-hm-card-ico {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		border-radius: 14px;
		background: rgba(255, 255, 255, .14);
	}
	.ms-hm-card-ico svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
	.ms-hm-card-txt { display: flex; flex-direction: column; gap: 6px; padding-right: 50px; }
	.ms-hm-card-txt b { color: #fff; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 20px; line-height: 1.25; }
	.ms-hm-card-txt small { color: #fff; font-size: 14px; line-height: 1.45; }
	.ms-hm-card-go {
		position: absolute;
		right: 22px;
		bottom: 22px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 42px;
		height: 42px;
		border-radius: 50%;
		background: #e5232e;
		color: #fff;
		font-size: 18px;
	}
	.ms-hm-also p {
		margin: 0 0 10px !important;
		padding: 0 !important;
		color: #333d5c;
		font-size: 12px;
		font-weight: 700;
		letter-spacing: .1em;
		text-transform: uppercase;
	}
	.msw-header .ms-hm .ms-hm-also ul { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
	.ms-hm .ms-hm-also a {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		min-height: 48px;
		padding: 10px 16px !important;
		border: 1px solid #e4e9f5;
		border-radius: 12px;
		background: #f4f7fd;
		color: #0e1b4d !important;
		font-size: 14.5px !important;
		font-weight: 600;
		transition: border-color .15s, background .15s, color .15s;
	}
	.ms-hm .ms-hm-also a i { font-style: normal; color: #c4141f; transition: transform .15s; }
	.ms-hm .ms-hm-also a:hover { border-color: #e5232e; background: #fff; color: #c4141f !important; }
	.ms-hm .ms-hm-also a:hover i { transform: translateX(3px); }
}
