/* =====================================================================
   GfelliCMS 7.1 – Grundstyling der Elemente (Kern, wird bei Updates ersetzt)
   Wird VOR dem Projekt-Stylesheet (projekt/style.php) geladen. Alles hier
   kann dort übersteuert werden, für Farben genügen die Variablen:
   :root { --gf-akzent: #0A62A1; --gf-akzent-text: #fff; }
   Mobile First: Grundstil für kleine Bildschirme, Erweiterungen per min-width.
   ===================================================================== */

:root {
	--gf-akzent:       #1F5FA8;
	--gf-akzent-hover: #174A84;
	--gf-akzent-text:  #FFFFFF;
	--gf-linie:        #D9D9D9;
	--gf-flaeche:      #F5F6F7;
	--gf-text:         inherit;
	--gf-text-leise:   #666666;
	--gf-radius:       6px;
}

/* ---------- Raster der neuen Elemente (wie die bestehenden: 1/4 bis 1/1) ---------- */
.button_1-4, .button_1-3, .button_1-2, .button_1-1, .button_2-3, .button_3-4,
.downloadliste_1-4, .downloadliste_1-3, .downloadliste_1-2, .downloadliste_1-1, .downloadliste_2-3, .downloadliste_3-4,
.tabelle_1-4, .tabelle_1-3, .tabelle_1-2, .tabelle_1-1, .tabelle_2-3, .tabelle_3-4,
.bildslider_1-4, .bildslider_1-3, .bildslider_1-2, .bildslider_1-1, .bildslider_2-3, .bildslider_3-4 {
	width:          100%;
	min-width:      0;
	margin-bottom:  20px;
	box-sizing:     border-box;
}

@media screen and (min-width: 601px) {
	.button_1-4, .downloadliste_1-4, .tabelle_1-4, .bildslider_1-4 { width: calc(25% - 15px); }
	.button_1-3, .downloadliste_1-3, .tabelle_1-3, .bildslider_1-3 { width: calc(33.3% - 15px); }
	.button_1-2, .downloadliste_1-2, .tabelle_1-2, .bildslider_1-2 { width: calc(50% - 15px); }
	.button_2-3, .downloadliste_2-3, .tabelle_2-3, .bildslider_2-3 { width: calc(66.7% - 15px); }
	.button_3-4, .downloadliste_3-4, .tabelle_3-4, .bildslider_3-4 { width: calc(75% - 15px); }
}

/* ---------- Bilder mit WebP (picture) ---------- */
.gf_bild {
	display:    block;
	max-width:  100%;
}

.gf_bild img {
	display:    block;
	max-width:  100%;
	height:     auto;
}

/* ---------- Button ---------- */
.gf_button_wrap {
	display:    flex;
}

.gf_ausrichtung_links     { justify-content: flex-start; }
.gf_ausrichtung_zentriert { justify-content: center; }
.gf_ausrichtung_rechts    { justify-content: flex-end; }

/* :visited mitführen, sonst übersteuert «#content a:visited» aus dem Projekt-Stylesheet Farbe und Linie */
#content .gf_button, #content .gf_button:visited,
.gf_button, .gf_button:visited {
	display:          inline-flex;
	align-items:      center;
	justify-content:  center;
	box-sizing:       border-box;
	width:            100%;
	min-height:       48px;
	padding:          12px 22px;
	border:           2px solid var(--gf-akzent);
	border-radius:    var(--gf-radius);
	background:       var(--gf-akzent);
	color:            var(--gf-akzent-text);
	font-weight:      bold;
	line-height:      1.2;
	text-align:       center;
	text-decoration:  none;
	cursor:           pointer;
	transition:       background-color .15s ease, color .15s ease, border-color .15s ease;
}

#content .gf_button:hover, #content .gf_button:focus-visible,
.gf_button:hover, .gf_button:focus-visible {
	background:       var(--gf-akzent-hover);
	border-color:     var(--gf-akzent-hover);
	color:            var(--gf-akzent-text);
	border-bottom-style: solid;
}

#content .gf_button_neben, #content .gf_button_neben:visited,
.gf_button_neben, .gf_button_neben:visited {
	background:       transparent;
	color:            var(--gf-akzent);
}

