/*
 * Intent Brands Stellengenerator – Frontend
 * Farben kommen als CSS-Variablen, Schriften als eigene Regeln aus dem
 * Backend (Stellen → Design und Einstellungen). Hier nichts fest eintragen.
 * Ohne Schriftwahl bleibt die Schrift des Themes erhalten.
 */

/* Rückfallwerte – die Angaben aus dem Backend folgen danach und haben Vorrang. */
:root {
	--ibsp-primaer: #243b55;
	--ibsp-auf-primaer: #fff;
	--ibsp-akzent: #c9a04a;
	--ibsp-text: #333;
	--ibsp-hg: #f4f5f7;
	--ibsp-kasten: #fff;
}

.ibsp {
	--ibsp-linie: rgba(0, 0, 0, .1);
	color: var(--ibsp-text);
	line-height: 1.6;
	box-sizing: border-box;
}
.ibsp *, .ibsp *::before, .ibsp *::after { box-sizing: inherit; }

.ibsp h1, .ibsp h2, .ibsp h3 {
	color: var(--ibsp-text);
	letter-spacing: normal;
	text-transform: none;
}

/* ---------- Buttons ---------- */

.ibsp .ibsp-knopf {
	display: inline-block;
	padding: .8em 1.6em;
	border: 1px solid var(--ibsp-primaer);
	border-radius: 2px;
	background: var(--ibsp-primaer);
	color: var(--ibsp-auf-primaer);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: filter .15s, background-color .15s, color .15s;
}
.ibsp .ibsp-knopf:hover,
.ibsp .ibsp-knopf:focus-visible { filter: brightness(1.15); color: var(--ibsp-auf-primaer); }
.ibsp .ibsp-knopf:focus-visible { outline: 2px solid var(--ibsp-akzent); outline-offset: 2px; }

.ibsp .ibsp-knopf--rahmen {
	background: transparent;
	color: var(--ibsp-text);
	font-weight: 400;
}
.ibsp .ibsp-knopf--rahmen:hover,
.ibsp .ibsp-knopf--rahmen:focus-visible {
	filter: none;
	background: var(--ibsp-primaer);
	color: var(--ibsp-auf-primaer);
}

/* ---------- Jobliste [stellenportal-intentbrands] ---------- */

.ibsp-liste { margin: 0 0 1.5em; }

.ibsp-zeile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 22px 0;
	border-bottom: 1px solid var(--ibsp-linie);
}
.ibsp .ibsp-zeile__titel {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
}
.ibsp .ibsp-zeile__titel a { color: inherit; text-decoration: none; }
.ibsp .ibsp-zeile__titel a:hover { color: var(--ibsp-primaer); }
.ibsp .ibsp-zeile__ort { margin: 0; font-size: 13px; opacity: .7; }
.ibsp-zeile .ibsp-knopf { flex-shrink: 0; min-width: 170px; text-align: center; }

.ibsp-leer { margin: 1em 0; }

