@media (max-width: 1024px) {
	html {
		scroll-padding-top: calc(var(--header-height) + 20px);
	}
	section,
	.container,
	[id] {
		scroll-margin-top: calc(var(--header-height) + 20px);
	}
	
	/* Header wird zu Flexbox Container für Button-Integration */
	.dual-brand-header {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		padding-right: 1rem;
	}
	
	.brand-container {
		flex: 1;
		min-width: 0;
		position: relative;
		height: 100%;
		overflow: hidden;
	}
	
	/* Button im Header rechts sichtbar */
	.sub-nav-toggle {
		position: relative !important;
		top: auto !important;
		left: auto !important;
		transform: none !important;
		z-index: 1100 !important;
		padding: 0.6rem 1.2rem !important;
		width: auto !important;
		min-width: 100px !important;
		height: 40px !important;
		border-radius: 10px !important;
		font-size: 1.3rem !important;
		font-weight: 600 !important;
		letter-spacing: 0.3px !important;
		background: linear-gradient(135deg, rgba(10, 18, 32, 0.95), rgba(0, 8, 20, 0.95)) padding-box,
			linear-gradient(90deg, var(--weber-color), var(--devtoolbox-color)) border-box !important;
		border: 2px solid transparent !important;
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 
			0 2px 8px rgba(74, 144, 226, 0.2),
			inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
		backdrop-filter: blur(12px) !important;
		transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
		color: #fff !important;
		margin-left: 0.5rem;
		flex-shrink: 0;
		cursor: pointer;
	}
	
	.sub-nav-toggle:hover {
		transform: translateY(-2px) !important;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 
			0 4px 12px rgba(74, 144, 226, 0.3),
			inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
	}
	
	.sub-nav-toggle[aria-expanded="true"] {
		background: linear-gradient(135deg, rgba(20, 32, 52, 0.98), rgba(10, 18, 32, 0.98)) padding-box,
			linear-gradient(90deg, var(--devtoolbox-color), var(--weber-color)) border-box !important;
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 
			0 2px 8px rgba(0, 255, 136, 0.25),
			inset 0 -2px 8px rgba(0, 255, 136, 0.1) !important;
	}
	
	.sub-nav.dropdown {
		top: var(--header-height) !important;
	}
	
	.sub-nav.dropdown.open {
		opacity: 1 !important;
		pointer-events: auto !important;
		z-index: 2000 !important;
		display: block !important;
		background: rgba(0, 8, 20, 0.98);
		box-shadow: 0 18px 45px rgba(0,0,0,0.55);
	}
}

/* Responsive Anpassungen für kleinere Bildschirme */
@media (max-width: 768px) {
	:root {
		--header-height: 70px;
		--nav-button-height: 42px;
	}
	
	.dual-brand-header {
		height: var(--header-height);
	}
	
	.brand-link {
		font-size: 1.4rem;
		padding: 0 2rem;
	}
}

@media (max-width: 480px) {
	:root {
		--header-height: 60px;
		--nav-button-height: 38px;
	}
	
	.dual-brand-header {
		height: var(--header-height);
	}
	
	.brand-link {
		font-size: 1.1rem;
		padding: 0 1.5rem;
	}
	
	.sub-nav-toggle {
		min-width: 120px !important;
		font-size: 0.85rem !important;
		padding: 0.5rem 1rem !important;
	}
}
/* Shared Dual-Brand Header for WeberComputerHilfe & DevToolBox */
:root {
	--header-bg: rgba(0, 8, 20, 0.98);
	--weber-color: #4a90e2;
	--devtoolbox-color: #00ff88;
	--text: #ffffff;
	--text-secondary: #a0b3cc;
	--border: #1a2332;
	--accent: #4a90e2;
	/* diagonal slant control for brand clip-paths */
	--slant: 14%; /* desktop default */
	/* menu animation tokens */
	--menu-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--menu-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
	--menu-duration: 240ms;
	--drawer-duration: 320ms;
	/* global menu spacing under header (mobile) */
	--menu-gap-md: 15px;
	--menu-gap-sm: 15px;
	/* Flexible header and nav heights */
	--header-height: 80px;
	--nav-button-height: 46px;
	--nav-gap: 0px;
	--nav-height: 50px;
}

