/*** mask elements ***/

/** header image **/
#headerImage
{
    position: relative;
    max-height: var(--teaserHeight);
    overflow: clip;
}
.headerImg
{
    width: 100%;
    height: auto;
}
.teaserImgcover
{
    object-fit: cover;
}
/**  header video **/
.teaserVideo
{
    width: 100%;
    height: auto;
}

.textInTeaser
{
    grid-column: 1 / 5;
    position: absolute;
    top: 50%;
    left: calc((100vw - var(--contentWidth))/2);
    width: fit-content;
    max-width: max(var(--contentWidth)/2 + 5rem, 380px);
    padding: var(--boxPadding);
    border-radius: var(--boxBorderRadius);
    background-color: rgba(255,255,255,0.6);
    z-index: 100;

    transform: translateY(-50%);
}

.textInTeaser a
{
    font-weight: bold;
    cursor: pointer;
}

.textInTeaser a:hover
{
    text-decoration: underline;
}

.teaserElementImage .textInTeaser
{
    grid-column: 1 / 8;
}

.teaserElementblack .textInTeaser
{
    background-color: rgba(0,0,0,0.4);
    color: white;
}

.teaserElementblue .textInTeaser
{
    background: color-mix(in srgb, var(--primaryclr) 60%, transparent);
    color: white;
}

.teaserElementred .textInTeaser
{
    background: color-mix(in srgb, var(--secondaryclr) 60%, transparent);
    color: white;
}

.teaserElementred .textInTeaser h1,
.teaserElementred .textInTeaser h2,
.teaserElementred .textInTeaser h3,
.teaserElementblue .textInTeaser h1,
.teaserElementblue .textInTeaser h2,
.teaserElementblue .textInTeaser h3
{
    color: black;
}

.inTeaserImage
{
    max-width: calc(100% + 2rem);
    height: auto;
    margin-left: -1rem;
    margin-bottom: 1rem;
}

.teaserElementBeside
{
    display: grid;
    grid-template-columns: repeat(12,1fr);
    grid-column-gap: var(--boxPadding);
    width: var(--contentWidth);
    margin-inline: auto;
    padding-top: var(--boxPadding);
    padding-bottom: calc(var(--boxPadding) * 2 );
}

.teaserElementBeside .textInTeaser
{
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    left: unset;
    top: unset;
    height: 100%;
    width: 100%;
    padding: var(--boxPadding);
    border-radius: var(--boxBorderRadius);
    background-color: white;

    transform: unset;
}

.teaserElementBeside.teaserElementleft .textInTeaser
{
    grid-column: 9 / -1;
}

.teaserElementImage.teaserElementBeside.teaserElementleft .textInTeaser
{
    grid-column: 6 / -1;
    width: 100%;
}

.teaserElementBeside .textInTeaserblack
{
    background-color: black;
    color: white;
}

.teaserElementBeside .textInTeaserblue
{
    background-color: var(--primaryclr);
    color: white;
}

.teaserElementBeside .textInTeaserred
{
    background-color: var(--secondaryclr);
    color: white;
}

.teaserElementBeside .textInTeaserblue h1,
.teaserElementBeside .textInTeaserblue h2,
.teaserElementBeside .textInTeaserblue h3,
.teaserElementBeside .textInTeaserred h1,
.teaserElementBeside .textInTeaserred h2,
.teaserElementBeside .textInTeaserred h3,
.teaserElementBeside .textInTeaserblue a,
.teaserElementBeside .textInTeaserred a,
.teaserElementBeside .textInTeaserblue a:visited,
.teaserElementBeside .textInTeaserred a:visited
{
    color: inherit;
}

.teaserElementBeside .videoWrapper
{
    grid-column: 5 / -1;
}

.teaserElementBeside .hirImageWrapper
{
    grid-column: 3 / -1;
}

.teaserElementBeside.teaserElementright .hirImageWrapper
{
    grid-column: 8 / -1;
    grid-row: 1;
}

.teaserElementBeside.teaserElementleft .videoWrapper
{
    grid-column: 1 / 9;
    grid-row: 1;
}

.teaserElementBeside.teaserElementleft .hirImageWrapper
{
    grid-column: 1 / 6;
    grid-row: 1;
}

.teaserElementBeside video,
.hirImage img
{
    width: 100%;
    height: auto;
    border-radius: var(--boxBorderRadius);
}

.headerImage:has(.teaserElementBeside.teaserElementblack)
{
    background-color: black;
}

.headerImage:has(.teaserElementBeside.teaserElementblue)
{
    background-color: var(--primaryclr);
}

.headerImage:has(.teaserElementBeside.teaserElementred)
{
    background-color: var(--secondaryclr);
}

