/************** root *************/
:root {
    --bg-master-light: oklch(88% 0.01 90);
    --bg-master-dark: oklch(20% 0.01 90);

    --bg-color-dark: light-dark(oklch(from var(--bg-master-light) l c h), oklch(from var(--bg-master-dark) l c h)); /*Hintergrundvariationen*/
    --bg-color-medium: light-dark(oklch(from var(--bg-color-dark) 91% c h), oklch(from var(--bg-color-dark) 25% c h));
    --bg-color-light: light-dark(oklch(from var(--bg-color-dark) 94% c h), oklch(from var(--bg-color-dark) 30% c h));

    --shadow-color: light-dark(oklch(from var(--bg-color-dark) 70% c h), oklch(from var(--bg-color-dark) 10% c h));

    --text-color: light-dark(oklch(from var(--bg-master-dark) l c h), oklch(from var(--bg-master-light) l c h));
    --text-color-light: light-dark(oklch(from var(--bg-master-light) l c h), oklch(from var(--bg-master-light) 84% c h)); /* farbe, die immer hell ist */
    --text-color-dark: light-dark(oklch(from var(--bg-master-dark) l c h), oklch(from var(--bg-master-dark) l c h));  /* farbe, die immer dunkel ist */

    --primary-color-dark: light-dark(oklch(45% 0.192 32), oklch(40% 0.168 32));
    --primary-color-medium: light-dark(oklch(from var(--primary-color-dark) 58% 0.18 h), oklch(from var(--primary-color-dark) 50% c h));
    --primary-color-light: light-dark(oklch(from var(--primary-color-dark) 67% 0.15 h), oklch(from var(--primary-color-dark) 60% c h));

    --red-color: light-dark(oklch(80% 0.3 30), oklch(50% 0.2 30));
    --green-color: light-dark(oklch(80% 0.18 140), oklch(60% 0.16 140));
    --dialog-bg-color: light-dark (oklch(from var(--bg-color-dark) 80% c h / 0.5), oklch(from var(--bg-color-dark) 30% c h / 0.5));
}

@font-face {
    font-family: "merriweather";
    src: url("../fonts/Merriweather-Bold.ttf") format("truetype");
}

@font-face {
    font-family: "liberation";
    src: url("../fonts/LiberationSans-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "birthstone";
    src: url("../fonts/Birthstone-Regular.ttf") format("truetype");
}

html {
    --font-titelzeile: "birthstone", "comic sans", sans-serif;
    --font-header: "verdana", "tahoma", sans-serif;
    --font-text: "liberation", "arial", "helvetica", sans-serif;

    &.dark {
        color-scheme: dark;
    }

    &.light {
        color-scheme: light;
    }
}

/*********** reset *************/
*, *::before, *::after {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
    font-size: 100%;
}

/** {
    letter-spacing: clamp(
        -0.05em,
        calc((1em - 1rem) / -10),
        0em
    );
}*/

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    text-wrap: balance;
    font-family: var(--font-header);
    color: var(--primary-color-medium);
}
h1 {
    font-size: 2rem;
    margin-bottom: 1.3em;
    line-height: 1.1em;
    @media (width < 25rem) {
        font-size: 1.7rem;
    }

}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1em;
    line-height: 1.1em;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: .5em;
    line-height: 1.1em;
}

h4 {
    font-size: 1rem;
    margin-bottom: .5em;
    line-height: 1.1em;
}

p {
    overflow-wrap: break-word;
    text-wrap: pretty;
}

ol, ul {
    list-style: none;
}

/************* Basisklassen, Tokens **************/

.error {
    color: var(--red-color);
}

.confirm {
    color: var(--green-color);
}

.bigger {
    font-size: 1.2em;
}

.smaller {
    font-size: 0.8em;
    line-height: 1.2em;
}

.mt1em {
    margin-top: 1em;
}

.mb1em {
    margin-bottom: 1em;
}

.mb2em {
    margin-bottom: 2em;
}

.mb3em {
    margin-bottom: 3em;
}

.mbhem {
    margin-bottom: .5em;
}

.center {
    text-align: center;
}

.infotext {
    font-style: italic;
    font-size: .8rem;
    line-height: .8rem;
}

.bold {
    font-weight: bold;
}

strong {
    font-weight: bold;
}

em {
    font-style: italic;
}

/***********  Basics ************/

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    scrollbar-color: var(--primary-color-light) var(--bg-color-medium);
}

