/* =====================================================================
   Escola Galerie-Komponente (inc/galleryComponent.php + js/gallery.js)
   Varianten: filmstrip / grid / stage - plus gemeinsame Vollbild-Lightbox.
   ===================================================================== */

.escola-gallery {
	margin: 0 0 3.5rem;
}
.escola-gallery:last-child {
	margin-bottom: 0;
}
/* Typografie wie im Blog-Text: Titel auf Höhe der Blog-Zwischentitel (24px),
   Beschreibung wie der Fliesstext (19px/30px). */
.escola-gallery-title {
	font-size: 24px;
	line-height: 120%;
	letter-spacing: 0.01em;
	font-weight: 700;
	color: #333333;
	margin: 0 0 0.5rem;
}
.escola-gallery-description {
	font-size: 19px;
	line-height: 30px;
	font-weight: 400;
	color: #555;
	margin: 0 0 1rem;
}
/* Im Blog gewinnen sonst die .entry-text h3/p-Regeln aus escola-page.css
   (höhere Spezifität) und setzen Titel/Text wieder kleiner. */
.blogentry-contents .container .blogentry-content .entry-text .escola-gallery-title {
	font-size: 24px;
	margin: 0 0 0.5rem;
}
.blogentry-contents .container .blogentry-content .entry-text .escola-gallery-description {
	font-size: 19px;
	line-height: 30px;
	font-weight: 400;
}
.escola-gallery .escola-gallery-img {
	cursor: zoom-in;
	border-radius: 10px;
	display: block;
	background: #eef4f9;
}

/* ---------- Einzelbild (Galerie mit nur einem Foto) ---------- */
.escola-gallery-single .escola-gallery-img {
	width: 100%;
	max-height: 70vh;
	object-fit: cover;
	border-radius: 16px;
	aspect-ratio: auto;
}

/* ---------- Variante A: Filmstreifen ---------- */
.escola-gallery-strip-wrap {
	position: relative;
}
.escola-gallery-strip {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 6px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.escola-gallery-strip .escola-gallery-img {
	height: 200px;
	width: auto;
	flex: 0 0 auto;
	scroll-snap-align: start;
}
.escola-gallery-strip-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
	color: #0083db;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	padding: 0;
}
.escola-gallery-strip-btn.prev {
	left: -8px;
}
.escola-gallery-strip-btn.next {
	right: -8px;
}
@media (max-width: 767px) {
	.escola-gallery-strip .escola-gallery-img {
		height: 150px;
	}
	/* Auf Touch-Geräten wischt man nativ - Pfeile ausblenden */
	.escola-gallery-strip-btn {
		display: none;
	}
}

/* ---------- Variante B: Raster ---------- */
.escola-gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}
.escola-gallery-grid .escola-gallery-img {
	width: 100%;
	aspect-ratio: 3 / 2 !important;
	object-fit: cover;
}
@media (max-width: 991px) {
	.escola-gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 560px) {
	.escola-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- Variante C: Slideshow (Stage) ---------- */
.escola-gallery-stage-wrap {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: #eef4f9;
}
.escola-gallery-stage {
	aspect-ratio: 3 / 2;
	position: relative;
}
@media (min-width: 768px) {
	.escola-gallery-stage {
		aspect-ratio: 16 / 10;
	}
}
.escola-gallery-stage .escola-gallery-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.35s ease;
	border-radius: 0;
	aspect-ratio: auto !important;
	pointer-events: none;
}
.escola-gallery-stage .escola-gallery-slide.active {
	opacity: 1;
	pointer-events: auto;
}
.escola-gallery-stage-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	color: #0083db;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	padding: 0;
}
.escola-gallery-stage-btn.prev {
	left: 12px;
}
.escola-gallery-stage-btn.next {
	right: 12px;
}
.escola-gallery-dots {
	position: absolute;
	bottom: 10px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 7px;
	z-index: 2;
}
.escola-gallery-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: rgba(255, 255, 255, 0.55);
	cursor: pointer;
}
.escola-gallery-dot.active {
	background: #fff;
}
@media (max-width: 767px) {
	.escola-gallery-stage-btn {
		width: 38px;
		height: 38px;
	}
}

/* ---------- Lightbox (alle Varianten) ---------- */
.escola-gallery-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(10, 16, 22, 0.94);
	z-index: 10000;
	display: none;
	align-items: center;
	justify-content: center;
	touch-action: pan-y;
}
.escola-gallery-lightbox.open {
	display: flex;
}
.escola-gallery-lightbox img {
	max-width: min(92vw, 1600px);
	max-height: 86vh;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	user-select: none;
	-webkit-user-drag: none;
}
.escola-gallery-lightbox-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	padding: 0;
}
.escola-gallery-lightbox-btn:hover {
	background: rgba(255, 255, 255, 0.28);
}
.escola-gallery-lightbox-btn.prev {
	left: 14px;
}
.escola-gallery-lightbox-btn.next {
	right: 14px;
}
.escola-gallery-lightbox-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	padding: 0;
}
.escola-gallery-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.28);
}
.escola-gallery-lightbox-counter {
	position: absolute;
	bottom: 14px;
	left: 0;
	right: 0;
	text-align: center;
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	font-family: Nunito, sans-serif;
}
/* Dezenter Urheber-Hinweis unten rechts */
.escola-gallery-lightbox-author {
	position: absolute;
	bottom: 14px;
	right: 16px;
	color: rgba(255, 255, 255, 0.45);
	font-size: 11.5px;
	font-family: Nunito, sans-serif;
	letter-spacing: 0.02em;
	pointer-events: none;
}
@media (max-width: 767px) {
	.escola-gallery-lightbox img {
		max-width: 96vw;
	}
	.escola-gallery-lightbox-btn {
		display: none; /* auf Touch: wischen */
	}
}
