/* Zapobieganie poziomemu paskowi przewijania przy tłach dociąganych do krawędzi okna */
html,
body {
	overflow-x: clip;
}

/* Wymuszenie pełnej szerokości 100% na kontenerze widżetu w Elementorze (Sekcje i Kontenery Flexbox) */
.elementor-widget-esm_school_menu,
.e-con > .elementor-widget-esm_school_menu,
.elementor-column > .elementor-widget-wrap > .elementor-widget-esm_school_menu,
.elementor-widget-esm_school_menu > .elementor-widget-container {
	width: 100% !important;
	max-width: 100% !important;
	flex: 1 1 100% !important;
	align-self: stretch !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box !important;
}

/* Zmienne domyślne widżetu */
.esm-nav-wrapper {
	--esm-bar-height: 66px;
	--esm-item-gap: 2px;
	--esm-item-padding-x: 16px;
	--esm-tile-padding-x: 22px;
	--esm-center-offset: 0px;
	--esm-skew-angle: 15deg;
	--esm-curve-radius: 10px;
	--esm-bar-bg: #ffffff;
	--esm-wedge-bg: #337aa8;

	/* Stany Normalny / Hover / Aktywne */
	--esm-text-color: #103b66;
	--esm-normal-bg: transparent;
	--esm-text-hover: #ffffff;
	--esm-hover-bg: #0e82e8;
	--esm-hover-scale: 1;
	--esm-active-color: #ffffff;
	--esm-active-bg: #0e82e8;

	/* Hamburger i Mobile */
	--esm-ham-size: 46px;
	--esm-ham-bar-w: 22px;
	--esm-ham-radius: 8px;
	--esm-ham-color: #103b66;
	--esm-ham-bg: #f0f6fc;
	--esm-ham-color-active: #ffffff;
	--esm-ham-bg-active: #0e82e8;
	--esm-mob-list-bg: #ffffff;
	--esm-mob-text: #103b66;
	--esm-mob-active-bg: #0e82e8;
	--esm-mob-active-text: #ffffff;
	--esm-mob-item-radius: 8px;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	position: relative;
	z-index: 99;
	box-sizing: border-box;
}

/* Główny pasek menu */
.esm-bar-container {
	display: flex;
	align-items: stretch;
	justify-content: center;
	background-color: var(--esm-bar-bg);
	min-height: var(--esm-bar-height);
	box-shadow: 0 4px 20px rgba(16, 59, 102, 0.06);
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

/* =========================================================
   LEWY PASEK I PRAWY WYPEŁNIACZ – RÓWNE SKRZYDŁA (FLEX 1:1)
   ========================================================= */
.esm-left-wedge,
.esm-left-filler,
.esm-right-filler {
	position: relative;
	display: block;
	flex: 1 1 0% !important;
	width: 0 !important;
	min-width: 0 !important;
	z-index: 1;
}

.esm-left-wedge {
	background-color: var(--esm-wedge-bg);
}

.esm-left-filler,
.esm-right-filler {
	background-color: var(--esm-bar-bg);
}

/* Skośne zakończenie lewego paska wchodzące pod 1. pozycję menu */
.esm-left-wedge::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: -18px;
	width: 38px;
	background-color: var(--esm-wedge-bg);
	transform: skewX(var(--esm-skew-angle));
	z-index: -1;
}

/* Przedłużenie lewego koloru aż do lewej krawędzi okna przeglądarki */
.esm-full-bleed .esm-left-wedge::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: 100%;
	width: 100vw;
	background-color: var(--esm-wedge-bg);
	box-shadow: 0 4px 20px rgba(16, 59, 102, 0.06);
}

.esm-full-bleed .esm-left-filler::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: 100%;
	width: 100vw;
	background-color: var(--esm-bar-bg);
	box-shadow: 0 4px 20px rgba(16, 59, 102, 0.06);
}

