
@font-face {
    font-family: "AlegreyaSans";
    src: url("../../../fonts/AlegreyaSans-Regular.ttf");
    font-display: swap;
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: "AlegreyaSansMedium";
    src: url("../../../fonts/AlegreyaSans-Medium.ttf");
    font-display: swap;
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: "Barlow";
    src: url("../../../fonts/Barlow-Regular.ttf");
    font-display: swap;
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: "BarlowBold";
    src: url("../../../fonts/Barlow-Bold.ttf");
    font-display: swap;
    font-weight: 600;
    font-style: normal;
}
:root
{
    /*** colours  1A4175  ***/
    --headerBackground: rgba(255,255,255,0.6);
    --headerHoverBackground: rgba(255,255,255,0.6);
    --primaryclr: #006219;
    --secondaryclr: #424242;
    --bs-primary: #C8A24A;
    --bs-secondary: hsl(218, 80%, 75%);
    --hbGreyBG: rgba(255,255,255,0.6);
    --hblightGrey: #E9E6EF;
    --linkClr: #C8A24A;

    /***  heights ***/
    --teaserHeight: calc(100vh - var(--headerHeight) - 14rem);
    --parallaxHeight: 40vh;
    --boxPadding: 2rem;

    /*** filters ***/
    --backdropFilter: blur(15px) saturate(100%);
    --backdropFilterTeaserText: blur(5px) saturate(100%);

    --stdAnimSpeed: 1s;
    --fastAnimSpeed: 0s;
    --slowAnimSpeed: 2.5s;
    --realSlowAnimSpeed: 3.5s;

    /*** fonts **/
    --headerFont: "AlegreyaSansMedium", "BarlowBold", Helvetica, Arial, sans-serif;
    --defaultFont: "Barlow", Helvetic, Arial, sans-serif;
    --menuFont: "AlegreyaSans", "Barlow", Helvetica, Arial, sans-serif;
    --headerFontSize: clamp(1.25rem, 7.5vw + 0.5rem, 1.9rem );
    --header2FontSize: clamp(1.2rem, 7.5vw + 0.5rem, 1.8rem );
    --header3FontSize: clamp(1.1rem, 7vw + 0.5rem, 1.5rem );
}

/*
body {
    display: grid;
    min-block-size: 100dvh;
    place-content: center;
}
 */

html
{
    --webkit-scrollbar-color: var(--primaryclr) var(--hbGreyBG);
    scrollbar-color: var(--primaryclr) var(--hbGreyBG);
    scroll-behavior: smooth;
}

html *
{
    scroll-margin-top: 10rem;
    scroll-padding-top: 10rem;
    scroll-snap-margin-top: 10rem;
}

#page
{
    padding-top: 0;

    --webkit-scrollbar-width: thin;
    scrollbar-width: thin;
    --webkit-scrollbar-color: var(--primaryclr) var(--bs-primary);
    scrollbar-color: var(--primaryclr) var(--bs-primary);
    --webkit-scrollbar-display: none;
    scroll-behavior: smooth;
}

.scrollable-content::-webkit-scrollbar {
    display: none;
}

.scrollable-content {
    -ms-overflow-style: none;
}

.scrollable-content {
    scrollbar-width: none;
}

#headerWrapper
{
    -webkit-backdrop-filter: var(--backdropFilterTeaserText);
    backdrop-filter: var(--backdropFilterTeaserText);

    transition: background-color var(--stdAnimSpeed) ease-in-out;
}

#headerWrapper:hover
{
    background-color: var(--headerHoverBackground);
}


#logo
{
    position: relative;
    top: auto;
    left: 10px;
    width: auto;
    padding-block: 0.25em;
    /*
    -webkit-box-shadow: 5px 5px 12px 5px rgba(0,0,0,0.75);
    box-shadow: 5px 5px 12px 5px rgba(0,0,0,0.75);

     */
}

a
{
    color: var(--linkClr);
}

#logo a.logoLink
{
    height: 100%;
}

#logo img
{
    width: auto;
    height: 100%;
    /*border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;*/
    border-radius: 0.2em;
}

#wave
{
    display: none;
}

.teaserTextWrapper
{
    top: 40%;
}

.teaserText
{
    background-color: rgba(255,255,255,0.4);
    -webkit-backdrop-filter: var(--backdropFilterTeaserText);
    backdrop-filter: var(--backdropFilterTeaserText);

    -webkit-box-shadow: 5px 5px 20px 10px rgba(0,0,0,0.6);
    box-shadow: 5px 5px 20px 10px rgba(0,0,0,0.6);

    outline: #888888 2px outset;

    transition: background-color var(--stdAnimSpeed) ease-in-out;
}

