/**
 * NTB Intranet – Shell (Tokens + Header/Nav/Footer/Hero).
 * Komponenten (.ntb-akl-*, .ntb-anm-*, …) bleiben in den Snippets.
 *
 * Merriweather: selbst gehostet (assets/fonts), keine Google Fonts im Frontend (DSGVO).
 */

@font-face {
	font-family: "Merriweather";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/merriweather-400-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Merriweather";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/merriweather-400-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Merriweather";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/merriweather-700-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Merriweather";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/merriweather-700-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--ntb-navy: #11325c;
	--ntb-red: #c22936;
	--ntb-primary: #5cb0de;
	--ntb-bg-page: #f4f6f8;
	--ntb-white: #ffffff;
	--ntb-border: #dfe4ea;
	--ntb-text: #1c1f23;
	--ntb-text-mid: #4a5568;
	--ntb-text-light: #8498ad;
	--ntb-info-bg: #d2ebf7;
	/* Gewünschte Breite der Inhaltsspalte (Text, Karten) – ohne Randabstand */
	--ntb-content-max: 1200px;
	/* Horizontales Innenpadding; mit border-box: Außenbreite = content-max + 2×dieses Padding */
	--ntb-content-pad-x: 40px;
	--ntb-layout-outer-max: calc(var(--ntb-content-max) + 2 * var(--ntb-content-pad-x));
	--ntb-hero-max: var(--ntb-layout-outer-max);
	--ntb-nav-height: 50px;
	--ntb-hero-height: 375px;
	--ntb-content-pad-y: 32px;
	--ntb-font-ui: Arial, Helvetica, sans-serif;
	--ntb-font-heading: "Merriweather", Georgia, "Times New Roman", serif;
	/* Überschriften: Desktop; unter 768px siehe @media (max-width: 767px) */
	--ntb-heading-h1: 34px;
	--ntb-heading-h2: 28px;
}

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

body {
	margin: 0;
	font-family: var(--ntb-font-ui);
	font-size: 16px;
	line-height: 1.5;
	color: var(--ntb-text);
	background: var(--ntb-white);
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--ntb-navy);
}

/* —— Site header —— */
.ntb-site-header {
	background: var(--ntb-white);
	position: relative;
	z-index: 20;
}

.ntb-header-inner {
	max-width: var(--ntb-layout-outer-max);
	margin: 0 auto;
	padding: 0 var(--ntb-content-pad-x);
}

.ntb-header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 58px;
	padding: 12px 0;
	border-bottom: 1px solid var(--ntb-border);
}

.ntb-logo {
	flex-shrink: 0;
	min-width: 0;
}

.ntb-logo a {
	display: block;
	line-height: 0;
}

.ntb-logo img {
	display: block;
	height: 42px;
	width: auto;
	max-width: none;
	max-height: 42px;
	object-fit: contain;
}

.ntb-header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

.ntb-header-user {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: none;
	background: transparent;
	padding: 4px 0;
	font: inherit;
	font-size: 12px;
	color: var(--ntb-text-mid);
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s;
}

.ntb-header-user__icon {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
	color: inherit;
}

.ntb-header-user__icon .ntb-icon {
	display: block;
}

.ntb-header-user:hover,
.ntb-header-user:focus-visible {
	color: var(--ntb-navy);
	outline: none;
	border-bottom: 1px solid var(--ntb-navy);
}

.ntb-btn-logout {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 14px;
	border-radius: 4px;
	border: 1px solid var(--ntb-border);
	background: transparent;
	font-family: var(--ntb-font-ui);
	font-size: 12px;
	color: var(--ntb-text);
	text-decoration: none;
	cursor: pointer;
}

.ntb-btn-logout:hover {
	border-color: var(--ntb-navy);
	color: var(--ntb-navy);
}

/* —— Profil-Dialog (Header „Meine Einstellungen“ + [ntb_mein_profil]) —— */
/* [hidden] muss sichtbar überschreiben: sonst bleibt display:flex aktiv → Dialog offen beim Laden */
.ntb-profile-modal[hidden] {
	display: none !important;
	visibility: hidden;
	pointer-events: none;
}

.ntb-profile-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	box-sizing: border-box;
	padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: visible;
	pointer-events: auto;
}

.ntb-profile-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	cursor: pointer;
}

