/* TSV Bärenstein – Desktop-Header */
@media (min-width: 1025px) {
    :root {
        --tsv-header-green: #063d28;
        --tsv-header-content: 1200px;
        --tsv-header-top: 102px;
        --tsv-header-menu-height: 54px;
        --tsv-header-art-height: 260px;
        --tsv-header-wave-top: 34px;
        --tsv-header-menu-start: -226px;
    }

    #masthead {
        position: relative;
        z-index: 2;
    background:
    linear-gradient(#fff, #fff)
        left top / 100% var(--tsv-header-wave-top) no-repeat,
    linear-gradient(#fff, #fff)
        right top / calc(50% - var(--tsv-header-menu-start)) 100% no-repeat;    
        overflow: visible;
    }

/* Linke Welle. Die Grafikebene darf über das Menü hinausragen. */
#masthead::before {
    --tsv-header-wave-left: 1280px;

    content: "";
    position: absolute;
    inset: var(--tsv-header-wave-top) 0 auto
           calc(50% - var(--tsv-header-wave-left));
    height: calc(var(--tsv-header-art-height) - var(--tsv-header-wave-top));
    background:
    url("../tsv-header-welle.svg") left top / auto no-repeat,
    url("../tsv-header-welle-weiss.svg") 10px top / auto no-repeat;
    pointer-events: none;
}

    /* Wappen, Vereinsname und Slogan im mittigen Inhaltsbereich */
    #masthead .inside-header {
        position: relative;
        box-sizing: border-box;
        width: min(calc(100% - 48px), var(--tsv-header-content));
        min-height: var(--tsv-header-top);
        margin-inline: auto;
        padding: 0;
        display: flex;
        align-items: center;
    }

    #masthead .site-logo img {
        display: block;
        width: 120px;
        height: auto;
    }

    #masthead .main-title {
        font-size: clamp(25px, 2.4vw, 34px);
        font-weight: 800;
        line-height: 1.15;
    }

    #masthead .main-title a {
        color: #10271d;
    }

    #masthead .site-description {
        margin-top: 4px;
        color: #263b32;
        font-size: 16px;
    }

    /* Hauptmenü und Menüband */
    #site-navigation {
        --tsv-menu-left: calc(50% + var(--tsv-header-menu-start));
        position: relative;
        z-index: 3;
        isolation: isolate;
        min-height: var(--tsv-header-menu-height);
        background: transparent;
    }

    #site-navigation::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0 0 auto var(--tsv-menu-left);
        height: var(--tsv-header-menu-height);
        background:
            url("../tsv-header-menu-bg.svg") left top / auto 54px no-repeat,
            linear-gradient(var(--tsv-header-green), var(--tsv-header-green))
                right top / calc(100% - 54px) 100% no-repeat;
        pointer-events: none;
    }

    #site-navigation .inside-navigation {
        box-sizing: border-box;
        width: min(calc(100% - 48px), var(--tsv-header-content));
        min-height: var(--tsv-header-menu-height);
        margin-inline: auto;
        padding-inline: max(0px, calc(var(--tsv-menu-left) - (100% - min(100% - 48px, var(--tsv-header-content))) / 2 + 20px)) 0;
        justify-content: flex-start;
    }

    #site-navigation .main-nav {
        margin-inline: 0;
    }

    #site-navigation .main-nav > ul > li > a {
        padding-inline: clamp(9px, 1vw, 16px);
        line-height: var(--tsv-header-menu-height);
        font-weight: 700;
    }
}

/* Grün nur außerhalb der mittigen 2560 px ergänzen */
@media (width > 2560px) {
    #masthead::after,
    #site-navigation::after {
        content: "";
        position: absolute;
        width: 50vw;
        height: var(--tsv-header-menu-height);
        background: var(--tsv-header-green);
        pointer-events: none;
    }
