/**
 * Verbesserte Tastaturnavigation Styles
 */

/* Verbesserte Fokus-Indikatoren */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 3px solid #2271b1 !important; /* WordPress Blau */
    outline-offset: 2px !important;
    box-shadow: 0 0 0 1px rgba(34, 113, 177, 0.2) !important;
}

/* Skip-Link Styling */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 9999;
    padding: 8px 16px;
    background-color: #ffffff;
    color: #2271b1;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
    border: 2px solid #2271b1;
}

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

/* Sichtbare Fokusindikatoren für Dropdown-Menüs */
.menu-item-has-children > a:focus + .sub-menu,
.menu-item-has-children > a[aria-expanded="true"] + .sub-menu {
    display: block !important;
}

/* Sichtbare Hover- und Fokus-Stile für Menüpunkte */
.menu-item > a:hover,
.menu-item > a:focus {
    background-color: rgba(34, 113, 177, 0.1);
    color: #2271b1;
}

/* Tastatur-zugängliche Dropdown-Menüs */
.menu-item-has-children {
    position: relative;
}

.menu-item-has-children > a[aria-expanded="true"] {
    background-color: rgba(34, 113, 177, 0.1);
}

.sub-menu {
    display: none;
    position: absolute;
    z-index: 1000;
    min-width: 200px;
    padding: 8px 0;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Sicherstellung, dass Untermenüs sichtbar sind, wenn sie aktiv sind */
.sub-menu:focus-within {
    display: block !important;
}

/* Styles für das mobile Menü */
.menu-toggle {
    padding: 10px 15px;
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    cursor: pointer;
}

.menu-toggle:focus {
    outline: 3px solid #2271b1 !important;
}

/* Verbesserung der Lesbarkeit für Screen Reader */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #ffffff;
    clip: auto !important;
    clip-path: none;
    color: #2271b1;
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Modals und Dialoge */
.modal, .dialog, [role="dialog"] {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content, .dialog-content {
    position: relative;
    margin: 10vh auto;
    padding: 20px;
    max-width: 600px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-close, .dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-close:focus, .dialog-close:focus {
    outline: 3px solid #2271b1;
}


.menu-languages:focus{
	  outline: 3px solid #2271b1;
}