.ntb-profile-modal__panel {
	position: relative;
	z-index: 1;
	width: min(520px, 100%);
	max-height: min(90vh, 880px);
	display: flex;
	flex-direction: column;
	background: var(--ntb-white);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(17, 50, 92, 0.18);
	overflow: hidden;
}

.ntb-profile-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-shrink: 0;
	padding: 14px 16px 12px;
	border-bottom: 1px solid var(--ntb-border);
	background: var(--ntb-white);
}

.ntb-profile-modal__title {
	margin: 0;
	font-family: var(--ntb-font-heading);
	font-size: 20px;
	font-weight: 700;
	color: var(--ntb-navy);
	line-height: 1.25;
}

.ntb-profile-modal__close {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: var(--ntb-navy);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ntb-profile-modal__close:hover {
	background: var(--ntb-bg-page);
}

.ntb-profile-modal__body {
	overflow: auto;
	padding: 16px;
	-webkit-overflow-scrolling: touch;
}

.ntb-profile-modal__body .ntb-mprofil-root > div {
	max-width: none;
	margin: 0 auto;
}

.ntb-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: var(--ntb-navy);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	box-shadow: none;
	appearance: none;
}

.ntb-nav-toggle span {
	display: block;
	font-size: 28px;
	line-height: 1;
}

.ntb-site-header .ntb-nav-toggle {
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
}

.ntb-nav-toggle:hover,
.ntb-nav-toggle:focus-visible {
	color: var(--ntb-navy);
}

.ntb-nav-toggle:focus-visible {
	outline: 2px solid var(--ntb-primary);
	outline-offset: 3px;
}

.ntb-nav-row {
	display: flex;
	align-items: stretch;
	flex-wrap: nowrap;
	min-height: var(--ntb-nav-height);
	background: var(--ntb-white);
}

.ntb-nav-row .ntb-menu {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ntb-nav-row .ntb-menu > li {
	margin: 0;
	padding: 0;
}

.ntb-nav-row .ntb-menu > li > a {
	display: flex;
	align-items: center;
	height: var(--ntb-nav-height);
	padding: 0 18px;
	border: none;
	border-bottom: 2.5px solid transparent;
	background: transparent;
	font-family: var(--ntb-font-ui);
	font-size: 14px;
	font-weight: 400;
	color: var(--ntb-text-mid);
	text-decoration: none;
	transition: color 0.2s, border-color 0.2s;
}

.ntb-nav-row .ntb-menu > li > a:hover,
.ntb-nav-row .ntb-menu > li > a:focus-visible {
	color: var(--ntb-navy);
}

.ntb-nav-row .ntb-menu > li.current-menu-item > a,
.ntb-nav-row .ntb-menu > li > a.ntb-nav-active {
	color: var(--ntb-navy);
	font-weight: 600;
	border-bottom-color: var(--ntb-navy);
}

/* —— Hero —— */
/* Desktop: gleiche Außenbreite wie Inhalt (.ntb-shell). Mobil: volle Viewport-Breite, siehe @media (max-width: 767px). Kein negatives margin: Hero liegt vollständig unter dem Header. */
.ntb-hero-wrap {
	max-width: var(--ntb-hero-max);
	margin: 0 auto;
	position: relative;
	z-index: 10;
	padding: 0 var(--ntb-content-pad-x);
}

/* Nur Bild + Overlay: position für „Zurück“-Button (nicht ganze Wrap-Höhe inkl. Intro) */
.ntb-hero-stage {
	position: relative;
	width: 100%;
}

.ntb-hero {
	width: 100%;
	height: var(--ntb-hero-height);
	background-size: cover;
	background-position: center;
	background-color: var(--ntb-border);
}

.ntb-hero-back {
	position: absolute;
	left: 16px;
	bottom: 20px;
	z-index: 15;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px 10px 14px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.9);
	color: var(--ntb-text);
	font-family: var(--ntb-font-ui);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 2px 12px rgba(17, 50, 92, 0.12);
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ntb-hero-back:hover {
	background: var(--ntb-white);
	color: var(--ntb-navy);
	box-shadow: 0 4px 16px rgba(17, 50, 92, 0.16);
}

.ntb-hero-back:focus-visible {
	outline: 2px solid var(--ntb-primary);
	outline-offset: 3px;
}

.ntb-hero-back__icon {
	display: flex;
	flex-shrink: 0;
	line-height: 0;
	color: var(--ntb-navy);
	opacity: 0.85;
}

.ntb-hero-back:hover .ntb-hero-back__icon {
	opacity: 1;
}

.ntb-hero-back__text {
	white-space: nowrap;
}

.ntb-hero-intro {
	max-width: 100%;
	margin: 0 auto;
	padding: 24px 0 48px;
	background: var(--ntb-white);
}

.ntb-hero-intro__meta-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 10px;
}