#masthead {
    box-shadow: inset 12px 0 0 #fff;
}
#masthead::after {
    top: var(--tsv-header-top);
    right: calc(100% - 12px);
    z-index: -1;
}

    #site-navigation::after {
        top: 0;
        left: 100%;
    }
}
/* Logo und Slogann */
@media (min-width: 1025px) {
    #masthead .inside-header {
        --tsv-logo-top: 5px;
        --tsv-logo-left: 600px;

        --tsv-branding-top: 15px;
        --tsv-branding-left: 450px;

        position: relative;
    }

    #masthead .site-branding-container {
        position: static;
    }

    #masthead .site-logo {
        position: absolute;
        top: var(--tsv-logo-top);
        left: max(0px, calc(50% - var(--tsv-logo-left)));
        margin: 0;
    }

    #masthead .site-branding {
        position: absolute;
        top: var(--tsv-branding-top);
        left: max(90px, calc(50% - var(--tsv-branding-left)));
        margin: 0;
    }
}
/* Sticky header */
@media (min-width: 1025px) {
    body {
        --tsv-sticky-top: 0px;
    }

    body.admin-bar {
        --tsv-sticky-top: 32px;
    }

    #masthead {
        position: sticky;
        top: var(--tsv-sticky-top);
        z-index: 20;
    }

    #site-navigation {
        position: sticky;
        top: calc(var(--tsv-sticky-top) + var(--tsv-header-top));
        z-index: 21;
    }
}
/* Schnelllinks */
/* ==========================================
   TSV Bärenstein – Navigation und Schnelllinks
   ========================================== */

/* Schnelllinks */
.tsv-quicklinks-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tsv-quicklinks-menu li {
    margin: 0;
    padding: 0;
}

.tsv-quicklinks-menu a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #092c20;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.tsv-quicklinks-menu a:hover,
.tsv-quicklinks-menu a:focus-visible {
    color: #287c12;
    text-decoration: underline;
}

/* Gemeinsame Icon-Eigenschaften */
.tsv-quicklinks-menu a::before {
    content: "";
    display: inline-block;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    background-color: currentColor;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;

    -webkit-mask-image: var(--tsv-link-icon);
    mask-image: var(--tsv-link-icon);
}

/* Kontakt */
.tsv-quicklinks-menu > li.tsv-link-kontakt {
    --tsv-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='5' width='20' height='14' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m3 7 9 7 9-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Online-Shop */
.tsv-quicklinks-menu > li.tsv-link-shop {
    --tsv-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='21' r='1' fill='black'/%3E%3Ccircle cx='20' cy='21' r='1' fill='black'/%3E%3Cpath d='M1 2h3l2.4 12.4a2 2 0 0 0 2 1.6h11a2 2 0 0 0 2-1.6L23 6H5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Facebook */
.tsv-quicklinks-menu > li.tsv-link-facebook {
    --tsv-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 22v-9h3l.5-4H14V6.5c0-1.2.4-2 2-2h2V1.2C17.7 1.1 16.5 1 15.2 1 12.4 1 10.5 2.7 10.5 5.8V9H7v4h3.5v9Z'/%3E%3C/svg%3E");
}

/* Instagram */
.tsv-quicklinks-menu > li.tsv-link-instagram {
    --tsv-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='5' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='4' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='17.5' cy='6.5' r='1.2'/%3E%3C/svg%3E");
}

/* WhatsApp */
.tsv-quicklinks-menu > li.tsv-link-whatsapp {
    --tsv-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 3.5A11.8 11.8 0 0 0 12.1 0C5.5 0 .1 5.4.1 12c0 2.1.6 4.2 1.6 6L0 24l6.2-1.6c1.7.9 3.7 1.4 5.8 1.4h.1c6.6 0 12-5.4 12-12 0-3.2-1.3-6.2-3.6-8.3ZM12.1 21.8c-1.8 0-3.6-.5-5.1-1.4l-.4-.2-3.7 1 1-3.6-.2-.4A9.8 9.8 0 0 1 2.1 12c0-5.5 4.5-10 10-10a10 10 0 0 1 10 10c0 5.4-4.5 9.8-10 9.8Zm5.5-7.4c-.3-.1-1.8-.9-2.1-1-.3-.1-.5-.1-.7.2-.2.3-.8 1-.9 1.2-.2.2-.3.2-.6.1-.3-.2-1.3-.5-2.5-1.6-.9-.8-1.5-1.8-1.7-2.1-.2-.3 0-.5.1-.6l.5-.6.3-.5c.1-.2 0-.4 0-.6L9 6.7c-.2-.6-.5-.5-.7-.5h-.6c-.2 0-.5.1-.8.4-.3.3-1.1 1.1-1.1 2.6s1.1 3 1.3 3.2c.1.2 2.2 3.4 5.4 4.8.7.3 1.3.5 1.8.6.7.2 1.4.2 1.9.1.6-.1 1.8-.7 2-1.4.3-.7.3-1.3.2-1.4-.1-.2-.3-.3-.6-.4Z'/%3E%3C/svg%3E");
}

/* Social-Media-Links: nur Icons anzeigen */
#masthead .tsv-quicklinks-menu > :is(
    .tsv-link-facebook,
    .tsv-link-instagram,
    .tsv-link-whatsapp
) > a {
    font-size: 0;
    gap: 0;
    width: 40px;
    height: 40px;
    justify-content: center;
    text-decoration: none;
}

#masthead .tsv-quicklinks-menu > :is(
    .tsv-link-facebook,
    .tsv-link-instagram,
    .tsv-link-whatsapp
) > a::before {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

/* Tastaturfokus */
#masthead .tsv-quicklinks-menu > :is(
    .tsv-link-facebook,
    .tsv-link-instagram,
    .tsv-link-whatsapp
) > a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Abstände der Schnelllinks */
#masthead .tsv-quicklinks-menu {
    --tsv-quicklinks-gap: 0px;
    gap: var(--tsv-quicklinks-gap);
}