@media (max-width: 640px) {
	.ibsp-zeile { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ---------- Stellenseite ---------- */

.ibsp-stelle {
	background: var(--ibsp-hg);
	/* --ibsp-menue: Höhe einer festen Theme-Menüleiste, fest eingetragen in den Einstellungen (sonst misst frontend.js). */
	padding: calc(40px + var(--ibsp-menue, 0px)) 16px 64px;
}
.ibsp-rahmen { max-width: 960px; margin: 0 auto; }

.ibsp-kasten {
	background: var(--ibsp-kasten);
	border: 1px solid var(--ibsp-linie);
	border-radius: 4px;
	padding: 32px 40px;
	margin: 0 0 20px;
}

.ibsp-kopf__logo {
	display: block;
	width: auto;
	max-width: 180px;
	max-height: 64px;
	margin: 0 0 20px;
}
.ibsp .ibsp-kopf__titel {
	margin: 0 0 10px;
	font-size: clamp(24px, 3.4vw, 32px);
	font-weight: 700;
	line-height: 1.25;
}

.ibsp .ibsp-eckdaten {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
	font-size: 14px;
}
.ibsp .ibsp-eckdaten li { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.ibsp .ibsp-eckdaten li::before { content: none; }
.ibsp-icon { flex-shrink: 0; color: var(--ibsp-akzent); }

.ibsp-abgelaufen {
	margin: 0;
	padding: 12px 16px;
	border-left: 4px solid #b32d2e;
	background: #fcf0f1;
	color: #8a2424;
}

.ibsp-bild { margin: 0 0 20px; }
.ibsp-bild img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: cover;
	border-radius: 4px;
}

.ibsp .ibsp-block h2 {
	margin: 0 0 16px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
}
.ibsp-inhalt > :first-child { margin-top: 0; }
.ibsp-inhalt > :last-child { margin-bottom: 0; }
.ibsp-inhalt p { margin: 0 0 1em; }
.ibsp-inhalt a { color: var(--ibsp-akzent); }

/*
 * Aufzählungen: Viele Themes setzen Listen zurück (list-style: none, padding: 0)
 * oder zeichnen eigene Punkte per ::before. Deshalb hier mit hoher Spezifität
 * und !important die normalen Punkte und Nummern wiederherstellen.
 */
.ibsp .ibsp-inhalt ul,
.ibsp .ibsp-inhalt ol {
	display: block;
	margin: 0 0 1em !important;
	padding: 0 0 0 1.5em !important;
	list-style-position: outside !important;
}
.ibsp .ibsp-inhalt ul { list-style-type: disc !important; }
.ibsp .ibsp-inhalt ol { list-style-type: decimal !important; }
.ibsp .ibsp-inhalt ul ul { list-style-type: circle !important; margin: .35em 0 0 !important; }
.ibsp .ibsp-inhalt ol ol { list-style-type: lower-alpha !important; margin: .35em 0 0 !important; }
.ibsp .ibsp-inhalt li {
	display: list-item !important;
	list-style: inherit;
	margin: 0 0 .35em;
	padding: 0 0 0 .2em;
	background: none;
}
.ibsp .ibsp-inhalt li::before { content: none !important; display: none !important; }
.ibsp .ibsp-inhalt li::marker { color: var(--ibsp-text); }

.ibsp-fuss {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-top: 28px;
}

/* ---------- Mitlaufende Leiste ---------- */

.ibsp-leiste {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background: var(--ibsp-kasten);
	border-bottom: 1px solid var(--ibsp-linie);
	box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
	transform: translateY(-110%);
	visibility: hidden;
	transition: transform .25s ease, visibility 0s linear .25s;
}
.ibsp-leiste.ist-sichtbar {
	transform: none;
	visibility: visible;
	transition: transform .25s ease;
}
.admin-bar .ibsp-leiste { top: 32px; }
@media (max-width: 782px) { .admin-bar .ibsp-leiste { top: 46px; } }

.ibsp-leiste__innen {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 16px;
}
.ibsp-leiste__logo { width: auto; max-width: 110px; max-height: 40px; flex-shrink: 0; }
.ibsp-leiste__text { flex: 1; min-width: 0; text-align: center; }
.ibsp .ibsp-leiste__titel {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ibsp .ibsp-eckdaten--klein { justify-content: center; margin: 2px 0 0; font-size: 12px; gap: 2px 16px; }
.ibsp-eckdaten--klein .ibsp-icon { width: 13px; height: 13px; }

@media (max-width: 700px) {
	.ibsp-kasten { padding: 24px 20px; }
	.ibsp-stelle { padding-top: calc(20px + var(--ibsp-menue, 0px)); }
	.ibsp-leiste__logo, .ibsp-eckdaten--klein { display: none; }
	.ibsp-leiste__text { text-align: left; }
	.ibsp-leiste .ibsp-knopf { padding: .7em 1em; font-size: 12px; }
	.ibsp-fuss { flex-direction: column-reverse; align-items: stretch; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.ibsp-leiste, .ibsp-leiste.ist-sichtbar { transition: none; }
}