.ntb-hero-intro__meta {
	margin: 0;
	font-family: var(--ntb-font-ui);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--ntb-text-light);
}

/* wie Aktuelles-Karten (.ntb-akl-chip-*), damit Snippet-CSS nicht nötig ist */
.ntb-hero-intro__chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	border: 1px solid transparent;
	flex-shrink: 0;
}

.ntb-hero-intro__chip--post {
	background: #e8f4fb;
	color: #11325c;
	border-color: #c5dde9;
}

.ntb-hero-intro__chip--schulung {
	background: #ecfdf3;
	color: #166534;
	border-color: #bbf7d0;
}

.ntb-hero-intro__chip--event {
	background: #fff7ed;
	color: #9a3412;
	border-color: #fed7aa;
}

.ntb-hero-intro__chip--zukunft {
	background: #f3e8ff;
	color: #6b21a8;
	border-color: #e9d5ff;
}

/* Unsichtbarer Platzhalter: gleiche Außenmaße wie Chip, wenn keine Kategorie (kein sichtbarer Chip) */
.ntb-hero-intro__chip-slot {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	align-self: center;
	visibility: hidden;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	border: 1px solid transparent;
	box-sizing: border-box;
	min-width: 4.5rem;
	pointer-events: none;
}

.ntb-hero-intro h1 {
	font-family: var(--ntb-font-heading);
	font-size: var(--ntb-heading-h1);
	font-weight: 700;
	color: var(--ntb-navy);
	margin: 0 0 4px;
	line-height: 1.25;
}

.ntb-hero-intro p {
	margin: 0;
	font-size: 16px;
	color: var(--ntb-text-light);
}

/* —— Einzelbeitrag: 66/33 (Inhalt | Weitere Beiträge) —— */
.ntb-post-layout__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	column-gap: 64px;
	row-gap: 40px;
	align-items: start;
}

.ntb-post-layout__grid.ntb-post-layout__grid--single {
	grid-template-columns: 1fr;
}

.ntb-post-layout__main .ntb-hero-intro {
	padding-top: 8px;
	padding-bottom: 28px;
}

/* Event: Datum / Uhr / Ort unter Titel */
.ntb-event-intro h1 {
	margin-bottom: 10px;
}

/* Meta wie Anlass-Liste: abgerundete Rechtecke, hellblau, ohne Trennlinien */
.ntb-event-intro__meta-pills {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.ntb-event-intro__meta-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 8px;
	font-family: var(--ntb-font-ui);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.45;
	box-sizing: border-box;
	background: #e8f4fb;
	color: var(--ntb-navy);
	border: 0;
	max-width: 100%;
}

.ntb-event-intro__meta-pill-text {
	color: inherit;
}

.ntb-event-intro__meta-pill .ntb-event-intro__icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	color: var(--ntb-navy);
	opacity: 1;
}

.ntb-event-intro__rule {
	border: 0;
	border-top: 1px solid var(--ntb-border);
	margin: 20px 0 0;
}

.ntb-post-layout__aside {
	position: sticky;
	top: 16px;
}

.ntb-post-sidebar__anmeldung {
	margin-bottom: 32px;
	max-width: 100%;
}

.ntb-post-sidebar__anmeldung .ntb-anmeldung-wrap {
	max-width: 100%;
}

.ntb-post-sidebar__more {
	max-width: 100%;
}

.ntb-post-more__heading {
	font-family: var(--ntb-font-heading);
	font-size: 20px;
	font-weight: 700;
	color: var(--ntb-navy);
	margin: 0 0 16px;
	line-height: 1.3;
}

.ntb-post-more__list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Karte: Bild oben (Querformat, abgerundet), darunter Titelzeile mit Pfeil rechts, dann Meta */
.ntb-post-more__item {
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-decoration: none;
	color: inherit;
	padding: 0;
	border-radius: 0;
	transition: opacity 0.15s ease;
}

.ntb-post-more__item:hover {
	opacity: 0.88;
}

.ntb-post-more__item:focus-visible {
	outline: 2px solid var(--ntb-primary);
	outline-offset: 3px;
	border-radius: 4px;
}