#masthead .tsv-quicklinks-menu > li + li {
    margin-left: 24px;
}

/* Abstand vom Shop zur Social-Gruppe */
#masthead .tsv-quicklinks-menu > li.tsv-link-facebook {
    margin-left: 16px;
}

/* Zwischen Social-Icons den zusätzlichen Menüabstand ausgleichen */
#masthead .tsv-quicklinks-menu > li.tsv-link-facebook + li.tsv-link-instagram,
#masthead .tsv-quicklinks-menu > li.tsv-link-instagram + li.tsv-link-whatsapp {
    margin-left: calc(-1 * var(--tsv-quicklinks-gap));
}
/* WhatsApp optisch an die anderen Icons angleichen */
#masthead .tsv-quicklinks-menu > li.tsv-link-whatsapp > a::before {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

/* Desktop ab 1025px */
@media (min-width: 1025px) {
    #masthead .tsv-header-quicklinks {
        --tsv-quicklinks-top: 28px;
        --tsv-quicklinks-right: 0px;

        position: absolute;
        top: var(--tsv-quicklinks-top);
        right: var(--tsv-quicklinks-right);
    }

    #masthead .tsv-quicklinks-menu {
        --tsv-quicklinks-gap: clamp(12px, 1.5vw, 28px);
    }
}

/* Bis 1024px */
@media (max-width: 1024px) {
    #masthead .inside-header {
        flex-wrap: wrap;
    }

    #masthead .tsv-header-quicklinks {
        width: 100%;
        margin-top: 12px;
    }

    #masthead .tsv-quicklinks-menu {
        --tsv-quicklinks-gap: 16px;

        justify-content: center;
        flex-wrap: wrap;
        row-gap: 8px;
    }
}

/* Tablet: 769px bis 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    #masthead .inside-header {
        position: relative;
        padding-top: 15px;
    }

    #masthead .tsv-header-quicklinks {
        position: absolute;
        top: 12px;
        right: 16px;
        width: auto;
        margin: 0;
    }

    #masthead .tsv-quicklinks-menu {
        justify-content: flex-end;
        flex-wrap: nowrap;
        row-gap: 16px;
    }
}

/* Unter 769px Schnelllinks ausblenden */
@media (width < 769px) {
    #masthead .tsv-header-quicklinks {
        display: none;
    }
}

/* Titel und Slogan: 1025px bis 1200px */
@media (min-width: 1025px) and (max-width: 1200px) {
    #masthead .site-branding {
        left: max(130px, calc(50% - var(--tsv-branding-left)));
    }
}
.leaflet-container {
    z-index: 1;
}
