/* ==========================================================================
   Hlavička — maket, uzel 94:581 (výška 100, obsah od 60 px od okraje)
   ========================================================================== */

.bx-header {
	position: relative;
	z-index: 60;
	height: var(--bx-header-h);
	background: transparent;
}

.bx-header--sticky {
	position: sticky;
	top: 0;
}

/* Na tmavém pozadí hero zůstává hlavička průhledná; jinde dostane krém. */
body:not(.home) .bx-header { background: var(--bx-cream); }
.bx-header--sticky.is-stuck { background: var(--bx-yellow); box-shadow: 0 1px 0 rgba(20, 20, 20, .08); }
body:not(.home) .bx-header--sticky.is-stuck { background: var(--bx-cream); }

.bx-header__inner {
	position: relative;
	height: 100%;
	display: flex;
	align-items: center;
	gap: 24px;
	padding-inline: var(--bx-gutter);
	max-width: var(--bx-page);
	margin-inline: auto;
}

/* --- Logo ---------------------------------------------------------------- */
.bx-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: none;
}

.bx-logo__mark,
.bx-logo svg {
	width: 46px;
	height: 46px;
	flex: 0 0 46px;
	display: block;
}

.bx-logo__word {
	color: var(--bx-ink);
	text-transform: uppercase;
}

/* --- Menu ---------------------------------------------------------------- */
.bx-nav {
	display: flex;
	align-items: center;
	margin-left: 60px;
}

/* Na šířce maketu sedí prvky přesně na souřadnicích z Figmy:
   menu 340, telefon 1140, kulaté tlačítko 1332 (rám 1440). */
@media (min-width: 1440px) {
	.bx-header__inner { display: block; }
	.bx-logo { position: absolute; left: 60px; top: 27px; }
	.bx-nav { position: absolute; left: 340px; top: 40px; margin: 0; }
	.bx-header__phone { position: absolute; left: 1140px; top: 38px; margin: 0; }
	.bx-header__call { position: absolute; left: 1332px; top: 26px; }
}

.bx-nav__list {
	display: flex;
	align-items: center;
	gap: 34px;
	margin: 0;
}

.bx-nav__link {
	color: var(--bx-ink);
	display: inline-block;
	position: relative;
}

.bx-nav__link::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: -6px;
	height: 2px;
	background: var(--bx-ink);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .18s ease;
	pointer-events: none;
}

/* Maket žádnou aktivní položku nezvýrazňuje, proto linka jen při najetí.
   Která sekce je zrovna na obrazovce, hlásí skript přes aria-current
   (pro hlasové čtečky, bez vizuálního rozdílu). */
.bx-nav__link:hover::after { transform: scaleX(1); }

.bx-nav__sub {
	position: absolute;
	top: 100%;
	min-width: 220px;
	background: var(--bx-cream);
	padding: 10px 0;
	box-shadow: 0 12px 30px rgba(20, 20, 20, .12);
	display: none;
}

.bx-nav__item:hover > .bx-nav__sub,
.bx-nav__item:focus-within > .bx-nav__sub { display: block; }

.bx-nav__sub .bx-nav__item { display: block; }
.bx-nav__sub .bx-nav__link { display: block; padding: 8px 18px; }
.bx-nav__sub .bx-nav__link::after { display: none; }

.bx-nav__mobile-contacts { display: none; }

/* --- Telefon a kulaté tlačítko ------------------------------------------- */
.bx-header__phone {
	margin-left: auto;
	color: var(--bx-ink);
	white-space: nowrap;
}

.bx-header__call {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background: var(--bx-ink);
	color: var(--bx-cream);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform .18s ease;
}

.bx-header__call:hover { transform: scale(1.06); }
.bx-header__call .bx-icon { width: 20px; height: 20px; }

/* --- Tlačítko menu na mobilu --------------------------------------------- */
.bx-burger {
	display: none;
	margin-left: auto;
	width: 44px; height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--bx-ink);
	cursor: pointer;
}
.bx-burger .bx-icon { width: 26px; height: 26px; margin-inline: auto; }
.bx-burger__close { display: none; }
.bx-burger[aria-expanded="true"] .bx-burger__open { display: none; }
.bx-burger[aria-expanded="true"] .bx-burger__close { display: inline-flex; }

/* --- Adaptiv -------------------------------------------------------------- */
@media (max-width: 1300px) {
	.bx-nav { margin-left: 60px; }
	.bx-nav__list { gap: 24px; }
}

@media (max-width: 1100px) {
	.bx-header__phone { display: none; }
	.bx-nav { margin-left: auto; }
}

@media (max-width: 980px) {
	.bx-burger { display: block; }
	.bx-header__call { display: none; }

	.bx-nav {
		position: fixed;
		inset: var(--bx-header-h) 0 auto 0;
		margin: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--bx-cream);
		padding: 12px var(--bx-gutter) 32px;
		box-shadow: 0 20px 40px rgba(20, 20, 20, .14);
		transform: translateY(-12px);
		opacity: 0;
		visibility: hidden;
		transition: opacity .2s ease, transform .2s ease, visibility .2s;
		max-height: calc(100dvh - var(--bx-header-h));
		overflow-y: auto;
	}

	.bx-nav.is-open { transform: none; opacity: 1; visibility: visible; }

	.bx-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.bx-nav__item { border-bottom: 1px solid rgba(20, 20, 20, .1); }
	.bx-nav__link { display: block; padding: 16px 0; font-size: 18px; }
	.bx-nav__link::after { display: none; }
	.bx-nav__sub { position: static; display: block; box-shadow: none; background: transparent; padding: 0 0 8px 16px; }

	.bx-nav__mobile-contacts {
		display: flex;
		flex-direction: column;
		gap: 6px;
		padding-top: 22px;
	}
}