#teaserWrapper
{
    top: 0;
    left: 0;
    margin-bottom: 0;
    max-width: 100vw;
    overflow-x: hidden;

    z-index: unset !important;
}

.indexPage .teaserHeaderWrapper,
header.hasIcon
{
    position: relative;
}

.indexPage .teaserHeaderWrapper:before
{
    position: absolute;
    top: 0.8rem;
    left: 0;
    width: 4rem;
    height: 4rem;
    content: " ";
    background-image: url("images/DK-Glasdesign-Logo-dunkler.png");
    background-repeat: no-repeat;
    background-size: 90%;
    background-position: center center;
    /*background-color: rgba(255,255,255,0.7);
    border-radius: 1rem;*/
}

.contentItemshortcut .frame-layout-0 .frameInner
{
    padding-bottom: unset !important;
}

header.hasIcon
{
    text-indent: 3rem;
}
header.hasIcon:before
{
    position: absolute;
    top: -0.4rem;
    left: -0.2rem;
    width: 3.5rem;
    height: 3rem;
    content: " ";
    background-image: url("images/DK-Glasdesign-Logo-dunkler.png");
    background-repeat: no-repeat;
    background-size: 100%;
    background-position: center center;
}

#greyContent header.hasIcon:before
{
    background-image: url("images/DK-Glasdesign-Logo-heller.png");
}

.teaserHeaderWrapper > h1,
.teaserHeaderWrapper > h2
{
    padding-inline: clamp(3em, 5%, 1em);
    color: var(--primaryclr);
    text-shadow: 2px -2px 12px rgba(31, 70, 138, 0.6);
    /*text-shadow: -6px -6px 12px #F0F0FF;*/
    text-wrap: balance;
}

.teaserHeaderWrapper .teaserSubHeader
{
    padding-top: 0.4em;
    padding-inline: clamp(3em, 5%, 1em);
}

[data-typeimage] .teaserHeaderWrapper *
{
    margin-bottom: 0;
}

[data-typeimage] .teaserHeaderWrapper
{
    padding-block: 1em;
}

.hasGreyContent #mainContentWrapper
{
    background-color: var(--mainContentBG);
}

.hasGreyContent #mainContentWrapper section:first-child
{
    padding-top: 1.8em;
}

.hasGreyContent #mainContentWrapper > section:first-child header h3
{
    padding-top: 0;
}

.hasGreyContent #mainContentWrapper section.animType1:not(.visible):first-child
{
    margin-top: -8rem;
}

#mainContent h1
{
    font-size: var(--headerFontSize);
}
#mainContent h2
{
    font-size: var(--header2FontSize);
}
#mainContent h3
{
    font-size: var(--header3FontSize);
}

#mainContent h3.subHeader
{
    padding-top: 0;
    margin-top: -0.4rem;
    color: var(--defaultColor);
    font-family: var(--defaultFont);
    font-weight: 400;
    font-optical-sizing: auto;
}

#greyContent h3.subHeader
{
    color: var(--primaryclr);
}

#mainContent:not(.hasGreyContent),
#greyContent
 {
    --headerFontSize: clamp(1.7rem, 7vw + 0.6rem, 2.5rem );
    padding-top: 3rem;
    min-height: unset;
 }

#greyContent
{
    position: relative;
    background-color: var(--hbGreyBG);

    -webkit-backdrop-filter: var(--backdropFilter);
    backdrop-filter: var(--backdropFilter);
    z-index: 1;
}

#greyContent header,
#greyContent header *
{
    /*mix-blend-mode: darken !important;*/
}

#greyContent .contentBody
{
    /*mix-blend-mode: difference;*/
    /*color: #ffffff;*/
}

#greyContent section:last-child
{
    padding-bottom: 0.8rem;
}

#greyContent h1
{
    mix-blend-mode: darken;
    color: var(--primaryclr);
    font-optical-sizing: auto;
    /*opacity: 0.7;
    color: hsl(218, 80%, 20%);*/
}
/*
#greyBG
{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hblightGrey);
    -webkit-backdrop-filter: var(--backdropFilter);
    backdrop-filter: var(--backdropFilter);
    z-index: -1;
}
*/
#mainContent.hasGreyContent
{
    background: transparent;
}

#mainContent section.stylegreyContent
{
    background-color: var(--hblightGrey);
}
/*
section.animType1
{
    position: relative;
}

section.animType1:after
{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    transform: scale(1);
    background-color: var(--mainContentBG);
    z-index: -1;;
}
*/
#mainContentt:not(.hasGreyContent) > section:first-child,
#greyContent + section
{
    padding-top: 3em;
}

