/*
 * Barrierefreiheit (Audit 17.11.2026)
 * Wird nach main.css / tablet.css / mobile.css / blocks.css geladen.
 * Grundsatz: keine optische Änderung, außer wo es für die Barrierefreiheit nötig ist
 * (Fokusrahmen, Skip-Link bei Fokus, Slider-Pause-Button, Formular-Labels).
 */

/* ---------- Nur für Screenreader ---------- */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ---------- Skip-Link (A-04): erst bei Tastaturfokus sichtbar ---------- */
.skip-link {
    position: absolute;
    left: 10px;
    top: -200px;
    z-index: 1000;
    padding: 10px 20px;
    background: #D1121F;
    color: #fff !important;
    font-size: 18px;
    line-height: 1.4;
    text-decoration: none !important;
}
.skip-link:focus {
    top: 10px;
}

/* Container, die nur programmatisch den Fokus erhalten (Sprungziel, Dialog, Fehlermeldung) */
main:focus,
#cookieBanner_root:focus,
#contactform-errors:focus {
    outline: none;
}

/* ---------- Einheitlicher Fokusrahmen (C-01) ---------- */
:focus-visible {
    outline: 3px solid #2E4A97;
    outline-offset: 2px;
}
/* Links, deren sichtbarer Button ein (absolut positioniertes) <div> ist: Rahmen am Button zeigen */
a:focus-visible > div {
    outline: 3px solid #2E4A97;
    outline-offset: 2px;
}
/* Auf rotem Grund (Footer, rote Buttons) weißer Rahmen für ausreichenden Kontrast */
#footer :focus-visible,
.servicename:focus-visible,
.a11y-slider-toggle:focus-visible {
    outline-color: #fff;
}
.servicename:focus-visible {
    outline-offset: -5px;
}
.slick-list:focus-visible {
    outline: 3px solid #2E4A97;
}

/* ---------- Buttons ohne Browser-Standardoptik (bisher <div>/<span>) ---------- */
button.servicename,
button.cookieBanner_button,
#header-menu-button,
.cookieBanner_optgroup_option_label button.plus,
.cookieBanner_optgroup_option_label button.minus {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    border-radius: 0;
    margin: 0;
    font-family: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}
button.servicename {
    font-size: inherit;
}
button.cookieBanner_button {
    background: transparent;
    margin: 0 10px 10px 0;
}
.cookieBanner_optgroup_option_label button.plus,
.cookieBanner_optgroup_option_label button.minus {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}
#header-menu-button {
    padding: 0;
    background-color: transparent;
}
@media screen and (max-width: 720px) {
    button.cookieBanner_button {margin: 0 5px 10px 0;}
}