/* Przedłużenie prawego tła aż do prawej krawędzi okna przeglądarki */
.esm-full-bleed .esm-right-filler::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 100%;
	width: 100vw;
	background-color: var(--esm-bar-bg);
	box-shadow: 0 4px 20px rgba(16, 59, 102, 0.06);
}

/* Główna lista UL – wyśrodkowana na komputerze */
.esm-menu-list {
	display: flex;
	align-items: stretch;
	justify-content: center;
	flex-wrap: nowrap;
	flex: 0 0 auto !important;
	width: auto !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: var(--esm-item-gap, 2px);
	position: relative;
	z-index: 2;
	transform: translateX(var(--esm-center-offset, 0px));
}

/* Pojedyncza pozycja LI */
.esm-menu-item {
	position: relative;
	display: flex;
	align-items: stretch;
	margin: 0 !important;
	padding: 0 !important;
	flex-shrink: 0;
	z-index: 2;
}

/* Link wewnątrz pozycji głównej – stały padding bez przeskoków na Hover */
.esm-nav-wrapper .esm-menu-item > .esm-menu-link,
.esm-nav-wrapper .esm-menu-item > .esm-menu-link:hover,
.esm-nav-wrapper .esm-menu-item > .esm-menu-link:focus,
.esm-nav-wrapper .esm-menu-item > .esm-menu-link:active {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 0 var(--esm-item-padding-x, 16px) !important;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--esm-text-color) !important;
	background: transparent !important;
	border: none !important;
	box-sizing: border-box !important;
	text-decoration: none !important;
	white-space: nowrap;
	transition: color 0.2s ease;
	z-index: 2;
}

