/**
 * DanubeHandwerk – gemeinsame Brand-Ebene (site-weit geladen).
 *
 * ZENTRALES DESIGN-SYSTEM: Alle Farb-, Radius- und Schriftgrößen-Tokens
 * werden HIER definiert; dh-portal.css und die Funnel-Styles konsumieren
 * sie. Änderungen an der Corporate Identity passieren nur in dieser Datei.
 *
 * Schrift: Inter (Google Fonts, Handle "dh-google-fonts"). DSGVO-Hinweis:
 * Der Abruf über die Google-API übermittelt Besucher-IPs an Google. Für
 * strikte Konformität die WOFF2-Dateien lokal in assets/fonts/ ablegen und
 * den Enqueue in danubehandwerk-funnel.php umstellen – alle Token bleiben.
 */

:root {
	/* Schrift */
	--dh-brand-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--dh-fs-base: 16px;
	--dh-fs-title: 1.7rem;
	--dh-fs-btn: 0.95rem;

	/* Farben (Nachtblau-System, identisch mit Funnel --df-*) */
	--dh-brand-accent: #4f9be0;
	--dh-brand-accent-strong: #7cbcf2;
	--dh-brand-accent-dark: #2d6faf;
	--dh-brand-ink: #1b2836;
	--dh-brand-night: #0c1626;
	--dh-brand-success: #3dae7d;
	--dh-brand-danger: #c04f4f;

	/* Radien (einheitlich für ALLE Module) */
	--dh-radius-lg: 16px;   /* Karten, Tabellen-Container, Panels   */
	--dh-radius: 10px;      /* Buttons, Inputs, Chips, Notices      */
	--dh-radius-pill: 999px;/* Badges, Zähler-Chips                 */

	/* Interaktionsflächen: Touch-Mindestgröße */
	--dh-tap-min: 48px;
}

body,
button,
input,
select,
textarea {
	font-family: var(--dh-brand-font);
}

/* Sicherheitsnetz gegen horizontales Scrollen auf Mobilgeräten.
 * `clip` statt `hidden`: erzeugt keinen Scroll-Container,
 * position:sticky im Theme funktioniert weiter. */
body {
	overflow-x: clip;
}

/* --- Text-Logo (Platzhalter, CSS-basiert) --- */

.dh-logo {
	align-items: center;
	display: inline-flex;
	gap: 0.55rem;
	line-height: 1;
	text-decoration: none;
	user-select: none;
}

.dh-logo-mark {
	align-items: center;
	background: linear-gradient(135deg, var(--dh-brand-accent) 0%, var(--dh-brand-accent-dark) 100%);
	border-radius: 9px;
	box-shadow: 0 2px 6px rgba(45, 111, 175, 0.35);
	color: #ffffff;
	display: inline-flex;
	font-size: 0.95rem;
	font-weight: 800;
	height: 2.1rem;
	justify-content: center;
	letter-spacing: 0.02em;
	width: 2.1rem;
}

.dh-logo-text {
	color: var(--dh-brand-ink);
	font-size: 1.25rem;
	font-weight: 500;
	letter-spacing: 0.01em;
}

.dh-logo-text strong {
	color: var(--dh-brand-accent-dark);
	font-weight: 800;
}

.dh-logo-img {
	display: inline-block;
	height: 2.4rem;
	width: auto;
}

/* SVG-Signet: Hammer im D-Zahnrad. Strichfarbe über currentColor,
 * Hammerkopf-Gold ist im SVG fest hinterlegt (#C9A54A). */
.dh-sitelogo {
	display: inline-flex;
	margin-right: 0.6rem;
	vertical-align: -0.62em;
}

.dh-sitelogo .dh-logo-svg {
	color: var(--dh-brand-night);
	height: 44px;
	width: 44px;
}

.dh-logo .dh-logo-svg {
	color: var(--dh-brand-night);
	flex: none;
	height: 48px;
	width: 48px;
}

/* =====================================================================
 * NAVIGATION: genau zwei Business-Buttons (Anfrage / Login-Portal).
 * Der Nachtblau-Look gilt auf allen Seiten, Touch-Fläche >= 44px.
 * =================================================================== */