.ntb-post-more__media {
	display: block;
	width: 100%;
	border-radius: 8px;
	overflow: hidden;
	background: var(--ntb-border);
	/* Etwas niedriger als 16:9, damit vier Karten kompakter wirken */
	aspect-ratio: 2 / 1;
	max-height: 168px;
}

.ntb-post-more__media .ntb-post-more__img,
.ntb-post-more__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ntb-post-more__img-fallback {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	background: linear-gradient(135deg, #e8eef4, #dfe8f0);
}

.ntb-post-more__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ntb-post-more__title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.ntb-post-more__title {
	font-family: var(--ntb-font-ui);
	font-size: 16px;
	font-weight: 700;
	color: var(--ntb-navy);
	line-height: 1.35;
	flex: 1;
	min-width: 0;
}

.ntb-post-more__arrow {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	line-height: 0;
	color: var(--ntb-navy);
	opacity: 0.8;
	margin-top: 1px;
}

.ntb-post-more__meta {
	font-family: var(--ntb-font-ui);
	font-size: 13px;
	color: var(--ntb-text-light);
	line-height: 1.4;
}

.ntb-post-more__empty {
	margin: 0;
	font-size: 14px;
	color: var(--ntb-text-light);
}

@media (max-width: 900px) {
	.ntb-post-layout__grid {
		grid-template-columns: 1fr;
		/* Eine Spalte: nur Zeilenabstand; etwas großzügiger als Desktop-row-gap, damit Sidebar klar getrennt wirkt */
		row-gap: 48px;
		column-gap: 28px;
	}

	/* Event mit Anmeldung: weniger Luft zwischen Fließtext und Anmeldungs-Spalte (Beiträge unverändert 48px) */
	.ntb-event-layout .ntb-post-layout__grid {
		row-gap: 24px;
	}

	.ntb-post-layout__aside {
		position: static;
		order: 3;
	}

	.ntb-post-layout__main {
		order: 1;
	}
}

/* —— Main shell —— */
.ntb-shell {
	max-width: var(--ntb-layout-outer-max);
	margin: 0 auto;
	padding: var(--ntb-content-pad-y) var(--ntb-content-pad-x) 60px;
}

.ntb-shell .entry-content {
	max-width: none;
	font-size: 16px;
	/* Gutenberg: Standard-Abstand zwischen Blöcken = 0 (Abstände im Editor setzen) */
	--wp--style--block-gap: 0;
}

/* Core-Layout: vertikaler Abstand zwischen aufeinanderfolgenden Blöcken (Core oft mit Preset) */
.ntb-shell .entry-content :where(.is-layout-flow) > * + *,
.ntb-shell .entry-content :where(.is-layout-constrained) > * + *,
.ntb-shell .entry-content :where(.is-layout-flex.is-vertical) > * + *,
.ntb-shell .entry-content :where(.is-layout-grid) > * + * {
	margin-block-start: 0 !important;
}

.ntb-shell .entry-content > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/*
 * Einzelbeitrag: wieder Abstände zwischen Gutenberg-Blöcken (ohne manuelles Spacing im Editor).
 * Seiten/Startseite bleiben bei block-gap 0 (feinere Steuerung über Shortcodes/Blöcke).
 */
.ntb-post-layout__main .entry-content {
	--wp--style--block-gap: 1.25rem;
}

.ntb-post-layout__main .entry-content :where(.is-layout-flow) > * + *,
.ntb-post-layout__main .entry-content :where(.is-layout-constrained) > * + *,
.ntb-post-layout__main .entry-content :where(.is-layout-flex.is-vertical) > * + *,
.ntb-post-layout__main .entry-content :where(.is-layout-grid) > * + * {
	margin-block-start: var(--wp--style--block-gap) !important;
}

.ntb-post-layout__main .entry-content > * + * {
	margin-block-start: var(--wp--style--block-gap);
}

.ntb-post-layout__main .entry-content h2 + p,
.ntb-post-layout__main .entry-content h2.wp-block-heading + p {
	margin-block-start: var(--wp--style--block-gap);
	margin-block-end: 0;
}

/*
 * Gutenberg „constrained“: Core setzt auf Kindelementen oft max-width + margin:auto
 * (Lesbreite). Steht die Seitenüberschrift (H1) davor als eigener Block, beginnt der
 * folgende Block weiter rechts → wirkt eingerückt. Mit NTB-Shell (eigene max-width)
 * flachen wir das auf volle Inhaltsbreite ab. „Volle Breite“-Blöcke bleiben ausgenommen.
 */
.ntb-shell .entry-content :where(.is-layout-constrained) > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/*
 * Primäre Seitenüberschrift: Startseite (`.ntb-welcome-title`), Beiträge, Events –
 * Größe über --ntb-heading-h1 (Desktop 34px, schmalere Viewports kleiner).
 */
.ntb-shell .entry-content h1,
.ntb-shell .entry-content h1.wp-block-heading,
.ntb-welcome-title {
	font-family: var(--ntb-font-heading);
	font-size: var(--ntb-heading-h1);
	font-weight: 700;
	color: var(--ntb-red);
	margin: 0;
	line-height: 1.25;
}

/*
 * Gutenberg: Core-Shortcode-Block setzt häufig Monospace auf dem Wrapper –
 * die *Ausgabe* von [ntb_datum_heute] etc. soll wie normaler Fließtext wirken.
 */
.ntb-shell .entry-content .wp-block-shortcode {
	font-family: var(--ntb-font-ui);
	font-size: 16px;
	line-height: 1.5;
	color: var(--ntb-text);
	white-space: normal;
}

/* Sektions-Überschriften im Seiteninhalt (z. B. „Aktuelles“) an Demo-Tokens */
.ntb-shell .entry-content h2,
.ntb-shell .entry-content h2.wp-block-heading {
	font-family: var(--ntb-font-heading);
	font-size: var(--ntb-heading-h2);
	font-weight: 700;
	color: var(--ntb-navy);
	line-height: 1.3;
	margin: 0;
}

.ntb-shell .entry-content > h2:first-child,
.ntb-shell .entry-content > h2.wp-block-heading:first-child {
	margin-top: 0;
}

.ntb-shell .entry-content h2 + p,
.ntb-shell .entry-content h2.wp-block-heading + p {
	font-size: 16px;
	color: var(--ntb-text-mid);
	margin: 0;
}

/* —— Footer —— */
.ntb-site-footer {
	margin-top: 100px;
	background: var(--ntb-navy);
	color: rgba(255, 255, 255, 0.5);
	padding: 24px 0;
	font-size: 12px;
}

.ntb-footer-inner {
	max-width: var(--ntb-layout-outer-max);
	margin: 0 auto;
	padding: 0 var(--ntb-content-pad-x);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}

.ntb-footer-copy {
	margin: 0;
}

.ntb-footer-legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	font-size: 12px;
}

