/* Barrierefreiheit - Verbesserte Sichtbarkeit für Tastaturfokus */
*:focus {
    outline: 2px solid rgb(255, 246, 0);
    outline-offset: -2px;
}
/* Spezifischer Fokus-Stil für Menüelemente */
#menu [role="menuitem"]:focus {
    background-color: rgba(255, 246, 0, 0.2);
    outline: none; /* Entfernt die Standardumrandung */
}

/* Menüelemente im geöffneten Zustand */
#menu [aria-expanded="true"] {
    background-color: rgba(255, 246, 0, 0.2);
}

/* Sicherstellen, dass Untermenüs bei Fokus sichtbar bleiben */
#menu li:focus-within > ul[role="menu"] {
    max-height: 1000px !important;
    padding: 0px 10px 20px 10px !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}
/* Spezifischer Fokus-Stil für Menüelemente */
#menu [role="menuitem"]:focus {
    background-color: rgba(255, 246, 0, 0.2);
    outline: none;
}
.button:focus {
    outline-offset: 4px;
}

.filter-options input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none; /* Damit Klick nur aufs Label geht */
}
.filter-options input[type="radio"]:focus + label {
    outline: 2px solid #fff600; /* Fokus-Rahmen */
    outline-offset: 10px;
    border-radius: 0px;
}


/* Für Screenreader versteckte Inhalte */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Verbesserte visuelle Hinweise für Untermenüs */
#menu [aria-expanded="true"] {
    background-color: rgba(146, 107, 110, 0.2);
}

/* Stellen Sie sicher, dass Untermenüs durch Tastaturnavigation geöffnet sichtbar bleiben */
#menu [aria-expanded="true"] + ul {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Spezifischer Fokusindikator für aktuelle Elemente */
#menu .current:focus {
    outline-color: #444;
}

/* Styles für das Sprach-Menü */
.altlang-container {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 5px 0;
    /* Wichtig: Für geschmeidigen Übergang zwischen Anzeigen/Verbergen */
    transition: opacity 0.2s ease-out;
}

/* Sprach-Links Styling */
.altlang {
    display: block;
    padding: 5px 10px;
    text-decoration: none;
    color: #333;
}

.altlang:hover {
    background-color: #f5f5f5;
}

/* Unterstützung für aria-expanded */
button.linkasspan[aria-expanded="true"] .fa-angle-down {
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

/* Verbessere das Erscheinungsbild des Language-Menü-Buttons für bessere Tastatur-Navigation */
#langmenu {
    border: none;
    background: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
}

/* Verbesserte Sichtbarkeit für aktivierte Menüelemente */
[aria-expanded="true"] {
    background-color: rgba(146, 107, 110, 0.1);
}


.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: 8px;
    z-index: 10000;
    background: white;
    color: black;
    transition: top 0.2s ease-in;
}

.skip-link:focus {
    top: 0;
}