.wp-block-navigation .dh-nav-cta a,
.wp-block-navigation .dh-nav-portal a {
	align-items: center;
	border-radius: var(--dh-radius);
	display: inline-flex;
	font-size: var(--dh-fs-btn);
	font-weight: 600;
	justify-content: center;
	min-height: 44px;
	padding: 0.5rem 1.25rem;
	text-decoration: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wp-block-navigation .dh-nav-cta a {
	background: var(--dh-brand-accent);
	color: #ffffff !important;
}

.wp-block-navigation .dh-nav-cta a:hover,
.wp-block-navigation .dh-nav-cta a:focus {
	background: var(--dh-brand-accent-dark);
}

.wp-block-navigation .dh-nav-portal a {
	border: 1.5px solid var(--dh-brand-accent);
	color: var(--dh-brand-accent-dark) !important;
}

.wp-block-navigation .dh-nav-portal a:hover,
.wp-block-navigation .dh-nav-portal a:focus {
	background: rgba(79, 155, 224, 0.12);
}

/* Im mobilen Overlay-Menü: Buttons in voller Breite. */
.wp-block-navigation__responsive-container.is-menu-open .dh-nav-cta a,
.wp-block-navigation__responsive-container.is-menu-open .dh-nav-portal a {
	justify-content: center;
	width: 100%;
}

/* =====================================================================
 * LANDINGPAGE-MODE (Funnel, page_id=7 – auch als Startseite):
 * kein Footer, keine ablenkende Navigation – aber Logo + LOGIN-Button
 * bleiben sichtbar. Der "Anfrage"-Button entfällt hier, denn die
 * Landingpage IST die Anfrage.
 * =================================================================== */

.page-id-7 .wp-block-navigation .dh-nav-cta {
	display: none;
}

.page-id-7 footer.wp-block-template-part {
	display: none;
}

/* Theme-Eigenwerbung gehört nicht zur Corporate Identity. */
footer.wp-block-template-part a[href*="wordpress.org"] {
	display: none;
}

footer.wp-block-template-part p:has(> a[href*="wordpress.org"]) {
	display: none;
}

/* Mehr Luft um den Seiteninhalt – "die Seite atmet". */
.wp-site-blocks > main {
	padding-bottom: 3rem;
	padding-top: 1rem;
}

/* =====================================================================
 * LOGIN-SEITE /login/: Standalone im Nachtblau – Theme-Header/-Footer
 * ausgeblendet, zentrierte Karte mit Logo. Keine WP-Standard-Elemente.
 * =================================================================== */

body.dh-login-page {
	background: linear-gradient(168deg, #0e1b2e 0%, #070d17 55%, #04070d 100%);
	min-height: 100vh;
}

.dh-login-page header.wp-block-template-part,
.dh-login-page footer.wp-block-template-part {
	display: none;
}

.dh-login-wrap {
	align-items: center;
	display: flex;
	justify-content: center;
	min-height: 88vh;
	padding: 2rem 1rem;
}

.dh-login-card {
	background: linear-gradient(168deg, #122036 0%, #0c1626 60%, #0a1322 100%);
	border: 1px solid rgba(148, 178, 209, 0.28);
	border-radius: var(--dh-radius-lg, 16px);
	box-shadow: 0 24px 60px rgba(2, 6, 12, 0.55);
	color: #eef3f9;
	max-width: 420px;
	padding: 2.5rem 2.25rem;
	width: 100%;
}

.dh-login-logo {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	margin: 0 0 1.5rem;
}

.dh-login-logo .dh-logo-svg {
	color: #eef3f9;
	height: 68px;
	width: 68px;
}

.dh-login-brand {
	color: #c2cfdd;
	font-size: 1.15rem;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.dh-login-brand strong {
	color: var(--dh-brand-accent-strong, #7cbcf2);
	font-weight: 800;
}

.dh-login-title {
	color: #ffffff;
	font-size: 1.4rem;
	font-weight: 700;
	margin: 0 0 0.3rem;
	text-align: center;
}

.dh-login-sub {
	color: #8fa3b8;
	font-size: 0.9rem;
	margin: 0 0 1.5rem;
	text-align: center;
}

.dh-login-error {
	background: rgba(224, 103, 103, 0.16);
	border: 2px solid #e06767;
	border-radius: var(--dh-radius, 10px);
	color: #ffb3b3;
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 1.25rem;
	padding: 0.85rem 1rem;
}

.dh-login-label {
	color: #8fa3b8;
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 1rem 0 0.4rem;
	text-transform: uppercase;
}

.dh-login-input {
	background: #0e1b2e;
	border: 2px solid rgba(148, 178, 209, 0.4);
	border-radius: var(--dh-radius, 10px);
	color: #ffffff;
	color-scheme: dark;
	font-size: 1.1rem;
	min-height: 54px;
	padding: 0.75rem 1rem;
	width: 100%;
}

.dh-login-input:focus {
	border-color: var(--dh-brand-accent, #4f9be0);
	box-shadow: 0 0 0 3px rgba(79, 155, 224, 0.35);
	outline: none;
}

.dh-login-remember {
	align-items: center;
	color: #c2cfdd;
	cursor: pointer;
	display: flex;
	font-size: 0.9rem;
	gap: 0.5rem;
	margin: 1.1rem 0 1.4rem;
}

.dh-login-remember input {
	accent-color: var(--dh-brand-accent, #4f9be0);
	height: 1.1rem;
	width: 1.1rem;
}

.dh-login-submit {
	background: var(--dh-brand-accent, #4f9be0);
	border: 0;
	border-radius: var(--dh-radius, 10px);
	color: #ffffff;
	cursor: pointer;
	display: block;
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	min-height: 56px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s ease;
	width: 100%;
}

.dh-login-submit:hover,
.dh-login-submit:focus {
	background: var(--dh-brand-accent-dark, #2d6faf);
	color: #ffffff;
}

.dh-login-links {
	margin: 1.4rem 0 0;
	text-align: center;
}

.dh-login-links a {
	color: #8fa3b8;
	font-size: 0.9rem;
	text-decoration: underline;
}

.dh-login-links a:hover {
	color: var(--dh-brand-accent-strong, #7cbcf2);
}

/* =====================================================================
 * SPRACH-UMSCHALTER: dezent, fix oben rechts, Mini-Flaggen (SVG).
 * =================================================================== */

.dh-lang-switch {
	align-items: center;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(6px);
	border: 1px solid rgba(27, 40, 54, 0.12);
	border-radius: var(--dh-radius-pill, 999px);
	box-shadow: 0 2px 10px rgba(2, 6, 12, 0.12);
	display: flex;
	gap: 0.25rem;
	padding: 0.3rem 0.45rem;
	position: fixed;
	right: 0.9rem;
	top: 0.9rem;
	z-index: 9990;
}

.admin-bar .dh-lang-switch {
	top: 42px;
}

.dh-lang {
	align-items: center;
	border-radius: var(--dh-radius-pill, 999px);
	display: inline-flex;
	line-height: 0;
	opacity: 0.45;
	padding: 0.3rem;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.dh-lang svg {
	border-radius: 3px;
	display: block;
	height: 14px;
	width: 20px;
}

.dh-lang:hover {
	opacity: 0.85;
	transform: scale(1.08);
}

.dh-lang.is-active {
	background: rgba(79, 155, 224, 0.16);
	opacity: 1;
}

/* Auf der dunklen Login-Seite: dunkle Pille. */
.dh-login-page .dh-lang-switch {
	background: rgba(18, 32, 54, 0.85);
	border-color: rgba(148, 178, 209, 0.28);
}

/* Erfolgs-Hinweis auf der Login-Seite (Passwort-Reset u. a.). */
.dh-login-success {
	background: rgba(61, 174, 125, 0.16);
	border: 2px solid #3dae7d;
	border-radius: var(--dh-radius, 10px);
	color: #7fe0b4;
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 1.25rem;
	padding: 0.85rem 1rem;
}

.dh-login-sep {
	color: #52657d;
	margin: 0 0.5rem;
}
