/* =========================================================================
   vhs-Lernportal Demo − Seitenstil

   Die Farbwerte sind aus einem Screenshot der echten Seite abgenommen und
   deshalb Annäherungen. Liegen die offiziellen Markenfarben vor, müssen nur
   die Variablen in :root ersetzt werden.
   ========================================================================= */

:root {
	--blau: #1a6cb0;
	--blau-dunkel: #135890;
	--blau-tief: #0f3f6b;
	--navy: #123f6e;
	--gelb: #f9c200;
	--gelb-dunkel: #e0af00;
	--leiste: #dde5ef;
	--karte: #e7eef7;
	--flaeche: #ffffff;
	--text: #1d2b3a;
	--text-leise: #4a5c6e;
	--rand: #cfdce9;

	--punkt-hell: #8fc0e8;
	--punkt-gelb: #ffcc00;
	--punkt-orange: #f39200;
	--punkt-rot: #e2001a;

	--bahn-breite: 1180px;
	--radius: 6px;

	--schrift: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--flaeche);
	color: var(--text);
	font-family: var(--schrift);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/*
   Wichtig: Grundregeln für Text sind bewusst auf #inhalt eingegrenzt und
   stehen nicht als blosse Element-Selektoren da.
   Das Chat-Widget rendert intern ein <main class="chat-layout"> samt <h1> und
   <p>; eine Regel wie "main { padding: ... }" landet sonst mitten im
   Chat-Fenster. :where() hält die Spezifität bei null, damit die Klassen
   weiter unten ohne !important gewinnen.
*/
:where(#inhalt) :where(h1, h2, h3) {
	color: var(--navy);
	line-height: 1.25;
	margin: 0 0 0.5em;
}

:where(#inhalt) p {
	margin: 0 0 1em;
}

:where(#inhalt) a {
	color: var(--blau-dunkel);
}

.bahn {
	width: 100%;
	max-width: var(--bahn-breite);
	margin-inline: auto;
	padding-inline: 16px;
}

.visuell-versteckt {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: var(--navy);
	color: #fff;
	padding: 0.7rem 1.1rem;
	border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
	left: 0;
}

:where(a, button, select, [tabindex]):focus-visible {
	outline: 3px solid var(--punkt-orange);
	outline-offset: 2px;
}

/* --- Hinweisstreifen ---------------------------------------------------- */

.demo-hinweis {
	margin: 0;
	padding: 0.45rem 16px;
	background: var(--blau-tief);
	color: #d8e7f5;
	font-size: 0.8rem;
	text-align: center;
	letter-spacing: 0.01em;
}

/* --- Kopfbereich -------------------------------------------------------- */

.kopf {
	position: relative;
	background: var(--blau);
	overflow: hidden;
}

.kopf::after {
	content: '';
	position: absolute;
	inset: -60% 0 -60% 55%;
	background:
		radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.09) 0 38%, transparent 39%),
		radial-gradient(circle at 62% 45%, rgba(255, 255, 255, 0.07) 0 30%, transparent 31%);
	pointer-events: none;
}

.kopf-inhalt {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 96px;
	flex-wrap: wrap;
	padding-block: 0.75rem;
}

