/* Übernommen aus der v13-Stage (public/design/patch.css) */
.page-header {
    background-color: rgba(255, 255, 255, 1) !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.d21-widget .d21-primary:before {
    background-color: #8f6a14;
}
.d21-widget .d21-primary:hover {
    background-color: #6f5310;
}
.d21-widget .d21-primary span{
    color: #0e0e0e;
}
.navbar-nav .nav-link {
    color: #005262 !important;
    font-weight: 600;
}
.navbar-nav .nav-link:hover {
    color: #0e0e0e !important;
}
.dropdown-menu {
    --bs-dropdown-color:  #0e0e0e !important;
    --bs-dropdown-link-color: #0e0e0e !important;
    --bs-dropdown-link-hover-color: #ffffff;
    --bs-dropdown-link-active-bg: #005262 !important;
    --bs-dropdown-link-active-color: #fff!important;
}
.ce-content a {
    color: #005262;
    text-decoration: none;
}
.ce-content a:hover {
    color: #0e0e0e;
    text-decoration: underline;
}
.img-thumbnail {
    border: none !important;
}

.d21-widget .d21-container-view {
    background: #fafafc !important;
}


.table, .ce-table {
    --bs-table-bg: #f8f9fa !important;
}
.btn {
    color: #fff;
    background-color: #005262;
    border-color: #005262;
}
fieldset legend {
    font-size: 1.2rem !important;
    font-weight: 700;
}
.searchbar-toggler {
    border-color: #6c757d !important;
}
.searchbar-toggler:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}



/* Live (Bootstrap 4) hatte maximal 1140px Inhaltsbreite; Bootstrap 5 geht ab 1400px auf 1320px.
   "html body" erhöht die Spezifität: main.css wird im liveMode inline und damit nach dieser Datei ausgegeben. */
@media (min-width: 1400px) {
    html body .container, html body .container-sm, html body .container-md, html body .container-lg, html body .container-xl, html body .container-xxl {
        max-width: 1140px;
    }
}

/* CKEditor 5 legt RTE-Tabellen in <figure class="table">; Bootstraps .table-Regeln zeichneten dadurch
   Linien und Hintergrund in einfache Text-Tabellen (z. B. Stadtführungen auf „Kunst und Kultur“). Live: schlicht. */
html body figure.table {
    width: auto;
    margin-bottom: 1rem;
}
html body figure.table > :not(caption) > * > *,
html body figure.table > table > :not(caption) > * > * {
    border-bottom-width: 0;
    background-color: transparent;
    box-shadow: none;
    padding: 1px 0.5rem 1px 0;
}

/* ---- Footer wie live (EXT:wildermann v8: _footer.scss, Bootstrap-4-.small = 80%) ---- */
html body .page-footer {
    margin-top: 0.5rem; /* plus padding-bottom l des letzten Inhaltselements (spacing.yaml) = 2rem wie live */
    border-top: 1px solid #ddd;
}
/* Bänder mit Hintergrund (Startseite) behalten ihr eigenes 2em-Padding; der Positionsabstand
   first/last gehört dann als weißer Rand nach außen, wie live */
html body .page-main .frame.parallaxBg.t3b-pt-l {
    margin-top: var(--t3b-space-l);
}
html body .page-main .frame.parallaxBg.t3b-pb-l {
    margin-bottom: var(--t3b-space-l);
}
/* Die Positions-Defaults first/last aus spacing.yaml sind für den Seiteninhalt gedacht, nicht für den Footer-Inhalt */
html body .page-footer__row1 .frame.t3b-pt-l:first-child {
    padding-top: 0;
}
html body .page-footer__row1 .frame.t3b-pb-l:last-child {
    padding-bottom: 0;
}
html body .page-footer__row1 {
    padding-top: 2rem;
}
html body .page-footer__row1 .ce-bodytext,
html body .page-footer__row1 table,
html body .page-footer__row2 {
    font-size: 0.76rem; /* 80 % von 0.95rem */
}
/* Copyright-Zeile direkt unter dem Footer-Inhalt, wie live */
html body .page-footer__row2 > .container {
    padding-top: 0;
    padding-bottom: 0.5rem;
}
/* Tabellen „Rechtliches“/„Kontakt“: live Linie oben, kein Hintergrund, 12px Innenabstand */
html body .page-footer table.table > :not(caption) > * > * {
    background-color: transparent;
    box-shadow: none;
    border-bottom-width: 0;
    border-top: 1px solid #dee2e6;
    padding: 0.75rem;
}
/* Externe Links mit Icon wie live (Template setzt es nur im Hauptinhalt) */
html body .page-footer a[target="_blank"]:not(.no-icon)::before {
    font-family: t3bootstrap !important;
    font-style: normal;
    font-weight: normal !important;
    line-height: 1;
    display: inline-block;
    margin-right: 0.3rem;
    content: "\f110";
}