body {
    background-color: var(--bg-color-dark);
    color: var(--text-color);
    -webkit-transition: background-color 0.3s ease, color 0.3s ease;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-content: space-between;
    container: body / inline-size;
    font-family: var(--font-text);
    font-size: clamp(1rem, 0.857rem + 0.714vw, 1.5rem);
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 120rem;
    -webkit-font-smoothing: antialiased;
    hyphens: auto;
    line-height: calc(1em + 0.6rem);
}

section, article {
    content-visibility: auto;

    &.mitbg {
        background-color: var(--bg-color-medium);
        border-radius: 1em;
        margin-inline: min(3em, 2vw);
        padding: .5em 1em;
        box-shadow: 1px 4px 3px var(--shadow-color);
    }
}

/************* header ********************/

header {
    display: grid;
    grid-template-areas: "logo titel ld-button";
    grid-template-columns: auto 1fr 60px;
    align-items: center;
    background-color: var(--primary-color-dark);
    height: clamp(80px, 12vw, 150px);
}

#textzeile {
    font-family: var(--font-titelzeile);
    color: var(--text-color-light);
    grid-area: titel;
    container-type: inline-size;
}

.headertext {
    padding-inline-start: 3vw;
    font-size: clamp(30px, 12cqw, 130px);
    font-weight: 600;
}

#logo {
    grid-area: logo;
    margin: 1em .5rem 1em 2vw;

    a img {
        width: clamp(35px, 6vw, 80px);
    }

}

.dark .logolink img {
    filter: brightness(75%);
}

#togglebox {
    grid-area: ld-button;
    margin-top: 1em;
    align-self: start;
}

#themetoggle {
    &.circle {
        width: 30px;
        height: 30px;
        border: 2px solid black;
        border-radius: 50%;
        background: linear-gradient(to right, var(--bg-color-dark) 50%, var(--text-color) 50%);
    }
}

/************* navigation ******************/

#mainmenu {
    position: fixed;
    bottom: 50px;
    z-index: 80;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;

    #datumszeile {
        display: none;
    }

    @media (width > 40rem) {
        width: 95%;
        justify-content: space-between;
        flex-direction: row-reverse;
        margin-inline: auto;
        margin-top: .2em;
        position: relative;
        bottom: initial;
        padding-bottom: .2em;
        border-bottom: 3px solid var(--primary-color-dark);

        #datumszeile {
            display: inline;
            font-size: 60%;
            font-weight: bold;
            padding: .1em .8em;
        }

    }
}

#navmenu {
    display: inline flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
    align-items: flex-end;
    font-size: .8rem;
    @media (width > 40rem) {
        gap: .3em;
        font-size: 1.3rem;
    }

    li {
        text-align: center;
        background-color: var(--primary-color-dark);
        @media (width <= 40rem) {
            width: 5rem;
            height: 55px;
            padding-top: 4px;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
            &:last-of-type {
                margin-right: 16px;
            }

            &:has(a.aktuell)  {
                height: 65px;
            }
        }

        @media (width > 40rem) {
            width: 8rem;
            border-radius: 4px;
        }

        a.nb-all {
            display: block;
            text-decoration: none;
            font-weight: bold;
            transition: background-color .5s;
            background-color: var(--primary-color-dark);
            color: var(--text-color-light);
            @media (width > 40rem) {
                padding: .3em;
                padding-inline-start: .4em;
                border-radius: .2em;
                &.aktuell {
                    background-color: var(--primary-color-medium);
                }

                &:hover {
                    background-color: var(--primary-color-light);
                }

                &:active {
                    color: var(--text-color-dark);
                }

            }

            img {
                height: 1.5rem;
                margin-inline: auto;
                @media (width > 40rem) {
                    display: none;
                }
            }
        }
    }
}

.dark a.nb-all img {
    filter: brightness(75%);
}

/*********************** Main *******************/

main {
    display: grid;
    grid-template-areas: "buttons" "news" "sonstiges" "aside";
    width: 95%;
    margin-inline: auto;
    margin-bottom: 8rem;
    gap: 1em;

    @container body (width > 70rem) {
        grid-template-areas: "buttons news aside" "buttons sonstiges aside";
        grid-template-columns: 190px 1fr clamp(14rem, 19vw, 20rem);
        margin-bottom: 1em;
    }

    p {
        margin-top: .5em;
    }
}

#kontaktseite {
    grid-template-areas: "news";
    @container body (width > 70rem) {
        grid-template-areas: "buttons news aside" "buttons sonstiges aside";
        grid-template-columns: 10vw 1fr 10vw;
    }
}

#buttonfeld {
    grid-area: buttons;

    h2.versteckt {
        display: none;
        @media (width > 70rem) {
            display: block;
            margin-top: 1.5em;
        }
    }

}