a:hover
{
    color: var(--bs-primary);
}
section strong a,
section strong a:visited
{
    font-weight: 600;
}
#textAboveFooter .contentBodyText
{
    columns: 400px;
}
#textAboveFooter header h3
{
    margin-bottom: 1rem;
}
a.primaryLink,
a.primaryLink:visited,
a.secondaryLink,
a.secondaryLink:visited
{
    display: block;
    width: fit-content;
    padding-right: 1rem;
    padding-left: 1em;
    padding-top: 0.5em;
    padding-bottom:  0.5em;
    text-decoration: none;
    text-transform: uppercase;
    color: white;
    background-color: var(--primaryclr);
    border-radius: 0.5em;

    transition: all 1s ease-in-out;
}

a.secondaryLink,
a.secondaryLink:visited
{
    background-color: var(--bs-primary);
}

a.primaryLink:hover,
a.primaryLink:focus
{
    background-color: var(--bs-primary);
}

a.secondaryLink:hover,
a.secondaryLink:focus
{
    background-color: var(--primaryclr);
    color: white;
}

a.moreLink,
a.moreLink:visited
{
    box-shadow: 3px 5px 8px 0px rgba(0,0,0,0.4);
    background-color: var(--bs-primary);

    transition: background-color var(--fastAnimSpeed) ease-in-out, box-shadow 1s ease-in-out;
}

a.moreLink:hover,
a.moreLink:focus,
a.primaryLink:hover,
a.primaryLink:focus,
a.secondaryLink:hover,
a.secondaryLink:focus
{
    box-shadow: 3px -5px 8px 0px rgba(0,0,0,0.6);
}

a.moreLink:hover,
a.moreLink:focus
{
    color: white;
}

.text-right .primaryLink,
.text-right .secondaryLink,
.text-right .moreLink
{
    margin-left: auto;
}

.text-center .primaryLink,
.text-center .secondaryLink,
.text-center .moreLink
{
    margin-left: auto;
    margin-right: auto;
}

ul.iconList,
.ce-intext ul.iconList
{
    padding-top: 0.5em;
    padding-left: 0;
}

.iconList li
{
    padding-left: 1.8em;
    margin-bottom: 0.2em;
    margin-left: 0.1em;
    background-image: url("images/dk.png");
    background-size: 1.2em auto;
    background-repeat: no-repeat;
    background-position: left 0.3em;
}

.ce-textpic.ce-left.ce-intext.ce-nowrap
{
    display: flex;
    column-gap: 2em;
    row-gap: 1em;
    flex-wrap: wrap;
}

.ce-textpic.ce-left.ce-intext.ce-nowrap > .ce-gallery
{
}

.ce-textpic.ce-left.ce-intext.ce-nowrap > .ce-bodytext
{
    flex-shrink: 1;
    flex-basis: 400px;
}

.ce-textpic.ce-left.ce-intext.ce-nowrap .ce-gallery
{
    margin-top: 0.5em;
}

.ce-gallery img
{
    border-radius: 0.5rem;
}

.ce-left.ce-intext .ce-column
{
    padding-top: 0.6rem;
}

/*** menus and sitemaps ***/
.frame-type-menu_subpages ul
{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    grid-column-gap: 2.2em;
    grid-row-gap: 2.2em;
}
.frame-type-menu_subpages ul > li a,
.frame-type-menu_subpages ul > li a:visited
{
    text-transform: none;
    color: var(--primaryclr);
    white-space: normal;
    border-radius: 0;
    background: none;
}

ul.menuPages
{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    grid-template-columns: repeat(3,1fr);
    grid-column-gap: 2em;
    grid-row-gap: 2.2em;
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.menuPages > li
{
    flex-basis: 320px;
    display: table-cell;
    max-width: 100%;
    text-align: center;
    box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.3);
}

.menuItemLink
{
    display: block;
    height: 100%;
}

.menuPages .menuItemInner
{
    height: 100%;
    border: 3px var(--primaryclr) double;
    border-radius: 0.5em;
}

.menuPages .menuItemInner:hover
{
    border-style: inset;
    border-color: var(--bs-primary);
}

.menuPages .pagesImage
{
    height: 180px;
    overflow: hidden;
}

.menuPages .pagesImage img
{
    width: 100%;
    height: auto;
    object-fit: cover;
}

.menuPages .menuItemText > *
{
    padding-inline: 1.2em;
}

.pagesItemTitle
{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.5em;
    background-color: var(--hbGreyBG);
    color: var(--bs-primary);
    font-family: var(--headerFont);
    font-weight: 600;
    font-size: 1.2em;
    line-height: 1.2;
    padding-block: 1.5rem;
}

