/* TS Gießen: Größen nach Funktion, unabhängig vom einzelnen Seitendesign.
   Die Startseite ist der Maßstab. Kein Eingriff in Farben oder Schriftfamilien.
   Explizite ID-Spezifität über :is() überstimmt die vorhandenen Plugin-Regeln.
   Header, Footer, Zahlen und redaktionelle Beitragskarten sind ausgenommen. */
:root {
  --tsg-title-size: clamp(37px, calc(30px + 2.4vw), 76px);
  --tsg-section-size: 36px;
  --tsg-subheading-size: clamp(22px, calc(20px + .3vw), 26px);
}

/* Zentrale H2-Größen: Desktop / Tablet / Smartphone. */
@media (max-width: 1024px) {
  :root { --tsg-section-size: 32px; }
}
@media (max-width: 767px) {
  :root { --tsg-section-size: 26px; }
}

/* Normale Elementor-Überschriften im Seiteninhalt. */
body :is(#ts-home-hero, .elementor[data-elementor-type="wp-page"], .tsg-shell, .tsgy-shell)
h1.elementor-heading-title:not(:where(.tsg-year-widget *, .tsgy-number *, .tsg-typography-exempt *, [data-elementor-type="header"] *, [data-elementor-type="footer"] *)) {
  font-size: var(--tsg-title-size) !important;
  line-height: 1.08 !important;
}
body :is(#ts-home-hero, .elementor[data-elementor-type="wp-page"], .tsg-shell, .tsgy-shell)
h2.elementor-heading-title:not(:where(.tsg-year-widget *, .tsgy-number *, .tsg-typography-exempt *, [data-elementor-type="header"] *, [data-elementor-type="footer"] *)) {
  font-size: var(--tsg-section-size) !important;
  line-height: 1.2 !important;
}
body :is(#ts-home-hero, .elementor[data-elementor-type="wp-page"], .tsg-shell, .tsgy-shell)
h3.elementor-heading-title:not(:where(.tsg-year-widget *, .tsgy-number *, .tsg-typography-exempt *, [data-elementor-type="header"] *, [data-elementor-type="footer"] *)) {
  font-size: var(--tsg-subheading-size) !important;
  line-height: 1.2 !important;
}

/* Alle drei Slider-Titel und die Titel der Jugendseite haben dieselbe
   visuelle Rolle, auch wenn sie unterschiedliche HTML-Tags verwenden. */
body #ts-home-hero .ts-hero-heading,
body :is(#ts-home-hero, .tsgy-shell) .tsgy-hero-copy .elementor-widget-heading .elementor-heading-title {
  font-size: var(--tsg-title-size) !important;
  line-height: 1.08 !important;
}

/* Eine längere Überschrift darf innerhalb ihres Containers umbrechen. */
body :is(#ts-home-hero, .elementor[data-elementor-type="wp-page"], .tsg-shell, .tsgy-shell)
.elementor-widget-heading:not(:where(.tsg-year-widget, .tsgy-number, .tsg-typography-exempt, .tsg-typography-exempt *, [data-elementor-type="header"] *, [data-elementor-type="footer"] *)) .elementor-heading-title {
  overflow-wrap: anywhere;
}