/* ---------- Überschriften: neue Ebene, altes Aussehen ---------- */
/* Klasse a11y-hN = Optik der ursprünglichen Überschrift hN (siehe tiny.css) */
.a11y-h1 {font-family: 'Lato-Medium'; font-weight: 400; font-size: 44px; line-height: 120%; color: #D1121F; margin: 0 0 15px 0; padding: 0;}
.a11y-h2 {font-family: 'Lato-Medium'; font-weight: normal; font-size: 30px; line-height: inherit; color: #D1121F; margin: 0 0 15px 0; padding: 0;}
.a11y-h3 {font-family: 'Lato-Medium'; font-weight: normal; font-size: 22px; line-height: inherit; color: #000; margin: 0 0 10px 0; padding: 0;}
.a11y-h4 {font-family: 'Lato-Medium'; font-weight: normal; font-size: 20px; line-height: inherit; color: #D1121F; margin: 0 0 15px 0; padding: 0;}
.a11y-h5 {font-weight: bold; font-size: 0.83em; line-height: inherit; margin: 1.67em 0;}
.a11y-h6 {font-weight: bold; font-size: 0.67em; line-height: inherit; margin: 2.33em 0;}

@media only screen and (max-width: 990px) {
    .a11y-h1 {font-size: 40px;}
}
@media only screen and (max-width: 720px) {
    .a11y-h1 {font-size: 30px;}
}
@media (min-width: 721px) and (max-width: 990px) {
    .content_block_image_text__content .a11y-h1 {hyphens: auto;}
}

/* Filial-Block: Filialnamen sind jetzt H3, sehen aber aus wie bisher (H1) */
.single-branch-wrap .branch-name {font-family: 'Lato-Medium'; font-weight: 400; font-size: 44px; line-height: 120%; color: #D1121F; margin: 0 0 15px 0; padding: 0; width: 100%; text-align: center; padding-top: 40px;}
.braches-small-wrap .single-branch-wrap:nth-child(2) .branch-name {color: #2e4a97;}
@media only screen and (max-width: 1150px) {
    .single-branch-wrap .branch-name {font-size: 40px;}
}
@media only screen and (max-width: 990px) {
    .single-branch-wrap .branch-name {padding-top: 20px;}
}

/* ---------- Hauptnavigation ---------- */
/* A-02: Desktop-Untermenü auch per Tastatur (zusätzlich zu main.css, damit es nicht an einer gecachten main.css hängt) */
@media only screen and (min-width: 992px) {
    #HeaderNaviWrapper #navigation li:focus-within > ul {display: block;}
    /* Mobile Untermenü-Aufklapper gibt es nur bis 991px; am Desktop kein unsichtbarer Tab-Stopp */
    #HeaderNaviWrapper #navigation .frontendNavigationItemMobile {display: none;}
}
/* Esc schließt das per Fokus geöffnete Untermenü (muss nach der :focus-within-Regel stehen) */
#HeaderNaviWrapper #navigation li.a11y-submenu-closed > ul {display: none;}

/* N-01: Mobiler Untermenü-Aufklapper als sichtbarer Pfeil-Button, Zielfläche 44 × 44 px */
@media only screen and (max-width: 991px) {
    #HeaderNaviWrapper #navigation .hasChildren > button.frontendNavigationItemMobile {
        -webkit-appearance: none;
        appearance: none;
        position: absolute;
        top: 0;
        right: 20px;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #D1121F;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    #HeaderNaviWrapper #navigation .hasChildren > button.frontendNavigationItemMobile:hover {color: #2e4a97;}
    #HeaderNaviWrapper #navigation .hasChildren > button.frontendNavigationItemMobile:focus-visible {outline-offset: -3px;}
    #HeaderNaviWrapper #navigation .hasChildren > button.frontendNavigationItemMobile svg {
        display: block;
        transition: transform 200ms;
    }
    #HeaderNaviWrapper #navigation .hasChildren > button.frontendNavigationItemMobile[aria-expanded="true"] svg {
        transform: rotate(180deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    #HeaderNaviWrapper #navigation .hasChildren > button.frontendNavigationItemMobile svg {transition: none;}
}

/* ---------- Slider: Pause/Play-Button (S-01) ---------- */
.a11y-slider-wrap {position: relative;}
.a11y-slider-toggle {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 6;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #D1121F;
    cursor: pointer;
    transition: background 500ms;
}
.a11y-slider-toggle:hover {background: #2e4a97;}
/* Pause-Symbol (zwei Balken) */
.a11y-slider-toggle-icon {
    display: block;
    width: 14px;
    height: 16px;
    margin: 0 auto;
    border-left: 5px solid #fff;
    border-right: 5px solid #fff;
    box-sizing: border-box;
}
/* Play-Symbol (Dreieck) */
.a11y-slider-toggle.is-paused .a11y-slider-toggle-icon {
    width: 0;
    height: 0;
    margin-left: 17px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff;
    border-right: 0;
}
@media only screen and (max-width: 720px) {
    .a11y-slider-toggle {right: 10px; bottom: 10px;}
}

/* ---------- Kontaktformular (U-02): sichtbare Labels ---------- */
.wrapperform .formLabel {
    display: block;
    font-family: 'Lato-Medium';
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 4px;
    color: #000;
}
.wrapperform .formLabel span {
    color: #D1121F;
    margin-left: 2px;
}
.wrapperform [aria-invalid="true"] {
    border: 2px solid #D1121F;
}
/* N-02: Hinweis auf Telefon/E-Mail direkt beim hCaptcha */
.wrapperform .formHint {
    margin: 10px 0 0 0;
}