/*** general ***/

/*** pageTitle ***/
.pageTitleWrapper.whiteBackground
{
    background-color: white;
}
.pageTitleWrapper h1,
.pageTitleWrapper h2
{
    margin-bottom: 0;
}

    /** Text Image **/
.textpicElement
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px,1fr));
    grid-column-gap: var(--boxPadding);
    grid-row-gap: var(--boxPadding);
}

.textpicHeader h2
{
    font-size: clamp(1.6rem, 2.1vw + 0.8rem, 2rem);
}

.textpicElement > *
{
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.textpicImage
{
    display: flex;
    justify-content: center;
    align-items: center;
}

.textpicImage > a
{
    display: block;
    width: 100%;
}

.textpicImageWrapper img
{
    width: 100%;
    height: auto;
    border-radius: var(--boxBorderRadius);
}

.textpicImage:has(video)
{
    max-height: calc(var(--contentWidth) / 3);
    border-radius: var(--boxBorderRadius);
}

.textpicImage video
{
    max-height: 100%;
    width: auto;
    border-radius: var(--boxBorderRadius);
}

.textpicBodytext .contenttable:has(thead)
{
    width: auto;
    margin-inline: 0;
    margin-block: 1rem;
}

.textpicBodytext .contenttable thead th
{
    color: var(--primaryclr);
}

.textpicBodytextWrapper,
.pageTitleWrapper
{
    padding: var(--boxPadding);
    border-radius: var(--boxBorderRadius);
}

.whiteBackground .textpicBodytextWrapper
{
    background-color: white;
    color: var(--defaultColor);
}

.blackBackground .textpicBodytextWrapper
{
    background-color: black;
    color: white;
}

.blueBackground .textpicBodytextWrapper
{
    background-color: var(--primaryclr);
    color: white;
}

.redBackground .textpicBodytextWrapper
{
    background-color: var(--secondaryclr);
    color: white;
}

.redBackground h1,
.redBackground h2,
.blueBackground h1,
.blueBackground h2
{
    color: black;
}

.imageHPosleft .textpicImageWrapper
{
    order: 1;
}

.imageHPosleft .textpicBodytextWrapper
{
    order: 2;
}

/*** Ablauf ***/
.ablaufWrapper
{
    padding-block: var(--boxPadding);
}

.ablaufTextWrapper
{
    padding-inline: var(--boxPadding);
    padding-block: var(--boxPadding);
    border-radius: var(--boxBorderRadius);
    background-color: white;
    transition: background-color 1s ease-in-out, color 1s ease-in-out;
}

.ablaufTextWrapper:hover h2
{
    color: black;
}

.ablaufTextWrapper:hover
{
    background-color: var(--primaryclr);
    color: white;
}

.ablaufItemsWrapper
{
    display: grid;
    grid-template-columns: repeat(12,1fr);
    grid-template-rows: repeat(12,1fr);
    grid-column-gap: var(--boxPadding);
    grid-row-gap: var(--boxPadding);
    padding-block: calc(var(--boxPadding) / 2);
}

.ablaufItem
{
    display: flex;
    position: relative;
    padding-inline: var(--boxPadding);
    padding-block: var(--boxPadding);
    border-radius: var(--boxBorderRadius);
    background-color: var(--primaryclr);
    color: white;
    transition: background-color 1s ease-in-out, color 1s ease-in-out;
}

.ablaufItem h3
{
    color: black;
}

.ablaufItem:hover
{
    background-color: white;
    color: var(--defaultColor);
}

.ablaufItem:hover h3
{
    color: var(--primaryclr);
}

.ablaufItem > *
{
    flex-grow: 1;
    flex-shrink: 1;
}

.ablaufItem h3
{
    transition: color 1s ease-in-out;
}

.ablaufItem1
{
    grid-column: 1 / 7;
    grid-row: 1 / 6;
    column-gap: 1rem;
}

.ablaufItem1 > .ablaufText
{
    flex-basis: 100%;
}

.ablaufItem1 > .ablaufImageWrapper
{
    flex-basis: 30%;
    max-width: 30%;
}

.ablaufItem1 > .ablaufImageWrapper img
{
    height: 100%;
    width: auto;
}

.ablaufItem2
{
    grid-column: 1 / 4;
    grid-row: 6 / 12;
    flex-direction: column;
}

.ablaufItem2 > .ablaufImageWrapper
{
    max-width: 100px;
    margin-right: auto;
    margin-left: 0;
}

.ablaufItem3
{
    grid-column: 4 / 7;
    grid-row: 6 / 12;
    flex-direction: column;
}

.ablaufItem3> .ablaufImageWrapper
{
    max-width: 100px;
    margin-right: auto;
    margin-left: 0;
}

.ablaufItem4
{
    grid-column: 7 / -1;
    grid-row: 1 / 12;
    display: block;
    background-color: black;
    color: white;
}

.ablaufItem4 h3
{
    color: var(--primaryclr);
}

.ablaufItem4:hover
{
    background-color: var(--secondaryclr);
    color: white;
}

.ablaufItem4:hover h3
{
    color: black;
}

.ablaufArrow
{
    position: absolute;
    right: var(--boxPadding);
    bottom: var(--boxPadding);
    width: var(--boxPadding);
    height: var(--boxPadding);
    background-image: url("images/arrowblk.png");
    background-size: contain;
    background-repeat: no-repeat;
}

.ablaufItem1 .ablaufArrow
{
    right: unset;
    left: var(--boxPadding);
    transform: rotate(90deg);
}

.ablaufItem3 .ablaufArrow
{
    transform: rotate(-45deg);
}

.ablaufItem4 .ablaufArrow
{
    display: none;
}

.ablaufImageWrapper
{
    position: relative;
    aspect-ratio: 1;
    width: fit-content;
    height: fit-content;
    margin-left: auto;
    border-radius: 50%;
    overflow: clip;
}

.ablaufImageWrapper img
{
    width: auto;
    height: 100%;
}

img.ablaufImage
{
    position: absolute;
    top: 0;
    left: 0;
    max-width: unset;
    width: auto;
    height: 100%;
    object-fit: cover;
    opacity: 0;

    transition: opacity 1s ease-in;
}

img.ablaufImage.active
{
    opacity: 1;
}

.ablaufItem4 .ablaufImageWrapper
{
    flex-shrink: 1;
    max-width: 100%;
    width: 300px;
    max-height: 300px;
    margin-inline: auto;
    margin-top: var(--boxPadding)
}
/*** Klapper für Startseite ***/
.klapperWrapper
{
    position: relative;
    padding-block: var(--boxPadding);
    padding-inline: var(--boxPadding);
    border-radius: var(--boxBorderRadius);
    background-color: rgba(255,255,255,0.9);
}

.klapperWrapper > .showMoreLabel
{
    position: absolute;
    top: calc(var(--boxPadding) / 2 );
    right: calc(var(--boxPadding) / 2 );
    cursor: pointer;
    z-index: 10;
}
.klapperWrapper > .showMoreLabel > input
{
    position: absolute;
    left: -10000px;
}
.klapperToggleText
{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    width: fit-content;
    max-height: 4rem;
    padding-inline: 1rem;
    padding-block: 0.5rem;
    border: 3px lightgrey outset;
    border-radius: 0.5rem;
    font-size: max(14px,1.4rem);
    font-weight: 600;
    opacity: 1;
    overflow: clip;
    cursor: pointer;

    transition: max-width 0.1s ease-in, max-height 0.1s ease-in-out, padding-bottom 0.5s linear, padding-top 0.5s linear, padding-left 0.5s linear, padding-right 0.5s linear, opacity 0.2s linear;
}
.klapperToggleText > span
{
    font-size: max(12px,0.7rem);
    font-weight: 400;
}
.klapperToggleText:hover
{
    color: var(--primaryclr);
}
.klapperToggleText.showLess
{
    /*max-width: 0;*/
    max-height: 0;
    padding: 0;
    opacity: 0;
    border: none;
}
.klapperText
{
    height: auto;
    overflow-y: clip;

    transition: max-height 0.5s ease-in-out;
}
.klapperWrapper:has(:checked) .klapperText
{
    transition: max-height 1.5s linear;
}
.maskTextBodyWrapper #showMore
{
    display: none;
}
.klapperFull
{
    max-height: 0;
}
.klapperWrapper:has(:checked) .klapperToggleText.showLess
{
    max-width: fit-content;
    max-height: 4rem;
    padding-inline: 1rem;
    padding-block: 0.5rem;
    opacity: 1;
    border: 3px lightgrey outset;
    transition: max-width 0.1s ease-in, max-height 0.1s ease-in-out
}
.klapperWrapper:has(:checked) .klapperToggleText.showMore
{
    /*max-width: 0;*/
    max-height: 0;
    padding: 0;
    opacity: 0;
    border: none;
    transition: max-width 0.1s ease-in, max-height 0.1s ease-in-out
}
@media screen and (max-width: 1000px)
{
    .klapperToggleText
    {
        gap: 0;
        padding-block: 0.2rem;
        padding-inline: 0.5rem;
    }
    .klapperWrapper:has(:checked) .klapperToggleText.showLess
    {
        padding-block: 0.2rem;
        padding-inline: 0.5rem;
    }
    .klapperToggleText > span
    {
        display: none;
    }
}
.klapperWrapper:has(:checked) .klapperFull
{
    max-height: 100vh;
}
.klapperWrapper:has(:checked) .klapperShort
{
    max-height: 0;
}

/*** slider ***/

.maskSlider
{
    display: grid;
    gap: 2rem;
    grid-auto-flow: column;
    grid-auto-columns: 33%;

    list-style: none;
    margin-right: 1rem;
    border: 5px solid white;
    border-radius: 1rem;
    background-color: white;

    overflow-x: auto;
    scroll-snap-type: x mandatory;

    @media (prefers-reduced-motion: no-preference)
    {
        scroll-behavior: smooth;
    }

    anchor-name: --carousel;

    scroll-marker-group: after;

    &::scroll-marker-group
    {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        padding: 1rem;
    }

    > li
    {
        margin-block: 1rem;
        border-radius: 2rem;
        scroll-snap-align: center;
        background-color: var(--itemBG);
        overflow-y: clip;

        &::scroll-marker
        {
            content: " ";
            width: 20px;
            height: 20px;
            aspect-ratio: 1 / 1;
            border-radius: 100%;
            border: 2px solid CanvasText;
        }

        &::scroll-marker:target-current
        {
            background: var(--primaryclr);
        }

        img
        {
            max-width: 100%;
            height: auto;
            object-fit: cover;
        }
    }

    &::scroll-button(*)
    {
        position: fixed;
        position-anchor: --carousel;
        margin: 1rem;
        font: inherit;
        background: var(--primaryclr);
        color: white;
        border: 0;
        border-radius: 4px;
        font-weight: 700;
        cursor: pointer;
    }

    &::scroll-button(right)
    {
        content: ">";
        position-area: center right;
    }

    &::scroll-button(left)
    {
        content: "<";
        position-area: center left;
    }
    .maskSliderImageWrapper
    {
        border-top-left-radius: 2rem;
        border-top-right-radius: 2rem;
        overflow: clip;
    }
    .maskSliderTextContentWrapper
    {
        padding-inline: var(--boxPadding);
        padding-bottom: 2rem;
    }
    .readMore
    {
        display: block;
        margin-left: auto;
        width: fit-content;
    }
}

@media only screen and (max-width: 900px)
{
    .ablaufItem1
    {
        grid-row: 1 / 5;
    }
    .ablaufItem1 .ablaufArrow
    {
        left: unset;
        right: var(--boxPadding);
    }
    .ablaufItem2
    {
        grid-column: 1 / 7;
        grid-row: 5 / 8;
    }
    .ablaufItem2 .ablaufArrow
    {
        transform: rotate(90deg);
    }
    .ablaufItem3
    {
        grid-column: 1 / 7;
        grid-row: 8 / 12;
    }
    .ablaufItem4
    {
        grid-row: 3 / 10;
    }
    .maskSlider
    {
        grid-auto-columns: 50%;
    }
}

@media only screen and (max-width: 800px)
{
    .ablaufItemsWrapper
    {
        display: flex;
        flex-direction: column;
        row-gap: 1rem;
    }
    .ablaufItem
    {
        grid-column: unset;
        grid-row: unset;
    }
    .ablaufItem .ablaufArrow
    {
        right: unset;
        left: var(--boxPadding);
        transform: rotate(90deg);
    }
    .ablaufItem2,
    .ablaufItem3
    {
        flex-direction: unset;
    }
    .ablaufItem .ablaufText
    {
        padding-bottom: 2rem;
    }
    .ablaufItem4 .ablaufText
    {
        padding-bottom: 0;
    }
}
@media screen and (max-width: 640px)
{
    .textInTeaser
    {
        position: relative;
        top: unset;
        left: unset;
        max-width: unset;
        width: auto;
        margin-top: 0.3rem;
        transform: unset;
    }
    .teaserElementblack .textInTeaser
    {
        background-color: rgba(0,0,0,0.1);
    }
}

@media screen and (max-width: 600px)
{
    .teaserElementBeside
    {
        display: flex;
    }
}
@media screen and (max-width: 500px)
{
    .teaserElementBeside
    {
        flex-direction: column;
        align-items: center;
        row-gap: 1.5rem;
    }
    .teaserElementBeside video, .hirImage img
    {
        max-height: calc(var(--teaserHeight) * 0.6 );
        width: auto;
        max-width: 100%;
    }
    video.video-embed-item
    {
        margin-inline: auto;
    }
    .maskSlider
    {
        grid-auto-columns: 100%;
    }
}