#abteilungs_links_mobile {
    @container body (width > 70rem) {
        display: none;
    }

    details {
        width: 100%;
        background-color: var(--bg-color-dark);
        text-align: center;
        border-radius: 5px;
        border: 3px solid var(--primary-color-dark);

        summary {
            background-color: var(--primary-color-dark);
            color: var(--text-color-light);
            font-family: var(--font-header);
            font-weight: bold;
            font-size: 2rem;
            line-height: 2rem;
            padding: .5em;
            @media (width < 30rem) {
                font-size: 1.5rem;
                line-height: 1.5rem;
                padding: .3em;
            }

        }

        #abteilungen {
            display: flex;
            flex-direction: column;
            font-size: 1.5rem;
            font-family: var(--font-header);
            font-weight: bold;
            gap: .3em;
            margin: .5em 1em;

            a.text_abt {
                display: block;
                text-decoration: none;
                padding: .5em;
                background-color: var(--primary-color-dark);
                color: var(--text-color-light);
                border-radius: 5px;
            }
        }
    }
}

#abteilungs_links {
    display: none;
    @container body (width > 70rem) {
        display: flex;
        flex-direction: column;
        flex-wrap: no-wrap;
        align-items: center;
        gap: .5em;

        .bildlink  {
            position: relative;
            aspect-ratio: 3/2;
            -webkit-transition: all ease-in-out 0.1s;
            transition: all ease-in-out 0.1s;
            width: 190px;

            p.button_linktext {
                display: block;
                width: 100%;
                text-align: center;
                font-family: var(--font-header);
                font-weight: 900;
                color: white;
                margin: 0;
                position: absolute;
                top: 50%;
                left: 00%;
                font-size: 1.3rem;
                transform: translate(0%, -50%);
            }

            img {
                border-radius: .3em;
                filter: saturate(30%) contrast(60%);
                transition: filter .1s;
            }

            &:hover {
                -webkit-transform: scale(.95);
                        transform: scale(.95);

                img {
                    filter: saturate(100%) contrast(100%) brightness(70%);
                }

            }

            &:active {
                filter: saturate(100%) contrast(100%) brightness(50%);
            }
        }
    }
}

#news {
    grid-area: news;
    max-width: 95%;
    container: news / inline-size;
    @container body (width > 70rem) {
        margin-top: 2rem;
    }
}

.news_box, .berichte_box, .termin_box {
    margin-bottom: 2em;
    h3 {
        margin-top: .5em;
        margin-bottom: 1em;
    }
}

.news_datum, .termin_datum {
    font-size: .7em;
    font-weight: bold;
    padding: .1em .3em;
    background-color: var(--primary-color-medium);
    color: var(--text-color-light);
    border-radius: 5px;
    margin-bottom: .3em;
}

section > div:not(:last-of-type){
    margin-bottom: 2em;
}

.termin_datum {
    font-size: 1em;
}

.news_sub {
    font-style: italic;
    font-weight: 600;
}

div:has(.news_sub) {
    margin-top: -.5em;
}

#sonstiges {
    grid-area: sonstiges;
}

.bildcontainer {
    border: 3px solid var(--primary-color-light);
    border-radius: .5em;
    background-color: var(--bg-color-dark);
    padding: .5em;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
    gap: .5em;
}

.vorschau {
    border: .3em solid var(--primary-color-light);
    border-radius: .2em;
    transition: all ease-in-out 0.1s;
    &:hover {
        border: .3em solid var(--primary-color-dark);
        transform: scale(1.05);
    }
}

.querkant {
    width: auto;
    @container (width < 30rem) {
        width: 100px;
    }
}

.hochkant {
    height: auto;
    @container (width < 30rem) {
        height: 100px;
    }
}

.galeriehinweis::after {
    content: " anklicken";
    @media (hover: none) {
        content: " antippen";
    }
}

aside {
    grid-area: aside;
    min-width: 15rem;
    font-size: .8em;
        h1, h2, h3 {
            font-size: 1em;
            text-wrap: wrap;
        }

    @media (width < 70rem) {
        margin-inline: 4vw;
    }

    p {
        line-height: 1.1em;
    }
}

.textlink {
    color: light-dark(var(--primary-color-dark), var(--primary-color-light));
    text-decoration: none;
    font-weight: 600;
    background:
    linear-gradient(currentColor 0 0)
    bottom /var(--d, 0) 2px
    no-repeat;
    transition:0.5s;
        &:hover {
            --d: 100%;
        }
}