/* Scroll offset for fixed header */
html {
	scroll-padding-top: calc(var(--header-height) + var(--nav-height) + 20px);
}

/* All sections need scroll margin to prevent hiding behind header */
section,
.container,
[id] {
	scroll-margin-top: calc(var(--header-height) + var(--nav-height) + 20px);
}

/* Fixed Header */
.dual-brand-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 1000;
	background: linear-gradient(135deg, rgba(0, 8, 20, 0.98) 0%, rgba(10, 18, 32, 0.96) 100%);
	border-bottom: 2px solid;
	border-image: linear-gradient(90deg, var(--weber-color) 0%, var(--devtoolbox-color) 100%) 1;
	height: 80px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
	backdrop-filter: blur(10px);
}

/* Header - no animations on load */
.dual-brand-header::after {
	display: none;
}

/* Container for both brands */
.brand-container {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	width: 100%;
	position: relative;
	overflow: hidden;
	/* Mittige schräge Border als Übergang */
	/* Die Border ist 6px breit, diagonal, mit Gradient */
}

.brand-container::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 6px;
	height: 100%;
	transform: translateX(-50%);
	background: linear-gradient(180deg, var(--weber-color) 0%, var(--devtoolbox-color) 100%);
	background-size: 100% 200%;
	background-position: 0% 0%;
	animation: border-gradient-move 3s linear infinite alternate;
@keyframes border-gradient-move {
	0% {
		background-position: 0% 0%;
	}
	100% {
		background-position: 0% 100%;
	}
}
	box-shadow: 0 0 16px 2px rgba(74,144,226,0.18), 0 0 24px 2px rgba(0,255,136,0.12);
	z-index: 12;
	border-radius: 3px;
	pointer-events: none;
}

/* Individual brand links */
.brand-link {
	position: absolute;
	top: 0;
	height: 100%;
	display: flex;
	align-items: center;
	text-decoration: none;
	font-size: 1.8rem;
	font-weight: 800;
	letter-spacing: -0.5px;
	text-transform: uppercase;
	z-index: 10;
	padding: 0 3rem;
}

/* Weber on the left */
.brand-weber {
	left: 0;
	width: 60%;
	color: var(--weber-color);
	justify-content: flex-start;
	background: rgba(74,144,226,0.08);
	position: relative;
	overflow: hidden;
	opacity: 1;
	filter: none;
	transition: background 0.3s, box-shadow 0.3s;
	position: relative;
	/* clip-path entfernt, Schräge per ::after */
}

.brand-weber::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to bottom right, transparent 99%, var(--weber-color) 100%);
	transform: skewX(-1deg);
	z-index: 2;
	pointer-events: none;
}

.brand-weber.active {
	background: rgba(74,144,226,0.18);
	box-shadow: inset 0 0 60px rgba(74,144,226,0.3);
}


.brand-weber::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, 
		transparent 0%, 
		rgba(74,144,226,0.5) 50%, 
		transparent 100%);
	animation: sweepWeber 3s ease-in-out infinite;
	pointer-events: none;
	z-index: 1;
}

.brand-weber:not(.active)::before {
	display: none;
}

@keyframes sweepWeber {
	0% { left: -100%; }
	50% { left: 100%; }
	100% { left: 100%; }
}

/* DevToolBox on the right */
.brand-devtoolbox {
	right: 0;
	width: 60%;
	color: var(--devtoolbox-color);
	justify-content: flex-end;
	background: rgba(0,255,136,0.08);
	position: relative;
	overflow: hidden;
	opacity: 1;
	filter: none;
	transition: background 0.3s, box-shadow 0.3s;
	position: relative;
	/* clip-path entfernt, Schräge per ::after */
}

