/**
 * app.css – schlanke CSS-Schicht für die ACF-Module (ersetzt Divi-Markup).
 * Wirkt ausschließlich auf .module-Markup; bestehende statische Seiten
 * bleiben unberührt.
 */

:root {
    --tp-brand: #F16334;       /* Marken-Orange (Hero, Buttons, Links) */
    --tp-brand-dark: #d9501f;
    --tp-card: #f5f5f5;        /* Testimonial-/Kartenhintergrund */
    --tp-text: #666;
    --tp-row-max: 1080px;
    --tp-font-heading: 'Abel', Helvetica, Arial, Lucida, sans-serif;
    --tp-font-body: Georgia, serif;
    --tp-font-card: 'Open Sans', Helvetica, Arial, Lucida, sans-serif;
    --tp-font-button: 'Open Sans', Helvetica, Arial, Lucida, sans-serif;
}

.tp-modules { width: 100%; }

.module { width: 100%; }

/* ACF-Margins über CSS-Variablen (steuerbar in Media Queries) */
.tp-modules > .module[style*="--tp-m-b"],
#sidebar .tp-modules > .module[style*="--tp-m-b"] {
    margin-bottom: var(--tp-m-b) !important;
}
.tp-modules > .module[style*="--tp-m-t"],
#sidebar .tp-modules > .module[style*="--tp-m-t"] {
    margin-top: var(--tp-m-t) !important;
}

/* ACF-Padding-Felder (--tp-pad-t/b am Section) überschreiben CSS-Defaults */
.module[style*="--tp-pad-t"] > .module__inner {
    padding-top: var(--tp-pad-t) !important;
}
.module[style*="--tp-pad-b"] > .module__inner {
    padding-bottom: var(--tp-pad-b) !important;
}
/* Default-Hintergrund je Modul (volle Breite). Per ACF-Feld „bg_color" wird
   pro Modul ein Inline-Style gesetzt, der diesen Default überschreibt. */
