@import url("https://fonts.verwaltungsportal.de/import/?family=Montserrat:400,600,400i,600i");

html {
    max-width: 1922px;
    margin-left: auto;
    margin-right: auto;
    background: #f1f1f1;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    scrollbar-color: #4d4d4d #ffffff;
    scrollbar-width: thin;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: #404040;
    background: #ffffff;
    font-size: clamp(1rem, 2vw, 1.125rem);
    /* 1rem = 16px */
    line-height: 1.5;
}

a,
a:is(:hover, :focus) {
    color: #c93a13;
}

#content a,
a:is(:hover, :focus),
:is(header, main) a,
footer .template-page a {
    text-decoration: underline;
}

:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

b,
strong {
    font-weight: 600;
}

.small-text {
    font-size: 1rem;
}

.large-text,
.button-style.button-style-wide a:not(.has-image):not(:has(img)),
#contact table {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
}

#over {
    overflow: clip;
    position: relative;
}

/* -------------------------------------------- topbar -------------------------------------------- */

#topbar {
    padding-bottom: 25px;
    background: url('../img/slider-mask.png') top -1px center / 100% auto no-repeat, url('../img/muster-geschwungene-wellen-topbar.png') top right no-repeat;
}

.index #topbar {
    padding-bottom: 25px;
    background: url('../img/slider-mask.png') top -1px center / 100% auto no-repeat;
}

/* -------------------------------------------- logo -------------------------------------------- */

#logo {
    display: inline-block;
}

#logo img {
    display: block;
    background: #ffffff;
}

@media (max-width: 991px) {
    #logo img {
        max-width: 120px;
        width: 100%;
    }
}

/* ------------------------------------------ navigation ---------------------------------------- */

@media (min-width: 1200px) {
    nav.horizontally>.row {
        max-width: 1600px;
        width: 100%;
    }
}

/* burgermenu for tablet */

@media (max-width: 991px) {
    #burgerButton {
        font-size: 0;
        border: 1px solid transparent;
        display: block;
        height: 60px;
        width: 60px;
        padding: 6px 8px;
        cursor: pointer;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1003;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        background: #ffffff;
        border-radius: 6px;
    }

    #burgerButton::before,
    #burgerButton::after,
    #burgerButtonInner {
        background: #c93a13;
        position: absolute;
        width: 40px;
        height: 3px;
        left: calc(50% - 20px);
        transition: transform 200ms linear, opacity 200ms linear;
    }

    #burgerButton[aria-expanded="true"] #burgerButtonInner {
        transform: rotate(-45deg) translate(-7px, 7px);
    }

    #burgerButton[aria-expanded="true"]::before {
        opacity: 0;
    }

    #burgerButton[aria-expanded="true"]::after {
        transform: rotate(45deg) translate(-6px, -7px);
        width: 40px;
    }

    #burgerButtonInner {
        top: 18px;
    }

    #burgerButton::before {
        top: 28px;
        content: "";
    }

    #burgerButton::after {
        top: 38px;
        content: "";
    }

    .navbar-nav {
        margin: 20px 0;
    }

    .navbar-collapse {
        width: calc(100% - 90px);
        max-width: 300px;
        top: 0;
        background: #ffffff;
        position: fixed;
        left: -100%;
        bottom: 0;
        z-index: 100;
        height: auto !important;
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        overflow-y: auto;
        transition: left 300ms linear, opacity 300ms linear, box-shadow 600ms linear;
        box-shadow: 250px 0 50vw 50vw rgba(255, 255, 255, 0);
    }

    .navbar-collapse:is([aria-expanded="true"], .in) {
        left: 0;
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        box-shadow: 250px 0 50vw 50vw rgba(0, 0, 0, 0.6);
    }

    .navbar-header {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 101;
    }

    .dropdown-toggle-button-wrapper {
        top: 7px;
    }

    .dropdown-toggle-button-wrapper2 {
        top: 4px;
    }
}

/* menu desktop */