.ntb-site-footer a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ntb-site-footer a:hover {
	color: #fff;
}

/* —— Login (team-login) —— */
.ntb-login-page {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	background-size: cover;
	background-position: center;
	padding: 24px 16px;
}

.ntb-login-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		160deg,
		rgba(0, 42, 82, 0.93) 0%,
		rgba(0, 59, 113, 0.88) 50%,
		rgba(10, 79, 140, 0.85) 100%
	);
}

.ntb-login-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 400px;
	background: var(--ntb-white);
	border-radius: 16px;
	padding: 44px 36px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.ntb-login-card .ntb-login-brand {
	text-align: center;
	margin-bottom: 32px;
}

.ntb-login-card .ntb-login-brand img {
	height: 56px;
	width: auto;
	margin: 0 auto;
	display: block;
}

.ntb-login-card .entry-content {
	font-size: 14px;
}

/* Login-Formular (Theme, ohne Elementor) */
.ntb-login-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
}

.ntb-login-field {
	margin: 0;
}

.ntb-login-field label {
	font-size: 12px;
	font-weight: 600;
	color: var(--ntb-text);
	display: block;
	margin-bottom: 5px;
}

.ntb-login-field input[type="text"],
.ntb-login-field input[type="email"],
.ntb-login-field input[type="password"] {
	width: 100%;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid var(--ntb-border);
	font-size: 14px;
	background: #fafbfc;
	font-family: var(--ntb-font-ui);
	box-sizing: border-box;
}

.ntb-login-remember {
	margin: 0;
	font-size: 13px;
	color: var(--ntb-text-mid);
}

.ntb-login-remember label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.ntb-login-submit {
	margin: 4px 0 0;
}

