/* DEGENER Zeitstrahl */

/* Fira Sans Condensed Bold – lokal ausgeliefert (SIL Open Font License, siehe fonts/OFL.txt) */
@font-face {
	font-family: "DGZ Fira Sans Condensed";
	src: url("fonts/fira-sans-condensed-700-latin.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	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: "DGZ Fira Sans Condensed";
	src: url("fonts/fira-sans-condensed-700-latin-ext.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	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;
}

.dgz {
	--dgz-akzent: #f0b93f;
	--dgz-text: #1d1d1b;
	--dgz-linie: #c4c4c4;
	--dgz-kreis-rand: #9d9d9d;
	--dgz-sichtbar: 4;
	--dgz-n: var(--dgz-sichtbar);

	/* Geometrie der Leiste: Linie läuft exakt durch die Kreismitte */
	--dgz-label-h: 1.35rem;
	--dgz-abstand: 0.55rem;
	--dgz-kreis: 20px;

	/* Schriftgröße der Meldung (Freitext); Datum und Thema skalieren proportional mit */
	--dgz-text-groesse: 19px;
	--dgz-freitext-groesse: 19px;

	color: var(--dgz-text);
	margin: 2rem 0;
}

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

/* ---------- Kopfzeile ---------- */

.dgz-kopf {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	font-weight: 700;
	font-size: 1.15rem;
	margin-bottom: 2.25rem;
}

/* ---------- Zeitstrahl ---------- */

.dgz-leiste {
	position: relative;
	margin: 0;
	padding: 0 0 0.75rem;
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: var(--dgz-linie) transparent;
	-webkit-overflow-scrolling: touch;
}

.dgz-leiste::-webkit-scrollbar { height: 6px; }
.dgz-leiste::-webkit-scrollbar-thumb { background: var(--dgz-linie); border-radius: 3px; }

/* Etwas weniger als 1/n Breite, damit der nächste Eintrag angeschnitten sichtbar ist
   und klar wird, dass man weiter scrollen kann. */
.dgz-punkt {
	position: relative;
	flex: 0 0 calc(100% / (var(--dgz-n) + 0.12));
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
}

/* Theme-Listen-/Zählerstile neutralisieren */
.dgz .dgz-punkt::before,
.dgz .dgz-punkt::after,
.dgz .dgz-punkt button::before,
.dgz .dgz-punkt button::after {
	content: none !important;
	display: none !important;
}

.dgz-leiste,
.dgz-punkt {
	counter-reset: none;
	counter-increment: none;
}

.dgz-punkt-linie {
	position: absolute;
	top: calc(var(--dgz-label-h) + var(--dgz-abstand) + var(--dgz-kreis) / 2);
	left: 0;
	right: 0;
	height: 1px;
	background: var(--dgz-linie);
}

.dgz-punkt:first-child .dgz-punkt-linie { left: 50%; }
.dgz-punkt:last-child .dgz-punkt-linie  { right: 50%; }
.dgz-punkt:only-child .dgz-punkt-linie  { display: none; }

.dgz-punkt button {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--dgz-abstand);
	width: 100%;
	margin: 0;
	padding: 0 0.4rem 0.25rem;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	font: inherit;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.dgz-punkt button:hover,
.dgz-punkt button:focus {
	background: none;
	color: inherit;
}

.dgz-punkt button:focus-visible {
	outline: 2px solid var(--dgz-akzent);
	outline-offset: 2px;
}

.dgz-punkt-datum {
	height: var(--dgz-label-h);
	line-height: var(--dgz-label-h);
	font-size: 0.95rem;
	font-weight: 500;
	text-transform: uppercase;
	white-space: nowrap;
}

.dgz-punkt-kreis {
	position: relative;
	z-index: 1;
	width: var(--dgz-kreis);
	height: var(--dgz-kreis);
	border: 1.5px solid var(--dgz-kreis-rand);
	border-radius: 50%;
	background: #fff;
	transition: background-color 0.2s, border-color 0.2s;
}

.dgz-punkt-thema {
	font-size: 0.95rem;
	line-height: 1.3;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.dgz-punkt button:hover .dgz-punkt-kreis {
	border-color: var(--dgz-akzent);
}

.dgz-punkt.is-aktiv .dgz-punkt-kreis {
	background: var(--dgz-akzent);
	border-color: var(--dgz-akzent);
}

.dgz-punkt.is-aktiv .dgz-punkt-datum,
.dgz-punkt.is-aktiv .dgz-punkt-thema {
	font-weight: 700;
}

/* ---------- Vor / Zurück ---------- */

.dgz-nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 2.25rem 0 2.75rem;
}

.dgz-nav-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin: 0;
	padding: 0.25rem 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-size: 1.2rem;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.dgz-nav-btn:hover,
.dgz-nav-btn:focus {
	background: none;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.dgz-nav-btn:focus-visible {
	outline: 2px solid var(--dgz-akzent);
	outline-offset: 2px;
}

.dgz-nav-btn[disabled] {
	opacity: 0.3;
	cursor: default;
	text-decoration: none;
}

/* ---------- Meldung ---------- */

.dgz-meldung {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	animation: dgz-ein 0.3s ease-out;
}

.dgz-meldung[hidden] {
	display: none;
}

.dgz-meldung.ohne-bild {
	grid-template-columns: minmax(0, 1fr);
}

.dgz-meldung-bild img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.dgz-meldung-text {
	font-size: var(--dgz-text-groesse);
}

.dgz-datum {
	display: flex;
	align-items: flex-start;
	gap: 0.9em;
	margin-bottom: 1.6em;
}

.dgz-tag {
	font-size: 3.6em;
	font-weight: 800;
	line-height: 0.82;
	letter-spacing: -0.01em;
}

.dgz-monat-jahr {
	display: flex;
	flex-direction: column;
	font-size: 0.9em;
	font-weight: 700;
	line-height: 1.45;
	text-transform: uppercase;
}

.dgz .dgz-meldung .dgz-thema {
	display: block;
	margin: 0 0 0.6em !important;
	padding: 0 !important;
	color: var(--dgz-ueberschrift-farbe, var(--dgz-text)) !important;
	font-family: "DGZ Fira Sans Condensed", "Fira Sans Condensed", "Fira Sans", sans-serif !important;
	font-size: 1.4em !important;
	font-weight: 700 !important;
	font-style: normal !important;
	line-height: 1.2 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
}

.dgz-inhalt {
	font-size: var(--dgz-freitext-groesse);
	line-height: 1.55;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.dgz-inhalt > :first-child { margin-top: 0; }
.dgz-inhalt > :last-child  { margin-bottom: 0; }

.dgz .dgz-inhalt p,
.dgz .dgz-inhalt li {
	font-size: inherit !important;
	line-height: inherit !important;
}

.dgz-inhalt p {
	margin: 0 0 0.9em;
}

.dgz .dgz-inhalt a,
.dgz .dgz-inhalt a:hover,
.dgz .dgz-inhalt a:focus,
.dgz .dgz-inhalt a:visited {
	color: inherit;
	font-style: italic !important;
	text-decoration: none !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
	background-image: none !important;
	overflow-wrap: anywhere;
}

/* Pro Eintrag abschaltbare Silbentrennung im Freitext */
.dgz .dgz-ohne-trennung .dgz-inhalt,
.dgz .dgz-ohne-trennung .dgz-inhalt * {
	-webkit-hyphens: manual !important;
	hyphens: manual !important;
}

/* Separater Link unter dem Freitext: fett und unterstrichen */
.dgz .dgz-meldung .dgz-link {
	margin: 0.9em 0 0 !important;
	padding: 0 !important;
	font-size: var(--dgz-freitext-groesse) !important;
	line-height: 1.55 !important;
}

.dgz .dgz-meldung .dgz-link a,
.dgz .dgz-meldung .dgz-link a:hover,
.dgz .dgz-meldung .dgz-link a:focus,
.dgz .dgz-meldung .dgz-link a:visited {
	color: inherit !important;
	font-weight: 700 !important;
	font-style: normal !important;
	text-decoration: underline !important;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	border-bottom: 0 !important;
	box-shadow: none !important;
	background-image: none !important;
}

.dgz .dgz-meldung .dgz-link a:focus-visible {
	outline: 2px solid var(--dgz-akzent);
	outline-offset: 2px;
}

@keyframes dgz-ein {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

/* ---------- Responsiv ---------- */

@media (max-width: 960px) {
	.dgz { --dgz-n: min(var(--dgz-sichtbar), 3); }
}

@media (max-width: 680px) {
	.dgz { --dgz-n: min(var(--dgz-sichtbar), 2); }

	.dgz-kopf { font-size: 1rem; margin-bottom: 1.5rem; }

	.dgz-punkt-datum,
	.dgz-punkt-thema { font-size: 0.875rem; }

	.dgz-nav { margin: 1.5rem 0 2rem; }
	.dgz-nav-btn { font-size: 1rem; }

	.dgz-meldung {
		grid-template-columns: minmax(0, 1fr);
	}

	.dgz { --dgz-text-groesse: 17px; --dgz-freitext-groesse: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	.dgz-leiste { scroll-behavior: auto; }
	.dgz-meldung { animation: none; }
	.dgz-punkt-kreis { transition: none; }
}
