/*
 * Pasek nawigacji z logo na srodku.
 * Logo jest biale, wiec pasek jest ciemny w kazdym motywie kolorow.
 */

.awc-nav {
	--awc-nav-h: 84px;
	--awc-nav-bg: rgba(10, 10, 14, 0.55);
	--awc-nav-bg-scrolled: rgba(10, 10, 14, 0.72);
	--awc-nav-line: rgba(255, 255, 255, 0.10);
	--awc-nav-fg: rgba(255, 255, 255, 0.72);
	--awc-nav-fg-strong: #ffffff;
	--awc-nav-logo-h: 40px;
	--awc-nav-gap: clamp(1.25rem, 2.5vw, 2.25rem);
	--awc-nav-pad: clamp(1rem, 4vw, 2.5rem);
	--awc-nav-max: 1320px;
	--awc-nav-ease: cubic-bezier(0.22, 1, 0.36, 1);

	position: sticky;
	top: 0;
	z-index: 900;
	background: var(--awc-nav-bg);
	border-bottom: 1px solid var(--awc-nav-line);
	-webkit-backdrop-filter: saturate(170%) blur(18px);
	backdrop-filter: saturate(170%) blur(18px);
	transition: background 0.3s var(--awc-nav-ease), border-color 0.3s var(--awc-nav-ease);
}

.awc-nav.is-scrolled {
	background: var(--awc-nav-bg-scrolled);
	border-bottom-color: rgba(255, 255, 255, 0.16);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
}

.awc-nav__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: var(--awc-nav-gap);
	max-width: var(--awc-nav-max);
	min-height: var(--awc-nav-h);
	margin: 0 auto;
	padding: 0 var(--awc-nav-pad);
}

.awc-nav__side {
	display: flex;
	align-items: center;
	min-width: 0;
}

.awc-nav__side--right {
	justify-content: flex-end;
}

/* Logo -------------------------------------------------------------- */

.awc-nav__brand {
	display: flex;
	justify-content: center;
	align-items: center;
}

.awc-nav__logo {
	display: block;
	line-height: 0;
	border-radius: 8px;
	transition: opacity 0.25s var(--awc-nav-ease);
}

.awc-nav__logo:hover {
	opacity: 0.78;
}

.awc-nav__logo img {
	display: block;
	height: var(--awc-nav-logo-h);
	width: auto;
}

/* Menu ---------------------------------------------------------------- */

.awc-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(0.5rem, 1.6vw, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.awc-nav__menu--right .awc-nav__list {
	justify-content: flex-end;
}

.awc-nav__list li {
	position: relative;
	margin: 0;
}

.awc-nav__list a {
	display: inline-block;
	padding: 0.5rem 0.25rem;
	color: var(--awc-nav-fg);
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s var(--awc-nav-ease);
}

.awc-nav__label {
	position: relative;
	display: inline-block;
}

/* Podkreslenie rozjezdza sie od srodka */
.awc-nav__label::after {
	content: "";
	position: absolute;
	left: 50%;
	right: 50%;
	bottom: -5px;
	height: 1.5px;
	background: currentColor;
	transition: left 0.3s var(--awc-nav-ease), right 0.3s var(--awc-nav-ease);
}

.awc-nav__list a:hover,
.awc-nav__list a:focus-visible {
	color: var(--awc-nav-fg-strong);
}

.awc-nav__list a:hover .awc-nav__label::after,
.awc-nav__list a:focus-visible .awc-nav__label::after {
	left: 0;
	right: 0;
}

.awc-nav__list .current-menu-item > a,
.awc-nav__list .current-menu-ancestor > a {
	color: var(--awc-nav-fg-strong);
}

.awc-nav__list .current-menu-item > a .awc-nav__label::after {
	left: 0;
	right: 0;
}

/* Rozwijane podmenu */

.awc-nav__list .sub-menu {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	z-index: 10;
	min-width: 210px;
	margin: 0;
	padding: 0.5rem;
	list-style: none;
	background: #131316;
	border: 1px solid var(--awc-nav-line);
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.22s var(--awc-nav-ease), transform 0.22s var(--awc-nav-ease), visibility 0.22s;
}

.awc-nav__menu--right .sub-menu {
	left: auto;
	right: 0;
}

.awc-nav__list li:hover > .sub-menu,
.awc-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.awc-nav__list .sub-menu a {
	display: block;
	padding: 0.55rem 0.75rem;
	border-radius: 8px;
	white-space: normal;
}

.awc-nav__list .sub-menu a:hover,
.awc-nav__list .sub-menu a:focus-visible {
	background: rgba(255, 255, 255, 0.07);
}

.awc-nav__list .sub-menu .awc-nav__label::after {
	display: none;
}

/* Przycisk menu ------------------------------------------------------- */

.awc-nav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-left: -10px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 10px;
	color: var(--awc-nav-fg-strong);
	cursor: pointer;
}