/* ---- Abstände im Inhalt wie live (Bootstrap 4: Überschriften 0.5rem, Bilder 1rem darunter) ---- */
/* t3bootstrap setzt unter Überschriften .h1-mb … .h6-mb (h2: 2rem); live waren es überall 0.5rem */
html body :not(.hero) > .ce-header.h1-mb, html body :not(.hero) > .ce-header.h2-mb, html body :not(.hero) > .ce-header.h3-mb,
html body :not(.hero) > .ce-header.h4-mb, html body :not(.hero) > .ce-header.h5-mb, html body :not(.hero) > .ce-header.h6-mb {
    margin-bottom: 0.5rem;
}
/* Galeriebilder: t3bootstrap nimmt die Gitterbreite (1.5rem), live 1rem */
html body figure.image,
html body figure.image:has(:not(.image-caption)) {
    margin-bottom: 1rem;
}
/* Element-Abstände (space_before/after → tx_t3b_spacing): live waren die Frames Blöcke, der 1rem-Abstand des
   letzten Absatzes/Bildes fiel mit dem Frame-Abstand zusammen (Margin-Collapsing). Die v14-Frames sind
   Flex-Container, dort addiert sich beides -> Frame-Abstand um diese 1rem kürzen. */
html body .frame.t3b-mt-m { margin-top: 0; }
html body .frame.t3b-mb-m { margin-bottom: 0; }
html body .frame.t3b-mt-l { margin-top: calc(var(--t3b-space-l) - 1rem); }
html body .frame.t3b-mb-l { margin-bottom: calc(var(--t3b-space-l) - 1rem); }
html body .frame.t3b-mt-xl { margin-top: calc(var(--t3b-space-xl) - 1rem); }
html body .frame.t3b-mb-xl { margin-bottom: calc(var(--t3b-space-xl) - 1rem); }
html body .frame.t3b-mt-xxl { margin-top: calc(var(--t3b-space-xxl) - 1rem); }
html body .frame.t3b-mb-xxl { margin-bottom: calc(var(--t3b-space-xxl) - 1rem); }
/* Überschriften in Fließtext und HTML-Elementen: t3bootstrap setzt global h2 { margin-bottom: 2rem },
   live galt der Bootstrap-4-Standard 0.5rem. Überschriften von Inhaltselementen regelt .ce-header (oben). */
html body :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
    margin-bottom: 0.5rem;
}
/* Erstes Element in einem Container: davor steht nichts, mit dem der Abstand zusammenfallen könnte -> voller Wert */
html body .frame.t3b-mt-m:first-child { margin-top: var(--t3b-space-m); }
html body .frame.t3b-mt-l:first-child { margin-top: var(--t3b-space-l); }
html body .frame.t3b-mt-xl:first-child { margin-top: var(--t3b-space-xl); }
html body .frame.t3b-mt-xxl:first-child { margin-top: var(--t3b-space-xxl); }

/* Spaltenabstand wie live (Bootstrap 4: 30px; Bootstrap 5: 24px) */
html body .row {
    --bs-gutter-x: 30px;
}

/* Media-Element ohne Bild: die leere Bildspalte trägt me-3 (1rem) und rückte den Text ein; live bündig */
html body .media > .media-left:not(:has(*)) {
    display: none;
}