.logo {
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.logo-wort {
	color: #fff;
	font-size: 2.6rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
}

.logo-punkte {
	position: relative;
	width: 34px;
	height: 34px;
	align-self: flex-end;
	margin-bottom: 0.15rem;
}

.punkt {
	position: absolute;
	border-radius: 50%;
	display: block;
}

.punkt-hell {
	width: 13px;
	height: 13px;
	left: 0;
	top: 2px;
	background: var(--punkt-hell);
}

.punkt-gelb {
	width: 9px;
	height: 9px;
	left: 16px;
	top: 0;
	background: var(--punkt-gelb);
}

.punkt-orange {
	width: 11px;
	height: 11px;
	left: 20px;
	top: 12px;
	background: var(--punkt-orange);
}

.punkt-rot {
	width: 14px;
	height: 14px;
	left: 3px;
	top: 18px;
	background: var(--punkt-rot);
}

.logo-trenner {
	width: 1px;
	height: 42px;
	background: rgba(255, 255, 255, 0.55);
	margin-inline: 0.5rem;
}

.logo-zusatz {
	color: #fff;
	font-size: 1.5rem;
	font-weight: 400;
}

.kopf-rechts {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.sprachwahl {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: #fff;
	border-radius: 999px;
	padding: 0.35rem 0.9rem 0.35rem 0.75rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.sprachwahl-globus {
	width: 24px;
	height: 24px;
	flex: none;
	fill: none;
	stroke: var(--blau);
	stroke-width: 1.7;
}

.sprachwahl select {
	border: 0;
	background: transparent;
	font: inherit;
	color: var(--text);
	padding-right: 0.5rem;
	min-width: 9rem;
	cursor: pointer;
}

.login {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: #fff;
	font-size: 1.15rem;
	text-decoration: none;
}

.login:hover {
	text-decoration: underline;
}

.login svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* --- Werkzeugleiste ----------------------------------------------------- */

.werkzeugleiste {
	background: var(--leiste);
	border-bottom: 1px solid #cdd8e4;
}

.werkzeugleiste-inhalt {
	display: flex;
	justify-content: flex-end;
	gap: 0.6rem;
	padding-block: 0.55rem;
}

.werkzeug {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid var(--blau);
	background: transparent;
	color: var(--blau);
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.werkzeug svg {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.werkzeug:hover {
	background: var(--blau);
	color: #fff;
}

.werkzeug-aktiv {
	background: var(--blau);
	color: #fff;
}

/* --- Inhalt ------------------------------------------------------------- */

#inhalt {
	padding-block: 2.6rem 3.5rem;
}

.seiten-titel {
	font-size: clamp(1.9rem, 4vw, 2.7rem);
	font-weight: 700;
	margin-bottom: 1.4rem;
}

.held {
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 2rem;
}

.held-bild {
	display: block;
	width: 100%;
	height: auto;
}

.held-worte text {
	fill: #fff;
	font-family: var(--schrift);
	font-size: 34px;
	font-weight: 600;
}

/* Zwei Karten wie auf der Startseite */

.karten-paar {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 1.5rem;
	margin-bottom: 3rem;
}

.karte {
	background: var(--karte);
	border-radius: var(--radius);
	padding: 1.6rem 1.8rem 1.4rem;
}

.karte-kopf {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.1rem;
}

.karte-symbol {
	width: 44px;
	height: 44px;
	flex: none;
	fill: none;
	stroke: var(--navy);
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.karte p {
	margin: 0;
	color: var(--text);
}

.knopf-gelb {
	display: inline-block;
	background: var(--gelb);
	color: var(--navy);
	font-weight: 700;
	font-size: 1.1rem;
	padding: 0.55rem 1.3rem;
	border-radius: var(--radius);
	text-decoration: none;
	border: 0;
	cursor: pointer;
}

.knopf-gelb:hover {
	background: var(--gelb-dunkel);
}

.knopf-blau {
	display: inline-block;
	background: var(--blau);
	color: #fff;
	font-weight: 600;
	font-size: 1.05rem;
	padding: 0.7rem 1.5rem;
	border-radius: var(--radius);
	border: 0;
	cursor: pointer;
}

.knopf-blau:hover {
	background: var(--blau-dunkel);
}

/* --- Assistenten-Abschnitt ---------------------------------------------- */

.assistent {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
	background: linear-gradient(180deg, #f4f8fc 0%, #eaf1f9 100%);
	border: 1px solid var(--rand);
	border-radius: var(--radius);
	padding: 2rem 2.2rem;
	margin-bottom: 3rem;
}

.marke {
	display: inline-block;
	background: var(--punkt-orange);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	margin-bottom: 0.9rem;
}

.assistent h2 {
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.assistent-einleitung {
	color: var(--text-leise);
	max-width: 54ch;
}

.beispiele {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.beispiel-knopf {
	background: #fff;
	border: 1px solid var(--rand);
	border-radius: 999px;
	color: var(--blau-dunkel);
	cursor: pointer;
	font: inherit;
	font-size: 0.95rem;
	padding: 0.5rem 1rem;
	text-align: left;
	transition: border-color 0.15s, background 0.15s;
}

.beispiel-knopf:hover {
	background: var(--blau);
	border-color: var(--blau);
	color: #fff;
}

.assistent-hinweis {
	margin-top: 1rem;
	color: #9c2b20;
	font-size: 0.95rem;
}

.assistent-fakten {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.9rem;
}

.assistent-fakten li {
	background: #fff;
	border-left: 4px solid var(--blau);
	border-radius: 0 var(--radius) var(--radius) 0;
	padding: 0.8rem 1rem;
	font-size: 0.95rem;
	color: var(--text-leise);
}

.assistent-fakten strong {
	display: block;
	color: var(--navy);
	font-size: 1rem;
	margin-bottom: 0.15rem;
}

/* --- Lernbereiche ------------------------------------------------------- */

.lernbereiche h2 {
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	margin-bottom: 1.2rem;
}

.bereich-gitter {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.2rem;
}

.bereich {
	background: var(--karte);
	border-radius: var(--radius);
	padding: 1.3rem 1.4rem;
}

.bereich h3 {
	font-size: 1.2rem;
	margin-bottom: 0.35rem;
}

.bereich p {
	margin: 0;
	font-size: 0.95rem;
	color: var(--text-leise);
}

.bereich-farbe {
	display: block;
	width: 46px;
	height: 6px;
	border-radius: 3px;
	margin-bottom: 0.9rem;
}

.farbe-rot {
	background: var(--punkt-rot);
}
.farbe-gruen {
	background: #4e9c3f;
}
.farbe-blau {
	background: var(--blau);
}
.farbe-orange {
	background: var(--punkt-orange);
}
.farbe-tuerkis {
	background: #1b9e8f;
}
.farbe-lila {
	background: #7b4d9e;
}

/* --- Vorlesefunktion ---------------------------------------------------- */

.vorlese-knopf {
	background: transparent;
	border: 0;
	color: var(--blau);
	cursor: pointer;
	padding: 0;
	margin-right: 0.45rem;
	vertical-align: baseline;
}

.vorlese-knopf svg {
	width: 0.85em;
	height: 0.85em;
	fill: currentColor;
	display: inline-block;
	vertical-align: baseline;
}

.vorlese-knopf[aria-pressed='true'] {
	color: var(--punkt-orange);
}

/* Ist die Vorlesefunktion abgeschaltet, verschwinden die kleinen Symbole. */
.vorlesen-aus .vorlese-knopf {
	display: none;
}

/* --- Fußbereich --------------------------------------------------------- */

.fuss {
	background: var(--blau-tief);
	color: #c8dcee;
	padding-block: 2rem;
}

.fuss-inhalt {
	display: grid;
	gap: 0.8rem;
}

.fuss-marke {
	color: #fff;
	font-size: 1.3rem;
	font-weight: 700;
	margin: 0;
}

.fuss-marke span {
	font-weight: 400;
	font-size: 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 999px;
	padding: 0.1rem 0.5rem;
	vertical-align: middle;
	margin-left: 0.4rem;
}

.fuss-links {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem;
}

.fuss-links a {
	color: #c8dcee;
	text-decoration: none;
}

.fuss-links a:hover {
	text-decoration: underline;
}

.fuss-notiz {
	margin: 0;
	font-size: 0.85rem;
	color: #9fbdd8;
	max-width: 70ch;
}

/* --- Chat-Widget -------------------------------------------------------- */

/*
   Gestaltung des @n8n/chat-Widgets über dessen CSS-Variablen.
   Die Namen stammen aus der Doku des Pakets und dürfen nicht abgewandelt werden.
*/
#n8n-chat {
	--chat--color--primary: var(--blau);
	--chat--color--primary-shade-50: var(--blau-dunkel);
	--chat--color--primary--shade-100: var(--blau-tief);
	--chat--color--secondary: var(--blau);
	--chat--color-secondary-shade-50: var(--blau-dunkel);
	--chat--color-light: #f2f6fb;
	--chat--color-light-shade-50: #e2eaf3;
	--chat--color-dark: var(--navy);

	--chat--font-family: var(--schrift);
	--chat--border-radius: 8px;

	--chat--window--width: 400px;
	--chat--window--height: 620px;
	--chat--window--border-radius: 12px;
	--chat--window--z-index: 9999;

	--chat--header--padding: 0.85rem 1rem;
	--chat--header--background: var(--navy);
	--chat--header--color: #ffffff;
	--chat--heading--font-size: 1.25em;
	--chat--subtitle--font-size: 0.9em;
	--chat--subtitle--line-height: 1.4;

	--chat--message--font-size: 1rem;
	--chat--message--bot--background: #ffffff;
	--chat--message--bot--color: var(--text);
	--chat--message--user--background: var(--blau);
	--chat--message--user--color: #ffffff;

	--chat--toggle--size: 62px;
	--chat--toggle--background: var(--blau);
	--chat--toggle--hover--background: var(--blau-dunkel);
	--chat--toggle--active--background: var(--blau-tief);
	--chat--toggle--color: #ffffff;

	--chat--body--background: #f2f6fb;
	--chat--footer--background: #f2f6fb;
	--chat--input--send--button--color: var(--blau);
	--chat--input--send--button--color-hover: var(--blau-dunkel);
}

/*
   Der Kopf des Chat-Fensters ist von Haus aus sehr hoch: er ist ein
   Flex-Container mit "gap: 1em", und Überschrift wie Unterzeile behalten die
   Standardabstände des Browsers (h1 hat 0.67em oben und unten). Beides wird
   hier zurückgenommen, damit mehr Platz für die Unterhaltung bleibt.
   Die ID-Selektoren sind nötig, um die Regeln des Widgets zu überschreiben.
*/
#n8n-chat .chat-header {
	gap: 0.35rem;
}

/* Gilt auch für die Unterzeile, falls im i18n-Block wieder eine gesetzt wird. */
#n8n-chat .chat-header h1,
#n8n-chat .chat-header p {
	margin: 0;
}

/* --- Schmale Bildschirme ------------------------------------------------ */

@media (max-width: 900px) {
	.assistent {
		grid-template-columns: 1fr;
		gap: 1.6rem;
		padding: 1.5rem;
	}
}

@media (max-width: 640px) {
	body {
		font-size: 16px;
	}

	.kopf-inhalt {
		min-height: 0;
	}

	.kopf-rechts {
		gap: 1rem;
		width: 100%;
		justify-content: space-between;
	}

	.logo-wort {
		font-size: 2.1rem;
	}

	.logo-zusatz {
		font-size: 1.2rem;
	}

	.sprachwahl select {
		min-width: 6.5rem;
	}

	.held-worte text {
		font-size: 44px;
	}

	.karte {
		padding: 1.2rem;
	}

	#n8n-chat {
		--chat--window--width: calc(100vw - 2rem);
		--chat--window--height: min(70vh, 560px);
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