.ntb-login-submit button {
	width: 100%;
	padding: 12px;
	border-radius: 8px;
	border: none;
	background: var(--ntb-primary);
	color: var(--ntb-white);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 59, 113, 0.3);
	font-family: var(--ntb-font-ui);
}

.ntb-login-submit button:hover {
	filter: brightness(1.05);
}

.ntb-login-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 10px;
	text-align: center;
	font-size: 13px;
	margin: 18px 0 0;
	line-height: 1.45;
}

.ntb-login-links-sep {
	color: var(--ntb-text-light);
	user-select: none;
}

.ntb-login-links .ntb-login-register {
	color: var(--ntb-primary);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ntb-login-links .ntb-login-register:hover {
	filter: brightness(1.08);
}

.ntb-login-linkbtn {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: var(--ntb-primary);
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ntb-login-linkbtn:hover {
	filter: brightness(1.08);
}

.ntb-login-dialog {
	border: none;
	border-radius: 14px;
	padding: 0;
	max-width: calc(100vw - 32px);
	width: 400px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	font-family: var(--ntb-font-ui);
}

.ntb-login-dialog::backdrop {
	background: rgba(0, 42, 82, 0.5);
	backdrop-filter: blur(2px);
}

.ntb-login-dialog-inner {
	padding: 24px 22px 22px;
}

.ntb-login-dialog-title {
	margin: 0 0 10px;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--ntb-text);
}

.ntb-login-dialog-text {
	margin: 0 0 18px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ntb-text-mid);
}

.ntb-login-dialog-form {
	margin: 0;
}

.ntb-login-dialog-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	margin: 18px 0 0;
}

.ntb-login-dialog-cancel {
	padding: 10px 16px;
	border-radius: 8px;
	border: 1px solid var(--ntb-border);
	background: #fff;
	color: var(--ntb-text);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: var(--ntb-font-ui);
}

.ntb-login-dialog-submit {
	padding: 10px 16px;
	border-radius: 8px;
	border: none;
	background: var(--ntb-primary);
	color: var(--ntb-white);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: var(--ntb-font-ui);
	box-shadow: 0 2px 8px rgba(0, 59, 113, 0.25);
}

.ntb-login-dialog-submit:hover {
	filter: brightness(1.05);
}

/* Mobile nav overlay (Mockup: aktiver Punkt Navy-Pille, Abstand, Fuß: Abmelden + Meine Einstellungen) */
.ntb-mobile-nav-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 5999;
	border: none;
	padding: 0;
	margin: 0;
	background: rgba(17, 50, 92, 0.42);
	cursor: pointer;
}

.ntb-mobile-nav-backdrop.is-open {
	display: block;
}

.ntb-mobile-nav {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 6000;
	width: min(360px, 100vw);
	background: var(--ntb-white);
	box-shadow: -8px 0 32px rgba(17, 50, 92, 0.14);
	transform: translateX(100%);
	transition: transform 0.25s ease;
	display: flex;
	flex-direction: column;
	font-family: var(--ntb-font-ui);
	box-sizing: border-box;
	/* Mehr Luft oben: Daumenreichweite + Notch (Dynamic Island) */
	padding-top: max(28px, calc(12px + env(safe-area-inset-top, 0px)));
}

.ntb-mobile-nav.is-open {
	transform: translateX(0);
}

.ntb-mobile-nav__head {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 4px 12px 10px;
	flex-shrink: 0;
}

@media (max-width: 767px) {
	.ntb-mobile-nav.is-open {
		/* Platz oben wie Site-Header, damit erste Menülinks nicht unter dem fixierten × liegen */
		padding-top: calc(env(safe-area-inset-top, 0px) + 12px + 58px + 12px + 8px);
	}

	.ntb-mobile-nav.is-open .ntb-mobile-nav__head {
		height: 0;
		min-height: 0;
		padding: 0;
		margin: 0;
		overflow: visible;
		pointer-events: none;
	}

	.ntb-mobile-nav.is-open .ntb-mobile-nav__head-spacer {
		display: none;
	}

	.ntb-mobile-nav.is-open .ntb-mobile-nav__close {
		position: fixed;
		z-index: 6001;
		pointer-events: auto;
		/* Gleiche Ecke wie Hamburger (.ntb-header-inner seitlicher Abstand + vertikal wie .ntb-header-top) */
		top: calc(env(safe-area-inset-top, 0px) + 12px + max(0px, (58px - 48px) / 2));
		right: var(--ntb-content-pad-x);
	}
}