@media (min-width: 992px) {
    nav.horizontally {
        padding: 0;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #ffffff;
        border-top: 1px solid #b3b3b3;
        border-bottom: 1px solid #b3b3b3;
    }

    nav.horizontally .navbar-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    nav.horizontally .navbar-nav ul {
        position: absolute;
        top: 100%;
        left: 50%;
        z-index: 1000;
        display: block !important;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 300ms linear;
    }

    nav.horizontally .navbar-nav [class*="secondlevel"]>ul {
        left: 100%;
        top: 0;
    }

    nav.horizontally .navbar-nav li {
        position: relative;
    }

    nav.horizontally .navbar-nav li:is(.open:focus-within, :hover)>ul,
    nav.horizontally .navbar-nav li[class*="secondlevel"]>ul[style*="block"] {
        pointer-events: auto !important;
        opacity: 1 !important;
        visibility: visible;
    }

    nav.horizontally .navbar-nav li:is(:hover, :focus-within)>ul {
        z-index: 1003;
    }
}

/* toplevel */

nav.horizontally li[class*="toplevel"] {
    position: relative;
}

nav.horizontally a[class*="toplevel"] {
    color: #404040;
    font-weight: 600;
    text-align: left;
    padding: 14px 15px;
    position: relative;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
}

@media (max-width: 991px) {
    nav.horizontally li[class*="toplevel"]:last-child {
        padding: 14px 15px;
    }

    nav.horizontally a[class*="toplevel"].dropdown-toggle {
        padding-right: 35px;
    }
}

@media (min-width: 992px) {
    nav.horizontally a[class*="toplevel"] {
        display: flex;
        align-items: center;
        text-align: center;
        padding: 40px 0;
    }
}

nav.horizontally li[class*="toplevel"]::after {
    content: "";
    display: inline-block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -2px;
    height: 3px;
    background: #447f1a;
    opacity: 0;
    width: 0;
    transition: opacity 200ms linear, width 200ms linear;
    pointer-events: none;
}

/* toplevel-over */

nav.horizontally li[class*="toplevel"]:is(:hover, :focus-within)>a,
nav.horizontally li[class*="toplevel"]>a:is(:hover, :focus),
nav.horizontally li[class*="toplevel"].open>a,
nav.horizontally li[class*="toplevel"].open>a:is(:hover, :focus),
nav.horizontally li[class*="toplevel"][class*="_over"]>a,
nav.horizontally li[class*="toplevel"][class*="_over"]>a:is(:hover, :focus) {
    color: #c93a13;
}

nav.horizontally li[class*="toplevel"]:is(:hover, :focus-within)::after,
nav.horizontally li[class*="toplevel"].open::after,
nav.horizontally li[class*="toplevel"][class*="_over"]::after {
    opacity: 1;
    width: 100%;
}

/* secondlevel + thirdlevel dropdown-box */

nav.horizontally [class*="toplevel"] ul {
    background: #007db3;
    padding: 15px;
}

@media (min-width: 992px) {
    nav.horizontally [class*="toplevel"] ul {
        border-radius: 20px;
        padding: 20px;
    }

    nav.horizontally [class*="toplevel"]>ul {
        margin-top: 20px;
        transform: translateX(-50%);
    }

    nav.horizontally [class*="secondlevel"]>ul {
        margin-top: -20px;
        margin-left: 40px;
    }

    nav.horizontally :is([class*="toplevel"], [class*="secondlevel"])>ul::before {
        content: "";
        position: absolute;
        display: block;
    }

    nav.horizontally [class*="toplevel"]>ul::before {
        height: 20px;
        left: 0;
        right: 0;
        top: -20px;
    }

    nav.horizontally [class*="secondlevel"]>ul::before {
        width: 40px;
        top: 0;
        bottom: 0;
        left: -40px;
    }
}

/* secondlevel + thirdlevel */

nav.horizontally a:is([class*="secondlevel"], [class*="thirdlevel"]) {
    color: #ffffff;
    font-weight: 400;
    text-align: center;
    padding: 12px 20px;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 1px;
}

@media (max-width: 991px) {
    nav.horizontally a:is([class*="secondlevel"], [class*="thirdlevel"]) {
        text-align: left;
    }

    nav.horizontally a[class*="secondlevel"].dropdown-toggle2 {
        padding-right: 35px;
    }
}

/* secondlevel + thirdlevel over */

nav.horizontally li:is([class*="secondlevel"], [class*="thirdlevel"]):is(:hover, :focus-within)>a,
nav.horizontally li:is([class*="secondlevel"], [class*="thirdlevel"])>a:is(:hover, :focus),
nav.horizontally li:is([class*="secondlevel"], [class*="thirdlevel"]).open>a,
nav.horizontally li:is([class*="secondlevel"], [class*="thirdlevel"]).open>a:is(:hover, :focus),
nav.horizontally li:is([class*="secondlevel"], [class*="thirdlevel"])[class*="_over"]>a,
nav.horizontally li:is([class*="secondlevel"], [class*="thirdlevel"])[class*="_over"]>a:is(:hover, :focus) {
    background: #ffffff;
    color: #c93a13;
}