#content .gf_button_neben:hover, #content .gf_button_neben:focus-visible,
.gf_button_neben:hover, .gf_button_neben:focus-visible {
	background:       var(--gf-akzent);
	color:            var(--gf-akzent-text);
}

.gf_button:focus-visible {
	outline:          3px solid var(--gf-akzent);
	outline-offset:   3px;
}

@media screen and (min-width: 601px) {
	#content .gf_button,
	.gf_button {
		width:        auto;
	}
}

/* ---------- Download-Liste ---------- */
.gf_downloads_titel {
	margin:           0 0 10px 0;
	font-weight:      bold;
}

.gf_downloads_liste {
	list-style:       none;
	margin:           0;
	padding:          0;
	border-top:       1px solid var(--gf-linie);
}

.gf_downloads_liste li {
	margin:           0;
	padding:          0;
	border-bottom:    1px solid var(--gf-linie);
}

#content .gf_download, #content .gf_download:visited,
.gf_download, .gf_download:visited {
	display:          flex;
	align-items:      center;
	gap:              12px;
	padding:          10px 4px;
	min-height:       44px;
	border-bottom:    0;
	color:            inherit;
	text-decoration:  none;
}

#content .gf_download:hover .gf_download_name,
.gf_download:hover .gf_download_name {
	text-decoration:  underline;
}

.gf_download_typ {
	flex:             0 0 auto;
	min-width:        42px;
	padding:          4px 6px;
	border-radius:    4px;
	background:       var(--gf-akzent);
	color:            var(--gf-akzent-text);
	font-size:        11px;
	font-weight:      bold;
	letter-spacing:   .04em;
	text-align:       center;
}

.gf_download_text {
	display:          flex;
	flex-direction:   column;
	min-width:        0;
}

.gf_download_name {
	color:            var(--gf-akzent);
	overflow-wrap:    anywhere;
}

.gf_download_info {
	color:            var(--gf-text-leise);
	font-size:        .85em;
}

/* ---------- Tabelle ---------- */
.gf_tabelle_scroll {
	max-width:        100%;
	overflow-x:       auto;
	-webkit-overflow-scrolling: touch;
	/* Schatten am Rand zeigen an, dass es seitlich weitergeht */
	background:
		linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left center,
		linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right center,
		radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .18), rgba(0, 0, 0, 0)) left center,
		radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .18), rgba(0, 0, 0, 0)) right center;
	background-repeat: no-repeat;
	background-size:  40px 100%, 40px 100%, 14px 100%, 14px 100%;
	background-attachment: local, local, scroll, scroll;
}

.gf_tabelle_scroll:focus-visible {
	outline:          2px solid var(--gf-akzent);
	outline-offset:   2px;
}

.gf_tabelle {
	width:            100%;
	border-collapse:  collapse;
	font-size:        .95em;
}

.gf_tabelle th,
.gf_tabelle td {
	padding:          8px 12px;
	border-bottom:    1px solid var(--gf-linie);
	text-align:       left;
	vertical-align:   top;
}

.gf_tabelle thead th {
	border-bottom:    2px solid var(--gf-akzent);
	white-space:      nowrap;
}

.gf_tabelle tbody th {
	font-weight:      bold;
}

/* Seitlich wischen: erste Spalte bleibt stehen */
.gf_tabelle:not(.gf_tabelle_liste) th:first-child {
	position:         sticky;
	left:             0;
	z-index:          1;
	background:       #fff;
}

/* Als Liste: unter 600 px jede Zeile als Karte */
@media screen and (max-width: 600px) {
	.gf_tabelle_liste thead {
		position:     absolute;
		width:        1px;
		height:       1px;
		overflow:     hidden;
		clip:         rect(0 0 0 0);
		white-space:  nowrap;
	}
	.gf_tabelle_liste,
	.gf_tabelle_liste tbody,
	.gf_tabelle_liste tr,
	.gf_tabelle_liste th,
	.gf_tabelle_liste td {
		display:      block;
		width:        100%;
		box-sizing:   border-box;
	}
	.gf_tabelle_liste tr {
		margin-bottom: 12px;
		border:       1px solid var(--gf-linie);
		border-radius: var(--gf-radius);
		overflow:     hidden;
	}
	.gf_tabelle_liste tbody th {
		background:   var(--gf-flaeche);
	}
	.gf_tabelle_liste td {
		display:      flex;
		gap:          12px;
		justify-content: space-between;
	}
	.gf_tabelle_liste tr > :last-child {
		border-bottom: 0;
	}
	.gf_tabelle_liste td[data-label]::before {
		content:      attr(data-label);
		flex:         0 0 40%;
		font-weight:  bold;
		color:        var(--gf-text-leise);
	}
	.gf_tabelle_liste th[data-label]::before {
		content:      attr(data-label) ": ";
		font-weight:  normal;
		color:        var(--gf-text-leise);
	}
}

