body#body main div article.flex-teaser span.linkextern:before {
    background-image: unset;
    display: none;
}


body#body main div .tinyblock p:has(a.btn) {
    text-align: center;
}

.heroteaser figure a[href=""] {
    display: block;
    cursor: default;
}

.heroteaser a[href=""] {
    display: none;
}

div:has(#breadcrumb) {
    margin-left: 0;
}

h1 {
    text-align: center;
}

.flex-teaser img {
    width: 100%
}

.one, .two, .three, .four, .linkbox_wrapper.two3rd,.linkbox_wrapper.three4th, .flex-fill {
    flex-basis: 100%;
}

a.yt-preview-image:hover, figure.col-12.responsiveImage a  {
    border: none!important;
}

.tpl-2023-uebersichtseite main div:has(figure.col-12.responsiveImage) + * {
    margin-top: calc(var(--margin-default-sm)*2);
}

/* Hintergrundfarbe Teaser */
main article.flex-teaser img, main body .flex-teaser .inhalt {
    background-color: #FAF7F5!important
}

.flex-teaser.flex-fill {
    flex-shrink: 1;
    flex-basis: 100%!important;
}


.tpl-2023-uebersichtseite .vorlesen-wrapper {
    display: none;
}

/*---------------------------------Abstand viele Heros --------------------------------*/

.tpl-2023-uebersichtseite .heroteaser, .bube + .bube {
    margin-bottom: var(--margin-extra-sm);
}

.tpl-2023-uebersichtseite .mainslider_start {
    margin-bottom: 3rem;
}


@media only screen and (min-width: 768px) {
/* Service Kacheln mit 50% bekommen ein Extra Padding, um die Darstellung vertikal zu zentrieren, wenn sie neben flex-teasern stehen */
        div.d-flex article:not(.skachel) ~ article.skachel.flex-column.two:not(:only-of-type) .service-kachel {
            padding-top: 9%;
        }

        .flex-teaser {
            width: 100%;
        }

        .two, .three, .four {
            flex-basis: 48.75%;
            flex-grow: 0;
        }

        .linkbox_wrapper.four {
            flex-grow: 1;
        }

        .linkbox_wrapper.two3rd, .linkbox_wrapper.three4th, .linkbox_wrapper.three {
            flex-basis: 100%;
            column-count: 1;
        }


        .linkbox_wrapper.two3rd .linkbox_kachel div.lb_kachel_inner, .linkbox_wrapper.three4th .linkbox_kachel div.lb_kachel_inner {
            column-count: 3;
        }

        /* überflüssig? */ 
        /* .flex-teaser a {
            display: inline-flex;
        } */

        .flex-teaser img {
            width: 100%
        }

        .flex-teaser a span {
            display: none;
        }

        .flex-teaser.flex-fill {
            flex-shrink: 1;
            flex-basis: 49%!important;
        }


}

@media only screen and (max-width: 960px) {
    .linkbox_kachel div.lb_kachel_inner {
        column-count: 1!important;
    }
}

@media only screen and (min-width: 1200px) {
    .two {
        flex-basis: 49.2%;
    }

    .four {
    flex-basis: 24.125%;
    flex-grow: 0;
    }

    .flex-teaser:has(.service-kachel) .four /* .flex-teaser:has(.linkbox_kachel) */  {
        flex-basis: 24.3%;
    }

    .three {
        flex-basis: 32.6%;
        flex-grow: 0;
        }    

    .linkbox_wrapper.four {
        flex-grow: 1;
    }    

    .linkbox_wrapper.two3rd {
        flex-basis: 65%;
    }

    .linkbox_wrapper.two3rd .linkbox_kachel div.lb_kachel_inner {
        column-count: 3;
    }

    .linkbox_wrapper.three4th {
        flex-basis: 74%;
        flex-grow: 1;
    }

    .linkbox_wrapper.three4th .linkbox_kachel div.lb_kachel_inner {
        column-count: 3;
    }
    .linkbox_wrapper.three {
        flex-grow: 1;  
     }

     .linkbox_wrapper.three .linkbox_kachel .lb_kachel_inner {
        column-count: 3;
     }

    .flex-teaser.flex-fill {
        flex-basis: 24%!important;
       
    }
    }