.pagesItemTitle > h3
{
    padding-top: 0;
}

.pageInfo
{
    padding-bottom: 1.5em;
    color: var(--defaultColor);
}

.menuItemInner:hover .pagesItemTitle,
.menuItemInner:hover .pageInfo
{
    color: var(--primaryclr)
}

.frame-type-menu_pages header + .contentBody,
.frame-type-menu_subpages header + .contentBody
{
    padding-top: 2em;
}

.twoColsItem
{
    display: table-cell;
    height: 100%;
}

.twoColsItem .csc-frame-greyContent
{
    height: 100%;
    padding-left: 2rem;
    padding-top: 1em;
}

.tx-powermail fieldset *
{
    margin: unset !important;
}

@supports selector(:has(*))
{
    .twoCols:has(.tx-powermail)
    {
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-column-gap: 4rem;
    }

    .twoColsItem header:has(.ce-headline-left)
    {
        padding-bottom: 2em !important;
    }

    .twoCols:has(.tx-powermail) .csc-frame-greyContent
    {
        border-radius: 0.5em;
    }

    .twoColsItem:has(.csc-frame-greyContent) .sectionInnerWrapper,
    .twoColsItem:has(.csc-frame-greyContent) .sectionInner
    {
        height: 100%;
    }

    .sectionInner:has(.tx-powermail)
    {
        padding-inline: 1.5rem;
        border: 3px var(--hbGreyBG) outset;
    }
}

@supports not selector(:has(*))
{
    .twoCols.hasPowermail
    {
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-column-gap: 4rem;
    }

    .twoCols.hasPowermail .csc-frame-greyContent
    {
        border-radius: 0.5em;
    }

    .twoColsItem.hasGreyContent .sectionInnerWrapper,
    .twoColsItem.hasGreyContent .sectionInner
    {
        height: 100%;
    }

    .hasPowermail .sectionInner
    {
        padding-inline: 1.5rem;
        border: 3px var(--hbGreyBG) outset;
    }

    .hasPowermail .hasGreyContent .sectionInner
    {
        padding-inline: 0;
        border: none;
    }
}

.info strong
{
    font-size: 1.2em;
    color: var(--primaryclr);
    font-family: var(--headerFont);
}

p.phone,
p.pdf,
p.weblink,
p.email,
p.address
{
    padding-left: 1.2em;
}

p.pdf:before,
p.weblink:before,
p.address:before,
p.phone:before,
p.email:before
{
    top: 0.5em;
    font-size: 0.8em;
}

.tx-powermail label
{
    font-weight: 600;
}

.tx-powermail .radio > label
{
    font-weight: 400;
}

.powermail_fieldwrap_type_radio.layout2
{
    background-color: var(--hblightGrey);
    padding-top: 0.5rem;
    padding-inline: 0.5em;
    border-radius: 0.3em;
}

/*** simple slider ***/
.sliderActive
{
    position: relative;
}
figure.multiImage
{
    display: flex;
    justify-content: center;
    align-items: center;
}

.sliderActive figure.multiImage
{
    position: absolute;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
}

figure.multiImage img
{
    display: block;
    width: auto;
    height: auto;
    max-width: 0;
    max-height: 0;
    opacity: 0;

    transition: max-height var(--slowAnimSpeed) linear, max-width var(--slowAnimSpeed) linear, opacity var(--realSlowAnimSpeed) ease-in-out;
}
figure.multiImage.active img
{
    max-width: 600px;
    max-height: 800px;
    opacity: 1;
}

/** for faulty mask templates **/
div[data-headertype="100"]
{
    display: none;
    pointer-events: none;
}

/*** For parallax  ****/
.parallax-wrapper
{
    position: relative;
    height: var(--parallaxHeight);
    overflow-y: hidden;
    /*perspective: 10px;
    transform-style: preserve-3d;*/
}
.ce-gallery[data-imagecols="10"] .ce-column
{
    width: 100%;
}

.parallax-wrapper > figure.image
{
    position: absolute;
    display: block;
    top: 0;
    left: 50%;

    transform: translateX(-50%);
    /*transform: translateX(-50%) translateZ(-10px) scale(2);*/
    /*transition: transform 0.02s linear;*/
}
.fullWidthImage img
{
    min-width: 100%;
    width: auto;
}
.parallax-wrapper img
{
    min-height: calc(100vh - var(--parallaxHeight)/2);
    height: auto;
    object-fit: cover;
    z-index: -1;
}

/*** breadcrumbs ***/
#breadCrumbWrapper
{
    position: relative;
    z-index: 10;
}

