/*
 * Nawigacja główna — StützSkin
 * Pasek fixed z backdrop-filter, hamburgerem na mobile.
 */

/* ----------------------------------------------------------------
 * Pasek nawigacji
 * ---------------------------------------------------------------- */
.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 101;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 48px;
	background: rgba(247, 243, 238, 0.95);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 0.5px solid rgba(180, 107, 96, 0.2);
	transition: padding 0.3s ease, box-shadow 0.3s ease;
}

/* Stan po przewinięciu — dodawany przez JS */
.nav--scrolled {
	padding: 14px 48px;
	box-shadow: 0 2px 20px rgba(28, 25, 23, 0.08);
}

/* ----------------------------------------------------------------
 * Logo
 * ---------------------------------------------------------------- */
.nav-logo {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	text-decoration: none;
	line-height: 1;
}

.nav-logo__img {
	height: 36px;
	width: auto;
	display: block;
	object-fit: contain;
}

/* ----------------------------------------------------------------
 * Lista linków — wycentrowana absolutnie między logo a CTA
 * ---------------------------------------------------------------- */
.nav-links {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.nav-links a {
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #4A4540;
	text-decoration: none;
	transition: color 0.2s;
}

.nav-links a:hover,
.nav-links .current-menu-item > a {
	color: #B46B60;
}

/* ----------------------------------------------------------------
 * CTA button — nadpisuje style z .btn-primary
 * ---------------------------------------------------------------- */
.nav-cta {
	flex-shrink: 0;
	background: var(--plum);
	color: #ffffff;
	padding: 10px 22px;
	border-radius: 2px;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.nav-cta:hover {
	background: var(--plum-dark);
	color: #ffffff;
}

/* ----------------------------------------------------------------
 * Mobile footer — kontakt i social (globalne, element tylko na mobile)
 * ---------------------------------------------------------------- */
.nav-mobile-footer {
	display: none; /* schowany na desktop — @media nadpisuje */
}

.nav-mobile-contact {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.nav-mobile-contact a {
	font-size: 13px;
	font-weight: 300;
	color: var(--ink-muted);
	text-decoration: none;
	font-family: var(--sans);
	letter-spacing: 0.04em;
	transition: color 0.2s;
}

.nav-mobile-contact a:hover {
	color: var(--brick);
}

.nav-mobile-social {
	display: flex;
	align-items: center;
	gap: 20px;
	color: var(--ink-muted);
}

.nav-mobile-social a {
	color: var(--ink-muted);
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-decoration: none;
	transition: color 0.2s;
}

.nav-mobile-social a:hover {
	color: var(--brick);
}

.nav-mobile-social__zl {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* ----------------------------------------------------------------
 * Hamburger — schowany na desktop
 * ---------------------------------------------------------------- */
.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 20px;
	height: 14px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.nav-toggle__bar {
	display: block;
	width: 20px;
	height: 1px;
	background: var(--ink);
	transition: opacity 0.2s, transform 0.2s;
}

/* ----------------------------------------------------------------
 * Mobile (max 768px) — hamburger i rozwijane menu
 * ---------------------------------------------------------------- */
@media (max-width: 768px) {
	.nav {
		padding: 16px 20px;
	}

	.nav-logo__img {
		height: 28px;
	}

	.nav--scrolled {
		padding: 12px 24px;
	}

	/* Hamburger widoczny */
	.nav-toggle {
		display: flex;
	}

	/* CTA schowany w głównym pasku — pokazywany w menu */
	.nav-cta {
		display: none;
	}

	/* Logo i hamburger muszą być nad overlay */
	.nav-logo {
		position: relative;
		z-index: 101;
	}

	.nav-toggle {
		position: relative;
		z-index: 101;
	}

	/* Lista linków — overlay pełnoekranowy */
	.nav-links {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100vw;
		height: 100vh;
		background: var(--cream);
		z-index: 99;
		padding-top: 90px;
		display: none;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		gap: 8px;
		overflow-y: auto;
		transform: none; /* resetuje translateX(-50%) z desktop */
	}

	/* Menu otwarte — klasa .nav--open na elemencie <nav> */
	nav.nav--open .nav-links {
		display: flex;
	}

	.nav-links li {
		width: 100%;
		text-align: center;
		border-bottom: 0.5px solid var(--cream-deep);
	}

	.nav-links li:last-child {
		border-bottom: none;
	}

	/* Linki w overlay */
	.nav-links li a {
		display: block;
		padding: 20px 24px;
		font-family: var(--serif);
		font-size: 22px;
		font-weight: 300;
		color: var(--ink);
		letter-spacing: 0.03em;
		text-transform: none;
	}

	/* CTA w overlay */
	.nav-links .nav-cta {
		background: var(--plum) !important;
		color: var(--white) !important;
		margin: 16px 24px;
		border-radius: var(--radius);
		padding: 14px 36px !important;
	}

	/* Stopka mobile overlay — ujawniania przez body.nav-open */
	.nav-mobile-footer {
		display: none;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 100;
		background: var(--cream);
		border-top: 0.5px solid var(--cream-deep);
		padding: 20px 24px;
		flex-direction: column;
		align-items: center;
		gap: 14px;
	}

	body.nav-open .nav-mobile-footer {
		display: flex;
		padding: 24px 24px 32px;
		background: var(--cream) !important;
		min-height: 100px;
		gap: 16px;
	}

	/* Animacja hamburgera w stanie otwartym */
	.nav--open .nav-toggle__bar:nth-child(1) {
		transform: translateY(6.5px) rotate(45deg);
	}

	.nav--open .nav-toggle__bar:nth-child(2) {
		opacity: 0;
	}

	.nav--open .nav-toggle__bar:nth-child(3) {
		transform: translateY(-6.5px) rotate(-45deg);
	}
}
