/*
 * K2CTS — nawigacja Kadence zgodna z referencją.
 * Tło #171811 jest dopasowane do źródłowego koloru znaku.
 * Sam znak jest przezroczystą, przyciętą wersją wordmarku: nie tworzy
 * ciemniejszego prostokąta wokół logo.
 */
#masthead.site-header,
#masthead .site-header-wrap,
#masthead .site-header-inner-wrap,
#masthead .site-main-header-wrap,
#masthead .site-main-header-wrap .site-header-row-container-inner,
#mobile-header.site-mobile-header-wrap,
#mobile-header .site-header-wrap,
#mobile-header .site-header-inner-wrap,
#mobile-header .site-main-header-wrap,
#mobile-header .site-main-header-wrap .site-header-row-container-inner {
	background: #171811 !important;
}

#masthead .site-main-header-wrap {
	min-height: 5.1875rem;
	border-bottom: 1px solid rgba(194, 169, 107, 0.18);
}

#masthead .site-main-header-wrap .site-container {
	width: 100%;
	max-width: none;
	min-height: 5.1875rem;
	padding-right: 3.75rem;
	padding-left: 3.75rem;
}

#masthead .site-header-main-section-left,
#masthead .site-header-main-section-right,
#masthead .site-header-item,
#masthead .site-branding,
#masthead .site-branding .brand,
#masthead .main-navigation {
	min-height: 5.1875rem;
}

/*
 * Kadence zachowuje ustawione w panelu logo jako element dostępny i link.
 * Oryginalny obraz jest jedynie przezroczysty, a pseudo-element pokazuje
 * przygotowany znak bez wpisanego w plik ciemnego tła.
 */
#masthead .site-branding,
#masthead .site-branding .brand {
	position: relative;
	width: 14rem;
}

#masthead .site-branding .brand {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

#masthead .site-branding .brand::before {
	display: block;
	width: 14rem;
	height: 3.625rem;
	content: '';
	background: url('/wp-content/themes/k2cts-child/assets/images/k2cts-header-logo-transparent.png') center / contain no-repeat;
	pointer-events: none;
}

#masthead .site-branding .custom-logo {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	max-height: none !important;
	margin: 0;
	opacity: 0;
}

#masthead .main-navigation,
#masthead .primary-menu-container,
#masthead #primary-menu {
	display: flex;
	align-items: center;
}

#masthead .main-navigation {
	min-height: 5.1875rem;
}

#masthead #primary-menu {
	gap: 1.625rem;
	margin: 0;
	padding: 0;
}

#masthead #primary-menu > li {
	margin: 0;
}

#masthead #primary-menu > li > a,
#masthead .main-navigation .sub-menu a {
	padding: 0;
	color: rgba(240, 232, 213, 0.78);
	font-family: Oswald, sans-serif !important;
	font-size: 0.72rem;
	font-weight: 400;
	letter-spacing: 0.1em;
	line-height: 1.5rem;
	text-transform: uppercase;
}

#masthead #primary-menu > li > a:hover,
#masthead #primary-menu > li > a:focus-visible,
#masthead #primary-menu > li.current-menu-item > a,
#masthead #primary-menu > li.current-menu-ancestor > a {
	color: #c2a96b;
}

/* Ostatnia pozycja „Zapisz się” — oznaczana automatycznie przez functions.php. */
#masthead #primary-menu > li.k2cts-menu-cta {
	margin-left: 0.15rem;
}

#masthead #primary-menu > li.k2cts-menu-cta > a {
	display: inline-flex;
	min-width: 8.625rem;
	min-height: 2.625rem;
	padding: 0.65rem 1.55rem;
	align-items: center;
	justify-content: center;
	background: #8b6914;
	color: #171811;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1;
}

#masthead #primary-menu > li.k2cts-menu-cta > a:hover,
#masthead #primary-menu > li.k2cts-menu-cta > a:focus-visible,
#masthead #primary-menu > li.k2cts-menu-cta.current-menu-item > a {
	background: #c2a96b;
	color: #171811;
}

#masthead .main-navigation .sub-menu {
	min-width: 13rem;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(194, 169, 107, 0.25);
	background: #171811;
	box-shadow: none;
}

#masthead .main-navigation .sub-menu li + li {
	margin-top: 0.45rem;
}

#masthead .main-navigation .sub-menu a {
	display: block;
	padding: 0.25rem 0;
	font-size: 0.68rem;
}

#masthead .menu-toggle-open,
#masthead .menu-toggle-close,
#masthead .mobile-toggle-open-container .menu-toggle-open,
#mobile-header .menu-toggle-open,
#mobile-header .menu-toggle-close,
#mobile-header .mobile-toggle-open-container .menu-toggle-open {
	color: #f0e8d5;
}

@media (max-width: 63.99rem) {
	#masthead .site-main-header-wrap,
	#masthead .site-main-header-wrap .site-container,
	#masthead .site-header-main-section-left,
	#masthead .site-header-main-section-right,
	#masthead .site-header-item,
	#masthead .site-branding .brand {
		min-height: 4.5rem;
	}

	#masthead .site-main-header-wrap .site-container {
		padding-right: 1.5rem;
		padding-left: 1.5rem;
	}

	#masthead .site-branding,
	#masthead .site-branding .brand {
		width: 11.5rem;
	}

	#masthead .site-branding .brand::before {
		width: 11.5rem;
		height: 3rem;
	}
}

@media (max-width: 47.99rem) {
	#mobile-header .site-main-header-wrap,
	#mobile-header .site-main-header-wrap .site-container {
		min-height: 4.25rem;
	}

	#mobile-header .site-main-header-wrap .site-container {
		padding-right: 1.25rem;
		padding-left: 1.25rem;
	}

	#mobile-header .site-branding,
	#mobile-header .site-branding .brand {
		position: relative;
		width: 10.25rem;
	}

	#mobile-header .site-branding .brand {
		display: flex;
		min-height: 4.25rem;
		align-items: center;
	}

	#mobile-header .site-branding .brand::before {
		display: block;
		width: 10.25rem;
		height: 2.7rem;
		content: '';
		background: url('/wp-content/themes/k2cts-child/assets/images/k2cts-header-logo-transparent.png') center / contain no-repeat;
		pointer-events: none;
	}

	#mobile-header .site-branding .custom-logo {
		position: absolute;
		inset: 0;
		display: block;
		width: 100% !important;
		height: 100% !important;
		margin: 0;
		opacity: 0;
	}

	#masthead .mobile-navigation .mobile-menu-container > ul > li > a,
	#masthead .mobile-navigation .mobile-menu-container .sub-menu a,
	#mobile-header .mobile-navigation .mobile-menu-container > ul > li > a,
	#mobile-header .mobile-navigation .mobile-menu-container .sub-menu a {
		font-family: Oswald, sans-serif !important;
		font-size: 0.78rem;
		font-weight: 400;
		letter-spacing: 0.1em;
		text-transform: uppercase;
	}

	#masthead .mobile-navigation .mobile-menu-container > ul > li.k2cts-menu-cta > a,
	#mobile-header .mobile-navigation .mobile-menu-container > ul > li.k2cts-menu-cta > a {
		background: #8b6914;
		color: #171811;
		font-weight: 600;
	}
}
