/** mobile devices **/
:root
{
    --teaserHeight: 80vh;
    --scBoxSize: min(400px, 95vw);
    --groupItemWidth: 380px;
    --maxContentWidth: 99dvw;
    --minTeaserHeight: 60vh;
    --headerHeight: 4rem;
    --stdInset: min(2rem,1.2vw);
    --mainHeaderFontSize: clamp(1.4rem, 2.2vw + 0.8rem, 2rem);
    --textPicHeaderFontSize: var(--mainHeaderFontSize);
    --hirHeaderFontSize: calc(var(--mainHeaderFontSize) * 1.4);
    --searchButtonSize: 3rem;

    --mobileMenuTransitionTime: 0.5s;
}
html
{
    font-size:clamp(12px, 2.5vw + 4px, 24px);
}

.outerFrame > *
{
    grid-column: 1 / -1;
}

#contentWrapper
{
    --stdFontSize: clamp(12px, 2.5vw + 4px, 24px);
}

#centreAreaWrapper .frame.frame-type-mask_pagetitle
{
    padding-block: 0;
    padding-top: var(--boxPadding);
    padding-bottom: 1rem;
}

.buttonLink, .buttonLink2
{
    padding-block: 0.8rem;
}

.accordionElements
{
    margin-top: 2rem;
}

.pageTitleWrapper header > *
{
    font-weight: 600;
}

#centreAreaWrapper > .frame-default.frame-type-mask_selection_menu
{
    padding-top: 0;
}

/*** search ***/
.tx-indexedsearch-res dl
{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    grid-row-gap: 0;
    grid-column-gap: 0;
    margin-top: 0.8em;
    font-size: 0.9em;
}

.tx-indexedsearch-res dd
{
    padding-right: 0;
    border-right: none;
    font-style: italic;
}

dd.tx-indexedsearch-text-item-mtime
{
    grid-column: span 3;
}

dt.tx-indexedsearch-text-item-crdate
{
    padding-left: 2em;
}

@media screen and (max-width: 430px)
{
    dt.tx-indexedsearch-text-item-crdate
    {
        padding-left: 0;
    }
}

.tx-indexedsearch-res .tx-indexedsearch-text-item-path
{
    display: none;
}

/*** menu ***/
#page:has(#headerMenuWrapper.active) #stoerer
{
    top: unset;
    bottom: 0;
    transform: translateY(-10%);
}
#headerMenuWrapper
{
    position: absolute;
    right: 0;
    top: 0;
    width: 4rem;

    transition: width var(--mobileMenuTransitionTime) ease-in;
}
#headerMenuWrapper.active
{
    top: 0.1rem;
    right: 0.3rem;
    width: min(400px,98vw);
}
.active > .menuTitle
{
    justify-content: center;
    max-width: 100%;
    max-height: 4rem;
    margin-left: auto;
    background-color: black;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    color: white;
}
#mainMenu
{
    /*max-width: 0;*/
    max-height: 0;
    margin-left: auto;
    background-color: white;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    overflow: clip;
    overscroll-behavior: contain;
    /*border: 1px solid transparent;*/

    transition: max-height var(--mobileMenuTransitionTime) ease-in, border-color var(--mobileMenuTransitionTime) ease-in;
}

.active > #mainMenu
{
    max-width: 100%;
    max-height: 98vh;
    /*border-color: black;*/
    box-shadow: -1rem 1rem 1rem rgba(0,0,0,0.5);
}

.toggle-button
{
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    top: 1rem;
    right: 1rem;
    width: 2.4rem;
    height: 2rem;
    padding-inline: 0.3rem;
    padding-block: 0.3rem;
    border-radius: 1rem;
    border: none;
    background-color: transparent;
    /*filter: drop-shadow(0 0 10px black);*/
    transition: top var(--mobileMenuTransitionTime) ease-in, background-color var(--mobileMenuTransitionTime), ease-in;
}

.active > .toggle-button
{
    display: block;
    top: 0.5rem;
    right: 0;
    height: 2.4rem;
    width: 2.4rem;
    padding-block: 1rem;
    background-color: white;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    transform: scale(0.75);
}

.toggle-button .bar
{
    position: absolute;
    display: block;
    left: 50%;
    height: 0.18rem; /* 3px in rem if 16px = 1rem */
    width: 2rem;
    background-color: black;
    /*mix-blend-mode: difference;
    filter: blur(1px);*/
    /*box-shadow: 2px 2px 4px rgba(0,0,0,0.5);*/
    border-radius: 10px;

    transform: translateX(-50%); /* center horizontally */
    transform-origin: center;
    transition: all var(--mobileMenuTransitionTime) ease-in-out;
}