#outerWrapper:has(#teaserBox) #breadCrumb
{
    position: absolute;
    right: 0;
    top: 1rem;
}
#breadCrumb
{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    column-gap: 0.5rem;
    position: relative;
    padding-top: calc(var(--boxPadding) / 2);
    font-size: max(12px, 0.8em);
    color: black;
}

#breadCrumb > span
{
    white-space: nowrap;
}

nav[aria-label="Breadcrumb"] ol
{
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0;
    margin-left: 0;
    list-style: none;
}

nav[aria-label="Breadcrumb"] li::after
{
    content: "›";
    margin: 0 0.5rem;
}

nav[aria-label="Breadcrumb"] li:last-child::after
{
    content: "";
}

@media (min-width: 2400px)
{
    :root
    {
        --baseFontSize: 18px;
        --contentWidth: calc(2400px - 4rem);
    }
    body
    {
        background-color: var(--hbGreyBG);
    }
    #outerWrapper,
    #teaserWrapper
    {
        max-width: 2400px;
        margin-left: auto;
        margin-right: auto;
    }
}
@media only screen and (max-width: 1060px)
{
    :root
    {
        --logoWidth: auto;
        --headerHeight: 5em;
    }
    #mainContent:not(.hasGreyContent),
    #greyContent
    {
        padding-top: 2rem;
    }

    .ce-textpic.ce-left.ce-intext.ce-nowrap
    {
        justify-content: space-around;
    }
    .twoCols:has(.tx-powermail)
    {
        display: flex;
        flex-direction: column-reverse;
    }
    .twoCols:has(.tx-powermail) > *
    {
        flex-basis: 100%;
        flex-grow: 1;
        width: 100%;
    }
    .twoCols:has(.tx-powermail) .twoColsItem:has(.csc-frame-greyContent) .contentBody
    {
        column-count: 2;
        padding-bottom: 2em;
    }
}

@media only screen and (max-width: 600px)
{
    :root
    {
        --parallaxHeight: 30svh;
    }
    h1.teaserHeader
    {
        padding-inline: 0.5rem;
    }
    h1.teaserHeader:first-line
    {
        /*font-size: inherit;*/
        font-size: 2.4rem;
    }
}

@media only screen and (max-width: 480px)
{
    :root
    {
        --parallaxHeight: 25svh;
    }
}
@media (prefers-reduced-motion)
{
    root
    {
        --stdAnimSpeed: 0s;
        --mobileMenuTransitionTime: 0s;
        --slowAnimSpeed: 0s;
        --realSlowAnimSpeed: 0s;
        --fastAnimSpeed: 0s;
    }
}



@media (aspect-ratio >= 1.65)
{
    :root
    {
        --teaserHeight: calc(85svh - var(--headerHeight) - 3rem);
    }
    .teaserTextWrapperType8,
    .teaserTextWrapperType9,
    .teaserTextWrapperType10
    {
        bottom: 1rem;
    }
}

@media (aspect-ratio >= 2)
{
    :root
    {
        --teaserHeight: calc(100svh - var(--headerHeight) - 1rem);
    }
}
@media (max-height: 680px)
{
    #teaserWrapper
    {
        /* for iPhone 8 */
        max-height: var(--teaserHeight);
        overflow: hidden;
        z-index: -1;
    }
}
@media (max-height: 400px)
{
    :root
    {
        --teaserHeight: calc(100svh - var(--headerHeight) - 3rem);
    }
}

@media (max-height: 360px)
{
    :root
    {
        --teaserHeight: calc(100svh - var(--headerHeight) - 1rem);
    }
    .teaserTextWrapperType8,
    .teaserTextWrapperType9,
    .teaserTextWrapperType10
    {
        bottom: -1rem;
    }
}

@media (min-height: 2200px)
{
    :root
    {
        --teaserHeight: 45svh;
    }
}

/* ---------------------------------------------------------------------------
   Animated "K & E" teaser lettering (self-drawing effect)
   Ported from the md-ueberdachungen teaser animation, adapted to render the
   editable text "K & E" in the brand green (#006219 = var(--primaryclr)).
   Shown only on the index page (data.layout == 1) via Partials/Teaser.html.
--------------------------------------------------------------------------- */
.teaserTextWrapper.animWrapper
{
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
}

.animWrapper svg
{
    width: min(600px, 92%);
    padding-inline: 2rem;
    padding-block: 1.5rem;
    margin-top: 2rem;
    border-radius: 1rem;

    background-color: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: var(--backdropFilterTeaserText);
    backdrop-filter: var(--backdropFilterTeaserText);
    box-shadow: 5px 5px 10px 10px rgba(0, 0, 0, 0.2);

    transition: all 0.5s ease-in;
}