main a:hover:not(.cgalerie) {
        border-bottom: none!important;
    }

/*main .flex-teaser a, main .flex-teaser a:hover {
    border-bottom: 2px solid transparent !important;
} */

main .heroteaser a:hover, main .heroteaser a {
    border: none !important;
}

/* margin aus element.css überschreiben */
main .heroteaser figure {
    margin-bottom: 0px!important;
}

/* Abstand nur Text Elemente */
main div p[id] {
    justify-content: center;
    width: 80%;
    margin: auto;
    margin-top: var(--margin-extra-sm);
    margin-bottom:var(--margin-extra-sm)
}



main h2, main h2.flexheadline {
    text-align: center;
    font-size: 1.375rem;
  
}

main .lb_headline {
    padding: 0% 1% 0 1%;
    background-color: #faf7f5;
    margin-right: 8px;
}

main .linkbox_wrapper h2 {
    text-align: unset;
    margin: 0;
    border-bottom: 1px solid #D0CDCA;
    background-color: #faf7f5;
    padding: 1.25rem 1% 0.5rem 0;
}

main .container .flex-wrap .flex-teaser img.service-icon {
    width: 33%;
    margin: auto;
    display: block;

} 

main .container .flex-wrap .flex-teaser .service-titel {
    /* margin: auto; */
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    /* margin-top: 0.75rem;
    margin-bottom: 0.875rem; */
    line-height: 1.625rem;
    height: 100%;
}

main .container .flex-wrap .flex-teaser .service-kachel, main .container .flex-wrap .flex-teaser .linkbox_kachel {
    background-color: #FAF7F5;
    border-bottom: 2px solid transparent !important;
    padding: 1%;
}


/* keine Link-Icons bei Service Kachel */
main .container .flex-wrap .flex-teaser a:has(.service-kachel):before {
    display: none;
}

main .container  .flex-wrap .linkbox_wrapper.flex-teaser .service-kachel:hover{
    border-bottom: 2px solid transparent !important;
}

main .container .flex-wrap h2.flexheadline {
    flex-basis: 100%;
}



/* Linkbox für neue Übersichtsseite */

main .link-box_wrapper {
    box-sizing: border-box;
	flex-wrap: wrap;
	display: flex;
	gap:30px;
    align-items: flex-start;
    margin:-10px;  
}

div.lb_headline:empty {
    display: none;
}

main .linkbox_wrapper .linkbox_kachel{
	box-sizing: border-box;
	/* margin: 1.5rem 10px; */
	flex: 1;
    min-width: 26%;
    margin-right: 8px;
}

main .linkbox_wrapper .linkbox_kachel .lb_kachel_inner h3{
	padding:0 0 0.6rem 0;
	margin:0;
	font-weight: normal;
	line-height: 1;
	border-bottom: 2px solid #777;
}

main .lb_kachel_inner ul li a.linkintern{
	background-position: 10px 50%;;
	background-image: url(/img/new-assets/red_chevron.svg);
	background-repeat: no-repeat;
	padding-left:25px;
	/*text-overflow: ellipsis;
	overflow: hidden; */
}

main .lb_kachel_inner ul li a:hover, main .lb_kachel_inner ul li a {
    border-bottom: none!important;
}


main .lb_kachel_inner ul{
	list-style-type:none;
	padding:0;
}

main .lb_kachel_inner ul li {
	text-align: left;
    /* padding:0.7rem 0;
    padding-top: 0.7rem!important; */
}

main .lb_kachel_inner ul li a, main .lb_kachel_inner ul li a.download, main .lb_kachel_inner ul li a.onlineform  {
    padding:0.7rem 0;
    padding-top: 0.7rem!important;
}