#searchButtonWrapper
{
    --searchButtonSize: 2.5rem;

    position: fixed;
    top: 0.5rem;
    right: 5rem;
    margin-top: 0;
    border-top: none !important;
}

#langSwitcherMenu
{
    display: none;
}

#langSwitcher img
{
    width: 2.2rem;
    height: 2rem;
}

#hamburgerBar1
{
    top: 0.2rem;
}

#hamburgerBar3
{
    bottom: 0.2rem; /* or top: 100% */
}

#hamburgerBar2
{
    width: 80%;
    top: 50%;
    margin-inline: auto;
    transform: translate(-50%, -50%); /* center horizontally & vertically */
}

.active #hamburgerBar1
{
    top: 0.35rem;
    width: 80%;
    height: 2px;
    opacity: 0.8;
    /* Move down, then rotate around center */
    transform: translate(-50%, 0.75rem) rotate(45deg);
}

.active #hamburgerBar3
{
    width: 80%;
    height: 2px;
    opacity: 0.8;
    /* Move up, then rotate around center */
    transform: translate(-50%, -0.75rem) rotate(-45deg);
}

.active #hamburgerBar2
{
    opacity: 0;
}

.active #hamburgerBar3
{
    bottom: 0.4rem;
}

#topMenu
{
    max-height: calc(100dvh - 5rem);
    padding-top: 1rem;
    /*padding-bottom: calc(var(--boxPadding)/2);*/
    overflow-y: auto;
}

#topMenu > .menuItem
{
    margin-top: 0.1rem;
    border-top: 1px grey dotted;
    font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}

#topMenu > .menuItem:first-of-type
{
    margin-top: 0.2rem;
    border-top: none;
}

.subMenu
{
    height: auto;
    max-height: 0;
    overflow: clip;
    transition: max-height var(--mobileMenuTransitionTime) ease-in;;
}

.menuItemLevel1:has(input:checked) .subMenuLevel2
{
    max-height: 200vh;
}

.menuItemLink
{
    display: block;
    padding-inline: var(--boxPadding);
    padding-top: 1.1rem;
    padding-bottom: 0.9rem;
    color: black;
    font-size: 1.2rem;
    font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
    letter-spacing: 1px;
}

.menuItemLinkLevel2
{
    font-size: 1rem;
    border-bottom: 1px lightgray dotted;
}

.menuItemLinkLevel2 > span
{
    padding-left: max(12px,0.6rem);
    white-space: nowrap;
}

.menuItemLinkLevel2:has(.menuImgWrapper)
{
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: max(12px,0.6rem);
}

.subMenuItem > a
{
    padding-inline: 0;
    padding-block: 0;
}

.menuItemLevel1:has(.menuToggleWrapper)
{
    position: relative;
}

.menuToggleWrapper
{
    position: absolute;
    top: 0.5rem;
    right: 0;
    height: 2.3rem;
    width: 3rem;
    padding: 0;
    background-color: transparent;
    font-size: 1.25rem;
    color: black;
    cursor: pointer;
    overflow: clip;
    z-index: 1;

    transition: all 0.1s ease-in;
}

