/* Copyright (c) 2026, Dipl.-Medieninformatiker Christoph Oldendorf, C F Systems. */

.gallery .gallery-slide .hero-ratio picture {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	margin: 0;
	}
.gallery .gallery-slide .hero-ratio picture img {

	display: block;
	width: auto;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	}
.gallery { position: relative; margin-bottom: 45px; outline: none; }
.gallery img { display: block; width: auto; height: auto; max-width: 100%; }
.gallery-slide + .gallery-slide {
	margin-top: 30px;
	}
.gallery .gallery-slide .gallery-ratio,
.gallery-ratio {
	display: block;
	position: relative;
	width: 100%;
	height: 0;
	padding-top: 66.6667%;       
	overflow: hidden;
	flex: 0 0 auto;              
	min-height: 0;
	align-self: stretch;
	}
.gallery .gallery-slide .gallery-ratio picture,
.gallery-ratio picture {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	margin: 0;

	text-align: left;
	}
.gallery .gallery-slide .gallery-ratio picture img,
.gallery-ratio picture img {
	display: block;
	width: auto;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	}
.gallery .gallery-slide picture { display: block; }
.gallery .gallery-slide picture img {

	max-height: 70vh;
	max-width: 100%;
	width: auto;
	height: auto;
	}
.gallery-nav { display: none; padding-top: 8px; }
.gallery-caption p {
	margin: 0;
	line-height: 1.45;
	}
.gallery-caption {
	margin-top: .5em;
	}
.gallery-track {
	position: relative;
	}
.gallery-track .gallery-slide {
		height: auto;
		}
.gallery-nav {
	margin-top: 1em;
	}
.gallery-prev,
.gallery-next {
	border: 1px solid #111;
	background: #fff;
	cursor: pointer;
	font: inherit;
	line-height: 1;
	padding: 4px 12px;
	}
.gallery-prev:hover,
.gallery-next:hover {
	background: #111;
	color: #fff;
	}
.gallery-count { font-size: 14px; color: #666; }
@media (max-width: 1199px) {
  .gallery .gallery-slide picture img { max-height: 60vh; }
}
@media (max-width: 767px) {
  .gallery .gallery-slide picture img { max-height: 50vh; }
}
@media (max-width: 991px) {
  .gallery-caption,
.gallery-nav {
	padding-left: 15px;
	padding-right: 15px;
	}
  .gallery,
.gallery-track,
.gallery-slide {
		padding-left: 0;
		padding-right: 0;
		}
  .gallery .gallery-slide picture img,
.gallery .gallery-slide img {
		width: 100%;
		height: auto;
		max-height: none;
		max-width: none;
		}
}
@media (max-width: 991px) {
  .gallery .gallery-slide picture img,
.gallery .gallery-slide img {

		max-height: 440px;
		max-height: min(440px, calc(100dvh - 210px));
		object-fit: contain;
		object-position: center top;
		}
  .gallery-nav {
		display: none !important;
		}
  .gallery .gallery-slide {
		display: flex;
		flex-direction: column;
		}
  .gallery .gallery-caption {
	display: block;
	margin: 6px 0 0;
	padding: 0 15px;
	}
  .gallery .gallery-caption p {
		margin: 0;
		font-size: 14px;
		line-height: 1.4;
		}
}
.gallery.is-enhanced {
	overflow: hidden;

	touch-action: pan-y;
	}
.gallery.is-enhanced.is-held {

	touch-action: none;
	}
.gallery.is-enhanced .gallery-track {
	display: flex;
	flex-wrap: nowrap;
	will-change: transform;
	cursor: grab;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	}
.gallery.is-enhanced.is-dragging .gallery-track {
	cursor: grabbing;
	}
.gallery.is-enhanced .gallery-slide {
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-top: 0;
	overflow: hidden;
	visibility: hidden;
	}
.gallery.is-enhanced .gallery-slide.is-current {
	visibility: visible;
	}
.gallery.is-enhanced.is-moving .gallery-slide {
	visibility: visible;
	}
.gallery.is-enhanced .gallery-slide {
	height: auto;
	}
.gallery.is-enhanced.is-settled .gallery-nav {
	display: flex;
	align-items: center;
	gap: 10px;
	}
@media (prefers-reduced-motion: reduce) {
  .gallery.is-enhanced .gallery-track {
		transition-duration: 1ms;
		}
}

/* a picture keeps its own proportions whatever box it is given */
.gallery img, .hero img, .header-image img, .lageplan img { object-fit: contain; }
