/* Einzelbeitrag (News) – geladen nur von single.php */

/* Lesebreite: Text ca. 70 Zeichen pro Zeile */
.single-post #main-content .container {
	max-width: 760px;
	width: calc(100% - 48px);
}

.single-post #left-area {
	width: 100%;
	padding: 0;
	float: none;
}

.single-post #main-content .container:before {
	display: none;
}

.on-news-head {
	margin-bottom: 28px;
}

.on-news-head .entry-title {
	font-size: 34px;
	line-height: 1.25;
	padding-bottom: 8px;
}

.on-news-meta {
	font-size: 15px;
	color: var(--on-muted);
	margin: 0;
	padding: 0;
}

.on-news-single .entry-content {
	font-size: 17px;
	line-height: 1.7;
}

/* Kontakt-/Teilen-Block am Beitragsende */
.on-news-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 28px;
	margin: 48px 0 24px;
	padding: 28px 32px;
	background: var(--on-bg-light);
	border-top: 3px solid var(--on-green);
	border-radius: 6px;
	clear: both;
}

.on-news-cta-text p {
	margin: 0;
	padding: 0;
	color: var(--on-secondary);
}

.on-news-cta-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--on-heading) !important;
	margin-bottom: 4px !important;
}

.on-news-cta-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.on-news-cta .on-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 22px;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	font-family: inherit;
}

.on-news-cta .on-btn-outline {
	background: transparent;
	border: 2px solid var(--on-text);
	color: var(--on-text);
	padding: 9px 20px;
}

.on-news-cta .on-btn-outline:hover,
.on-news-cta .on-btn-outline[aria-expanded="true"] {
	background: var(--on-text);
	color: #fff;
}

.on-news-cta .on-arrow-ico {
	margin-left: 0;
	vertical-align: middle;
}

/* Teilen-Menü */
.on-share {
	position: relative;
}

.on-share-menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	z-index: 50;
	min-width: 200px;
	margin: 0;
	padding: 6px !important;
	list-style: none !important;
	background: #fff;
	border: 1px solid var(--on-border);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.on-share-menu li {
	list-style: none;
	padding: 0;
}

.on-share-menu a,
.on-share-menu button {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px 12px;
	font: inherit;
	font-size: 15px;
	color: var(--on-text);
	text-align: left;
	text-decoration: none;
	background: none;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

.on-share-menu a:hover,
.on-share-menu button:hover,
.on-share-menu a:focus-visible,
.on-share-menu button:focus-visible {
	background: var(--on-bg-light);
	color: var(--on-green);
}

.on-share-menu svg {
	flex: 0 0 auto;
	color: var(--on-muted2);
}

/* Navigation oben: ältere links, neuere rechts */
.on-news-pager {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--on-border-light);
	font-size: 14px;
}

.on-news-pager a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	max-width: 48%;
	color: var(--on-muted2);
	text-decoration: none;
	transition: color .15s;
}

.on-news-pager a.is-newer {
	margin-left: auto;
	text-align: right;
}

.on-news-pager a:hover,
.on-news-pager a:focus-visible {
	color: var(--on-green);
}

.on-np-label {
	font-weight: 600;
	color: var(--on-text);
}

.on-news-pager a:hover .on-np-label {
	color: var(--on-green);
}

.on-np-title {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Karten am Seitenende: älter | aktuell | neuer */
.on-news-next {
	margin: 56px 0 16px;
}

.on-news-next-title {
	font-size: 24px;
	margin: 0 0 20px !important;
}

.on-nn-track {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.on-nn-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px;
	border: 1px solid var(--on-border-light);
	border-radius: 8px;
	background: #fff;
	color: var(--on-text);
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}

a.on-nn-card:hover,
a.on-nn-card:focus-visible {
	border-color: var(--on-green);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
}

.on-nn-card.is-older { grid-column: 1; }
.on-nn-card.is-current { grid-column: 2; }
.on-nn-card.is-newer { grid-column: 3; }

.on-nn-card.is-current {
	background: var(--on-bg-light);
	border: 2px solid var(--on-green);
}

.on-nn-card img,
.on-nn-noimg {
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: 4px;
	background: var(--on-bg-light);
	display: block;
	margin-bottom: 4px;
}

.on-nn-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--on-muted2);
}

.on-nn-card.is-current .on-nn-label {
	color: var(--on-green);
}

a.on-nn-card:hover .on-nn-label,
a.on-nn-card:hover .on-nn-title {
	color: var(--on-green);
}

.on-nn-date {
	font-size: 13px;
	color: var(--on-muted);
}

.on-nn-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.on-nn-all {
	margin-top: 18px !important;
	text-align: right;
}

@media (max-width: 640px) {
	.on-np-title {
		display: none;
	}

	/* Wisch-Karussell: eine Karte plus Anschnitt der nächsten */
	.on-nn-track {
		display: flex;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 16px;
		margin: 0 -16px;
		padding: 4px 16px 12px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.on-nn-track::-webkit-scrollbar {
		display: none;
	}

	.on-nn-card {
		flex: 0 0 78%;
		scroll-snap-align: center;
	}

	.on-nn-all {
		text-align: left;
	}

	.single-post #main-content .container {
		width: calc(100% - 32px);
	}

	.on-news-head .entry-title {
		font-size: 26px;
	}

	.on-news-cta {
		padding: 22px 20px;
	}

	.on-news-cta-actions,
	.on-news-cta-actions .on-share,
	.on-news-cta .on-btn {
		width: 100%;
	}

	.on-news-cta .on-btn {
		justify-content: center;
	}

	.on-share-menu {
		left: 0;
		right: 0;
		min-width: 0;
	}
}
