/* =========================================================
   StreetTrekker Header CSS
   Datei: assets/css/header.css
========================================================= */

/* =========================================================
   Header Grundrahmen
========================================================= */

.st-site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--st-header-bg);
	border-bottom: 1px solid var(--st-border-soft);
}

/* =========================================================
   Header oben: Logo | Suche | Konto
========================================================= */

.st-header-top {
	background: var(--st-header-bg);
	border-bottom: 1px solid var(--st-border-soft);
}

.st-header-top-inner {
	width: min(1320px, calc(100% - 48px));
	min-height: 96px;
	margin-inline: auto;
	display: grid;
	grid-template-columns: 320px minmax(420px, 1fr) auto;
	align-items: center;
	gap: 28px;
}

/* =========================================================
   Logo
========================================================= */

.st-brand {
	display: inline-flex;
	align-items: center;
	justify-self: start;
	text-decoration: none;
	line-height: 1;
}

.st-brand-logo {
	display: block;
	width: auto;
	max-width: 300px;
	max-height: 74px;
	object-fit: contain;
}

/* =========================================================
   Suche Desktop + Mobile
========================================================= */

.st-header-search-form {
	height: 52px;
	display: grid;
	grid-template-columns: 1fr 54px;
	border: 1px solid rgba(16, 24, 32, 0.13);
	border-radius: 999px;
	background: #fff9ef;
	overflow: hidden;
}

.st-header-search-form:focus-within {
	border-color: rgba(185, 96, 47, 0.52);
	box-shadow: 0 0 0 4px rgba(185, 96, 47, 0.12);
}

.st-header-search-desktop {
	justify-self: center;
	width: min(620px, 100%);
}

.st-header-search-mobile {
	width: 100%;
}

.st-header-search-form input[type="search"] {
	width: 100%;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--st-text);
	padding: 0 0 0 22px;
	outline: none;
	font-size: 15px;
}

.st-header-search-form input[type="search"]::placeholder {
	color: rgba(16, 24, 32, 0.48);
}

.st-header-search-form button {
	width: 54px;
	height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.st-search-icon {
	position: relative;
	width: 19px;
	height: 19px;
	display: block;
	border: 2px solid var(--st-text);
	border-radius: 50%;
}

.st-search-icon::after {
	content: "";
	position: absolute;
	width: 8px;
	height: 2px;
	right: -6px;
	bottom: -3px;
	background: var(--st-text);
	border-radius: 999px;
	transform: rotate(45deg);
	transform-origin: center;
}

/* =========================================================
   Login / Registrierung / Konto
========================================================= */

.st-header-auth {
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.st-auth-link {
	color: var(--st-text);
	text-decoration: none;
	font-weight: 850;
	font-size: 15px;
}

.st-auth-link:hover {
	color: var(--st-orange-deep);
}

.st-auth-button {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	border-radius: 999px;
	background: var(--st-orange-deep);
	color: #fff9ef;
	text-decoration: none;
	font-size: 15px;
	font-weight: 850;
}

.st-auth-button:hover {
	background: var(--st-orange);
	color: #fff9ef;
}

/* =========================================================
   Desktop Navigation
   Wichtig:
   - kein Grid
   - kein grid-column
   - kein justify-content:center
   - linksbündig im Container
========================================================= */

.st-header-nav-row {
	background: rgba(244, 243, 239, 0.96);
	border-bottom: 1px solid var(--st-border-soft);
}

.st-header-nav-inner {
	width: min(1320px, calc(100% - 48px));
	min-height: 56px;
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.st-main-nav {
	width: 100%;
	margin: 0;
	padding: 0;
}

.st-menu {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.st-menu li {
	margin: 0;
	padding: 0;
}

.st-menu a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 10px;
	border-radius: 999px;
	color: var(--st-text);
	text-decoration: none;
	font-size: 16px;
	font-weight: 850;
	line-height: 1;
}

.st-menu a:hover,
.st-menu .current-menu-item > a,
.st-menu .current_page_item > a {
	background: rgba(185, 96, 47, 0.12);
	color: var(--st-text);
}

/* =========================================================
   Hamburger
========================================================= */

.st-menu-toggle {
	display: none;
	width: 46px;
	height: 46px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	border: 1px solid rgba(16, 24, 32, 0.12);
	border-radius: 999px;
	background: #fff9ef;
	cursor: pointer;
}

.st-menu-toggle span {
	display: block;
	width: 20px;
	height: 2px;
	margin: 3px 0;
	background: var(--st-text);
	border-radius: 999px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.st-mobile-open .st-menu-toggle span:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.st-mobile-open .st-menu-toggle span:nth-child(2) {
	opacity: 0;
}

.st-mobile-open .st-menu-toggle span:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* =========================================================
   Mobile Menü
========================================================= */

.st-mobile-menu {
	display: none;
	background: var(--st-header-bg);
	border-bottom: 1px solid var(--st-border-soft);
	box-shadow: 0 18px 36px rgba(16, 24, 32, 0.12);
}

.st-mobile-open .st-mobile-menu {
	display: block;
}

.st-mobile-menu[hidden] {
	display: none !important;
}

.st-mobile-open .st-mobile-menu:not([hidden]) {
	display: block !important;
}

.st-mobile-menu-inner {
	width: min(100% - 32px, 720px);
	margin-inline: auto;
	padding: 18px 0 22px;
}

.st-mobile-nav {
	margin-top: 18px;
}

.st-mobile-menu-list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.st-mobile-menu-list li {
	margin: 0;
	padding: 0;
}

.st-mobile-menu-list a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0 16px;
	border-radius: 16px;
	background: rgba(16, 24, 32, 0.04);
	color: var(--st-text);
	text-decoration: none;
	font-weight: 850;
}

.st-mobile-menu-list a:hover {
	background: rgba(185, 96, 47, 0.12);
	color: var(--st-text);
}

.st-mobile-auth {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
}

/* =========================================================
   Tablet
========================================================= */

@media (max-width: 1100px) {
	.st-header-top-inner {
		grid-template-columns: 260px minmax(300px, 1fr) auto;
	}

	.st-brand-logo {
		max-width: 245px;
		max-height: 62px;
	}

	.st-header-search-desktop {
		width: min(480px, 100%);
	}
}

/* =========================================================
   Mobile
========================================================= */

@media (max-width: 900px) {
	.st-header-top-inner {
		width: min(100% - 32px, 1320px);
		min-height: 78px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
	}

	.st-brand-logo {
		max-width: 230px;
		max-height: 58px;
	}

	.st-header-search-desktop,
	.st-header-auth-desktop,
	.st-header-nav-row {
		display: none !important;
	}

	.st-menu-toggle {
		display: inline-flex;
		margin-left: auto;
	}
}

/* =========================================================
   Kleine Smartphones
========================================================= */

@media (max-width: 620px) {
	.st-header-top-inner {
		width: min(100% - 22px, 1320px);
		min-height: 72px;
	}

	.st-brand-logo {
		max-width: 185px;
		max-height: 48px;
	}

	.st-menu-toggle {
		width: 42px;
		height: 42px;
	}

	.st-mobile-menu-inner {
		width: min(100% - 22px, 720px);
	}

	.st-mobile-auth {
		flex-direction: column;
		align-items: stretch;
	}

	.st-mobile-auth .st-auth-link,
	.st-mobile-auth .st-auth-button {
		width: 100%;
		justify-content: center;
	}
}
