/* Piazza Beitrags-Sidebar */
.pbs {
	--pbs-accent: #5b2a86;
	--pbs-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	margin: 0 0 1.5em;
	font-size: .95em;
	line-height: 1.55;
}
.pbs--box {
	padding: 18px 20px 6px;
	background: #faf9f7;
	border-top: 4px solid var(--pbs-accent);
	border-radius: 0 0 12px 12px;
}
.pbs .pbs__title {
	margin: 0 0 .7em;
	padding: 0;
	font-size: .78em;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-family: inherit;
	color: var(--pbs-accent);
	border: 0;
}
.pbs__content > :first-child { margin-top: 0; }
.pbs__content p { margin: 0 0 1em; }
.pbs__content h3, .pbs__content h4 {
	margin: 1em 0 .4em;
	font-family: var(--pbs-serif);
	font-size: 1.15em;
	line-height: 1.3;
}
.pbs .pbs__content img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; border-radius: 6px; }
/* Bilder immer linksbündig über die volle Breite – unabhängig von der Ausrichtung im Editor. */
.pbs .pbs__content .alignleft,
.pbs .pbs__content .alignright,
.pbs .pbs__content .aligncenter,
.pbs .pbs__content .alignnone { float: none; display: block; margin: 0 0 1em; text-align: left; }
.pbs .pbs__content p:has(> img:only-child),
.pbs .pbs__content p:has(> .pbs-zoom:only-child) { text-align: left; }
.pbs .pbs__content .wp-caption { width: 100% !important; max-width: 100%; margin: 0 0 1em; padding: 0; text-align: left; }
.pbs__content .wp-caption-text { margin: .4em 0 0; font-size: .82em; color: #6b6b6b; text-align: left; }
.pbs__content ul { margin: 0 0 1em; padding-left: 1.1em; }
.pbs__content li { margin: .25em 0; }
.pbs__content li::marker { color: var(--pbs-accent); }
.pbs__content a { color: var(--pbs-accent); }
.pbs__content blockquote {
	margin: 0 0 1em;
	padding: 0 0 0 .9em;
	border-left: 3px solid var(--pbs-accent);
	font-family: var(--pbs-serif);
	font-size: 1.1em;
	font-style: italic;
}

/* Akkordeon – gemeinsame Basis */
.pbs-acc + br { display: none; }
.pbs-acc { --pbs-accent: #5b2a86; margin: 0; }
.pbs-acc:not(:has(+ .pbs-acc)) { margin-bottom: 1.4em; }
.entry-content .pbs-acc { margin-top: 0; }

/* Stil «box» */
.pbs-acc--box { background: #fff; border: 1px solid #e3e0da; border-radius: 8px; }
.pbs-acc--box + .pbs-acc--box { margin-top: -1px; border-top-left-radius: 0; border-top-right-radius: 0; }
.pbs-acc--box:has(+ .pbs-acc--box) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.pbs-acc--box .pbs-acc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	line-height: 1.35;
}
.pbs-acc__head { list-style: none; cursor: pointer; }
.pbs-acc__head::-webkit-details-marker { display: none; }
.pbs-acc--box .pbs-acc__head:hover .pbs-acc__title { color: var(--pbs-accent); }
.pbs-acc__head:focus-visible { outline: 3px solid var(--pbs-accent); outline-offset: 2px; border-radius: 4px; }
.pbs-acc--box .pbs-acc__icon {
	position: relative;
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--pbs-accent);
	transition: transform .2s ease;
}
.pbs-acc--box .pbs-acc__icon::before,
.pbs-acc--box .pbs-acc__icon::after {
	content: "";
	position: absolute;
	left: 6px;
	right: 6px;
	top: 10px;
	height: 2px;
	background: #fff;
	border-radius: 1px;
}
.pbs-acc--box .pbs-acc__icon::after { transform: rotate(90deg); transition: transform .2s ease; }
.pbs-acc--box[open] .pbs-acc__icon::after { transform: rotate(0deg); }
.pbs-acc--box[open] .pbs-acc__head { color: var(--pbs-accent); }
.pbs-acc--box .pbs-acc__body { padding: 0 14px 4px; border-top: 1px solid #efece7; }
.pbs-acc__body > :first-child { margin-top: .8em; }
.pbs-acc__body p { margin: 0 0 .9em; }
.pbs-acc__body img { max-width: 100%; height: auto; border-radius: 6px; }

/* Stil «schlicht» (Standard): wie Fliesstext */
.pbs-acc--schlicht .pbs-acc__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: .8em 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: 600;
	line-height: 1.4;
	color: inherit;
}
.pbs-acc--schlicht .pbs-acc__head:hover .pbs-acc__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.pbs-acc--schlicht .pbs-acc__icon { position: relative; flex: 0 0 .7em; width: .7em; height: .7em; align-self: center; }
.pbs-acc--schlicht .pbs-acc__icon::before,
.pbs-acc--schlicht .pbs-acc__icon::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: calc(50% - 1px);
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}
.pbs-acc--schlicht .pbs-acc__icon::after { transform: rotate(90deg); transition: transform .2s ease; }
.pbs-acc--schlicht[open] .pbs-acc__icon::after { transform: rotate(0deg); }
.pbs-acc--schlicht .pbs-acc__body { padding: .1em 0 .6em; }
.pbs-acc--schlicht .pbs-acc__body > :first-child { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
	.pbs-acc__icon, .pbs-acc__icon::after { transition: none; }
}

/* ---------- Position «neben dem Text» ---------- */
.pbs--neben { margin: 1.6em 0; }
@media (min-width: 1200px) {
	.pbs--neben {
		float: right;
		clear: right;
		width: 300px;
		/* Rechts aus der Textspalte heraus – der Fliesstext behält seine volle Breite. */
		margin: .35em calc(-300px - 56px) 1.5em 56px;
		position: relative;
	}
}
@media (min-width: 1440px) {
	.pbs--neben { width: 320px; margin-right: calc(-320px - 64px); margin-left: 64px; }
}

/* ---------- Bilder vergrössern ---------- */
.pbs .pbs-zoom { position: relative; display: block; width: 100%; cursor: zoom-in; border-radius: 6px; }
.pbs .pbs-zoom img { transition: filter .2s ease; }
.pbs .pbs-zoom:hover img, .pbs .pbs-zoom:focus-visible img { filter: brightness(.88); }
.pbs .pbs-zoom::after {
	content: "";
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 18px no-repeat;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
	opacity: .9;
	transition: opacity .2s, transform .2s;
}
.pbs .pbs-zoom:hover::after { opacity: 1; transform: scale(1.08); }
.pbs .pbs-zoom:focus-visible { outline: 3px solid var(--pbs-accent); outline-offset: 2px; }

.pbs-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 56px 24px 24px;
	background: rgba(12, 12, 12, .92);
	opacity: 0;
	transition: opacity .2s ease;
}
.pbs-lightbox.is-open { opacity: 1; }
.pbs-lightbox[hidden] { display: none; }
.pbs-lightbox img {
	display: block;
	max-width: min(1600px, 100%);
	max-height: calc(100vh - 150px);
	width: auto;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
	background: #fff;
}
.pbs-lightbox__caption { max-width: 900px; margin: 0; color: #e8e8e8; font-size: 14px; line-height: 1.5; text-align: center; }
.pbs-lightbox__close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 26px;
	line-height: 42px;
	cursor: pointer;
}
.pbs-lightbox__close:hover, .pbs-lightbox__close:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }
body.pbs-noscroll { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .pbs-lightbox { transition: none; } }