.ntb-mobile-nav__head-spacer {
	flex: 1;
}

.ntb-mobile-nav__close {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	border: none;
	background: transparent;
	color: var(--ntb-navy);
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
	box-shadow: none;
	appearance: none;
}

.ntb-mobile-nav__close:hover {
	background: transparent;
	opacity: 0.82;
}

.ntb-mobile-nav__close:focus-visible {
	outline: 2px solid var(--ntb-primary);
	outline-offset: 3px;
}

.ntb-mobile-nav__list {
	list-style: none;
	margin: 0;
	padding: 22px 20px 20px;
	flex: 1;
	overflow-y: auto;
}

.ntb-mobile-nav__list > li {
	margin: 0 0 6px;
}

.ntb-mobile-nav__list > li:last-child {
	margin-bottom: 0;
}

.ntb-mobile-nav__list a {
	display: block;
	width: 100%;
	text-align: left;
	padding: 16px 4px;
	border: none;
	background: transparent;
	color: var(--ntb-text-mid);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	box-sizing: border-box;
}

.ntb-mobile-nav__list a:hover,
.ntb-mobile-nav__list a:focus-visible {
	color: var(--ntb-navy);
	outline: none;
}

.ntb-mobile-nav__list .current-menu-item > a,
.ntb-mobile-nav__list a.ntb-nav-active {
	background: var(--ntb-navy);
	color: var(--ntb-white);
	font-weight: 700;
	border-radius: 10px;
	padding: 14px 16px;
	margin: 2px 0 4px;
}

.ntb-mobile-nav__foot {
	padding: 18px 20px max(22px, env(safe-area-inset-bottom));
	border-top: 1px solid var(--ntb-border);
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ntb-mobile-nav__foot .ntb-intranet-logout-link {
	width: 100%;
	box-sizing: border-box;
	justify-content: flex-start !important;
	padding: 12px 14px !important;
	border-radius: 10px !important;
	border: 1px solid var(--ntb-border) !important;
	background: var(--ntb-white) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	color: var(--ntb-text) !important;
}

.ntb-mobile-nav__logout-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid var(--ntb-border);
	background: var(--ntb-white);
	font-size: 15px;
	font-weight: 500;
	color: var(--ntb-text);
	text-decoration: none;
}

.ntb-mobile-nav__profile {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 4px;
	border: none;
	background: transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	color: var(--ntb-text-mid);
	text-align: left;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.35;
}

a.ntb-mobile-nav__profile {
	color: var(--ntb-text-mid);
}

.ntb-mobile-nav__profile:hover,
.ntb-mobile-nav__profile:focus-visible {
	color: var(--ntb-navy);
	outline: none;
}

.ntb-mobile-nav__profile-icon {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
	color: inherit;
	opacity: 0.92;
}

.ntb-mobile-nav__profile-icon .ntb-icon {
	display: block;
}

@media (max-width: 767px) {
	:root {
		--ntb-content-pad-x: 20px;
		--ntb-content-pad-y: 20px;
		--ntb-heading-h1: 28px;
		--ntb-heading-h2: 24px;
		--ntb-hero-height: 330px;
	}

	.ntb-logo img {
		height: 34px;
		max-height: 34px;
	}

	.ntb-header-actions--desktop {
		display: none;
	}

	.ntb-nav-toggle {
		display: inline-flex;
	}

	.ntb-nav-toggle span {
		font-size: 30px;
	}

	.ntb-nav-row--desktop {
		display: none;
	}

	.ntb-hero-wrap {
		margin-top: 0;
		max-width: none;
		width: 100%;
		padding-left: 0;
		padding-right: 0;
	}

	/* Intro im Hero-Wrap: seitlicher Rand wie Shell (Wrap hat auf Mobil kein horizontales Padding) */
	.ntb-hero-wrap > .ntb-hero-intro {
		padding-left: var(--ntb-content-pad-x);
		padding-right: var(--ntb-content-pad-x);
	}

	.ntb-hero-back {
		font-size: 13px;
		padding: 8px 14px 8px 10px;
		bottom: 14px;
		left: 20px;
	}

	.ntb-shell {
		padding: var(--ntb-content-pad-y) var(--ntb-content-pad-x);
	}
}

@media (min-width: 768px) {
	.ntb-mobile-nav,
	.ntb-mobile-nav-backdrop {
		display: none !important;
	}
}
