/* =========================================================================
   Page Builder – Ergänzungen zum Stylesheet
   Wird nach style.css geladen. Die Bausteine verwenden soweit möglich die
   Klassen aus style.css, damit das Design unverändert bleibt. Hier stehen
   nur die neuen, frei kombinierbaren Teile (Zeilen, Spalten, Galerien …).
   Ansichten: Handy bis 599 px, Tablet 600–1023 px, Desktop ab 1024 px.
   ========================================================================= */

/* ------------------------------------------------------ Zeilen & Spalten */

.pb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: clamp(2rem, 5vw, 4.5rem);
  row-gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.pb-row.container { margin-left: auto; margin-right: auto; }
.pb-col { min-width: 0; }

/* Kopfbereich eines Abschnitts (Überzeile, Überschrift, Einleitung):
   der Abstand nach unten kommt allein von .section-head – wie bisher,
   als die Außenabstände der Texte darin aufgingen. */
.section-head > :last-child,
.section-head > .pb-text:last-child > :last-child { margin-bottom: 0; }

/* Zentrierte Bereiche richten Buttons ebenfalls mittig aus */
.hero-content, .cta-inner, .center { --pb-justify: center; }

/* ------------------------------------------------------------ Abschnitte */

.pb-has-bg { position: relative; isolation: isolate; overflow: hidden; }
.pb-bg { position: absolute; inset: 0; z-index: -2; }
.pb-bg picture { display: block; width: 100%; height: 100%; }
.pb-bg img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }
.pb-overlay { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.pb-light { color: #fff; }
.pb-light :is(.h-display, .h-sub, .apt-title, .feature-title, .pb-heading) { color: #fff; }
.pb-light .eyebrow { color: rgba(255,255,255,.85); }
.pb-light .section-lead, .pb-light .prose { color: rgba(255,255,255,.88); }
.pb-light .link-arrow { color: #fff; border-color: rgba(255,255,255,.5); }
.pb-dark { color: var(--anthracite); }

/* Der Inhalt des Titelbilds besteht jetzt aus Zeilen – ohne eigene Ränder */
.hero-content > .pb-row { column-gap: 2rem; row-gap: 0; }

/* ---------------------------------------------------------------- Texte */

.pb-heading { margin: 0 0 .8rem; line-height: 1.2; color: var(--ink); }
:where(.pb-text > p:not([class])) { margin: 0 0 1rem; }
.pb-text :is(h1, h2, h3, h4, h5, h6):not([class]) {
  font-family: var(--font-display); font-weight: 400; color: var(--ink);
  line-height: 1.2; margin: 1.6rem 0 .8rem;
}
.pb-text :is(h1, h2, h3, h4, h5, h6):not([class]):first-child { margin-top: 0; }
.pb-text h1:not([class]) { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); }
.pb-text h2:not([class]) { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.pb-text h3:not([class]) { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); }
.pb-text h4:not([class]) { font-size: 1.25rem; }
.pb-text h5:not([class]), .pb-text h6:not([class]) { font-size: 1.05rem; }
.pb-text ul:not([class]), .pb-text ol:not([class]) { margin: 0 0 1rem; padding-left: 1.3rem; }
.pb-text li + li { margin-top: .3rem; }
.pb-text blockquote { margin: 0 0 1rem; padding-left: 1.2rem; border-left: 3px solid var(--line); color: var(--grey); }
.pb-text a:not([class]) { text-decoration: underline; text-underline-offset: 3px; }
.pb-text a:not([class]):hover { color: var(--moss); }
.pb-light .pb-text a:not([class]):hover { color: #fff; opacity: .85; }
address.pb-text { font-style: normal; }
address.pb-text a:not([class]) { text-decoration: none; }
.pb-text-small { font-size: .85rem; color: var(--grey); }
.pb-list { margin: 0; padding-left: 1.3rem; }
.pb-list li + li { margin-top: .35rem; }
.info-box .pb-ib-text p { margin: 0 0 1rem; line-height: 1.75; }

/* --------------------------------------------------------------- Buttons */

.pb-buttons {
  display: flex; flex-wrap: wrap; gap: .8rem;
  justify-content: var(--pb-justify, flex-start);
  align-items: center;
}
/* Ein einzelner Textlink verhält sich wie bisher wie Text in der Zeile */
.pb-buttons:has(> .link-arrow:only-child) { display: block; }
.pb-btn-sm { padding: .65rem 1.4rem; font-size: .85rem; }
.pb-btn-lg { padding: 1.2rem 2.8rem; font-size: 1.02rem; }
.pb-btn-filled { background: var(--moss); border-color: var(--moss); color: #fff; }
.pb-btn-filled:hover { background: var(--moss-dark); border-color: var(--moss-dark); color: #fff; }
.pb-btn-filled-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.pb-btn-filled-dark:hover { background: #2a2f34; border-color: #2a2f34; color: #fff; }
.pb-btn-custom {
  background: var(--pb-bg, transparent); color: var(--pb-fg, inherit);
  border-color: var(--pb-bd, currentColor);
}
.pb-btn-custom:hover { opacity: .88; }
.pb-textlink { text-decoration: underline; text-underline-offset: 3px; }
.pb-textlink:hover { color: var(--moss); }
span.btn, span.link-arrow, span.pb-textlink { cursor: default; }

/* ----------------------------------------------------------------- Bilder */

.pb-image { margin: 0; }
.pb-image picture { display: block; width: 100%; }
.pb-image img, .pb-image .img-placeholder { width: 100%; border-radius: var(--radius); }
.pb-image figcaption { font-size: .84rem; color: var(--grey); margin-top: .6rem; }
.pb-lb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pb-imglink { display: block; }

/* ---------------------------------------------------------------- Galerie */

.pb-gallery .container > .mosaic,
.pb-gallery .pb-gal-wrap > .mosaic { padding: 0; }
.pb-gallery[data-src="manual"] .mosaic { margin-bottom: 0; }
.pb-gal-filter .filter-bar { margin-top: 0; }
.pb-gal-notitles .pb-gal-filter .filter-bar { margin-bottom: 1.5rem; }

.pb-gal-masonry .mosaic { display: block; }
.pb-gal-masonry .mosaic-item { width: 100%; break-inside: avoid; }
.pb-gal-masonry .mosaic-item img { aspect-ratio: auto; }

.pb-gal-row .mosaic { display: flex; flex-wrap: wrap; }
.pb-gal-row .mosaic::after { content: ''; flex-grow: 999; }
.pb-gal-row .mosaic-item {
  flex: var(--ar, 1.5) 1 calc(var(--pb-h, 260px) * var(--ar, 1.5));
  height: var(--pb-h, 260px);
}
.pb-gal-row .mosaic-item picture { display: block; height: 100%; }
.pb-gal-row .mosaic-item img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }

.pb-gal-carousel .mosaic {
  display: grid; grid-auto-flow: column; grid-template-columns: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: .6rem;
}
.pb-gal-carousel .mosaic-item { scroll-snap-align: start; }
.pb-gal-carousel .mosaic-item img { height: 100%; }

.pb-nolb { cursor: default; }
.pb-nozoom .mosaic-item:hover img { transform: none; filter: none; }
.pb-cap { display: block; font-size: .82rem; color: var(--grey); padding: .45rem .1rem 0; text-align: left; }
.pb-with-caps .mosaic-item { overflow: visible; }
.pb-with-caps .mosaic-item picture { overflow: hidden; border-radius: inherit; }

/* ------------------------------------------------------------- Sonstiges */

.pb-video { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.pb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.pb-spacer { height: 48px; }
.pb-divider { border: 0; border-top: 1px solid var(--line); margin: 1.5rem auto; width: 100%; }
.pb-menu-inline { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0; padding: 0; }
.pb-empty {
  padding: 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--grey); text-align: center; font-size: .9rem;
}
.pb-error { padding: 1rem; background: #fbeceb; color: #8a2018; font-size: .85rem; }

/* ------------------------------------------- Untermenüs in der Kopfzeile */

.nav-desktop ul .has-sub { position: relative; }
.nav-desktop ul .has-sub > a::after {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-left: .45rem;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
}
.nav-desktop ul .sub-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 210px; padding: .4rem; margin: 0; list-style: none;
  display: flex; flex-direction: column; gap: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 16px 40px -18px rgba(20,23,26,.4);
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s;
  z-index: 40;
}
.nav-desktop ul .has-sub:hover > .sub-menu,
.nav-desktop ul .has-sub:focus-within > .sub-menu { opacity: 1; visibility: visible; }
.nav-desktop ul .sub-menu .sub-menu { top: 0; left: 100%; transform: none; }
.site-header .nav-desktop ul .sub-menu a {
  color: var(--ink); text-align: left; padding: .6rem .9rem; border-radius: 2px; white-space: nowrap;
}
.site-header .nav-desktop ul .sub-menu a:hover { background: var(--paper-2); }
.nav-desktop ul .sub-menu a::before { display: none; }

.mobile-nav .sub-menu { list-style: none; margin: 0 0 .8rem; padding: 0 0 0 1rem; }
.mobile-nav .sub-menu li + li { border-top: 0; }
.mobile-nav nav .sub-menu a { font-size: 1.15rem; padding: .45rem 0; font-family: var(--font-sans); color: var(--anthracite); }

/* ------------------------------------------------- Ansichten ausblenden */

@media (min-width: 1024px) { .pb-hide-d { display: none !important; } }
@media (max-width: 1023.98px) { .pb-hide-m { display: none !important; } }

/* Rechtstexte: Tabellen */
.pb-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.pb-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pb-table th, .pb-table td { text-align: left; vertical-align: top; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
.pb-table th { font-weight: bold; background: var(--paper-2); }
.pb-legal h2 { font-size: 1.25rem; margin: 2rem 0 .6rem; }
.pb-legal h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }

/* Theme-Option: Kopfzeile zentriert */
@media (min-width: 1024px) {
  .theme-header-layout-centered .header-inner { flex-direction: column; justify-content: center; gap: .5rem; }
  .theme-header-layout-centered { --header-h: 140px; }
}