/* ----------------------------------------- tabs global ---------------------------------------- */

.tab {
    padding: clamp(30px, 4vw, 45px) clamp(30px, 4vw, 40px) clamp(30px, 4vw, 40px) clamp(30px, 4vw, 40px);
    background: #ffffff no-repeat;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.tab.tab-background {
    background: #ffffff;
}

.tab.tab-background,
.tab.tab-background * {
    color: #404040;
}

.tab img {
    display: block;
}

/* -------------------------------------------- header ------------------------------------------ */

header {
    background: url("../img/bg-welle.png") center bottom -1px no-repeat, #ecf2e8;
}

header .template-page img {
    margin-bottom: 25px;
}

body:not(.index) header .template-page img {
    display: none;
    visibility: hidden;
}

header .tab-bg,
header>.row {
    padding-top: clamp(40px, 4vw, 60px);
}

header .tab-bg .tab {
    border-radius: 20px;
    padding: 30px;
    background: linear-gradient(45deg, #ffffff 35%, rgba(0, 0, 0, 0) 70%), url("../img/top-muster-geschwungene-wellen.png") center / cover no-repeat, #ffffff;
}

header .tab-bg .tab :is(.row, .row>div) {
    position: static;
}

header .tab img {
    border-radius: 50%;
    width: 135px;
    height: 135px;
    object-fit: cover;
}

@media (min-width: 576px) {
    header .tab-bg .tab {
        min-height: 195px;
        padding-left: 195px;
    }

    header .tab img {
        margin: 0;
        position: absolute;
        left: 30px;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* ------------------------------------------ button-style -------------------------------------- */

.button-style a:not(.has-image):not(:has(img)),
#social-media .button-style.button-style-invert a {
    padding: 11px 19px;
    line-height: 1.2;
    color: #ffffff;
    background: #630335;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
    align-items: center;
    border: 1px solid transparent;
    text-decoration: none;
}

.button-style a:not(.has-image):not(:has(img)):is(:hover, :focus) {
    color: #ffffff;
    background: #033f63;
}

.button-style.button-style-wide a:not(.has-image):not(:has(img)) {
    font-size: clamp(1rem, 2vw, 1.375rem);
    color: #007db3;
    background: #ffffff;
    border-color: #007db3;
}

.button-style.button-style-wide a:not(.has-image):not(:has(img)):is(:hover, :focus) {
    color: #ffffff;
    background: #007db3;
}

main>*:not(#social-media) .button-style:not(.button-style-wide) p:has(a+a) {
    margin-top: -20px;
}

.button-style:not(.button-style-wide) p:has(a+a) a:not(.has-image):not(:has(img)) {
    margin-top: 20px;
    margin-right: 10px;
}

/* invert */

.button-style.button-style-invert a:not(.has-image):not(:has(img)) {
    color: #ffffff;
    background: #007db3;
}

header .button-style.button-style-invert a:not(.has-image):not(:has(img)):nth-of-type(2) {
    background: #c93a13;
}

header .button-style.button-style-invert a:not(.has-image):not(:has(img)):nth-of-type(3) {
    background: #447f1a;
}

header .button-style.button-style-invert a:not(.has-image):not(:has(img)):is(:hover, :focus) {
    background: #ffffff;
    color: inherit;
    border-color: inherit;
}

#social-media .button-style.button-style-invert a:is(:hover, :focus) {
    color: #ffffff;
    background: #006b99;
}

#social-media .button-style.button-style-invert a {
    color: #006b99;
    font-size: clamp(1rem, 2vw, 1.375rem);
    padding: 16px 36px;
    background: transparent;
    border-color: #006b99;
    display: inline-grid;
}

#social-media .button-style.button-style-invert a+a {
    margin-left: 20px;
}

/* large */

.button-style.button-style-wide a:not(.has-image):not(:has(img)) {
    display: block;
    padding: 21px 20px;
    margin-top: 30px;
}

/* -------------------------------------------- contact ----------------------------------------- */

