/* WordPress-Ergänzungen zum übernommenen ESBZ-Template. Die alten Dateien bleiben unverändert. */

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.screen-reader-text:focus {
	clip: auto; width: auto; height: auto;
	z-index: 100000; top: 5px; left: 5px;
	padding: 12px 20px; background: #FFFFFF; color: #212121;
}

/* Ersatzschrift, solange Museo Sans nicht eingebunden ist (Lizenz). Klasse setzt functions.php. */
body, p, h1, h2, h3, h4, b, strong { font-family: 'MuseoSans-500', 'Helvetica Neue', Arial, sans-serif; }
h1, h2, h3, h4, b, strong, div#subMenu ul.menu li.active { font-family: 'MuseoSans-900', 'Helvetica Neue', Arial, sans-serif; }
body.esbz-ersatzschrift h1, body.esbz-ersatzschrift h2, body.esbz-ersatzschrift h3, body.esbz-ersatzschrift h4,
body.esbz-ersatzschrift b, body.esbz-ersatzschrift strong,
body.esbz-ersatzschrift div#subMenu ul.menu li.active > a,
body.esbz-ersatzschrift ul.topmenu li.active a,
body.esbz-ohne-900 h1, body.esbz-ohne-900 h2, body.esbz-ohne-900 h3, body.esbz-ohne-900 h4,
body.esbz-ohne-900 b, body.esbz-ohne-900 strong,
body.esbz-ohne-900 div#subMenu ul.menu li.active > a,
body.esbz-ohne-900 ul.topmenu li.active a { font-weight: 700; }

/* ---------- Startseite aus Blöcken (Maße wie im Original nachgemessen) ---------- */
.esbz-startseite > *:not(.alignfull) { max-width: 1140px; margin-left: auto; margin-right: auto; padding-left: 15px; padding-right: 15px; }
.esbz-startseite > * { margin-top: 0; margin-bottom: 0; }