.brand-devtoolbox::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to bottom left, transparent 99%, var(--devtoolbox-color) 100%);
	transform: skewX(1deg);
	z-index: 2;
	pointer-events: none;
}

.brand-devtoolbox.active {
	background: rgba(0,255,136,0.18);
	box-shadow: inset 0 0 60px rgba(0,255,136,0.3);
}


.brand-devtoolbox::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, 
		transparent 0%, 
		rgba(0,255,136,0.5) 50%, 
		transparent 100%);
	animation: sweepDevToolBox 3s ease-in-out infinite;
	pointer-events: none;
	z-index: 1;
}

.brand-devtoolbox:not(.active)::before {
	display: none;
}

@keyframes sweepDevToolBox {
	0% { left: -100%; }
	50% { left: 100%; }
	100% { left: 100%; }
}

/* Hover effects disabled to avoid mid-line shading skew */
.brand-weber:hover,
.brand-weber.active:hover,
.brand-devtoolbox:hover,
.brand-devtoolbox.active:hover { background: inherit; }

/* Prevent layout shift on load */
.brand-weber,
.brand-devtoolbox {
	transform: none;
	backface-visibility: visible;
}

/* Responsive tuning for slant so diagonal always aligns nicely */
@media (max-width: 1024px) {
	:root { --slant: 16%; }
}
@media (max-width: 768px) {
	:root { --slant: 18%; }
}
@media (max-width: 560px) {
	:root { --slant: 21%; }
}

/* Language Switcher Styling */
.lang-switcher-fixed {
	position: fixed;
	top: 90px;
	right: 2rem;
	z-index: 999;
	display: flex;
	gap: 0.5rem;
	background: rgba(0, 8, 20, 0.9);
	padding: 0.5rem;
	border-radius: 8px;
	border: 1px solid var(--border);
	backdrop-filter: blur(10px);
}

.lang-btn {
	padding: 0.5rem 1rem;
	background: transparent;
	color: var(--text-secondary);
	border: 1px solid var(--border);
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
}

.lang-btn:hover {
	color: var(--devtoolbox-color);
	border-color: var(--devtoolbox-color);
	background: rgba(0,255,136,0.1);
	transform: translateY(-2px);
}

.lang-btn.active {
	background: var(--devtoolbox-color);
	color: #000;
	border-color: var(--devtoolbox-color);
}

/* Sub Navigation Styling */
.sub-nav {
	position: fixed;
	top: 80px;
	left: 0;
	right: 0;
	z-index: 999;
	background: rgba(0, 8, 20, 0.95);
	border-bottom: 1px solid var(--border);
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem;
	backdrop-filter: blur(10px);
}

.sub-nav-toggle { display: none; }

.sub-nav a {
	color: var(--text-secondary);
	text-decoration: none;
	padding: 0.5rem 1rem;
	border-radius: 4px;
}

.sub-nav a:hover {
	color: var(--accent);
	background: rgba(74,144,226,0.1);
}