.trenner {
    display: block;
    width: 90%;
    margin: 2em auto;
    background: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0)), color-stop(15%, var(--primary-color-medium)), color-stop(85%, var(--primary-color-medium)), to(rgba(0, 0, 0, 0)));
    background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, var(--primary-color-medium) 15%, var(--primary-color-medium) 85%, rgba(0, 0, 0, 0) 100%);
    height: 0.2em;
}

/*************** home *****************/

.newspic {
    width: 100%;
}

/*************** verein *****************/

.inlinepic {
    width: 50%;
    float: left;
    margin: .4em;
    @container body (width < 40rem) {
        width: 100%;
        float: none;
        margin: .4em 0;
    }
}

figcaption {
    font-size: .8em;
    font-style: italic;
}

.chronik {

    h3 {
        margin-top: 2em;
    }
}

#downloadfeld {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5em;
    width: 95%;
    margin-inline: auto;
    align-items: stretch;

    .dateibox {
        border: 2px solid var(--bg-color-dark);
        width: 15rem;

        border-radius: .3em;
        background: var(--bg-color-dark);
        padding: .5em;
        display: flex;
        flex-direction: column;
        align-items: center;


        .datei {
            font-size: .7em;
            width: 10rem;
            height: 5rem;
            margin-inline: auto;
            box-shadow: 3px 5px 3px var(--shadow-color);
            border-radius: .3em;
            transition: all ease-in-out 0.5s;
            background: var(--bg-color-light);
            text-align: center;
        }

        .datei_beschreibung {
            font-size: .6em;
            line-height: 1.2;
        }

        &:hover {
            border: 2px solid var(--primary-color-light);

            .datei {
                box-shadow: 1px 2px 1px var(--shadow-color);
            }
        }
    }

    a {
        text-decoration: none;
        color: var(--text-color);
    }

}

.pdf, .word, .ppt {
    color: var(--text-color-light);
    font-family: var(--font-header);
    border-top-left-radius: .3em;
    border-top-right-radius: .3em;
}

.pdf {
    background: #CC0000;
}

.word {
    background: #3F4DCC;
}

.ppt {
    background: #940000;
}


/**************** kontakt *****************/

.vorstandsbox {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: space-around;
    @media (width > 40rem) {
        flex-direction: row;
        row-gap: 2em;
        column-gap: 1em;
    }
}

.vorstandsamt {
    flex: 0 1 auto;
    @media (width > 40rem) {
        flex: 0 1 22rem;
    }
}

#lageinfo {
    display: grid;
    width: 100%;
    grid-template-areas: "adressfeld" "lagekarte";
    grid-template-rows: auto auto;
    row-gap: 1em;

    @container news (width > 50rem) {
        grid-template-areas: "adressfeld lagekarte";
        grid-template-columns: 18rem 1fr;
    }
}

#adressfeld {
    grid-area: adressfeld;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1em;
}

.lagekarte {
    grid-area: lagekarte;
}

#openmap {
    border: 1px solid black;
    width: 100%;
    aspect-ratio: 3/2;
}

.adresskomponente {
    min-width: 12rem;
}

.kontaktseite {
    margin-top: 3em;
}

.erfolg {
    display: inline-block;
    margin-inline: auto;
    padding: .4em;
    background-color: var(--green-color);
    border-radius: .5em;
}

/********************** Rechtliches *****************/

.rechtliches h1 {
    margin-top: 2em;
}

.rechtliches h2 {
    margin-top: 2em;
}

.rechtliches h3 {
    margin-top: 1em;
}

.rechtliches h4 {
    margin-top: 1em;
}

/************************ Forms ******************/

form {
    display: block;
    width: 95%;
    margin-inline: auto;
    container-type: inline-size;
}
@media (min-width: 70rem) {
    form {
        margin-left: 5%;
        width: 90%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 1em;
    }
}
form label {
    display: block;
    &.label_lang {
        display: inline-block;
        max-width: 20em;
    }

}
@media (min-width: 70rem) {
    form label {
        display: inline-block;
        width: 9rem;
        &.label_lang {
            width: auto;
        }
    }
}

form input:not([type=submit]), form textarea {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.2em;
    width: 90%;
    border: 3px solid var(--primary-color-dark);
    background-color: var(--bg-color-light);
}
@media (min-width: 70rem) {
    form input:not([type=submit]), form textarea {
        width: calc(95% - 9rem);
    }
}

form input#checknummer {
    align-self: flex-end;
}

form textarea {
    field-sizing: content;
    resize: vertical;
}

form .wrapper {
    width: 100%;
}

