.grid {
	columns: 20rem;
	gap: 0.5rem;
	counter-reset: grid;
	margin: 0.5rem;
-webkit-box-sizing: border-box; /* ältere Wbkit-Browser */
-moz-box-sizing: border-box; /* Firefox */
box-sizing: border-box; /* W3C/Chrome//Opera/IE */
}
.item {
	break-inside: avoid;
	background: none;
	padding: 0%;
}
.item img {
	width: 100%;
	height: auto;
}
.item figure {
	display: block;
	margin: 0 auto 0 auto;
	width: 100%;
	height: auto;
	padding: 0;
	overflow: hidden;
}
.item figcaption {
  padding: 0;
  margin: 0 0 3px 0;
  font-size: 0.9em;
  line-height: 0.95em;
  font-weight: 300;
  text-align: left;
}
/* IMAGE LIGHTBOX SELECTOR */
#imagelightbox {
	cursor: pointer;
}
#imagelightbox {
	position: fixed;
	z-index: 10000;
	
	-ms-touch-action: none;
	touch-action: none;
}

/* ACTIVITY INDICATION */
#imagelightbox-loading,
#imagelightbox-loading div {
	border-radius: 50%;
}
		#imagelightbox-loading
		{
			width: 2.3em; /* 40 */
			height: 2.3em; /* 40 */
			background-color: rgba( 255, 255, 255, 0.2 );
			border: 2px solid black;
			position: fixed;
			z-index: 10003;
			top: 50%;
			left: 50%;
			padding: 0.625em; /* 10 */
			margin: 0 -1.25em -1.25em 0; /* 20 */

			-webkit-box-shadow: 0 0 1.0em rgba( 0, 0, 0, .75 ); /* 40 */
			box-shadow: 0 0 1.0em rgba( 0, 0, 0, .75 ); /* 40 */
		}
			#imagelightbox-loading div
			{
				width: 1.25em; /* 20 */
				height: 1.25em; /* 20 */
				background-color: black;

				-webkit-animation: imagelightbox-loading .5s ease infinite;
				animation: imagelightbox-loading .5s ease infinite;
			}

			@-webkit-keyframes imagelightbox-loading
			{
				from { opacity: .2;	-webkit-transform: scale( .75 ); }
				50%	 { opacity: 0.3;	-webkit-transform: scale( 1 ); }
				to	 { opacity: .4;	-webkit-transform: scale( .75 ); }
			}
			@keyframes imagelightbox-loading
			{
				from { opacity: .2;	transform: scale( .75 ); }
				50%	 { opacity: 0.3;	transform: scale( 1 ); }
				to	 { opacity: .4;	transform: scale( .75 ); }
			}
		/* OVERLAY */
		#imagelightbox-overlay
		{
			background-color: rgba( 0, 0, 0, 0.95 );
			/*
			background-image: url(../bg/overlay_bg.png);
			background-position: top left;
			*/
			position: fixed;
			z-index: 9998;
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
		}
		/* "CLOSE" BUTTON */
		/*
		button {
			border: 2px solid #330099;
		}
		*/
#imagelightbox-close {
	width: 2.5em; /* 40 */
	height: 2.5em; /* 40 */
	text-align: left;
	background-color: black;
	background-image: url("../graphics/wclose.svg");
	background-repeat: no-repeat;
	background-size: contain;
	border-radius: 50%;
	border: 0;
	margin: 0;
	padding: 0;
	position: fixed;
	z-index: 10002;
	top: 0.5em; /* 40 */
	right: 0.5em; /* 40 */
	-webkit-transition: color .3s ease;
	transition: color .3s ease;
}
			#imagelightbox-close:hover,
			#imagelightbox-close:focus
			{
	background-image: url("../graphics/bclose.svg");
			}
		/* CAPTION */
		#imagelightbox-caption
		{
			text-align: center;
			color: #fff;
			background-color: rgba(0, 0, 0, 0.8);
			position: fixed;
			z-index: 10001;
			left: 0;
			right: 0;
			bottom: 0;
			padding: 2px 0 4px 0;
		}
		/* NAVIGATION */
			#imagelightbox-nav button
			{
				width: 1em;
				height: 1em;
				display: inline-block;
				margin: 0;
			}
		/* ARROWS */
		.imagelightbox-arrow
		{
			width: 2em;
			height: 3.5em;
			background-color: rgba( 0, 0, 0, 1 );
			vertical-align: middle;
			border:0;
			margin: 0;
			padding: 0;
			/*display: none; */
			position: fixed;
			z-index: 10001;
			top: 50%;
		}
		.imagelightbox-arrow:hover,
		.imagelightbox-arrow:focus
		{
			background-color: rgba( 0, 0, 255, 0 );
		}
		.imagelightbox-arrow:active
		{
			background-color: rgba( 0, 0, 0, 0 );
		}