.sub-nav a.active {
	color: var(--accent);
	font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 768px) {
	.dual-brand-header {
		height: 65px;
	}
	
	.dual-brand-header::after {
		bottom: -30px;
		height: 30px;
	}
	
	.brand-link {
		font-size: 1rem;
		padding: 0 1.5rem;
		letter-spacing: -0.3px;
	}
	
	.brand-weber {
		width: 50%;
	}
	
	.brand-devtoolbox {
		width: 50%;
	}
	
	.brand-weber:hover,
	.brand-devtoolbox:hover { width: 50%; }
	
	.brand-separator {
		width: 2px;
	}
	
	.lang-switcher-fixed {
		/* Move language switcher to bottom-right on mobile to avoid overlap */
		top: auto;
		right: 1rem;
		bottom: calc(1rem + env(safe-area-inset-bottom));
		padding: 0.4rem;
	}
	
	.lang-btn {
		padding: 0.4rem 0.7rem;
		font-size: 0.75rem;
	}

	/* Mobile sub-nav: off-canvas drawer (default) */
	.sub-nav:not(.dropdown) {
		top: calc(65px + env(safe-area-inset-top)); /* align with reduced header height + safe area */
		bottom: 0;
		left: 0;
		right: auto;
		width: 80vw;
		max-width: 360px;
		padding: 0.75rem;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		overflow-y: auto;
		border-right: 1px solid var(--border);
		border-bottom: none;
		transform: translateX(-110%);
		will-change: transform;
		box-shadow: 8px 0 30px rgba(0,0,0,0.35);
		z-index: 1002; /* above backdrop */
		display: flex;
	}
	.sub-nav.open:not(.dropdown) { transform: translateX(0); }
	.sub-nav a { white-space: nowrap; width: 100%; }

	/* Mobile sub-nav: centered dropdown variant */
	.sub-nav.dropdown {
		top: calc(65px + env(safe-area-inset-top) + var(--menu-gap-md) + 48px); /* header + gap + button */
		left: 1rem;
		right: 1rem;
		width: auto;
		max-height: 60vh;
		padding: 0.5rem;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch; /* iOS momentum */
		overscroll-behavior: contain; /* prevent background scroll */
		border: 1px solid var(--border);
		border-radius: 10px;
		box-shadow: 0 18px 45px rgba(0,0,0,0.45);
		/* No animations */
		transform-origin: top center;
		transform: translateY(0);
		opacity: 0;
		pointer-events: none;
		display: block;
		/* clip-path entfernt, rechteckig */
	}
	.sub-nav.dropdown.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
	.sub-nav.dropdown a { padding: 0.9rem 1rem; font-size: 1rem; min-height: 44px; display: block; }
	.sub-nav.dropdown a + a { border-top: 1px solid var(--border); }

	/* dimmed backdrop under drawer */
	.nav-backdrop {
		position: fixed;
		top: 0;
		left: 0; right: 0; bottom: 0;
		background: rgba(0,0,0,0.5);
		opacity: 0;
		pointer-events: none;
		z-index: 1001;
	}
	.nav-backdrop.show { opacity: 1; pointer-events: auto; }

	/* Burger toggle button */
	.sub-nav-toggle {
		position: fixed;
		top: calc(65px + env(safe-area-inset-top) + var(--menu-gap-md));
		left: 50%;
		transform: translateX(-50%);
		z-index: 1003;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 0.6rem;
		padding: 0 0.75rem;
		width: min(720px, calc(100% - 2rem));
		height: 52px; /* larger touch target */
		border-radius: 12px; /* separated button: uniform radius */
		/* glass + gradient border */
		background:
			linear-gradient(rgba(0, 8, 20, 0.86), rgba(0, 8, 20, 0.86)) padding-box,
			linear-gradient(90deg, var(--weber-color), var(--devtoolbox-color)) border-box;
		border: 1px solid transparent;
		color: var(--text-secondary);
		cursor: pointer;
		backdrop-filter: blur(10px);
		touch-action: manipulation;
		-webkit-tap-highlight-color: transparent;
		user-select: none;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255,255,255,0.02);
		font-weight: 700;
		letter-spacing: 0.2px;
	}
	.sub-nav-toggle:hover { color: var(--text); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4); }
	.sub-nav-toggle:active { transform: translateX(-50%); }
	.sub-nav-toggle[aria-expanded="true"] {
		color: var(--text);
		background:
			linear-gradient(rgba(5, 18, 36, 0.95), rgba(5, 18, 36, 0.95)) padding-box,
			linear-gradient(90deg, var(--weber-color), var(--devtoolbox-color)) border-box;
	}

/* unified spacing applied via variables; brand-specific overrides can adjust --menu-gap-md if needed */

	/* visible label + caret indicator */
	.sub-nav-toggle::before {
		content: attr(data-label);
		color: currentColor;
		font-size: 1rem;
	}
	.sub-nav-toggle::after {
		content: "▾";
		margin-left: 0.5rem;
		font-size: 1rem;
	}
	.sub-nav-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
}