/* Startkopf: Diaschau 560px; im Original 30px Abstand durch .slick-dotted aus slick-theme.css. */
.is-style-esbz-startkopf { position: relative; margin-bottom: 30px !important; }
.wp-block-gallery.is-style-esbz-diaschau { display: block !important; height: 560px; margin: 0 !important; overflow: hidden; background-color: #CFCFCF; }
.wp-block-gallery.is-style-esbz-diaschau .slick-list,
.wp-block-gallery.is-style-esbz-diaschau .slick-track { height: 560px; }
.wp-block-gallery.is-style-esbz-diaschau figure.wp-block-image { height: 560px; margin: 0 !important; }
.wp-block-gallery.is-style-esbz-diaschau:not(.slick-initialized) figure.wp-block-image { width: 100% !important; }
.wp-block-gallery.is-style-esbz-diaschau:not(.slick-initialized) figure.wp-block-image:not(:first-child) { display: none; }
.wp-block-gallery.is-style-esbz-diaschau figure.wp-block-image img { width: 100% !important; height: 560px !important; object-fit: cover; margin: 0; }
.wp-block-gallery.is-style-esbz-diaschau figcaption { display: none; }

/* Blog-Stempel: oben rechts über der Diaschau (Original: 120px vom Rand, 450px über der Unterkante). */
figure.is-style-esbz-blogstempel { position: absolute; top: 110px; right: 120px; z-index: 400; margin: 0; width: auto; }
/* feste Breite: bei width:auto greift WordPress' contain-intrinsic-size (3000px) für sizes=auto */
figure.is-style-esbz-blogstempel img { margin: 0; width: 217px; max-width: none; height: auto; }

/* Kachelreihe: 4 Kacheln je 20% mit 5% Abstand, 120px hoch (Original #startMenu). */
.is-style-esbz-kachelreihe { position: relative; z-index: 200; }
.is-style-esbz-kachelreihe::after { content: ''; display: table; clear: both; }
/* Original: Liste mit 5% Einzug und 95% Breite, Kacheln 20% breit mit 5% Abstand: bezogen auf die volle Breite 19% / 4,75%. */
.is-style-esbz-kachelreihe > figure { position: relative; float: left; width: 19%; margin: 0 0 0 4.75%; }
.is-style-esbz-kachelreihe > figure:first-child { margin-left: 5%; }
.is-style-esbz-kachelreihe > figure img { display: none; }
.is-style-esbz-kachelreihe > figure figcaption {
	display: flex; align-items: center; justify-content: center;
	height: 120px; margin: 0; padding: 0 4px;
	color: #FFFFFF; font-size: 18px; line-height: 26px; text-align: center;
}
.is-style-esbz-kachelreihe > figure a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.is-style-esbz-kachelreihe > figure a { display: block; height: 0; padding: 0; background: none; } /* sonst leere Textzeile (26px) über der Kachel */
figure.is-style-esbz-kachel-orange figcaption { background-color: #DD9458; }
figure.is-style-esbz-kachel-lila figcaption { background-color: #6A4892; }
figure.is-style-esbz-kachel-gruen figcaption { background-color: #9FC7A3; }
figure.is-style-esbz-kachel-gelb figcaption { background-color: #FFD800; }
.is-style-esbz-kachelreihe > figure:hover figcaption { text-decoration: underline; }

/* Aktuelles: Breite col-md-10 im Container, Pfeile links und rechts. */
.esbz-startseite > .is-style-esbz-aktuelles { max-width: 955px; margin-top: 64px; }
.is-style-esbz-aktuelles > p { margin-bottom: 0; }
.is-style-esbz-aktuelles hr.wp-block-separator { border: 0; border-top: 1px solid rgba(0,0,0,.1); margin: 16px 0 0; opacity: 1; }
.wp-block-query.is-style-esbz-nachrichten { position: relative; margin-top: 56px; padding: 0 8.33%; }
.wp-block-query.is-style-esbz-nachrichten .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.wp-block-query.is-style-esbz-nachrichten:not(:has(.slick-initialized)) .wp-block-post-template > li:not(:first-child) { display: none; }
.wp-block-query.is-style-esbz-nachrichten .wp-block-post-title { font-size: 24px; line-height: 30px; margin-bottom: 12px; }
.wp-block-query.is-style-esbz-nachrichten .wp-block-post-content img { max-width: 100%; height: auto; }
.esbz-schieber-pfeil { position: absolute; top: 0; width: 8.33%; border: 0; background-color: transparent; cursor: pointer; }
.esbz-schieber-pfeil.startSliderPrev { left: 0; }
.esbz-schieber-pfeil.startSliderNext { right: 0; }

@media (max-width: 720px) {
	.is-style-esbz-startkopf { display: none; }
	.is-style-esbz-kachelreihe > figure,
	.is-style-esbz-kachelreihe > figure:first-child { float: none; width: 100%; height: 420px; margin: 20px 0; }
	.is-style-esbz-kachelreihe > figure a { height: 100%; }
	.is-style-esbz-kachelreihe > figure img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
	.is-style-esbz-kachelreihe > figure figcaption {
		position: absolute; bottom: 40px; left: -15px; height: 90px; width: 65%;
		justify-content: flex-start; padding: 20px; text-align: left;
	}
}
@media (max-width: 540px) { .is-style-esbz-kachelreihe > figure, .is-style-esbz-kachelreihe > figure:first-child { height: 320px; } }
@media (max-width: 450px) { .is-style-esbz-kachelreihe > figure, .is-style-esbz-kachelreihe > figure:first-child { height: 290px; } }
@media (max-width: 370px) { .is-style-esbz-kachelreihe > figure, .is-style-esbz-kachelreihe > figure:first-child { height: 220px; } }

/* Die freie Museo-Sans-Datei hat höhere Ober-/Unterlängen als der MyFonts-Build (Linkbox 52 statt 47px):
   Innenabstand so angleichen, dass die Box wie im Original von 302 bis 349px reicht (sonst Linie am Kopf). */
body:not(.esbz-ersatzschrift) ul.topmenu li a { padding-top: 12px; padding-bottom: 8px; }

/* Suche: Overlay ohne Bootstrap-JS. */
#searchModal.show { display: block; }
#searchModal .modal-dialog { margin-top: 120px; }
#searchModal button.close { background: transparent; border: 0; font-size: 32px; line-height: 1; cursor: pointer; }

/* Bereichskopf: aktive Unterseite ohne Hintergrundbild. */
div#subMenu ul.menu li.active ul li.active a { font-family: 'MuseoSans-900', 'Helvetica Neue', Arial, sans-serif; }

/* Joomla blendet Links mit Pfeil nur in Absätzen ein; Bildlinks ohne Pfeil. */
p a img { display: inline-block; }

/* Beitragslisten. */
.esbz-liste .item { margin-bottom: 48px; }
.esbz-liste .page-header h3 { margin-bottom: 12px; }
p.readmore a.btn { padding: 0; color: #D59010; }
.pagination ul.page-numbers { margin-left: 0; }
.pagination ul.page-numbers li span.current { font-family: 'MuseoSans-900', 'Helvetica Neue', Arial, sans-serif; }
.esbz-datum { font-size: 16px; margin-bottom: 12px; }

/* Blöcke des Editors. */
.esbz-inhalt .wp-block-image,
.esbz-inhalt figure { margin: 0 0 28px; }
.esbz-inhalt .wp-block-image img { height: auto; }
.esbz-inhalt figcaption { font-size: 15px; color: #757575; margin-top: 6px; }
.esbz-inhalt .aligncenter { margin-left: auto; margin-right: auto; }
.esbz-inhalt .alignleft { float: left; margin: 0 10px 12px 0; } /* wie Joomla pull-left item-image */
.esbz-inhalt .alignright { float: right; margin: 0 0 12px 24px; }
.esbz-inhalt .wp-block-file a { padding-left: 22px; background: url('../images/chevronRight.png') no-repeat 0 1px / 16px; }
.esbz-inhalt .wp-block-file__button { display: none; }

/* Galerie im Stil „Slider“ = contentSlider der alten Seite. */
.wp-block-gallery.is-style-esbz-slider {
	display: block !important;
	position: relative;
	width: 100%;
	height: 460px;
	margin-bottom: 30px;
	overflow: hidden;
}
.wp-block-gallery.is-style-esbz-slider .slick-list,
.wp-block-gallery.is-style-esbz-slider .slick-track { height: 460px; }
.wp-block-gallery.is-style-esbz-slider figure.wp-block-image {
	height: 460px;
	margin: 0 !important;
}
/* Vor dem Start von Slick nur das erste Bild zeigen. */
.wp-block-gallery.is-style-esbz-slider:not(.slick-initialized) figure.wp-block-image:not(:first-child) { display: none; }
.wp-block-gallery.is-style-esbz-slider:not(.slick-initialized) figure.wp-block-image { width: 100% !important; }
.wp-block-gallery.is-style-esbz-slider figure.wp-block-image img {
	width: 100% !important;
	height: 460px !important;
	object-fit: cover;
	margin: 0;
}
.wp-block-gallery.is-style-esbz-slider figcaption { display: none; }

@media (max-width: 720px) {
	.wp-block-gallery.is-style-esbz-slider,
	.wp-block-gallery.is-style-esbz-slider .slick-list,
	.wp-block-gallery.is-style-esbz-slider .slick-track,
	.wp-block-gallery.is-style-esbz-slider figure.wp-block-image,
	.wp-block-gallery.is-style-esbz-slider figure.wp-block-image img { height: 220px !important; }
	.wp-block-gallery.is-style-esbz-slider .contentDots { top: 180px; }
}

/* Klappmenü: geschlossen für Tastatur und Screenreader unsichtbar (liegt sonst nur außerhalb des Bildes). */
#sideMenu { visibility: hidden; transition: right 0.5s, visibility 0s 0.5s; }
#sideMenu.open { visibility: visible; transition: right 0.5s; }

/* Knöpfe ohne Browser-Optik (Schließen im Klappmenü). */
.esbz-knopf { background: transparent; border: 0; padding: 0; cursor: pointer; }
.esbz-knopf img { margin: 0; }

/* Aufklapp-Knopf für Tastatur: unsichtbar, erscheint beim Fokus über dem Pfeil. */
#sitemapMenu li { position: relative; }
#sitemapMenu .esbz-aufklappen {
	position: absolute; top: 0; right: 0; width: 78px; height: 48px;
	overflow: hidden; color: transparent; background: transparent; border: 0; padding: 0;
	opacity: 0;
}
#sitemapMenu .esbz-aufklappen:focus { opacity: 1; outline: 3px solid #6A4892; outline-offset: -3px; }

/* Angemeldet: Admin-Leiste überdeckt sonst das Klappmenü. */
.admin-bar #sideMenu { top: 32px; height: calc(100% - 32px); }

/* ---------- Kartenliste (Schüler*innenblog, Aktuelle Projekte) wie im Original ---------- */
.esbz-karten { display: flex; flex-wrap: wrap; gap: 0 24px; }
.esbz-karte { flex: 1 1 calc(20% - 24px); min-width: 100px; margin-bottom: 10px; }
.esbz-karte .mydate { display: block; margin-bottom: 4px; color: #212121; font-size: 16px; line-height: 26px; }
.esbz-karte a, .esbz-karte a:hover { text-decoration: none; padding: 0; background: none; }
.esbz-karte .card-image { min-height: 200px; background-color: #EFEFEF; background-position: center center; background-size: cover; }
.esbz-karte p { margin: 6px 0 0; font-size: 16px; line-height: 26px; color: #D59010; }
.esbz-karte a:hover p { text-decoration: underline; }

/* ---------- Team: Person mit Foto links (Original: col-md-3 Foto 200px, col-md-8 Text) ---------- */
.is-style-esbz-person { display: grid; grid-template-columns: 25% 1fr; column-gap: 30px; margin-top: 40px; }
.is-style-esbz-person > figure { grid-column: 1; grid-row: 1 / span 20; margin: 0; }
.is-style-esbz-person > figure img { width: 100%; height: 200px !important; object-fit: cover; background-color: #D8D8D8; } /* !important gegen height:auto der Bildblöcke */
.is-style-esbz-person > *:not(figure) { grid-column: 2; margin-bottom: 0; }
.is-style-esbz-person h4 { margin-bottom: 12px; }
.is-style-esbz-person p.lightGrey { margin-top: -10px; color: #999999; }
.is-style-esbz-person p { margin-bottom: 0; }
.is-style-esbz-person p.emailTo { margin: 8px 0 12px; }
@media (max-width: 576px) {
	.is-style-esbz-person { grid-template-columns: 1fr; }
	.is-style-esbz-person > figure, .is-style-esbz-person > *:not(figure) { grid-column: 1; grid-row: auto; }
	.is-style-esbz-person > figure { margin-bottom: 12px; }
}

/* Tabellen aus dem alten Inhalt. */
.esbz-inhalt table { width: 100%; margin-bottom: 28px; border-collapse: collapse; }
.esbz-inhalt td, .esbz-inhalt th { padding: 6px 8px; border-bottom: 1px solid #D8D8D8; vertical-align: top; }

/* ---------- Kontakt: zwei Spalten wie im Original (Text links, Karte rechts) ---------- */
.esbz-inhalt .wp-block-columns { display: flex; gap: 30px; margin-bottom: 28px; }
.esbz-inhalt .wp-block-column { flex: 1 1 0; min-width: 0; }
.esbz-inhalt .wp-block-column .mapp-layout { margin-top: 40px; }
@media (max-width: 767px) {
	.esbz-inhalt .wp-block-columns { flex-direction: column; }
	.esbz-inhalt .wp-block-columns.is-style-esbz-karte-zuerst { flex-direction: column-reverse; }
	.esbz-inhalt .wp-block-column .mapp-layout { margin-top: 0; }
}

/* „Zurück“ unter Beiträgen wie im Original (Pfeil links statt rechts). */
p.esbz-zurueck a { background-image: url('../images/chevronLeft.png'); }
/* Person ohne Foto: grauer Platzhalter wie im Original (vcardImage ohne Bild). */
.is-style-esbz-person:not(:has(> figure))::before { content: ''; grid-column: 1; grid-row: 1 / span 20; height: 200px; background-color: #D8D8D8; }