#contact {
    background-color: #ffffff;
    padding-top: clamp(30px, 4vw, 55px);
    padding-bottom: clamp(30px, 4vw, 65px);
}

@media (min-width: 768px) {
    #contact .tab {
        flex-grow: 1;
    }
}

#contact>.row {
    row-gap: 30px;
}

/* -------------------------------------------- content ----------------------------------------- */

#content {
    text-align: left;
    padding-top: clamp(30px, 4vw, 60px);
    padding-bottom: clamp(30px, 5vw, 70px);
    position: relative;
}

#content::before {
    content: '';
    position: absolute;
    pointer-events: none;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 8px;
    background: repeating-linear-gradient(to right,
            #009ee0 0px, #009ee0 320px,
            #e64215 320px, #e64215 640px,
            #5dad24 640px, #5dad24 960px) top center;
}

/* -------------------------------------- h1 - h6, newslink ------------------------------------- */

.h4link a:is(:link, :hover, :focus, :visited),
h6,
h5,
h4,
h3,
h2,
h1 {
    color: #404040;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 15px;
}

:is(h1, h2, h3, h4, h5, h6) :is(i, em) {
    color: #404040;
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-style: normal;
    margin-bottom: 6px;
    font-weight: 400;
    display: block;
    text-transform: uppercase;
}

#social-media :is(h1, h2) {
    margin-bottom: 30px;
}

footer h2.h6 {
    margin-bottom: 20px;
    color: #007db3;
}

h1,
.h1,
.legacy_h1,
:is(header .large-text, #social-media) :is(h1, h2) {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
}

h2,
.h2,
.legacy_h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.1875rem);
}

h3,
.h3,
.legacy_h3 {
    font-size: clamp(1.625rem, 3vw, 1.875rem);
}

h4,
.h4,
.h4link a:is(:link, :hover, :focus, :visited),
.legacy_h4,
:is(.tab:not(.small-text)) :is(h1, h2, h3, h4, h5, h6) {
    font-size: 1.5625rem;
}

h5,
.h5,
.legacy_h5 {
    font-size: 1.375rem;
}

h6,
.h6,
.legacy_h6 {
    font-size: 1.25rem;
}

/* ----------------------------------------- social-media --------------------------------------- */

#social-media {
    hyphens: auto;
    padding-top: clamp(30px, 6vw, 80px);
    padding-bottom: clamp(30px, 4vw, 65px);
    background: linear-gradient(45deg, #ecf2e8 35%, rgba(0, 0, 0, 0) 70%), url("../img/muster-geschwungene-wellen.png") center / cover no-repeat, #ecf2e8;
}

#social-media,
#social-media * {
    color: #404040;
}

#social-media img {
    max-height: 30px;
}

/* ------------------------------------------- footer ------------------------------------------- */

footer {
    hyphens: auto;
    padding-top: clamp(30px, 4vw, 60px);
    padding-bottom: clamp(40px, 6vw, 110px);
    background: url('../img/slider-mask-bottom.png') bottom -1px center / 100% auto no-repeat, url('../img/muster-geschwungene-wellen.png') top right no-repeat;
    position: relative;
}

.index footer {
    background: url('../img/slider-mask-bottom.png') bottom -1px center / 100% auto no-repeat;
}

footer::before {
    content: '';
    position: absolute;
    pointer-events: none;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 8px;
    background: repeating-linear-gradient(to right,
            #009ee0 0px, #009ee0 320px,
            #e64215 320px, #e64215 640px,
            #5dad24 640px, #5dad24 960px) top center;
}

footer>.row {
    row-gap: 30px;
}

/* innerfooter */

#innerfooter ul {
    padding: 0;
}

#innerfooter ul a {
    display: inline-block;
}

#innerfooter ul a:not(:is(:hover, :focus)) {
    color: inherit;
}

#innerfooter ul a:is(:hover, :focus) {
    text-decoration: none;
}

/* --------------------------------------------- kontraste -------------------------------------------- */

.contrast_light_font .dropdown-toggle-button,
.contrast_dark_font #burgerButton::before,
.contrast_dark_font #burgerButton::after,
.contrast_dark_font #burgerButtonInner {
    background-color: #000 !important;
}

.contrast_light_font #burgerButton::before,
.contrast_light_font #burgerButton::after,
.contrast_light_font #burgerButtonInner {
    background-color: #fff !important;
}