/*
 * AKP Baumanagement - Clean Accessibility Styles
 * WCAG 2.1 AA konform, minimalistisch, wartbar
 * Version: 2.0 (Clean Rewrite)
 */

/* ===== SKIP-LINKS ===== */

.skip-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 9999;
    pointer-events: none;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 6px;
    /* padding:10px; */
    background: #003057;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    z-index: 9999;
    pointer-events: auto;
    width:200px;
    text-align:center;
    height: 50px;
    line-height: 50px;
}

.skip-link:focus {
    left:11px;
    top:11px;
    outline: 2px solid #fff;
    outline-offset:0px;
}

@media (min-width: 992px) {
    .skip-link {
        height: 52px;
        line-height: 52px;
    }
    
    .skip-link:focus {
        left:12px;
        top:12px;
    }
}

@media (min-width: 1200px) {    
    .skip-link:focus {
        left:16px;
        top:16px;
    }
}

/* Skip-Links nur bei Tastaturfokus anzeigen – keine Sichtbarkeitseinschränkung nach Viewport */

/* ===== FOKUS-INDIKATOREN ===== */

/* Hauptinhalt */
#main-content:focus,
#page-content:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Content-Area nicht per Klick fokussierbar machen */
#content-area {
    outline: none !important;
}

/* Nur bei Skip-Link Navigation fokussieren */
#content-area:focus-visible {
    outline: 2px solid #0d6efd !important;
    outline-offset: 2px !important;
    border-radius: 4px !important;
}

section.mitarbeiter #content-area:focus-visible,
.projekte #content-area:focus-visible {
    outline-offset: -10px !important;
}

.mitarbeiter.detail #content-area:focus-visible,
#projekt #content-area:focus-visible {
    padding:1rem;    
    border-radius: 0 !important;
}

/* Navigation Links */
.navbar-nav a:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-radius: 4px;
}

.navbar-nav .dropdown-menu.show a:focus {
    color: #000 !important;
    background-color: #e9ecef;
}

/* Buttons */
.btn:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Links */
a:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    /* border-radius: 2px; */
}

/* ===== RESPONSIVE ===== */

/* ===== UTILITY CLASSES ===== */

.visually-hidden {
    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;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
    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;
}

/* ===== LOGO ACCESSIBILITY ===== */

/* Logo-Hover-Effekt für bessere UX */
.navbar-brand:hover,
a.navbar-brand:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Logo komplett von Accessibility-Features ausschließen */
.navbar-brand,
a.navbar-brand {
    /* Verhindert, dass das Logo die Skip-Navigation auslöst */
    pointer-events: auto;
    /* Logo über Skip-Links positionieren */
    position: relative;
    z-index: 10000 !important;
}


/* ===== DATENSCHUTZ: INHALTSÜBERSICHT ===== */

/* Inhaltsübersicht Styling */
.inhaltsuebersicht {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.inhaltsuebersicht h4 {
    color: #495057 !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    border-bottom: 2px solid #0d6efd !important;
    padding-bottom: 8px !important;
}

.inhaltsuebersicht ul li {
    margin-bottom: 8px !important;
}

.inhaltsuebersicht ul li a {
    color: #0d6efd !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.inhaltsuebersicht ul li a:hover {
    background-color: rgba(13, 110, 253, 0.1) !important;
    color: #0a58ca !important;
    text-decoration: underline !important;
    transform: translateX(5px) !important;
}

.inhaltsuebersicht ul li a:focus {
    outline: 2px solid #0d6efd !important;
    outline-offset: 2px !important;
    background-color: rgba(13, 110, 253, 0.15) !important;
}

/* Smooth Scroll für Anker-Links */
html {
    scroll-behavior: smooth !important;
}

/* Scroll-Margin für Anker-Ziele */
h2[id], h3[id], h4[id] {
    scroll-margin-top: 100px !important;
}
