/* Barrierefreiheit CSS */

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 4px 4px;
}

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

/* Screen Reader Only Text */
.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;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #e4761b;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .skip-link {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Button Styling for Accessibility */
.scroll-to-top {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.scroll-to-top:focus {
    outline: 2px solid #e4761b;
    outline-offset: 2px;
}

/* Language Navigation Styles */
.lang {
    display: inline-block;
}

.lang a {
    padding: 4px 8px;
    margin: 0 2px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.lang a:hover,
.lang a:focus {
    background-color: #f0f0f0;
    text-decoration: underline;
}

.lang a:focus {
    outline: 2px solid #e4761b;
    outline-offset: 2px;
}

/* Fallback für leere Sprachlinks */
.lang a:empty::before {
    content: "Sprache wechseln";
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ensure language links have minimum content */
.lang a {
    min-width: 20px;
    display: inline-block;
    text-align: center;
}

/* High Contrast Mode for Language Links */
@media (prefers-contrast: high) {
    .lang a {
        border: 1px solid #000;
    }

    .lang a.curlang {
        background-color: #000;
        color: #fff;
        border: 2px solid #fff;
    }
}

/* Social Media Links Accessibility */
.ihtab a,
.social-share-container a {
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    text-align: center;
    transition: background-color 0.2s ease;
}

.ihtab a:focus,
.social-share-container a:focus {
    outline: 2px solid #e4761b;
    outline-offset: 2px;
    background-color: rgba(228, 118, 27, 0.1);
}

.ihtab a:hover,
.social-share-container a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Ensure social icons are properly sized for touch */
.fa {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

/* High contrast support for social links */
@media (prefers-contrast: high) {
    .ihtab a,
    .social-share-container a {
        border: 2px solid #000;
        margin: 2px;
    }

    .ihtab a:focus,
    .social-share-container a:focus {
        background-color: #000;
        color: #fff;
    }
}

/* Ensure proper spacing between social links */
.ihtab a {
    margin-right: 4px;
}

.social-share-container a {
    margin: 0 4px;
}
