/*
 * Sprachumschalter in der Navigation.
 * Optik wie die Header-Buttons (.btn-ghost) und das Mega-Menü (Glas, Blur, roter Akzent).
 */
.lang-switch { position: relative; display: none; }
@media (min-width: 768px) { .lang-switch { display: block; } }

.lang-switch-btn {
	display: inline-flex; align-items: center; gap: 0.5rem;
	padding: 0.75rem 1rem; border-radius: 9999px;
	font-family: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1.15; letter-spacing: 0.04em;
	color: #fff; background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.22);
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.lang-switch-btn:hover,
.lang-switch-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.4); }
.lang-switch-btn:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 3px; }
.lang-switch-globe { opacity: 0.8; }
.lang-switch-btn[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }

.lang-switch-menu {
	/* bündig unter der Kopfzeile (5 rem hoch, Button mittig), wie das Mega-Menü */
	position: absolute; top: calc(50% + 2.5rem); right: 0; z-index: 70;
	min-width: 12.5rem; margin: 0; padding: 0.5rem; list-style: none;
	/* wie das Mega-Menü (.nav-megapanel): gleiche Glasfläche, roter Haarstrich oben */
	background: rgba(3, 38, 86, 0.72);
	backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%);
	border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 0 0 1.125rem 1.125rem; border-top: 0; overflow: hidden;
	box-shadow: 0 28px 56px -34px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
	opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden;
	transition: opacity 0.22s cubic-bezier(.2, .8, .2, 1), transform 0.22s cubic-bezier(.2, .8, .2, 1), visibility 0s linear 0.22s;
}
.lang-switch-menu::before {
	content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; pointer-events: none;
	background: linear-gradient(90deg, transparent 10%, rgba(191, 33, 76, 0.45) 50%, transparent 90%);
}
.lang-switch.is-open .lang-switch-menu {
	opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible;
	transition-delay: 0s;
}

.lang-switch-link {
	display: flex; align-items: center; gap: 0.875rem;
	padding: 0.65rem 0.875rem; border-radius: 0.75rem;
	font-size: 0.9375rem; color: rgba(255, 255, 255, 0.78); text-decoration: none;
	transition: background-color 0.18s, color 0.18s;
}
.lang-switch-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.lang-switch-link:focus-visible { outline: 2px solid var(--brand-red); outline-offset: -2px; }
.lang-switch-link-code {
	min-width: 1.75rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.45);
}
.lang-switch-link.is-current { color: #fff; }
.lang-switch-link.is-current .lang-switch-link-code { color: var(--brand-red); }
.lang-switch-link.is-current::after {
	content: ''; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--brand-red);
}

/* Mobiles Menü: Sprachen als Pillen-Zeile */
.m-lang { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.m-lang-link {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 3rem; padding: 0.55rem 0.9rem; border-radius: 9999px;
	font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.75); text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.18);
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.m-lang-link:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.m-lang-link.is-current { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }

@media (prefers-reduced-motion: reduce) {
	.lang-switch-menu, .lang-switch-btn, .lang-switch-link { transition: none; }
}

/* Zwischen 1280 und 1439 px ist die Kopfzeile eng: Umschalter und Navigation etwas kompakter. */
@media (min-width: 1280px) and (max-width: 1439px) {
	.lang-switch-globe { display: none; }
	.lang-switch-btn { padding: 0.75rem 0.9rem; }
	header [data-nav] { gap: 1.1rem; }
	header .btn.text-sm { padding-inline: 0.9rem; font-size: 0.8125rem; }
	header .nav-trigger, header .nav-link { font-size: 0.8125rem; }
}