.animWrapper svg:hover
{
    --backdropFilterTeaserText: blur(10px) saturate(80%);
    box-shadow: 5px 5px 10px 10px rgba(0, 0, 0, 0.4);
}

.animWrapper svg .script
{
    fill: transparent;
    stroke: #006219;
    stroke-width: 9;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 11000;
    stroke-dashoffset: 11000;

    animation: keDrawAnimation 3s ease-in-out 1 forwards;
    animation-delay: 0.4s;
}

@keyframes keDrawAnimation
{
    0%   { stroke-dashoffset: 11000; fill: transparent; }
    70%  { fill: transparent; }
    100% { stroke-dashoffset: 0; fill: #006219; }
}

.animWrapper .keTagline
{
    font-family: var(--headerFont);
    font-size: clamp(1rem, 4.5vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    color: #006219;

    padding: 0.4em 1em;
    border-radius: 0.6rem;
    background-color: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: var(--backdropFilterTeaserText);
    backdrop-filter: var(--backdropFilterTeaserText);

    opacity: 0;
    animation: keTaglineFade 1s ease-out 1 forwards;
    animation-delay: 3.4s;
}

@keyframes keTaglineFade
{
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Accessibility: users who prefer reduced motion see the finished lettering */
@media (prefers-reduced-motion: reduce)
{
    .animWrapper svg .script
    {
        animation: none;
        stroke-dashoffset: 0;
        fill: #006219;
    }
    .animWrapper .keTagline
    {
        animation: none;
        opacity: 1;
    }
}

/* ===========================================================================
   Contact form (Powermail) — brand-styled, responsive 2-column layout
=========================================================================== */
.powermail_form
{
    max-width: 820px;
    margin-inline: auto;
}

/* One shared grid for the whole fieldset. Powermail wraps two fields per
   .row and the pairing is offset (e.g. radio+Vorname, Name+Strasse), so we
   dissolve the .row wrappers with display:contents and let every field flow
   into one grid. Real pairs then sit side by side (Vorname|Name, PLZ|Ort,
   E-Mail|Telefon); full-width fields span both columns. */
.powermail_form .powermail_fieldset
{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem 1.5rem;
    align-items: start;
    border: 0;
    margin: 0;
    padding: 0;
}

.powermail_form .powermail_fieldset > legend
{
    grid-column: 1 / -1;
}

/* dissolve the Bootstrap .row wrappers so their fields join the grid */
.powermail_form .row
{
    display: contents;
}

.powermail_form .powermail_fieldwrap
{
    margin: 0;
    min-width: 0; /* allow fields to shrink inside the grid */
}

/* remove leftover Bootstrap column gutters (we use grid gap instead) */
.powermail_form [class*="col-"]
{
    padding-inline: 0;
}

/* fields that always span the full width */
.powermail_form .powermail_fieldwrap_type_radio,
.powermail_form .powermail_fieldwrap_type_textarea,
.powermail_form .powermail_fieldwrap_type_file,
.powermail_form .powermail_fieldwrap_type_check,
.powermail_form .powermail_fieldwrap_type_submit,
.powermail_form .powermail_fieldwrap.layout2
{
    grid-column: 1 / -1;
}

/* labels */
.powermail_form .powermail_label,
.powermail_form .form-label
{
    display: block;
    margin-bottom: 0.35em;
    font-family: var(--headerFont);
    font-weight: 600;
    color: var(--secondaryclr);
}

.powermail_form .powermail_label .mandatory,
.powermail_form .mandatory
{
    color: var(--primaryclr);
}

/* text-like inputs, textarea, select */
.powermail_form input.form-control,
.powermail_form input[type="text"],
.powermail_form input[type="email"],
.powermail_form input[type="tel"],
.powermail_form input[type="number"],
.powermail_form textarea,
.powermail_form select
{
    width: 100%;
    padding: 0.7em 1em;
    font-family: var(--defaultFont);
    font-size: 1rem;
    line-height: 1.4;
    color: var(--secondaryclr);
    background-color: #ffffff;
    border: 1px solid #cfd4cb;
    border-radius: 0.5rem;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.powermail_form textarea
{
    min-height: 9rem;
    resize: vertical;
}

/* focus state — brand green ring */
.powermail_form input.form-control:focus,
.powermail_form input:focus,
.powermail_form textarea:focus,
.powermail_form select:focus
{
    outline: none;
    border-color: var(--primaryclr);
    box-shadow: 0 0 0 3px rgba(0, 98, 25, 0.15);
}

.powermail_form ::placeholder
{
    color: #9aa09a;
    opacity: 1;
}

/* radio group ("Wie möchten Sie kontaktiert werden?") */
.powermail_form .powermail_fieldwrap_type_radio .powermail_field
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.6rem;
    padding: 0.9rem 1.2rem;
    background-color: rgba(0, 98, 25, 0.05);
    border: 1px solid #dfe4db;
    border-radius: 0.6rem;
}
.powermail_form .powermail_fieldwrap_type_radio .powermail_field > .powermail_label
{
    margin-bottom: 0;
    margin-right: 0.5rem;
}

.powermail_form .form-check,
.powermail_form .powermail_radiowrap,
.powermail_form .powermail_checkwrap
{
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}
.powermail_form .form-check-label
{
    margin: 0;
    font-family: var(--defaultFont);
    font-weight: 400;
    color: var(--secondaryclr);
    cursor: pointer;
}

/* brand-coloured native radios/checkboxes */
.powermail_form input[type="radio"],
.powermail_form input[type="checkbox"]
{
    accent-color: var(--primaryclr);
    width: 1.15em;
    height: 1.15em;
    cursor: pointer;
}

/* privacy-policy checkbox row */
.powermail_form .powermail_fieldwrap_type_check .powermail_field
{
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.powermail_form .powermail_fieldwrap_type_check label
{
    font-weight: 400;
    color: var(--secondaryclr);
}
.powermail_form .powermail_fieldwrap_type_check a
{
    color: var(--primaryclr);
    text-decoration: underline;
}

/* file upload */
.powermail_form input[type="file"]
{
    width: 100%;
    padding: 0.6em;
    background-color: #ffffff;
    border: 1px dashed #cfd4cb;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* submit button */
.powermail_form .powermail_fieldwrap_type_submit
{
    margin-top: 0.4rem;
}
.powermail_form button[type="submit"],
.powermail_form input[type="submit"],
.powermail_form .btn-primary
{
    display: inline-block;
    padding: 0.8em 2.4em;
    font-family: var(--headerFont);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
    background-color: var(--primaryclr);
    border: 0;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 98, 25, 0.25);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.powermail_form button[type="submit"]:hover,
.powermail_form input[type="submit"]:hover,
.powermail_form .btn-primary:hover
{
    background-color: #004d14;
    box-shadow: 0 6px 16px rgba(0, 98, 25, 0.35);
}
.powermail_form button[type="submit"]:active,
.powermail_form input[type="submit"]:active,
.powermail_form .btn-primary:active
{
    transform: translateY(1px);
}

/* validation errors */
.powermail_form .powermail_field_error,
.powermail_form input.error,
.powermail_form textarea.error,
.powermail_form .has-error input,
.powermail_form .has-error textarea
{
    border-color: #c0392b !important;
}
.powermail_form .powermail_field_error_container,
.powermail_form ul.parsley-errors-list,
.powermail_form .help-block.error
{
    margin-top: 0.3rem;
    padding-left: 0;
    list-style: none;
    color: #c0392b;
    font-size: 0.9rem;
}

/* mobile: single column, full-width button */
@media only screen and (max-width: 767px)
{
    .powermail_form .powermail_fieldset
    {
        grid-template-columns: 1fr;
    }
    .powermail_form button[type="submit"],
    .powermail_form input[type="submit"],
    .powermail_form .btn-primary
    {
        width: 100%;
    }
}

/* self-updating footer copyright (right-aligned, brand-green footer) */
#footerCopyright
{
    padding: 0.8em 0 1.2em;
    margin-top: 0.6em;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: right;
    font-family: var(--defaultFont);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Stoerer right edge — links to the page configured via {$stoererPageUID}.
   Reuses the theme's #stoererRechts positioning (fixed, right edge) from core.css. */
#stoererRechts .stoerer109
{
    font-size: 1rem;
    background-color: var(--primaryclr);
    border-radius: 0.4em 0 0 0.4em;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.3);

    transition: background-color var(--stdAnimSpeed) ease-in-out;
}

#stoererRechts .stoerer109 a.stoererLink
{
    font-family: var(--headerFont);
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-decoration: none;
}

#stoererRechts .stoerer109:hover
{
    background-color: #004d14;
}

#stoererRechts .stoerer109 a.stoererLink:hover
{
    text-decoration: none;
}

/* ===========================================================================
   Gallery layout for pages with layout 3 (body.pageLayout3, e.g. "Galerie").
   Textpics are reduced to their image and arranged in an asymmetric grid.
   Heading + bodytext stay in the DOM (hidden) and are shown in the lightbox.
=========================================================================== */
.pageLayout3 #mainContentWrapper
{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 12rem;
    gap: 0.75rem;
}

/* everything that is not a textpic (intro text, breadcrumb, TextAboveFooter)
   keeps the full width and its normal look */
.pageLayout3 #mainContentWrapper > *:not(.contentItemtextpic)
{
    grid-column: 1 / -1;
}

/* asymmetric rhythm: every 6th tile is 2x2, the 4th is 2 columns wide.
   :nth-child(... of .contentItemtextpic) counts only the textpics, so other
   content elements on the page do not shift the pattern. */
.pageLayout3 #mainContentWrapper > :nth-child(6n + 1 of .contentItemtextpic)
{
    grid-column: span 2;
    grid-row: span 2;
}
.pageLayout3 #mainContentWrapper > :nth-child(6n + 4 of .contentItemtextpic)
{
    grid-column: span 2;
}

.pageLayout3 .contentItemtextpic
{
    overflow: hidden;
    border-radius: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* strip all inner wrappers so the image can fill the tile */
.pageLayout3 .contentItemtextpic .sectionInnerWrapper,
.pageLayout3 .contentItemtextpic .sectionInner,
.pageLayout3 .contentItemtextpic .frame,
.pageLayout3 .contentItemtextpic .frameInner,
.pageLayout3 .contentItemtextpic .contentBody,
.pageLayout3 .contentItemtextpic .ce-textpic,
.pageLayout3 .contentItemtextpic .ce-gallery,
.pageLayout3 .contentItemtextpic .ce-row,
.pageLayout3 .contentItemtextpic .ce-column,
.pageLayout3 .contentItemtextpic figure,
.pageLayout3 .contentItemtextpic .ce-gallery a
{
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* only the image is visible in the grid */
.pageLayout3 .contentItemtextpic header,
.pageLayout3 .contentItemtextpic .ce-bodytext
{
    display: none;
}

.pageLayout3 .contentItemtextpic .ce-gallery img
{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;

    transition: transform 0.4s ease;
}

.pageLayout3 .contentItemtextpic:hover .ce-gallery img
{
    transform: scale(1.06);
}

/* --- lightbox --- */
#galleryLightbox
{
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 3vh 3vw;
    overflow-y: auto;

    background-color: rgba(0, 0, 0, 0.92);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#galleryLightbox.open
{
    opacity: 1;
    visibility: visible;
}

#galleryLightbox img
{
    max-width: 94vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.4rem;
}

#galleryLightbox .lbText
{
    max-width: min(900px, 92vw);
    color: #ffffff;
    text-align: center;
}

#galleryLightbox .lbText h1,
#galleryLightbox .lbText h2,
#galleryLightbox .lbText h3
{
    margin-bottom: 0.4em;
    color: #ffffff;
}

#galleryLightbox .lbText a
{
    color: var(--bs-primary);
}

#galleryLightbox .lbClose
{
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    font-size: 2rem;
    line-height: 1;
    color: #ffffff;
    background: none;
    border: 0;
    cursor: pointer;

    transition: transform 0.2s ease;
}

#galleryLightbox .lbClose:hover
{
    transform: scale(1.2);
}

@media only screen and (max-width: 900px)
{
    .pageLayout3 #mainContentWrapper
    {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 10rem;
    }
}

@media only screen and (max-width: 560px)
{
    .pageLayout3 #mainContentWrapper
    {
        grid-template-columns: 1fr;
        grid-auto-rows: 14rem;
    }
    /* no oversized tiles when there is only one column */
    .pageLayout3 #mainContentWrapper > :nth-child(6n + 1 of .contentItemtextpic),
    .pageLayout3 #mainContentWrapper > :nth-child(6n + 4 of .contentItemtextpic)
    {
        grid-column: span 1;
        grid-row: span 1;
    }
    #galleryLightbox img
    {
        max-height: 55vh;
    }
}

/* lightbox navigation arrows (prev/next) */
#galleryLightbox .lbNav
{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 4.5rem;
    padding: 0;
    font-size: 2.8rem;
    line-height: 1;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.35);
    border: 0;
    border-radius: 0.4rem;
    cursor: pointer;
    z-index: 2;

    transition: background-color 0.2s ease, transform 0.2s ease;
}

#galleryLightbox .lbPrev { left: 1rem; }
#galleryLightbox .lbNext { right: 1rem; }

#galleryLightbox .lbNav:hover
{
    background-color: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

@media only screen and (max-width: 560px)
{
    #galleryLightbox .lbNav
    {
        width: 2.4rem;
        height: 3.5rem;
        font-size: 2rem;
    }
    #galleryLightbox .lbPrev { left: 0.3rem; }
    #galleryLightbox .lbNext { right: 0.3rem; }
}
