/* Template-System v3 – Phase 3c Visueller Builder: Grundstile der Elemente (.pbn-*).
   Element-spezifische Stile kommen aus der erzeugten Seiten-CSS (.pbn-<id>), die nach dieser Datei geladen wird. */

.pbn { box-sizing: border-box; min-width: 0; }
.pbn *, .pbn *::before, .pbn *::after { box-sizing: border-box; }

/* Layout */
.pbn-section { position: relative; padding: 56px 0; }
.pbn-section__inner { max-width: var(--pb-container-max, 1320px); margin: 0 auto; padding: 0 16px; }
.pbn-section__inner--full { max-width: none; padding: 0; }
.pbn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.pbn-column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pbn-column--link, .pbn-column--link:hover { color: inherit; text-decoration: none; }
.pbn-box { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 12px; background: #fff; color: inherit; text-decoration: none; }
.pbn-box--link:hover { text-decoration: none; }
.pbn-spacer { height: 40px; }
/* Trennlinie: Balken in Primärfarbe (wie unter Überschriften); Länge in % kommt aus dem Inhalt-Tab (style="width"),
   Farbe/Stärke weiterhin optional über Design-Tab → Rahmen (.pbn-<id>) */
.pbn-divider { border: 0; border-top: 4px solid var(--pb-color-primary, #0b3fbf); border-radius: 2px; margin: 12px 0; width: 100%; max-width: 100%; height: 0; opacity: 1; flex: none; align-self: flex-start; }

@media (max-width: 767.98px) {
  .pbn-section { padding: 40px 0; }
  .pbn-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Bereich, der nur Trennlinien/Abstände enthält: kein Standard-Innenabstand (sonst 56 px oben + unten → hoher Streifen).
   Spezifität wie .pbn-section → eigene Abstände aus dem Design-Tab (.pbn-<id>, später geladen) gelten weiterhin. */
.pbn-section:where(:has(> .pbn-section__inner > .pbn-divider):not(:has(> .pbn-section__inner > :not(.pbn-divider, .pbn-spacer)))) { padding-top: 0; padding-bottom: 0; display: flow-root; background-color: var(--pb-color-surface, #f4f6fa); }

/* Inhalt */
.pbn-heading { margin: 0; color: var(--pb-color-heading, #0f1f3d); font-weight: 700; line-height: 1.2; }
:where(h1.pbn-heading) { font-size: clamp(2rem, 4vw, 3.25rem); }
:where(h2.pbn-heading) { font-size: clamp(1.6rem, 3vw, 2.25rem); }
:where(h3.pbn-heading) { font-size: 1.5rem; }
:where(h4.pbn-heading) { font-size: 1.25rem; }
:where(h5.pbn-heading, h6.pbn-heading) { font-size: 1.05rem; }
.pbn-heading a { color: inherit; text-decoration: none; }
.pbn-text { line-height: 1.65; }
.pbn-text p { margin: 0 0 .9em; }
.pbn-text p:last-child { margin-bottom: 0; }
.pbn-image { margin: 0; overflow: hidden; }
.pbn-image img { display: block; width: 100%; height: 100%; object-fit: inherit; }
.pbn-image a { display: block; height: 100%; }
.pbn-icon { display: inline-flex; width: 2.5rem; height: 2.5rem; color: var(--pb-color-primary, #0b3fbf); }
.pbn-icon svg { width: 100%; height: 100%; }

/* Button */
.pbn-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .75em 1.5em; border: 2px solid transparent; border-radius: 8px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s; align-self: flex-start; }
.pbn-btn:hover { text-decoration: none; transform: translateY(-1px); }
.pbn-btn--primary { background: var(--pb-color-primary, #0b3fbf); color: var(--pb-color-primary-contrast, #fff); }
.pbn-btn--primary:hover { filter: brightness(1.08); color: var(--pb-color-primary-contrast, #fff); }
.pbn-btn--secondary { background: var(--pb-color-heading, #0f1f3d); color: #fff; }
.pbn-btn--secondary:hover { color: #fff; filter: brightness(1.15); }
.pbn-btn--outline { background: transparent; border-color: currentColor; color: var(--pb-color-primary, #0b3fbf); }
.pbn-btn--link { background: none; padding-left: 0; padding-right: 0; color: var(--pb-color-primary, #0b3fbf); }
.pbn-btn__icon { display: inline-flex; width: 1.15em; height: 1.15em; }
.pbn-btn__icon svg { width: 100%; height: 100%; }

/* Nur im Editor/Vorschau sichtbar */
.pbn-empty { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 12px; border: 2px dashed rgba(11, 63, 191, .35); border-radius: 8px; color: rgba(15, 31, 61, .55); font-size: 13px; background: rgba(11, 63, 191, .03); width: 100%; }
.pbn-grid > .pbn-empty { grid-column: 1 / -1; }
.pbn-image--placeholder { min-height: 160px; display: flex; }