@media (max-width: 480px) {
	.dual-brand-header {
		height: 55px;
	}
	
	.dual-brand-header::after {
		bottom: -25px;
		height: 25px;
	}
	
	.brand-link {
		font-size: 0.75rem;
		padding: 0 1rem;
		letter-spacing: 0;
	}
	
	.brand-weber {
		width: 50%;
	}
	
	.brand-devtoolbox {
		width: 50%;
	}
	
	.lang-switcher-fixed {
		top: auto;
		right: 0.5rem;
		bottom: calc(0.75rem + env(safe-area-inset-bottom));
		padding: 0.3rem;
		gap: 0.3rem;
	}
	
	.lang-btn {
		padding: 0.3rem 0.5rem;
		font-size: 0.7rem;
	}
	
	.sub-nav:not(.dropdown) { top: calc(55px + env(safe-area-inset-top)); width: 82vw; max-width: 340px; }
	.sub-nav.dropdown { top: calc(55px + env(safe-area-inset-top) + var(--menu-gap-sm) + 44px); }
	.nav-backdrop { top: 0; }
	.sub-nav a {
		padding: 0.6rem 0.8rem;
		font-size: 0.95rem;
	}
	.sub-nav-toggle { top: calc(55px + env(safe-area-inset-top) + var(--menu-gap-sm)); width: min(720px, calc(100% - 1.5rem)); height: 52px; border-radius: 12px; }
/* brand-specific overrides can adjust --menu-gap-sm if needed */
}

/* Touchscreen enhancements for coarse pointers */
/* Global responsive typography for Weber pages (safe, brand-scoped) */
@media (max-width: 768px) {
	body.weber h1,
	body.weber h2,
	body.weber h3 {
		overflow-wrap: anywhere;
		text-wrap: balance;
	}
	body.weber h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); line-height: 1.1; }
	body.weber h2 { font-size: clamp(1.25rem, 5.6vw, 1.75rem); line-height: 1.2; }
	body.weber h3 { font-size: clamp(1.05rem, 4.8vw, 1.25rem); line-height: 1.25; }
}
@media (max-width: 420px) {
	body.weber h1 { font-size: clamp(1.6rem, 8vw, 2.1rem); }
}
@media (pointer: coarse) and (max-width: 768px) {
	.sub-nav.dropdown a { padding: 1rem 1.1rem; font-size: 1.05rem; min-height: 48px; }
}

/* Reduce accidental text selection on nav */
.sub-nav a, .sub-nav-toggle { -webkit-tap-highlight-color: transparent; }

/* Focus visibility for accessibility */
.sub-nav a:focus-visible, .sub-nav-toggle:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	.sub-nav:not(.dropdown),
	.sub-nav.dropdown,
	.nav-backdrop,
	.sub-nav-toggle {
		transition: none !important;
		animation: none !important;
	}
	.sub-nav.dropdown.open a { animation: none !important; }
}

/* Global responsive typography and content spacing helpers */
@media (max-width: 768px) {
	h1 { font-size: clamp(1.4rem, 4.2vw + 0.6rem, 2rem); line-height: 1.15; }
	h2 { font-size: clamp(1.2rem, 3.8vw + 0.5rem, 1.6rem); line-height: 1.2; }
	h3 { font-size: clamp(1rem, 3.2vw + 0.4rem, 1.25rem); line-height: 1.3; }
	p, li { font-size: clamp(0.95rem, 2.6vw + 0.35rem, 1.05rem); }
	/* Ensure page content starts below header + button on mobile */
	main, .tool-container, .tutorial-content {
		margin-top: calc(65px + env(safe-area-inset-top) + var(--menu-gap-md) + 48px + 16px) !important;
	}
}

@media (max-width: 480px) {
	main, .tool-container, .tutorial-content {
		margin-top: calc(55px + env(safe-area-inset-top) + var(--menu-gap-sm) + 44px + 12px) !important;
	}
}

@keyframes menuItemIn {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: translateY(0); }
}