.tp-modules .module:not(.module-hero) { background-color: #fff; }
.module__inner {
    width: 80%;
    max-width: var(--tp-row-max);
    margin: 0 auto;
    padding-top: var(--tp-pad-t, 50px);
    padding-bottom: var(--tp-pad-b, 50px);
    padding-left: 0;
    padding-right: 0;
}

/* Modul-Typografie: Fließtext in Georgia (serif) und Textfarbe #222.
   Überschriften (h1–h6) behalten ihre bestehende Schrift; Links behalten ihre
   Markenfarbe (siehe .tp-modules .module a:not(.tp-button)). Der Hero bleibt
   mit seiner eigenen Schrift/Farbe unberührt. */
.tp-modules .module:not(.module-hero) .module__inner {
    font-family: var(--tp-font-body);
    font-weight: normal;
    color: #222;
}
.tp-modules .module:not(.module-hero) .module__inner :is(strong, b) {
    font-weight: 700;
}
.tp-modules .module:not(.module-hero) .module__inner :is(h1, h2, h3, h4, h5, h6) {
    font-family: var(--tp-font-heading);
}

/* Hero / Aphorismus (Marken-Orange mit leichtem Verlauf wie Live) ---- */
.module-hero {
    background: linear-gradient(180deg, #F16334 0%, #d24e1c 100%);
    color: #fff;
    text-align: center;
}
.module-hero .module__inner {
    width: 100%;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding: 165px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* Hero: ACF Mobile-Padding überschreibt Standard nur wenn gesetzt */
@media (max-width: 980px) {
    .module-hero[style*="--tp-hero-pad-t-m"] > .module__inner {
        padding-top: var(--tp-hero-pad-t-m) !important;
    }
    .module-hero[style*="--tp-hero-pad-b-m"] > .module__inner {
        padding-bottom: var(--tp-hero-pad-b-m) !important;
    }
}
.module-hero.is-align-center { text-align: center; }
.module-hero.is-align-left { text-align: left; }
.module-hero.is-align-right { text-align: right; }
.module-hero.is-align-center .aphorism,
.module-hero.is-align-center .module-hero__subline { text-align: center !important; }
.module-hero.is-align-left .aphorism,
.module-hero.is-align-left .module-hero__subline { text-align: left !important; }
.module-hero.is-align-right .aphorism,
.module-hero.is-align-right .module-hero__subline { text-align: right !important; }
.module-hero .aphorism {
    font-family: var(--tp-font-heading);
    font-size: 48px;
    line-height: 1.5em;
    margin: 0;
    font-weight: 400;
}
.module-hero__subline { margin: .5em 0 0; opacity: .9; }

/* Textblock (auch Artikel-Fließtext für Wissen-Beiträge) ------------- */
.module-text-block p { line-height: 1.7; margin: 0 0 1em; }
.module-text-block h1,
.module-text-block h2,
.module-text-block h3,
.module-text-block h4 { line-height: 1.25; margin: 1.2em 0 .5em; }
.module-text-block h1:first-child,
.module-text-block h2:first-child,
.module-text-block h3:first-child { margin-top: 0; }
/* Bild direkt vor H1/H2 → kleinerer Abstand (alle Breakpoints) */
.module-text-block img + h1,
.module-text-block img + h2,
.module-text-block figure + h1,
.module-text-block figure + h2,
.module-text-block .wp-block-image + h1,
.module-text-block .wp-block-image + h2,
.module-text-block p:has(> img) + h1,
.module-text-block p:has(> img) + h2 {
    margin-top: 0.5em;
}
.module-text-block ul,
.module-two-columns ul,
.tp-card ul { list-style: disc; margin: 0 0 1em; padding-left: 1.25em; line-height: 1.7; }
.module-text-block ul { margin-bottom: 0; padding-bottom: 0; }
.module-text-block ol,
.module-two-columns ol,
.tp-card ol { list-style: decimal; margin: 0 0 1em; padding-left: 1.25em; line-height: 1.7; }
.module-text-block li,
.module-two-columns li,
.tp-card li { margin-bottom: .35em; }
.module-text-block img { max-width: 100%; height: auto; }
.module-text-block figure,
.module-text-block .wp-block-image { margin: 1.5em auto; text-align: center; }
.module-text-block figure img,
.module-text-block .wp-block-image img,
.module-text-block p > img {
    display: inline-block;
    max-width: min(100%, 680px);
    max-height: 600px;
    width: auto;
    height: auto;
}
.module-text-block figcaption,
.module-text-block .wp-element-caption {
    font-size: .85rem;
    color: #888;
    margin-top: 6px;
    text-align: center;
}
.module-text-block > *:last-child { margin-bottom: 0; }

/* Gutenberg-Blockklassen aus importierten Seiteninhalten */
.module-text-block .has-background { padding: 1em 1.5em; border-radius: 4px; }
.module-text-block .has-small-font-size { font-size: .9rem; }
/* Tablet + Desktop: „small“ nicht unter 15px */
@media (min-width: 768px) {
    .has-small-font-size,
    .module-text-block .has-small-font-size {
        font-size: 15px;
    }
}
.module-text-block .wp-block-pullquote {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 1.4em 1em;
    margin: 2em auto;
    max-width: 680px;
    text-align: center;
    font-style: italic;
}
.module-text-block .wp-block-pullquote blockquote {
    margin: 0;
    border: 0;
    padding: 0;
    text-align: center;
}
.module-text-block .wp-block-pullquote p { margin: 0; }
.module-text-block .wp-block-pullquote cite,
.module-text-block blockquote cite { display: block; font-style: normal; margin-top: .6em; }

/* Inhaltskarten (importierte Divi-Testimonial-Boxen) */
.tp-card {
    background: var(--tp-card);
    font-family: var(--tp-font-card);
    font-weight: normal;
    padding: 30px 34px;
    border-radius: 4px;
    margin: 0;
}
.tp-card :is(strong, b),
.wissen-card :is(strong, b),
.module-referenzen .referenz :is(strong, b) {
    font-weight: 700;
}
.tp-card > *:first-child { margin-top: 0; }
.tp-card > *:last-child { margin-bottom: 0; }
.tp-card__cta {
    margin: 30px 0;
}
.tp-card > .tp-card__cta:last-child {
    margin-bottom: 0;
}
.tp-card__cta.align-center { text-align: center; }
.tp-card__cta.align-right { text-align: right; }
/* Enge, gleichmäßige Abstände zwischen aufeinanderfolgenden Karten-Modulen */
.module-text-block:has(.tp-card) .module__inner,
.module-grauer-textblock .module__inner,
.module-grauer-textblock-cta .module__inner { padding: 12px 0; }
.module-hero + .module-text-block:has(.tp-card) .module__inner,
.module-hero + .module-grauer-textblock .module__inner,
.module-hero + .module-grauer-textblock-cta .module__inner { padding-top: 40px; }
.module-text-block:has(.tp-card):last-child .module__inner,
.module-grauer-textblock:last-child .module__inner,
.module-grauer-textblock-cta:last-child .module__inner { padding-bottom: 40px; }

/* Zwei Spalten -------------------------------------------------------- */
/* ACF-Padding (--tp-pad-*) gilt nur innen – nie auf der <section> */
.module.module-two-columns {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.module-two-columns .module__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    padding-top: var(--tp-pad-t, 50px);
    padding-bottom: var(--tp-pad-b, 50px);
    box-sizing: border-box;
}
/* Bei gesetzter ACF-Hintergrundfarbe: seitliches Innen-Padding nur auf .module__inner */
.module.module-two-columns[style*="background-color"] > .module__inner {
    padding-left: 20px;
    padding-right: 20px;
}
.module-two-columns__col > * { margin-bottom: 24px; }
.module-two-columns__col > *:last-child { margin-bottom: 0; }

/* Aufklappbox --------------------------------------------------------- */
.module-aufklappbox__details {
    background-color: #faf4ea;
    padding: 1em 1.25em;
    box-sizing: border-box;
}
.module-aufklappbox__summary {
    cursor: pointer;
    font-weight: 400;
    line-height: 1.5;
}
.module-aufklappbox__summary strong {
    font-weight: 700;
}
.module-aufklappbox__content {
    margin-top: 0.75em;
    line-height: 1.7;
}
.module-aufklappbox__content a {
    font-weight: 600 !important;
}
.module-aufklappbox__content > *:first-child { margin-top: 0; }
.module-aufklappbox__content > *:last-child { margin-bottom: 0; }

/* Einzelreferenz ------------------------------------------------------ */
.module-einzelreferenz .einzelreferenz {
    margin: 20px 0 30px;
    border-left: 5px solid;
    border-color: #f26437;
    padding-left: 20px;
    text-align: center;
}
.module-einzelreferenz .einzelreferenz__zitat {
    padding-left: 0.5em;
}
.module-einzelreferenz .einzelreferenz__zitat,
.module-einzelreferenz .einzelreferenz__zitat * {
    font-style: italic !important;
}
.module-einzelreferenz .einzelreferenz__weiterer-text,
.module-einzelreferenz .einzelreferenz__weiterer-text * {
    font-style: normal !important;
}
.module-einzelreferenz .einzelreferenz__weiterer-text {
    margin-top: 0.6em;
}
.module-einzelreferenz .einzelreferenz cite,
.module-einzelreferenz .einzelreferenz cite * {
    font-style: normal !important;
    text-transform: uppercase !important;
}
.module-einzelreferenz .einzelreferenz cite {
    display: block;
    margin-top: 2em;
}
.module-einzelreferenz .einzelreferenz > p:last-child {
    margin-bottom: 0;
}

/* Drei Boxen (Preisbeispiele) ---------------------------------------- */
.module-three-boxes .module-three-boxes__grid {
    display: grid;
    grid-template-columns: repeat(var(--tp-box-count, 3), 1fr);
    gap: 24px;
    align-items: stretch;
}
.module-three-boxes__box {
    color: #000;
    padding: 2em;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.module-three-boxes__title {
    margin: 0 0 0.5em;
    text-align: center;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
    color: #000;
}
.module-three-boxes__subtitle {
    margin: 0;
    text-align: center;
    font-size: 1em;
    line-height: 1.5;
    color: #000;
}
.module-three-boxes__rule {
    border: 0;
    border-top: 1px solid #000;
    margin: 1.1em 0;
    width: 100%;
}
.module-three-boxes__list {
    margin: 0 0 1.25em;
    padding-left: 1.25em;
    list-style: disc;
    font-size: 0.95em;
    line-height: 1.55;
    flex: 1 1 auto;
}
.module-three-boxes__list li {
    margin-bottom: 0.35em;
}
.module-three-boxes__price {
    margin: auto 0 0;
    text-align: center;
    font-size: 1.15em;
    font-weight: 700;
    color: #000;
}

/* Bildraster ---------------------------------------------------------- */
.module-image-grid__title { margin: 0 0 1em; }
.module-image-grid__grid {
    display: grid;
    grid-template-columns: repeat(var(--tp-grid-cols, 3), 1fr);
    gap: 24px;
}
.module-image-grid__item { margin: 0; }
.module-image-grid__img { width: 100%; max-width: 220px; height: auto; display: block; margin: 0 auto; border-radius: 4px; }
.module-image-grid.is-img-w-100 .module-image-grid__img { max-width: 100%; }
.module-image-grid.is-img-w-200 .module-image-grid__img { max-width: 200px; }
.module-image-grid.is-img-w-190 .module-image-grid__img { max-width: 190px; }
.module-image-grid.is-img-w-180 .module-image-grid__img { max-width: 180px; }
.module-image-grid figcaption { text-align: center; margin-top: .7em; }
.module-image-grid figcaption a { font-weight: 600; }

/* Überschrift (text_block) direkt vor der Referenzliste: Übergang straffen,
   damit der Abstand zur ersten grauen Box dem Live-Layout entspricht. */
.module-text-block:has(+ .module-referenzen) .module__inner { padding-bottom: 24px; }
.module-text-block + .module-referenzen .module__inner { padding-top: 0; }

/* Text + Bild -------------------------------------------------------- */
.module-text-image-block .module__inner {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.module-text-image-block.has-image-right .module__inner { flex-direction: row-reverse; }
.module-text-image-block__image { flex: 1 1 50%; margin: 0; }
.module-text-image-block__image img { width: 100%; height: auto; display: block; }
.module-text-image-block__text { flex: 1 1 50%; }

/* Bild --------------------------------------------------------------- */
.module-full-width-image { position: relative; }
.module-full-width-image__link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.tp-modules .module .module-full-width-image__link {
    color: inherit;
    text-decoration: none;
}
.module-full-width-image__link:hover .module-full-width-image__img {
    opacity: 0.92;
}
.module-full-width-image.has-overlay .module-full-width-image__link {
    position: relative;
    display: block;
}
.module-full-width-image__figure {
    margin: 0;
    text-align: center;
}
.module-full-width-image__img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: opacity .2s ease;
}
.module-full-width-image.is-width-full .module-full-width-image__img {
    max-width: 100%;
}
.module-full-width-image.is-width-600 .module-full-width-image__img {
    max-width: 600px;
}
.module-full-width-image.is-width-400 .module-full-width-image__img {
    max-width: 400px;
}
.module-full-width-image.is-align-left .module-full-width-image__figure {
    text-align: left;
}
.module-full-width-image.is-align-left .module-full-width-image__img {
    margin-left: 0;
    margin-right: auto;
}
.module-full-width-image.is-align-center .module-full-width-image__figure {
    text-align: center;
}
.module-full-width-image.is-align-center .module-full-width-image__img {
    margin-left: auto;
    margin-right: auto;
}
.module-full-width-image.is-align-right .module-full-width-image__figure {
    text-align: right;
}
.module-full-width-image.is-align-right .module-full-width-image__img {
    margin-left: auto;
    margin-right: 0;
}
.module-full-width-image__overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; text-align: center; padding: 30px;
    pointer-events: none;
}
.module-full-width-image.has-link .module-full-width-image__overlay {
    pointer-events: none;
}

/* Bild + Text (90% Viewport, 3/4 + 1/4) -------------------------------- */
.module-image-text-band .module-image-text-band__inner {
    width: 90%;
    max-width: 90%;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 28px;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
}
.module-image-text-band.is-image-right .module-image-text-band__inner {
    grid-template-columns: 1fr 3fr;
}
.module-image-text-band.is-image-right .module-image-text-band__media {
    order: 2;
}
.module-image-text-band.is-image-right .module-image-text-band__text {
    order: 1;
}
.module-image-text-band__media {
    margin: 0;
    min-width: 0;
    border: 1px solid #000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 10px 10px 0 0 rgba(0, 0, 0, 0.3);
}
.module-image-text-band__img {
    /* Wie Live: natürliche Breite, max. Container – verhindert Hochskalieren weicher Varianten */
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}
.module-image-text-band__text {
    margin: 0;
    min-width: 0;
    line-height: 1.5;
}
.module-image-text-band__text > *:first-child { margin-top: 0; }
.module-image-text-band__text > *:last-child { margin-bottom: 0; }

/* Zwei Bilder -------------------------------------------------------- */
.module-two-column-images .module__inner { display: flex; gap: 24px; }
.module-two-column-images figure { flex: 1; margin: 0; }
.module-two-column-images img { width: 100%; height: auto; display: block; }

/* Caption ------------------------------------------------------------ */
.caption { font-size: .8rem; color: #777; margin-top: 6px; text-align: left; }
.module-full-width-image.is-align-left figcaption.caption { text-align: left; }
.module-full-width-image.is-align-center figcaption.caption { text-align: center; }
.module-full-width-image.is-align-right figcaption.caption { text-align: right; }
.module-full-width-image figcaption.caption > *:first-child { margin-top: 0; }
.module-full-width-image figcaption.caption > *:last-child { margin-bottom: 0; }
.module-full-width-image figcaption.caption p { margin: 0 0 .35em; }

/* Button ------------------------------------------------------------- */
.module-cta .module__inner { padding-top: var(--tp-pad-t, 0); }
.module-cta.align-center .module__inner { text-align: center; }
.module-cta.align-right .module__inner { text-align: right; }

/* Wichtige Links ----------------------------------------------------- */
.module-wichtige-links { background-color: #faf4ea; }
.module-wichtige-links .module__inner {
    padding-top: var(--tp-pad-t, 1.5em);
    padding-bottom: var(--tp-pad-b, 1.5em);
}
.wichtige-links__title {
    margin: 0 0 0.75em;
    font-family: var(--tp-font-button, 'Open Sans', Helvetica, Arial, Lucida, sans-serif);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}
.wichtige-links__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wichtige-links__list li { margin: 0 0 0.35em; }
.wichtige-links__list li:last-child { margin-bottom: 0; }
.wichtige-links__list a {
    color: #000;
    text-decoration: none;
}
.wichtige-links__list a:hover { text-decoration: underline; }

/* Pfeil nach unten --------------------------------------------------- */
.module-chevron-down .module__inner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: var(--tp-pad-t, 1em);
    padding-bottom: var(--tp-pad-b, 1em);
}
.module-chevron-down__icon {
    display: block;
    width: 62px;
    height: auto;
}
@media (max-width: 980px) {
    .module-chevron-down { display: none !important; }
}
.tp-button {
    display: inline-block;
    padding: .55em 1.4em;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--tp-font-button);
    border: 2px solid var(--tp-btn-global-bg, var(--tp-brand));
    transition: background .2s, color .2s;
    margin-right: 12px;
}
.tp-button--primary {
    background: var(--tp-btn-global-bg, var(--tp-brand));
    color: var(--tp-btn-global-text, #fff);
}
.tp-button--primary:hover {
    background: var(--tp-btn-global-hover-bg, var(--tp-brand-dark));
    border-color: var(--tp-btn-global-hover-bg, var(--tp-brand-dark));
    color: var(--tp-btn-global-hover-text, #fff);
}

/* FAQ ---------------------------------------------------------------- */
.module-faq__item { border-bottom: 1px solid #e2e2e2; padding: 12px 0; }
.module-faq__q { cursor: pointer; font-weight: 600; }
.module-faq__a { padding-top: 8px; line-height: 1.7; }

/* Referenzen (helle Karten, Marken-Orange Links) --------------------- */
.module-referenzen .referenz {
    background: var(--tp-card);
    font-family: var(--tp-font-card);
    font-weight: normal;
    padding: 30px;
    margin: 0 0 24px;         /* sichtbare weiße Lücke zwischen den Karten wie Live */
    border: 0;                /* Divi-blockquote-Rand (border-left) neutralisieren */
    line-height: 1.5;
    color: var(--tp-text);
}
.module-referenzen .referenz:last-child { margin-bottom: 0; }
.module-referenzen .referenz__zitat { font-style: italic; }
.module-referenzen .referenz__zitat p { padding-bottom: 1em; }
.module-referenzen .referenz__meta { font-style: normal; }
.module-referenzen .referenz a { color: var(--tp-brand); text-decoration: none; }
.module-referenzen .referenz a:hover { text-decoration: underline; }

/* Allgemeine Links innerhalb der Module in Markenfarbe. */
.tp-modules .module a:not(.tp-button) { color: var(--tp-brand); }

/* Kunden-Grid -------------------------------------------------------- */
.module-kunden .module__inner { padding-top: 82px; }
.module-kunden__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 52px 32px;
}
.module-kunden__item { text-align: center; }
.module-kunden__logo {
    max-width: 130px;
    max-height: 50px;
    width: auto;
    height: auto;
    display: inline-block;
    object-fit: contain;
}

/* Wissen-Teaser (graue Karten: Bild links, Text rechts, oranger Link) - */
.wissen-card {
    display: flex;
    gap: 40px;
    background: var(--tp-card);
    font-family: var(--tp-font-card);
    font-weight: normal;
    padding: 30px;
    margin: 0 0 24px;
    align-items: flex-start;
}
.wissen-card:last-child { margin-bottom: 0; }
.wissen-card__media { flex: 0 0 150px; line-height: 0; }
.wissen-card__img { width: 150px; height: 150px; object-fit: contain; display: block; }
.wissen-card__body { flex: 1 1 auto; }
.wissen-card__title { line-height: 1.3; margin: 0 0 .6em; }
.tp-modules .module .wissen-card__title a { text-decoration: none; }
.wissen-card__teaser { line-height: 1.7; margin: 0 0 1em; }
.wissen-card__more { margin: 0; }
.wissen-card__more a { text-decoration: none; }
.wissen-card__more a:hover { text-decoration: underline; }

/* Preistabelle ------------------------------------------------------- */
.module-preise__table { width: 100%; border-collapse: collapse; }
.module-preise__table th,
.module-preise__table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e2e2e2; }

/* Sidebar-Layout (Template „Mit Sidebar") ---------------------------- */
.et_right_sidebar #content-area { display: flow-root; }
.et_right_sidebar #left-area {
    float: left;
    width: 77%;
    padding-right: 40px;
    box-sizing: border-box;
}
.et_right_sidebar #left-area .module__inner {
    width: 100%;
    max-width: none;
    padding-top: var(--tp-pad-t, 0);
    padding-bottom: var(--tp-pad-b, 0);
}
.et_right_sidebar #sidebar {
    float: right;
    width: 23%;
    padding-bottom: 28px;
    box-sizing: border-box;
}
/* Content-Links wie Live: schwarz, Unterstreichung in Markenfarbe */
.et_right_sidebar #left-area a:not(.tp-button) {
    color: #000;
    text-decoration: underline;
    text-decoration-color: var(--tp-brand, #f26437);
}
.tp-modules--sidebar .module:not(.module-hero) { background-color: transparent; }
.tp-modules--sidebar .module__inner {
    width: 100%;
    max-width: none;
    padding-top: var(--tp-pad-t, 0);
    padding-bottom: var(--tp-pad-b, 1.25em);
}
.tp-modules--sidebar blockquote {
    margin: 0 0 0.5em;
    padding-left: 16px;
    border-left: 4px solid var(--tp-brand, #f26437);
}
.tp-modules--sidebar .module-full-width-image__img,
.tp-modules--sidebar img { max-width: 100%; height: auto; }

/* Breadcrumb (Sidebar-Template, direkt unter Header wie Live) -------- */
.custom-breadcrumbs {
    max-width: 1000px;
    margin: 15px auto -10px;
    padding: 0 20px;
    font-size: 14px !important;
    color: #555;
    line-height: 1.5;
    box-sizing: border-box;
}
.custom-breadcrumbs a {
    color: #000;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px !important;
}
.custom-breadcrumbs a:hover {
    text-decoration: underline;
    text-decoration-color: var(--tp-brand, #f26437);
}
.custom-breadcrumbs .breadcrumb_last { color: #555; }

/* Preisrechner ------------------------------------------------------- */
.pk-form label { display: inline-block; margin-bottom: 0.25em; }
.pk-form input[type="number"],
.pk-form select {
    width: 100%;
    max-width: 320px;
    padding: 0.45em 0.6em;
    border: 1px solid #ccc;
    border-radius: 3px;
    font: inherit;
}
.pk-form input[type="radio"] {
    margin-right: 0.35em;
    accent-color: #F16334;
    width: 1.05em;
    height: 1.05em;
    vertical-align: -0.1em;
    cursor: pointer;
}
.pk-form input[type="radio"]:focus-visible {
    outline: 2px solid #F16334;
    outline-offset: 2px;
}
.pk-form button {
    margin: 0.25em 0.5em 0.25em 0;
    padding: 0.5em 1.2em;
    border: 2px solid var(--tp-btn-pk-calc-bg, var(--tp-brand, #f26437));
    border-radius: 5px;
    background: var(--tp-btn-pk-calc-bg, var(--tp-brand, #f26437));
    color: var(--tp-btn-pk-calc-text, #fff);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.pk-form button[type="reset"] {
    background: var(--tp-btn-pk-reset-bg, transparent);
    color: var(--tp-btn-pk-reset-text, var(--tp-brand, #f26437));
}
.pk-result {
    display: none;
    margin-top: 1em;
    padding: 1em;
    background: #f5f5f5;
    border-radius: 4px;
}
.pk-form .pk-invalid { border-color: #c0392b; }
.pk-form .pk-blink { animation: tp-pk-blink 0.6s ease 2; }
@keyframes tp-pk-blink {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.35); }
}

/* Responsiv ---------------------------------------------------------- */
@media (max-width: 980px) {
    .module-text-image-block .module__inner { flex-direction: column; }
    .module-two-column-images .module__inner { flex-direction: column; }
    .module-two-columns .module__inner { grid-template-columns: 1fr; gap: 24px; }
    .module-three-boxes .module-three-boxes__grid { grid-template-columns: 1fr; gap: 20px; }
    .module-image-text-band .module-image-text-band__inner,
    .module-image-text-band.is-image-right .module-image-text-band__inner {
        grid-template-columns: 1fr;
        width: calc(100% - 40px);
        max-width: none;
    }
    .module-image-text-band.is-image-right .module-image-text-band__media,
    .module-image-text-band.is-image-right .module-image-text-band__text {
        order: initial;
    }
    .module-kunden__grid { grid-template-columns: repeat(2, 1fr); }
    .wissen-card { flex-direction: column; gap: 20px; }
    .wissen-card__media { flex-basis: auto; }
    .module__inner {
        padding-top: var(--tp-pad-t, 36px);
        padding-bottom: var(--tp-pad-b, 36px);
        padding-left: 20px;
        padding-right: 20px;
    }
    .et_right_sidebar #left-area .module__inner {
        padding-top: var(--tp-pad-t, 0);
        padding-bottom: var(--tp-pad-b, 0);
    }
    .et_right_sidebar #left-area,
    .et_right_sidebar #sidebar {
        float: none;
        width: 100%;
        padding-right: 0;
    }
    .custom-breadcrumbs {
        font-size: 14px !important;
        padding-left: 10px;
        padding-right: 10px;
        margin-top: 10px;
        margin-bottom: 2px;
    }
}

/* Bildraster: Tablet (iPad mini ~744px, Air ~820px, kleine Tablets) → Spaltenzahl beibehalten */
@media (min-width: 600px) and (max-width: 980px) {
    .module-image-grid__grid {
        grid-template-columns: repeat(var(--tp-grid-cols, 3), minmax(0, 1fr));
        gap: 16px;
    }
}

/* Bildraster: nur schmale Smartphones → 1 Spalte */
@media (max-width: 599px) {
    .module-image-grid__grid {
        grid-template-columns: 1fr;
    }
}

.module-three-boxes__box { padding: 1.5em; }

.module-three-boxes__subtitle {
    font-weight: 700;
    font-style: italic;
}

/*
 * Tablet + Mobile: Abstand letztes Hauptmodul → Footer (#main-footer).
 * Desktop (≥981px): kein erzwungener Extra-Abstand (nur ACF-Margins).
 * Nicht bei Template „Mit Sidebar" auf Desktop; ≤980 siehe auch overrides.css.
 */
@media (min-width: 769px) and (max-width: 980px) {
    body:not(.et_right_sidebar) #main-content .tp-modules:not(.tp-modules--sidebar) > .module:last-child,
    body.et_right_sidebar #left-area .tp-modules > .module:last-child {
        margin-bottom: 20px !important;
    }
}

/* Template „Mit Sidebar" + Mobile-Abstände (≤768px; Tablet unverändert) */
@media (max-width: 768px) {
    body.page-template-page-sidebar .module__inner,
    .module__inner {
        width: calc(100% - 0px) !important;
        max-width: 100%;
    }

    .tp-modules > .module[style*="--tp-m-b"],
    #sidebar .tp-modules > .module[style*="--tp-m-b"] {
        margin-bottom: min(var(--tp-m-b), 30px) !important;
    }
    .tp-modules > .module[style*="--tp-m-t"],
    #sidebar .tp-modules > .module[style*="--tp-m-t"] {
        margin-top: min(var(--tp-m-t), 30px) !important;
    }
    .module[style*="--tp-pad-t"] > .module__inner {
        padding-top: min(var(--tp-pad-t), 30px) !important;
    }
    .module[style*="--tp-pad-b"] > .module__inner {
        padding-bottom: min(var(--tp-pad-b), 30px) !important;
    }
    .module__inner {
        padding-top: min(var(--tp-pad-t, 36px), 30px);
        padding-bottom: min(var(--tp-pad-b, 36px), 30px);
    }
}