/* ================================================================
   SABTEC — Referenzen (nur diese Seite)
   ================================================================
   Alles, was mehrere Seiten teilen, steht in `assets/css/system.css`
   (.sub, .sec, .wrap, .chips, .fchip, .refband, .refx, .pill,
   .playbtn, .annot, .ctab, .btn). Hier stehen ausschlieszlich die
   Regeln, die es nur auf der Referenzenseite gibt:

   1. Filterleiste und Rasterzustaende
   2. Das Projekt-Pop-up (.rmodal) samt Bildstrecke

   Farben und Maszen kommen aus theme.json; es steht kein Farbwert
   als Zahl in dieser Datei.
   ================================================================ */

/* 1. Filterleiste und Raster ---------------------------------------- */

/* Der Frame setzt den Filterblock dichter unter das blaue Panel als
   der Standardrhythmus (112 px) es vorsieht. */
.refsec { padding-top: 28px; }

.reffilter {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 24px;
}
.reffilter .annot { margin-left: 6px; }

/* Gliederung des Filters (Nachtrag 18.08.2026) --------------------
   Vierzehn gleich aussehende Chips in drei Zeilen liesen nicht erkennen,
   dass es zwei unabhaengige Filter sind. Jede Gruppe traegt jetzt ihre
   Beschriftung links, die Trefferzahl steht rechts. */
.reffilter-zeile {
	display: flex;
	align-items: baseline;
	gap: 16px;
	flex-wrap: wrap;
}
.reffilter-zeile + .reffilter-zeile {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--line);
}
.reffilter-titel {
	flex: 0 0 132px;
	font-size: 11.5px;
	font-weight: 900;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--soft);
	padding-top: 9px;
}
.reffilter-zeile .chips { flex: 1 1 340px; }
.reftreffer {
	margin-left: auto;
	font-size: 13px;
	font-weight: 900;
	color: var(--blue);
	white-space: nowrap;
	padding-top: 9px;
}

@media (max-width: 760px) {
	.reffilter-titel { flex-basis: 100%; padding-top: 0; }
	.reftreffer { margin-left: 0; }
}

/* Die Chips sind Schaltflaechen, keine anklickbaren <span> — sonst waeren
   sie mit der Tastatur nicht erreichbar. Das Aussehen bleibt gleich. */
.fchip {
	font: inherit;
	font-weight: 700;
	font-size: 13.5px;
	line-height: 1.65;
	text-align: left;
	-webkit-appearance: none;
	appearance: none;
}

/* Kacheln: Sprung auf das zugehoerige Pop-up. */
.refx { cursor: pointer; }
.refx[hidden] { display: none; }
.refx .in h2 {
	font-size: 20px;
	font-weight: 900;
	line-height: 1.2;
}

.refempty {
	margin-top: 20px;
	font-size: 15px;
	color: var(--mut);
}
.refempty[hidden] { display: none; }

.refhinweis {
	margin-top: 24px;
	font-size: 13.5px;
	color: var(--mut);
}

/* 2. Projekt-Pop-up -------------------------------------------------- */
/* Kommentar #52: 900 px statt 560, Bildbereich bis 440 px, Textteil
   scrollt. Ohne JavaScript oeffnet `:target` das Pop-up, mit
   JavaScript setzt referenzen.js zusaetzlich `.show`. */

.rmodal {
	position: fixed;
	inset: 0;
	z-index: 210;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: var(--wp--preset--color--overlay);
	background: color-mix(in srgb, var(--wp--preset--color--overlay) 58%, transparent);
}
.rmodal:target,
.rmodal.show { display: flex; }

.rmodalin {
	background: var(--card);
	border-radius: var(--wp--custom--radius--overlay);
	max-width: 900px;
	width: 100%;
	max-height: 92vh;
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
}

/* Schlieszen ist hier eine Sprungmarke (damit es ohne JavaScript geht),
   deshalb ein <a> im Kleid der Schaltflaeche aus dem Designsystem. */
.rmodal .popx {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	text-decoration: none;
}

.rbild {
	position: relative;
	flex: none;
}

/* Traegt ein Projekt einen Film, steht er anstelle der Bildstrecke. Gleiche
   Hoehe wie diese, damit das Pop-up nicht springt (Nachtrag 18.08.2026). */
.rbild-video { background: var(--wp--custom--ui--flaeche-bild); }
.rbild-video .vidbox,
.rbild-video .vidplayer {
	height: min(52vh, 440px);
	width: 100%;
	object-fit: cover;
}

/* Bildstrecke als Schienen-Streifen: ohne JavaScript laesst sie sich
   wischen und mit den Pfeiltasten scrollen, mit JavaScript steuern die
   Pfeilknoepfe. Kein Zustand haengt an JavaScript. */
.rimg {
	display: flex;
	height: min(52vh, 440px);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	background: var(--wp--custom--ui--flaeche-bild);
	scrollbar-width: none;
}
.rimg::-webkit-scrollbar { display: none; }
.rslide {
	flex: 0 0 100%;
	scroll-snap-align: center;
	background-size: cover;
	background-position: center;
}

.rnav {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px;
	pointer-events: none;
}
.rnav[hidden] { display: none; }
.rnav button {
	pointer-events: auto;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	background: var(--wp--preset--color--white);
	background: color-mix(in srgb, var(--wp--preset--color--white) 94%, transparent);
	color: var(--ink);
	font-family: inherit;
	font-size: 22px;
	font-weight: 900;
	line-height: 1;
	cursor: pointer;
}

.rcount {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 14px;
	background: var(--wp--preset--color--overlay);
	background: color-mix(in srgb, var(--wp--preset--color--overlay) 78%, transparent);
	color: var(--wp--preset--color--white);
	font-size: 12px;
	font-weight: 900;
	border-radius: 30px;
	padding: 6px 14px;
}
.rcount[hidden] { display: none; }

.rbody {
	overflow: auto;
	padding: 30px 34px 34px;
}
.rbody h3 {
	font-size: 24px;
	font-weight: 900;
	letter-spacing: -0.5px;
}
.rmeta {
	display: flex;
	gap: 10px;
	margin: 14px 0 12px;
	flex-wrap: wrap;
}
.rmeta span {
	display: inline-block;
	background: var(--wp--custom--ui--flaeche-hell);
	color: var(--ink);
	border-radius: 30px;
	padding: 6px 14px;
	font-size: 12.5px;
	font-weight: 900;
}
.rmeta span.k {
	background: var(--blue);
	color: var(--wp--preset--color--white);
}
.rbody p {
	font-size: 14.5px;
	color: var(--mut);
}
.rbody .rhinweis {
	margin-top: 10px;
	font-size: 13.5px;
}
.rbody .rannot { margin-top: 12px; }
.rbody .btn {
	margin-top: 20px;
	padding: 13px 26px;
	font-size: 14px;
}

@media (max-width: 700px) {
	.rmodal { padding: 12px; }
	.rimg { height: min(38vh, 260px); }
	.rbody { padding: 24px 22px 26px; }
	.rbody h3 { font-size: 21px; }
}
