/* ============================================================
   WCAG 2.2 Accessibility Styles
   ============================================================ */

/* ----------------------------------------------------------
   1. Skip Navigation Link (WCAG 2.4.1 – Bypass Blocks)
      position:fixed w obu stanach = przeglądarka nie scrolluje
      (fixed jest zawsze relatywny do viewportu, nie dokumentu)
   ---------------------------------------------------------- */
.skip-link {
    position: fixed;
    top: -100px;
    left: 8px;
    z-index: 99999;
    padding: 10px 18px;
    background: #fff;
    color: #000 !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 3px solid #BD2025;
    border-radius: 3px;
    white-space: nowrap;
    transition: top 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
    top: 8px;
    outline: 3px solid #BD2025 !important;
    outline-offset: 2px;
}

/* ----------------------------------------------------------
   2. Screen Reader Only – visually hidden but accessible
      (używane w form.php dla label)
   ---------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------------------------------------
   3. Focus Visible – WCAG 2.4.7 / 2.4.11 (nowe w 2.2)
      Nadpisuje globalne "outline: 0" z CSS resetu
   ---------------------------------------------------------- */
*:focus-visible {
    outline: 3px solid #BD2025 !important;
    outline-offset: 3px;
    border-radius: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #BD2025 !important;
    outline-offset: 3px;
}

/* ----------------------------------------------------------
   4. Hamburger button – reset stylów przycisku
      (button { height: 100% } pochodzi z CSS resetu)
   ---------------------------------------------------------- */
button.wrapper__hamb {
    height: auto !important;
    background: transparent !important;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

/* ----------------------------------------------------------
   5. Scroll-up button – reset stylów przycisku
   ---------------------------------------------------------- */
button.footer__arrow,
button.scroll--up {
    height: auto !important;
    background: transparent !important;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----------------------------------------------------------
   6. Scroll margin – focus not obscured by sticky header
      WCAG 2.4.11 (nowe w 2.2)
   ---------------------------------------------------------- */
:target,
#main-content:focus {
    scroll-margin-top: 80px;
}

/* ----------------------------------------------------------
   7. Target Size Minimum – WCAG 2.5.8 (nowe w 2.2)
      Minimum 24×24 CSS px dla elementów interaktywnych
   ---------------------------------------------------------- */
.wrapper__lang--href {
    min-height: 24px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
}

/* ----------------------------------------------------------
   9. Focus dla elementów z clip-path (wersje językowe)
      outline/box-shadow są przycinane przez clip-path –
      jedynym widocznym wskaźnikiem jest zmiana tła (WCAG 2.4.7)
   ---------------------------------------------------------- */
.wrapper__lang--href:focus,
.wrapper__lang--href:focus-visible {
    outline: none !important;
    background-color: #BD2025 !important;
    color: #fff !important;
}

.footer__menu--href {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
}

/* ----------------------------------------------------------
   8. Animacje – WCAG 2.3.3 (nowe w 2.2)
      Wyłącz animacje gdy użytkownik preferuje brak ruchu
   ---------------------------------------------------------- */
@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;
    }

    .wow {
        visibility: visible !important;
        animation: none !important;
    }

    .animated {
        animation: none !important;
    }
}