.imagelightbox-arrow-left {
	left: 1.5em;
	background-image: url("../graphics/wback.svg");
	background-repeat: no-repeat;
	background-size: contain;
}
.imagelightbox-arrow-left:hover {
	background-image: url("../graphics/bback.svg");
	background-repeat: no-repeat;
	background-size: contain;
}
.imagelightbox-arrow-right {
	right: 1.5em;
	background-image: url("../graphics/wnext.svg");
	background-repeat: no-repeat;
	background-size: contain;
}
.imagelightbox-arrow-right:hover {
	background-image: url("../graphics/bnext.svg");
	background-repeat: no-repeat;
	background-size: contain;
}
		#imagelightbox-loading,
		#imagelightbox-overlay,
		#imagelightbox-close,
		#imagelightbox-caption,
		#imagelightbox-nav,
		.imagelightbox-arrow
		{
			-webkit-animation: fade-in .25s linear;
			animation: fade-in .25s linear;
		}
			@-webkit-keyframes fade-in
			{
				from	{ opacity: 0; }
				to		{ opacity: 1; }
			}
			@keyframes fade-in
			{
				from	{ opacity: 0; }
				to		{ opacity: 1; }
			}
		@media only screen and (max-width: 41.250em) /* 660 */
		{
			#imagelightbox-close
			{
				top: 1.25em; /* 20 */
				right: 0.5em; /* 20 */
			}
			#imagelightbox-nav
			{
				bottom: 1.25em; /* 20 */
			}

			.imagelightbox-arrow
			{
				width: 1.2em;
				height: 2.3em;
			}
			.imagelightbox-arrow-left
			{
				left: 0.5em;
			}
			.imagelightbox-arrow-right
			{
				right: 0.5em;
			}
		}
/* ============================================
   WORDPRESS BLOCK-DEFAULTS AN .grid/.item ANPASSEN
   ============================================ */

/* Der äußere Group-Block (.grid): WP könnte hier
   automatischen Block-Abstand (blockGap) zwischen
   Kindern einfügen – das kollidiert mit deinem
   eigenen "gap: 0.5rem" aus dem Multicol-Layout */
.grid.wp-block-group {
	--wp--style--block-gap: 0;
	row-gap: 0;
}

/* Der innere Group-Block (.item) übernimmt sonst
   WP-Standardmargins zwischen verschachtelten Blöcken */
.grid .item.wp-block-group {
	--wp--style--block-gap: 0;
}
.grid .item > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* Core-Bild-Block setzt standardmäßig margin-bottom
   auf die <figure> – überschreibt sonst dein
   "figure { margin: 0 auto 0 auto; }" durch höhere
   Ladereihenfolge (nicht Spezifität, aber sicherheitshalber) */
.grid .item figure.wp-block-image {
	margin: 0 auto 0 auto !important;
}

/* Core-Bildunterschrift (falls du das native
   Caption-Feld im Bild-Block nutzt) übernimmt
   Theme-Typografie aus theme.json (Farbe, Größe,
   Ausrichtung) – hier an dein figcaption-CSS angleichen */
.grid .item figcaption {
	color: inherit;
	text-align: left;
	font-style: normal;
}

/* WP-Bild-Block umschließt <img> manchmal zusätzlich
   mit eigenen Wrapper-Klassen (z. B. size-large) –
   width/height sicherstellen, unabhängig von der
   im Editor gewählten Bildgröße */
.grid .item .wp-block-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Falls TT5 globale Link-Unterstreichung oder
   Fokus-Outline auf <a> setzt, die den Klick-Bereich
   optisch stört */
.grid .item .wp-block-image a {
	text-decoration: none;
	display: block;
}