main .lb_kachel_inner ul li{
    border-bottom: 1px solid #D0CDCA;
    -webkit-column-break-inside: avoid;  /* vermeide, dass ein li über eine Spalte hinweg umbricht */
    page-break-inside: avoid; /* Fallback für ältere Browser */
}

main .lb_kachel_inner li:not(.tinyblock):first-of-type:not(.abisz ul li):not(.aehnliche_dienstleistungen h2 + ul li) {
    padding-top: 0.5rem;

}

.main .lb_kachel_inner ul li:hover {
	text-decoration: underline;
	background-color: #eee;
}

main .lb_kachel_inner ul li a.linkintern {
    background-position: 6px 50%;;
	background-image: url(/images/x22/icons/arrow-right-red.svg);
	background-repeat: no-repeat;
    padding-left:34px;
    margin-right: 0.5rem;
}

main .lb_kachel_inner ul li a {
    box-sizing: border-box;
	font-size: 1rem;
	flex: 1;
	display: block;
	color: #000;
	text-decoration: none;
	text-align: left;
	background-position: left;
    padding-left:10px;
    line-height: 1.25rem;

}

main .linkbox_wrapper h3 {
    padding:0 0 0.25rem 0;
	/* margin-top: 0.5rem; */
	font-weight: normal;
    border-bottom: 2px solid #D0CDCA;
    font-size: 1.25rem;

}

main div.linkbox_kachel .lb_kachel_inner {
    padding-left: 1%;
    padding-right: 1%;
    padding-bottom: 1%;
}

/* damit stretched-link funktioniert, muss das Elternelement eine andere position als static haben */
main article.flex-teaser.skachel {
    position: relative;
}

main article.flex-teaser, main .linkbox_kachel {
    margin-bottom: 1rem!important;
  
}

/* body main article.flex-teaser:has(.service-kachel) {
    background-color: #FAF7F5;
    /* margin-left: 4px!important;
    margin-right: 4px!important; 
} */

body main article.flex-teaser .service-titel {
    background-color: #FAF7F5;
    padding-bottom: 0.875rem;
}

body main article.flex-teaser .service-kachel figure.responsiveImage {
    margin-bottom: 0px;
}

main article.flex-teaser:has(.service-kachel):hover {
    box-shadow: 0px 2px red;
}

main .linkbox_kachel div.lb_kachel_inner ul li a.onlineform, main .linkbox_kachel div.lb_kachel_inner ul li a.download  {
    margin-bottom: 0px!important;
    padding-left: 10px;
}

body main .flex-teaser .inhalt {
    border-bottom: none;
    box-shadow: 0px 2px red;
    background-color: #FAF7F5!important
}

body main .linkbox_wrapper .linkbox-kachel {
    background-color: #FAF7F5
}

body main video.wrapper {
    margin-bottom: 2.5rem!important;
}

body main figure.responsiveImage {
    margin-bottom: 2.5rem; /* important entfernt */
}


@media only screen and (min-width: 560px) {

main .text-mit-bild {
    max-width:  80%;
    margin: auto;
}

}

/* Linkliste zweispaltig ausgeben */
@media only screen and (min-width: 768px){
main .three .linkbox_kachel div.lb_kachel_inner {
    column-count: 1;

    }

    main  .linkbox_wrapper.three {
        flex-grow: 1;
    }   
}

@media only screen and (min-width: 1024px) {

    main  .linkbox_wrapper.three {
        flex-grow: 1;
    }    

    main .three .linkbox_kachel div.lb_kachel_inner
    {
        column-count: 3;

    }

    main .three .linkbox_kachel div.lb_kachel_inner a {
        -webkit-column-break-after: column;
    }

}

@media only screen and (min-width: 1200px) {
    main .three .linkbox_kachel div.lb_kachel_inner
    {
        column-count: 3;

    }

/* geht nur in Firefox: Neue Spalte immer erst nach einem Link */
    main .three .linkbox_kachel div.lb_kachel_inner ul li a {
        -webkit-break-after: avoid-column;
        break-inside: avoid-column;
    }
}