.awc-nav__toggle:hover {
	background: rgba(255, 255, 255, 0.07);
}

.awc-nav__burger {
	display: block;
	position: relative;
	width: 20px;
	height: 14px;
}

.awc-nav__burger span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.3s var(--awc-nav-ease), opacity 0.2s var(--awc-nav-ease);
}

.awc-nav__burger span:nth-child(1) { top: 0; }
.awc-nav__burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.awc-nav__burger span:nth-child(3) { bottom: 0; }

[data-nav-open="true"] .awc-nav__burger span:nth-child(1) {
	transform: translateY(6.25px) rotate(45deg);
}

[data-nav-open="true"] .awc-nav__burger span:nth-child(2) {
	opacity: 0;
}

[data-nav-open="true"] .awc-nav__burger span:nth-child(3) {
	transform: translateY(-6.25px) rotate(-45deg);
}

/* Panel mobilny ------------------------------------------------------- */

.awc-nav__panel {
	position: fixed;
	top: var(--awc-nav-h);
	left: 0;
	right: 0;
	z-index: 899;
	max-height: calc(100dvh - var(--awc-nav-h));
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--awc-nav-bg);
	border-bottom: 1px solid var(--awc-nav-line);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.28s var(--awc-nav-ease), transform 0.28s var(--awc-nav-ease), visibility 0.28s;
}

[data-nav-open="true"] .awc-nav__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.awc-nav__panel-inner {
	padding: 0.5rem var(--awc-nav-pad) 1.75rem;
}

.awc-nav__panel-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.awc-nav__panel-list li {
	margin: 0;
	border-bottom: 1px solid var(--awc-nav-line);
}

.awc-nav__panel-list a {
	display: block;
	padding: 1rem 0;
	color: var(--awc-nav-fg);
	font-size: 1.0625rem;
	font-weight: 500;
	text-decoration: none;
}

.awc-nav__panel-list a:hover,
.awc-nav__panel-list a:focus-visible,
.awc-nav__panel-list .current-menu-item > a {
	color: var(--awc-nav-fg-strong);
}

.awc-nav__panel-list .sub-menu {
	margin: 0 0 0.5rem 0.9rem;
	padding: 0;
	list-style: none;
}

.awc-nav__panel-list .sub-menu li {
	border-bottom: 0;
}

.awc-nav__panel-list .sub-menu a {
	padding: 0.6rem 0;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.56);
}

.awc-nav__scrim {
	position: fixed;
	inset: 0;
	z-index: 898;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.28s var(--awc-nav-ease);
}

[data-nav-open="true"] .awc-nav__scrim {
	opacity: 1;
}

/* Widocznosc fokusu z klawiatury */

.awc-nav a:focus-visible,
.awc-nav button:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

/* Przelaczenie na uklad mobilny --------------------------------------- */

@media (max-width: 1024px) {
	.awc-nav {
		--awc-nav-h: 68px;
		--awc-nav-logo-h: 33px;
	}

	.awc-nav__toggle {
		display: inline-flex;
	}

	.awc-nav__menu--left,
	.awc-nav__menu--right {
		display: none;
	}
}

@media (min-width: 1025px) {
	.awc-nav__panel,
	.awc-nav__scrim {
		display: none;
	}
}

/* Pasek bez menu: samo logo, wysrodkowane */

.awc-nav--bare .awc-nav__inner {
	grid-template-columns: 1fr;
}

.awc-nav--bare .awc-nav__side {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.awc-nav,
	.awc-nav *,
	.awc-nav__panel,
	.awc-nav__scrim {
		transition-duration: 0.01ms !important;
	}
}