.esm-link-inner {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.esm-link-text {
	display: inline-block;
	transition: transform 0.2s ease;
	transform-origin: center center;
}

/* Kontrolowane skalowanie tekstu po najechaniu */
.esm-menu-item > .esm-menu-link:hover .esm-link-text {
	transform: scale(var(--esm-hover-scale, 1));
}

/* =========================================================
   SKOŚNE TŁO KAFELKA (NORMALNY / HOVER / AKTYWNE)
   ========================================================= */
.esm-menu-item:not(.esm-highlight-pill):not(.esm-highlight-text) > .esm-menu-link::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: var(--esm-normal-bg, transparent);
	transform: skewX(var(--esm-skew-angle));
	border-top-right-radius: var(--esm-curve-radius);
	border-bottom-left-radius: 2px;
	z-index: -1;
	opacity: 0;
	transition: background-color 0.2s ease, opacity 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

/* Tło w stanie Normalnym (jeśli wybrane) */
.esm-has-normal-tile .esm-menu-item:not(.esm-is-highlighted) > .esm-menu-link::before {
	opacity: 1;
}

/* STAN AKTYWNY (oraz 1. pozycja) – identyczny padding w spoczynku i na Hover */
.esm-is-first-home {
	margin-right: 4px !important;
}

.esm-nav-wrapper .esm-is-first-home > .esm-menu-link,
.esm-nav-wrapper .esm-is-first-home > .esm-menu-link:hover,
.esm-nav-wrapper .esm-is-first-home > .esm-menu-link:focus,
.esm-nav-wrapper .esm-is-first-home > .esm-menu-link:active,
.esm-nav-wrapper .esm-menu-item.esm-current-item:not(.esm-is-highlighted) > .esm-menu-link,
.esm-nav-wrapper .esm-menu-item.esm-current-item:not(.esm-is-highlighted) > .esm-menu-link:hover,
.esm-nav-wrapper .esm-menu-item.esm-current-item:not(.esm-is-highlighted) > .esm-menu-link:focus,
.esm-nav-wrapper .esm-menu-item.esm-current-item:not(.esm-is-highlighted) > .esm-menu-link:active {
	color: var(--esm-active-color, #ffffff) !important;
	padding-left: var(--esm-tile-padding-x, 22px) !important;
	padding-right: var(--esm-tile-padding-x, 22px) !important;
}

.esm-is-first-home > .esm-menu-link::before,
.esm-menu-item.esm-current-item:not(.esm-is-highlighted) > .esm-menu-link::before {
	background-color: var(--esm-active-bg, #0e82e8) !important;
	opacity: 1 !important;
	box-shadow: 2px 0 12px rgba(14, 130, 232, 0.18);
}

/* STAN HOVER (PO NAJECHANIU) */
.esm-nav-wrapper .esm-menu-item:not(.esm-is-highlighted) > .esm-menu-link:hover {
	color: var(--esm-text-hover, #ffffff) !important;
}

.esm-has-hover-tile .esm-menu-item:not(.esm-is-highlighted) > .esm-menu-link:hover::before {
	background-color: var(--esm-hover-bg, #0e82e8) !important;
	opacity: 1 !important;
	box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   WYRÓŻNIONE POZYCJE Z LISTY (REPEATER)
   ========================================================= */
.esm-highlight-skew {
	margin-left: 4px !important;
	margin-right: 4px !important;
}

.esm-nav-wrapper .esm-highlight-skew > .esm-menu-link,
.esm-nav-wrapper .esm-highlight-skew > .esm-menu-link:hover,
.esm-nav-wrapper .esm-highlight-skew > .esm-menu-link:focus,
.esm-nav-wrapper .esm-highlight-skew > .esm-menu-link:active {
	color: var(--esm-item-color, #ffffff) !important;
	padding-left: var(--esm-tile-padding-x, 22px) !important;
	padding-right: var(--esm-tile-padding-x, 22px) !important;
}

.esm-highlight-skew > .esm-menu-link::before {
	background-color: var(--esm-item-bg, #18a558) !important;
	border-top-left-radius: calc(var(--esm-curve-radius) * 0.6);
	border-top-right-radius: var(--esm-curve-radius);
	opacity: 1 !important;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.esm-highlight-skew > .esm-menu-link:hover::before {
	filter: brightness(1.08);
}

/* Wariant Pastylka (Pill) */
.esm-highlight-pill {
	align-items: center;
	padding: 0 4px !important;
}

.esm-nav-wrapper .esm-highlight-pill > .esm-menu-link,
.esm-nav-wrapper .esm-highlight-pill > .esm-menu-link:hover,
.esm-nav-wrapper .esm-highlight-pill > .esm-menu-link:focus,
.esm-nav-wrapper .esm-highlight-pill > .esm-menu-link:active {
	background-color: var(--esm-item-bg, #18a558) !important;
	color: var(--esm-item-color, #ffffff) !important;
	height: calc(var(--esm-bar-height) - 20px);
	padding-left: var(--esm-tile-padding-x, 22px) !important;
	padding-right: var(--esm-tile-padding-x, 22px) !important;
	border-radius: 999px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
	transition: filter 0.2s ease, transform 0.2s ease;
}

.esm-highlight-pill > .esm-menu-link:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

/* Wariant Sam kolor tekstu */
.esm-nav-wrapper .esm-highlight-text > .esm-menu-link,
.esm-nav-wrapper .esm-highlight-text > .esm-menu-link:hover {
	color: var(--esm-item-color, #e63946) !important;
}

/* Ikony wewnątrz pozycji */
.esm-home-icon,
.esm-custom-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.esm-custom-icon svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Strzałka podmenu (v) */
.esm-submenu-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.esm-submenu-arrow {
	margin-left: 2px;
	transition: transform 0.22s ease;
	opacity: 0.9;
}

.esm-menu-item:hover > .esm-menu-link .esm-submenu-arrow,
.esm-menu-item.esm-sub-open > .esm-menu-link .esm-submenu-arrow,
.esm-submenu-item.esm-sub-open > .esm-submenu-link .esm-submenu-arrow {
	transform: rotate(180deg);
}

/* =========================================================
   ROZWIJANE PODMENU (DROPDOWN)
   ========================================================= */
.esm-submenu {
	position: absolute;
	top: 100%;
	left: 6px;
	min-width: 230px;
	background-color: #ffffff;
	border-radius: 0 10px 10px 10px;
	border: 1px solid #e6eef6;
	box-shadow: 0 12px 28px rgba(16, 59, 102, 0.12);
	list-style: none !important;
	margin: 0 !important;
	padding: 8px 0 !important;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 100;
}

.esm-menu-item:hover > .esm-submenu,
.esm-submenu-item:hover > .esm-submenu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.esm-submenu-item {
	position: relative;
	margin: 0 !important;
	padding: 0 !important;
}

.esm-nav-wrapper .esm-submenu-link,
.esm-nav-wrapper .esm-submenu-link:hover {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 18px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--esm-text-color) !important;
	text-decoration: none !important;
	transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.esm-nav-wrapper .esm-submenu-link:hover {
	background-color: #f0f6fc;
	color: var(--esm-active-bg, #0e82e8) !important;
	padding-left: 22px;
}

/* Trzeci poziom podmenu */
.esm-submenu-level-3 {
	top: 0;
	left: 100%;
	border-radius: 10px;
}

.esm-submenu-item .esm-submenu-arrow {
	transform: rotate(-90deg);
}

/* =========================================================
   PRZYCISK HAMBURGERA (CAŁKOWICIE UKRYTY NA KOMPUTERACH)
   ========================================================= */
.esm-nav-wrapper button.esm-mobile-toggle {
	display: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	flex-direction: column !important;
	justify-content: center !important;
	align-items: center !important;
	gap: 5px !important;
	width: var(--esm-ham-size, 46px) !important;
	height: var(--esm-ham-size, 46px) !important;
	min-height: 0 !important;
	align-self: center !important;
	background-color: var(--esm-ham-bg, #f0f6fc) !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	border-radius: var(--esm-ham-radius, 8px) !important;
	cursor: pointer !important;
	padding: 0 !important;
	transition: background-color 0.2s ease, transform 0.2s ease !important;
	z-index: 10;
}

.esm-nav-wrapper button.esm-mobile-toggle .esm-ham-bar {
	display: block !important;
	width: var(--esm-ham-bar-w, 22px) !important;
	height: 2.5px !important;
	background-color: var(--esm-ham-color, #103b66) !important;
	border-radius: 2px !important;
	margin: 0 !important;
	transition: transform 0.25s ease, opacity 0.2s ease, background-color 0.2s ease !important;
}

/* Hamburger w stanie Hover oraz po otwarciu menu */
.esm-nav-wrapper button.esm-mobile-toggle:hover,
.esm-nav-wrapper button.esm-mobile-toggle:focus,
.esm-nav-wrapper.esm-mobile-open button.esm-mobile-toggle {
	background-color: var(--esm-ham-bg-active, #0e82e8) !important;
	border: none !important;
	outline: none !important;
}

.esm-nav-wrapper button.esm-mobile-toggle:hover .esm-ham-bar,
.esm-nav-wrapper button.esm-mobile-toggle:focus .esm-ham-bar,
.esm-nav-wrapper.esm-mobile-open button.esm-mobile-toggle .esm-ham-bar {
	background-color: var(--esm-ham-color-active, #ffffff) !important;
}

/* Animacja kresek Hamburgera w znak "X" po otwarciu */
.esm-nav-wrapper.esm-mobile-open button.esm-mobile-toggle .esm-ham-bar:nth-child(1) {
	transform: translateY(7.5px) rotate(45deg) !important;
}

.esm-nav-wrapper.esm-mobile-open button.esm-mobile-toggle .esm-ham-bar:nth-child(2) {
	opacity: 0 !important;
}

.esm-nav-wrapper.esm-mobile-open button.esm-mobile-toggle .esm-ham-bar:nth-child(3) {
	transform: translateY(-7.5px) rotate(-45deg) !important;
}