form #absenden {
    display: block;
    margin-top: 1em;
    margin-inline: auto;
    width: 8rem;
    padding: .3em;
    color: var(--text-color-light);
    border-radius: 4px;
    border: none;
    transition: background-color .5s;
    background-color: var(--primary-color-dark);
    &:hover {
        background-color: var(--primary-color-light);
    }
}

form input#checknummer {
    width: 5rem;
    height: 40px;
}

input, button, textarea, select {
    font: inherit;
    border-radius: 0.4em;
}
input:focus, button:focus, textarea:focus, select:focus {
    outline-offset: 3px;
}

#message {
    display: flex;
    justify-content: center;
    margin-inline: auto;
}

/********************* Footer ***************/

footer {
    height: 50px;
    display: grid;
    width: 100%;
    position: fixed;
    bottom: 0;
    z-index: 90;
    grid-template-areas: "footer-nav social-nav";
    align-content: space-between;
    box-shadow: 0 -2px 2px var(--shadow-color);
    justify-content: space-between;
    align-content: end;
    margin-top: auto;
    background-color: var(--primary-color-dark);
    color: var(--text-color-light);
    font-size: 16px;
    @media (width > 40rem) {
        position: relative;
        height: 80px;
        grid-template-areas: "footer-nav social-nav kontakt" "copyright social-nav kontakt";
        padding-bottom: 8px;
    }
}

#footernav {
    grid-area: footer-nav;
    margin-bottom: .5em;

    #footernavlist {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        margin-left: clamp(0.3rem, 0.057rem + 1.217vw, 1rem);
        line-height: .9em;

        li {
            padding: .2em;
        }

        a {
            font-size: .8em;
            background:
                linear-gradient(currentColor 0 0)
                bottom /var(--d, 0) 2px
                no-repeat;
            transition:0.5s;

            @media (width > 40rem) {
                font-size: 1em;
            }

            color: var(--text-color-light);
            text-decoration: none;

            &:hover {
                --d: 100%;
            }
        }
    }
}

#socialnav {
    grid-area: social-nav;
    margin-bottom: .5em;
    align-content: center;
    margin-right: clamp(0.3rem, 0.057rem + 1.217vw, 1rem);


    ul {
        display: flex;
        justify-content: center;
        gap: 1em;
    }

    svg {
        width: 30px;
        height: 30px;
        color: var(--text-color-light);
    }
}

#footerkontakt {
    display: none;
    @media (width > 40rem) {
        display: block;
        grid-area: kontakt;
        margin-inline-end: 1em;
        text-align: right;
        line-height: 1.3em;

    }

}

#footertext {
    display: none;
    @media (width > 40rem) {
        display: block;
        font-size: .8em;
        grid-area: copyright;
        margin-inline-start: 1em;
        align-self: end;
    }

}


/********************* Tabellen ****************/

table {
    width: 100%;
    font-size: 1rem;
    line-height: 1rem;

    td {
        padding-right: 1em;
        padding-bottom: 1em;

        &:last-of-type {
            width: 5em;
        }

        h3 {
            margin-bottom: 0;
            margin-top: .5em;
        }

    }

    caption {
        margin-bottom: 1em;
    }

    @container body (width < 70rem) {
        width: auto;
        margin-inline: auto;
    }

    th {
        text-align: left;
    }

}

/************************ Cookie Window *******************/

#cookiewindow {
    max-width: 100ch;
    margin-top: 10vh;
    margin-inline: auto;
    padding: 1em;
    background: var(--bg-color-dark);
    color: var(--text-color);
    border-radius: .5em;

    button {
        display: block;
        margin-inline: auto;
        padding: .3em;
        padding-inline-start: .4em;
        border-radius: .2em;
        background: var(--primary-color-light);
        color: var(--text-color-light);
    }

}

::-ms-backdrop {
    background-color: var(--dialog-bg-color);
    backdrop-filter: blur(3px);
}

::backdrop {
    background-color: var(--dialog-bg-color);
    -webkit-backdrop-filter: blur(3px);
            backdrop-filter: blur(3px);
}

/*************************** topbutton *****************/
#topbutton {
    display: none;
    position: fixed;
    bottom: 120px;
    right: 30px;
    z-index: 97;
    border: none;
    outline: none;
    background-color: var(--primary-color-dark);
    color: var(--text-color-light);
    cursor: pointer;
    padding: 0.3em;
    border-radius: 10px;
    font-size: 100%;
    font-weight: bold;

    &:hover {
        background-color: var(--primary-color-light);
    }

}
@media (max-width: 70rem) {
    #topbutton {
        opacity: 70%;
    }
}