/* ---------- Bildslider ---------- */
.gf_slider {
	position:         relative;
}

.gf_slider_spur {
	display:          flex;
	overflow-x:       auto;
	scroll-snap-type: x mandatory;
	scroll-behavior:  smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width:  none;
	border-radius:    var(--gf-radius);
}

.gf_slider_spur::-webkit-scrollbar {
	display:          none;
}

.gf_slider_spur:focus-visible {
	outline:          3px solid var(--gf-akzent);
	outline-offset:   3px;
}

.gf_slide {
	flex:             0 0 100%;
	margin:           0;
	scroll-snap-align: start;
	position:         relative;
}

#content .gf_slide a, #content .gf_slide a:visited,
.gf_slide a, .gf_slide a:visited {
	display:          block;
	border-bottom:    0;
}

.gf_slide .gf_bild,
.gf_slide img {
	width:            100%;
	aspect-ratio:     3 / 2;
	object-fit:       cover;
}

.gf_slide figcaption {
	padding:          8px 2px 0 2px;
	color:            var(--gf-text-leise);
	font-size:        .9em;
}

.gf_slider_pfeil {
	position:         absolute;
	top:              calc(50% - 22px);
	width:            44px;
	height:           44px;
	padding:          0;
	border:           0;
	border-radius:    50%;
	background:       rgba(0, 0, 0, .5);
	color:            #fff;
	font-size:        24px;
	line-height:      44px;
	cursor:           pointer;
	z-index:          2;
}

.gf_slider_pfeil:hover,
.gf_slider_pfeil:focus-visible {
	background:       rgba(0, 0, 0, .75);
}

.gf_slider_pfeil:disabled {
	opacity:          .3;
	cursor:           default;
}

.gf_slider_zurueck { left: 8px; }
.gf_slider_weiter  { right: 8px; }

.gf_slider_punkte {
	display:          flex;
	justify-content:  center;
	gap:              4px;
	margin-top:       8px;
}

.gf_slider_punkt {
	width:            24px;
	height:           24px;
	padding:          0;
	border:           0;
	background:       transparent;
	cursor:           pointer;
}

.gf_slider_punkt::before {
	content:          "";
	display:          block;
	width:            10px;
	height:           10px;
	margin:           7px;
	border-radius:    50%;
	background:       var(--gf-linie);
}

.gf_slider_punkt[aria-current="true"]::before {
	background:       var(--gf-akzent);
}

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

/* ---------- Vorschau (nur für angemeldete Benutzer) ---------- */
.gf_vorschau_hinweis {
	position:         sticky;
	top:              0;
	z-index:          1000;
	display:          flex;
	flex-wrap:        wrap;
	align-items:      center;
	justify-content:  center;
	gap:              4px 16px;
	padding:          8px 16px;
	background:       #A55F00;
	color:            #fff;
	font:             14px/1.4 system-ui, sans-serif;
	text-align:       center;
}

.gf_vorschau_hinweis a,
.gf_vorschau_hinweis a:visited {
	padding:          4px 12px;
	border:           1px solid #fff;
	border-radius:    999px;
	color:            #fff;
	text-decoration:  none;
	white-space:      nowrap;
}

.gf_vorschau_hinweis a:hover,
.gf_vorschau_hinweis a:focus-visible {
	background:       #fff;
	color:            #A55F00;
}

.gf_vorschau_versteckt {
	position:         relative;
	outline:          2px dashed #A55F00;
	outline-offset:   4px;
	opacity:          .65;
}

.gf_vorschau_versteckt::before {
	content:          attr(data-gf-status);
	position:         absolute;
	top:              -12px;
	left:             0;
	z-index:          5;
	padding:          1px 8px;
	border-radius:    3px;
	background:       #A55F00;
	color:            #fff;
	font:             12px/1.5 system-ui, sans-serif;
}
