/*
Theme Name: THG Normalien
Theme URI: https://thg-normalien.de
Description: Kind-Theme von Hello Elementor. Traegt das aus der Pro/Cornerstone-Fassung uebernommene Design, damit die in Elementor aufgebauten Seiten dem Original entsprechen.
Author: ElisaBit
Version: 0.1.0
Template: hello-elementor
Text Domain: thg
*/

/* ------------------------------------------------------------------
   Bruecke zwischen Elementor und dem uebernommenen Cornerstone-Markup.

   Modell: jede Cornerstone-Sektion (.x-section) ist ein Elementor-
   Container mit den Originalklassen. Alles darin (.x-bg, .x-row ...)
   steckt unveraendert in HTML-Widgets. Deren zwei Huellen duerfen keine
   Box bilden, sonst greifen Kind-Kombinatoren und nth-child-Regeln des
   Cornerstone-CSS nicht mehr (.m8-z > .x-row-inner > *:nth-child(4n)).
   Alle Regeln haengen an #thg (body), damit sie Elementor schlagen.
   ------------------------------------------------------------------ */

#thg .thg-section.e-con,
#thg .thg-plain.e-con {
	display: block;              /* Cornerstone-Sektionen sind Blockelemente, keine Flexbox */
	--padding: 0;
	--margin: 0;
	--width: 100%;
	--content-width: 100%;
	--gap: 0;
	--row-gap: 0;
	--column-gap: 0;
	--min-height: 0;
	max-width: none;
	padding: 0;
}
#thg .thg-section.e-con > .e-con-inner,
#thg .thg-plain.e-con > .e-con-inner {
	display: contents;
}

#thg .elementor-widget-html,
#thg .elementor-widget-html > .elementor-widget-container,
#thg .elementor-widget-shortcode,
#thg .elementor-widget-shortcode > .elementor-widget-container,
#thg .elementor-widget-shortcode .elementor-shortcode {
	display: contents;
}
#thg .elementor-widget:not(:last-child) {
	margin-bottom: 0;
}

/* Elementor gibt allen Bildern height:auto (0,1,1) — Cornerstone setzt
   an .x-image img ausdruecklich Hoehen. Originalverhalten wiederherstellen. */
#thg .x-img img,
#thg .esg-entry-media img {
	height: auto;
	max-width: 100%;
}

/* Die Wrapper der Kopf- und Fusszeile aus dem Theme-Builder ebenfalls transparent. */
#thg .thg-chrome.e-con { display: block; --padding: 0; --margin: 0; --width: 100%; --content-width: 100%; max-width: none; padding: 0; }
#thg .thg-chrome.e-con > .e-con-inner { display: contents; }

/* Inhaltsblocker-Platzhalter (Karte) — Borlabs-CSS wird nicht geladen, das hier ersetzt es. */
#thg ._brlbs-content-blocker { position: relative; overflow: hidden; }
#thg ._brlbs-content-blocker ._brlbs-embed { position: relative; min-height: 300px; display: flex; align-items: center; justify-content: center; }
#thg ._brlbs-content-blocker ._brlbs-thumbnail { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#thg ._brlbs-content-blocker ._brlbs-caption { position: relative; z-index: 1; max-width: 90%; padding: 1.25em 1.5em; background: rgba(0,0,0,.75); color: #fff; text-align: center; font-size: 14px; line-height: 1.5; }
#thg ._brlbs-content-blocker ._brlbs-caption p { margin: 0 0 .75em; color: #fff; }
#thg ._brlbs-content-blocker ._brlbs-caption p:last-child { margin-bottom: 0; }
#thg ._brlbs-content-blocker ._brlbs-caption a { color: #fff; text-decoration: underline; }
#thg ._brlbs-content-blocker a._brlbs-btn { display: inline-block; padding: .55em 1.4em; background: #1a73e8; color: #fff; text-decoration: none; border-radius: 4px; font-weight: 600; }
#thg ._brlbs-content-blocker small { font-size: 12px; }

/* Unsichtbarer Traeger fuer Elemente, die per [thg_slides] an anderer Stelle ausgegeben werden. */
#thg .thg-slot-hidden { display: none !important; }

/* Beitragsuebersicht (Aktuelles): live ordnet Isotope die Karten per JS an und blendet
   sie erst dann ein (opacity:0 im Framework-CSS). Hier: Flex-Raster, sofort sichtbar. */
#thg .x-iso-container.x-iso-container-posts { display: flex; flex-wrap: wrap; align-items: flex-start; margin: 0 -1em; }
#thg .x-iso-container.x-iso-container-posts > * { opacity: 1; }
#thg .x-iso-container.x-iso-container-posts .entry-featured img { width: 100%; height: auto; display: block; }
#thg .thg-posts.e-con { max-width: 1200px; margin: 0 auto 4em; padding: 0 1em; }
