/* ===========================================================================
   Barrierefreiheit (a11y) – Holz Metall Riedel
   Skip-Link, Focus-Indicator, sr-only, prefers-reduced-motion
   =========================================================================== */

/* Visuell verstecken, aber für Screenreader vorhanden lassen */
.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: standardmäßig versteckt, sichtbar bei Tastatur-Fokus */
.skip-link {
    position: absolute;
    top: -200px;
    left: 0;
    z-index: 100000;
    padding: 12px 20px;
    background-color: var(--primary-color, #eb7013);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 6px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: top 0.15s ease-in-out;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Globaler sichtbarer Tastatur-Fokus
   :focus-visible wirkt nur, wenn der Fokus per Tastatur erreicht wird,
   nicht per Mausklick – so bleibt das Hover-/Klick-Erlebnis sauber.   */
*:focus-visible {
    outline: 3px solid var(--primary-color, #eb7013);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Mehr Kontrast für Fokus auf dunklen Flächen wie Hero und Footer */
.hero *:focus-visible,
.footer *:focus-visible,
[class*="bg-dark"] *:focus-visible {
    outline-color: #ffffff;
    box-shadow: 0 0 0 5px rgba(0,0,0,0.6);
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Hintergrundvideos stoppen wenn Reduced Motion gewünscht */
    video[autoplay] {
        display: none;
    }
}

/* Kontrast-Modus: zusätzliche Border auf interaktiven Elementen */
@media (prefers-contrast: more) {
    a,
    button,
    input,
    textarea,
    select {
        border: 2px solid currentColor !important;
    }
}

/* Sicherstellen, dass main fokusierbar ist (für Skip-Link-Sprung) */
main:focus,
#main:focus {
    outline: none;
}

/* Touch-Targets ausreichend groß (WCAG 2.5.5 AAA, 2.5.8 AA: min 24x24px,
   empfohlen 44x44px) */
.nav__link,
.dropdown__link,
.btn,
button,
.scroll-top {
    min-height: 44px;
    min-width: 44px;
}