.menuToggleWrapper:before
{
    content: "+";
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    height: 100%;
    width: 100%;
    font-size: 2em;
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

.menuToggleWrapper:after
{
    content: "-";
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    height: 100%;
    width: 100%;
    margin-top: -0.2rem;
    font-size: 3em;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.menuToggleWrapper:has(:checked):before
{
    opacity: 0;
}

.menuToggleWrapper:has(:checked):after
{
    opacity: 1;
}

.menuToggleWrapper input
{
    display: none;
}

.menuItemLink[target="_blank"]
{
    padding-block: calc(var(--boxPadding)/2);
    color: white;
    background-color: black;
    text-align: center;
}

#topMenu > .menuItem:has(.menuItemLink[target="_blank"])
{
    margin-top: 1rem;
    border-bottom: none;
}

#topMenu > .menuItem[data-current="1"]
{
    margin-top: -0.2rem;
    padding-top: 0.2rem
}

.menuItem[data-current="1"] > a.menuItemLink
{
    background-color: lightgray;
    font-weight: bold;
}

/*** header ***/
#logo img
{
    height: calc(var(--headerHeight) - 0.5rem);
    margin-block: 0.2rem;
}

/*** teaser ***/
body.indexPage
{
    background: white, var(--bodyBGClr);
    background-position: top left, var(--teaserHeight) left;
}
#teaser
{
    min-height: var(--minTeaserHeight);
    padding-inline: 0;
}

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

    min-height: var(--minTeaserHeight);
    border-radius: var(--boxRadius);
}

.teaserElement > *
{
    flex-grow: 1;
    border-radius: var(--boxRadius);
    overflow: clip;
}

.teaserElement > .headerImageWrapper
{
    width: 99dvw;
}

.indexPage .teaserElement
{
    display: block;
}

.indexPage #teaserBox
{
    width: 100vw;
    margin-left: -0.5vw;
    background-color: white;
    /*max-height: calc(99dvh - var(--teaserHeight));*/
}

@media screen and (orientation: portrait)
{
    .indexPage #teaserBox
    {
        top: var(--headerHeight);
    }
    .indexPage .teaserElementdark .teaserText
    {
        background: black;
    }
    .indexPage .teaserElementdark.active
    {
        background-color: black;
    }

    .teaserElementlight.active
    {
        background-color: var(--defaultFontClr);
    }
    .headerImageWrapper
    {
        position: absolute;
        height: 100%;
    }
    .indexPage .headerImageWrapper
    {
        position: relative;
        height: calc(var(--teaserHeight) * 0.5);
    }

    .indexPage .teaserImg
    {
        top: 50%;
        left: unset;
        right: 0;
        height: auto;
        width: auto;
        min-height: 100%;
        min-width: 100%;
        object-fit: unset;
        border-top-left-radius: var(--boxRadius);
        border-top-right-radius: var(--boxRadius);
        border-top: 1px white solid;
        border-left: 1px solid white;
        border-right: 1px white solid;
        transform: translate(0,-50%);
    }
    .teaserText
    {
        position: relative;
        left: unset;
        top: unset;
        right: unset;
        width: 90%;
        padding-inline: 1rem;
        padding-block: 1rem;
        border-radius: 1rem;
        overflow: clip;
    }
    .teaserText h1, .teaserText h2
    {
        font-size: clamp(1.4rem, 3.5vw + 0.8rem, 1.8rem);
    }
    .indexPage .teaserText
    {
        flex-shrink: 1;
        top: unset;
        right: unset;
        left: unset;
        width: 100%;
        height: 45%;
        border-radius: 0;
        overflow: clip;
        transform: none;
    }

    .teaserElementlight .teaserText
    {
        background-color: white;
    }
}

@media screen and (orientation: landscape)
{
    .indexPage #teaser
    {
        --teaserHeight: max(20rem,60dvh);
    }
    .teaserText
    {
        left: 10%;
        right: unset;
        width: 80%;
    }
}
@media screen and (max-width: 580px)
{
    .indexPage #teaser
    {
        --teaserHeight: 70vh;
    }
    .indexPage .teaserText
    {
        padding-block: var(--boxPadding);
    }
    #breadCrumbWrapper
    {
        margin-top: 2rem;
    }
}

.imageNavigation
{
    top: unset;
    bottom: -0.8rem;
}
@media screen and (max-width: 640px)
{
    .indexPage #teaser
    {
        --teaserHeight: 95vh;
    }
}
@media screen and (max-width: 440px)
{
    .indexPage #teaser
    {
        --teaserHeight: 85vh;
    }
    .imageNavigation
    {
        max-width: 99.5%;
        bottom: -1.2rem;
        border-bottom-right-radius: 2rem;
        border-bottom-left-radius: 2rem;
        overflow: clip;
    }
}

.indexPage .teaserText h1,
.indexPage .teaserText h2
{
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

#contentWrapper
{
    line-height: 1.2;
}

#centreAreaWrapper
{
    grid-template-columns: 1fr;
}

.pageTitleWrapper
{
    padding-inline: var(--boxPadding);
    padding-block: var(--boxPadding);
}

.boxCollageElements
{
    grid-template-columns: repeat(2,1fr);
    grid-template-rows: unset;
    grid-row-gap: var(--stdColGap);
}

.boxCollageElements > *
{
    grid-column: unset;
    grid-row: unset;
    display: block;
    width: 100%;
    margin-inline: auto;
    aspect-ratio: unset;
}

.boxCollageElement1,
.boxCollageElement2
{
    grid-column: 1 / -1;
}

.boxCollageElements .bodyText
{
    height: auto;
    min-height: 2.5rem;
    justify-content: center;
}

.boxCollageElement1
{
    min-height: 10rem;
}

.boxCollageElement1 > header
{
    max-width: 50%;
    margin-top: -1rem;
}

.boxCollageElement1 .bgImage
{
    width: 50%;
    left: 50%;
}

.boxCollageElement1 .bodyText
{
    background-color: rgba(0,0,0,0.4);
    padding-block: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 4rem;
}

.boxCollageElement2
{
    min-height: 15rem;
}

.boxCollageElement3 .bodyText,
.boxCollageElement4 .bodyText
{
    margin-right: 2rem;
}

.boxCollageElement3 > .boxCollageLink,
.boxCollageElement4 > .boxCollageLink
{
    display: flex;
    align-items: center;
    position: unset;
    min-height: 2.5rem;
    width: 100%;
    padding-block: 0;
}

.textImageLink .textImageLinkBox
{
    background-position: calc(100% - var(--boxPadding)) var(--boxPadding);
}

.frame-type-mask_text_image_link .textImageArticle
{
    display: block;
}

.frame-type-mask_text_image_link .textContent
{
    max-width: unset;
    padding-inline: 0;
}

.frame-type-mask_text_image_link .textContent header
{
    max-width: calc(90% - var(--imageWidth) + var(--boxPadding));
}

.productBoxElement .textContent
{
    --stdInset: calc(var(--boxPadding) / 2);
    flex-basis: 0;
    height: fit-content;
    padding-top: var(--boxPadding);
    padding-inline: var(--boxPadding);
}

.indexPage .productBoxElement .textContent
{
    padding-bottom: calc(var(--boxPadding) * 2);
}

.frame-layout-1 .ce-textpic.ce-nowrap
{
    display: block;
}

.ce-textpic.ce-nowrap .ce-gallery
{
    margin-bottom: 0;
}

.frame-type-mask_element_group.frame-layout-1[data-maxcols="2"]
{
    grid-template-columns: 1fr;
}

.frame-type-mask_element_group.frame-layout-0:has(.frame-type-mask_shortcut)
{
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.shortcutWrapper
{
    height: calc(var(--scBoxSize) * 0.5);
    margin-bottom: 0;
}

.shortcutHeader
{
    font-size: 1.2rem;
}

.frame-type-mask_element_group[data-maxcols="1"]
{
    grid-template-columns: 1fr;
}
.frame-type-mask_element_group[data-maxcols="1"] > *
{
    height: auto;
}
.productBoxElement .productImage img
{
    min-width: unset;
}
.frame-type-mask_element_group[data-maxcols="4"],
.indexPage .frame-type-mask_element_group[data-maxcols="4"]
{
    --groupItemWidth: 330px;
}

.boxItem .imageText
{
    flex-wrap: wrap;
    flex-direction: column-reverse;
}

.boxItem:nth-child(odd) > .imageText
{
    flex-direction: column-reverse;
}

.boxItem .imageText > *
{
    flex-basis: 400px;
    flex-grow: 1;
    max-width: 100%;
    height: auto;
    max-height: unset;
}

.boxItem .imageText > .textContent
{
    flex-basis: 0;
    flex-shrink: 1;
    max-height: 300px;
}

.frame-type-mask_element_group[data-maxcols="1"] .imageText > .textContent
{
    max-height: unset;
}

.moreLink,
.productBoxElement .moreLink
{
    font-size: calc(var(--stdFontSize) * 1.2);
    padding-inline: var(--boxPadding);
}

.productBoxElement .moreLink
{
    font-size: 1em;
}

#page:not(.indexPage) #teaser
{
    --teaserHeight: auto;
    --minTeaserHeight: 30vh;
}

#page:not(.indexPage) #teaser:has(.teaserText)
{
    --minTeaserHeight: 40vh;
}

/*** header elements ***/
.headerImageRight .gridFlexWrapper
{
    grid-template-columns: 1fr;
    grid-row-gap: 0.5rem;
    max-width: unset;
    max-height: unset;
    height: auto;
}

.headerImageRight .gridFlexWrapper > *
{
    display: block;
    max-width: unset;
}

.headerImageRight .gridFlexWrapper > *:nth-child(2)
{
    grid-row: 1;
}

.hirImage
{
    /*max-width: calc(99vw - 2 * var(--stdInset));*/
    max-width: 99vw;
    width: 100%;
    margin-inline: auto;
}

/*** text pic elements ***/
.accContent .frame-type-mask_textpic .textpicBodytextWrapper
{
    padding-inline: var(--stdInset);
}
.textpicBodytext:has(table)
{
    max-width: calc(100vw - 2*var(--stdInset));
    overflow: auto;
}

.flexGridWrapper .textpicImageWrapper,
.newsElement .newsImage
{
    grid-row: 1;
}

/*** text bild link ***/
.boxCollageElements, .frame-type-mask_text_bild_link .textImageArticle
{
    max-width: unset;
}
.frame-type-mask_text_bild_link .textImageLink:has(.boxItemBGblack)
{
    background-color: black;
    border-radius: var(--boxPadding);
    overflow: clip;
}
.frame-type-mask_text_bild_link .textImageLinkBox
{
    position: relative;
    background: rgba(0,0,0,0.3);
    z-index: 10;
}
.frame-type-mask_text_bild_link .bgImage
{
    left: 100%;
    right: unset;
    max-height: 110%;
    transform: translate(-50%,-50%);
}

.frame-type-mask_text_bild_link .bgImage > img
{
    max-height: 100%;
    width: auto;
}
.frame-type-mask_shortcut
{
    /*aspect-ratio: unset;*/
}

/*** news ***/
.newsWrapper
{
    height: auto;
}

.newsElement
{
    grid-template-columns: 1fr;
    grid-row-gap: 1rem;
}

.newsElement h2
{
    font-size: clamp(2.2rem, 0.5vw, 56px);
}

.newsSubtitle
{
    position: unset;
    top: unset;
    left: unset;
    font-size: 4rem;
    text-align: center;
    transform: unset;
}

#footerWrapper
{
}

#footer
{
    grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
    grid-column-gap: 2rem;
    grid-row-gap: 2rem;
    width: 100%;
    max-width: unset;
    padding-inline: 1rem;
}

#footer > *
{
}

#footer .submenuHeader:first-child
{
}

#bottom-menu > li
{
    max-width: calc(100dvw - 4rem);
}

#bottom-menu > li > a,
#footerSupport > a
{
    display: block;
    padding-block: 0.3rem;
    margin-block: 0.5rem;
}

.socialMediaIcons > a
{
    padding: 0.2rem;
}

@media screen and (min-width: 520px)
{
    :root
    {
    }
    .teaserText
    {
        /*margin-top: -1rem;*/
    }
    .shortcutWrapper
    {
        height: calc(var(--scBoxSize) * 0.6);
        aspect-ratio: 1;
    }
    #bottomMenu .submenuHeader:first-child
    {
        padding-top: 0;
    }
}

@media screen and (min-width: 720px)
{
    :root
    {
        --minTeaserHeight: 65vh;
    }
    .shortcutWrapper
    {
    }
    .frame-type-mask_shortcut
    {
        aspect-ratio: unset;
    }
}

@media screen and (min-width: 820px)
{
    :root
    {
        --minTeaserHeight: 70vh;
    }
}
@media screen and (max-width: 900px)
{
    .frame-type-mask_element_group.frame-layout-0:has(.frame-type-mask_shortcut)
    {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    #header:has(#openSearchForm:checked) #logoTopWrapper
    {
        margin-top: 0.2rem;
    }

    #header:has(#openSearchForm:checked) #logoTopWrapper img
    {
        height: 2.5rem;
    }
}
@media screen and (max-width: 720px)
{
    .imageDot
    {
        width: 1.2rem;
        height: 1.2rem;
    }

    .imageDot.active
    {
        width: 2rem;
        height: 2rem;
    }
    .frame-type-mask_element_group.frame-layout-0:has(.frame-type-mask_shortcut)
    {
        grid-template-columns: repeat(2, 1fr);
    }
    #page.indexPage .productBoxElement .textContent
    {
        height: auto;
    }
    .frame-type-mask_shortcut
    {
        aspect-ratio: unset;
    }
}

@media screen and (max-width: 600px)
{
    .indexPage #centreAreaWrapper
    {
        position: relative;
        top: 0.5rem;
        border-top-right-radius: var(--boxRadius);
        border-top-left-radius: var(--boxRadius);
    }
    .boxCollageElement1 > .bodyText
    {
        padding-left: 1rem;
        border-top-right-radius: 0;
        border-top-left-radius: 0;
    }
    .shortSearchFormWrapper
    {
        justify-content: flex-end;
        align-items: flex-end;
    }
    .shortSearchFormWrapper > article
    {
        margin-right: 2rem;
        margin-bottom: 2rem;
    }


    .powermail_fieldwrap_type_captcha
    {
        display: block
    }

    .powermail_fieldwrap_type_captcha > label
    {
        text-align: left;
    }

    .powermail_fieldwrap_type_captcha .powermail_field
    {
        margin-top: 1rem;
    }
}

@media screen and (max-width: 440px)
{
    #page:not(.indexPage) #teaser
    {
        --teaserHeight: 25vh;
        --minTeaserHeight: 25vh;
    }
}

@media screen and (max-width: 420px)
{
    #page:not(.indexPage) #teaser
    {
        --teaserHeight: 22vh;
        --minTeaserHeight: 22vh;
    }
}
