/* ========================================
   BARRIEREFREIHEITS-STYLES (WCAG 2.1 Level AA)
   ======================================== */

/* Skip-Links */
.skip-links {
    position: relative;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-blue);
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    transition: top 0.3s;
    font-weight: 500;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

/* Verbesserte Fokus-Indikatoren */
*:focus {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.5);
    outline: none;
}

.form-control:focus, .form-select:focus {
    border-color: #005fcc;
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.25);
}

.nav-link:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Fokus für Carousel-Controls */
.carousel-control-prev:focus,
.carousel-control-next:focus {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Honeypot verstecken (Anti-Spam) */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Verbesserte Kontraste für Badges */
.badge.bg-warning {
    background-color: #b8860b !important; /* Dunkleres Goldgelb */
    color: #000 !important;
}

/* Respektiere prefers-reduced-motion */
@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;
  }
  
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =============================================================================
   PHASE 2: ERWEITERTE BARRIEREFREIHEITS-FEATURES
   ============================================================================= */

/* Skip-Link Ziel-Hervorhebung */
.skip-link-target {
  outline: 3px solid #005fcc !important;
  outline-offset: 2px;
  background-color: rgba(0, 95, 204, 0.1) !important;
  transition: all 0.3s ease;
}

/* Carousel Fokus-Verbesserungen */
.carousel:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
  border-radius: 4px;
}

.carousel[tabindex="0"] {
  position: relative;
}

/* Carousel Keyboard-Hinweis für sehende Benutzer */
.carousel:focus::after {
  content: "Pfeiltasten zum Navigieren";
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 10;
  pointer-events: none;
}

/* Verbesserte Carousel-Indikatoren */
.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 4px;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.carousel-indicators button.active {
  background-color: #ffffff;
  transform: scale(1.2);
}

.carousel-indicators button:focus {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
  background-color: #ffffff;
}

.carousel-indicators button:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

/* Verbesserte Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
  width: 48px;
  height: 48px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.carousel-control-prev {
  left: 10px;
}

.carousel-control-next {
  right: 10px;
}

.carousel-control-prev:focus,
.carousel-control-next:focus {
  background-color: rgba(0, 95, 204, 0.8);
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 20px;
  height: 20px;
}

/* Live-Region Verstecken aber für Screen Reader zugänglich */
.visually-hidden, 
#aria-live-region {
  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;
}

/* Enhanced Focus Styles für verschiedene Elemente */
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
  border-color: #005fcc !important;
  box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.25) !important;
}

button:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.5);
}

/* Spezielle Fokus-Styles für verschiedene Button-Typen */
.btn-primary:focus {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.5);
}

.btn-success:focus {
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.5);
}

.btn-danger:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.5);
}

.btn-warning:focus {
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.5);
}

/* Navigation Fokus-Verbesserungen */
.nav-link:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.navbar-toggler:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: none;
}

/* Form Label Verbesserungen */
.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-label .text-danger {
  font-weight: bold;
}

/* Alert Verbesserungen für Screen Reader */
.alert {
  border-left: 4px solid;
  padding-left: 1rem;
}

.alert-success {
  border-left-color: #198754;
}

.alert-danger {
  border-left-color: #dc3545;  
}

.alert-warning {
  border-left-color: #ffc107;
}

.alert-info {
  border-left-color: #0dcaf0;
}

/* High Contrast Modus Support */
@media (prefers-contrast: high) {
  .btn {
    border: 2px solid;
    font-weight: bold;
  }
  
  .card {
    border: 2px solid;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid white;
  }
  
  .carousel-indicators button {
    border: 2px solid white;
  }
}

/* Reduced Motion Support für Fokus-Animationen */
@media (prefers-reduced-motion: no-preference) {
  .btn:focus {
    transform: translateY(-1px);
    transition: all 0.2s ease;
  }
  
  .carousel-indicators button {
    transition: all 0.3s ease;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    transition: all 0.3s ease;
  }
}

/* Touchscreen Verbesserungen */
@media (pointer: coarse) {
  .carousel-control-prev,
  .carousel-control-next {
    width: 56px;
    height: 56px;
  }
  
  .carousel-indicators button {
    width: 16px;
    height: 16px;
    margin: 0 6px;
  }
}

/* Dark Mode Support (falls implementiert) */
@media (prefers-color-scheme: dark) {
  .skip-link-target {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }
  
  .carousel:focus::after {
    background: rgba(255, 255, 255, 0.9);
    color: black;
  }
}

/* Verbesserte Fokus-Sichtbarkeit (wenn Animationen erlaubt) */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus {
        transform: translateY(-1px);
        transition: all 0.2s ease;
    }
}

/* High Contrast Modus Support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid;
    }
    
    .card {
        border: 2px solid;
    }
}

/* Screen Reader Only Text */
.sr-only, .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;
}

/* Live Region für dynamische Inhalte */
#carousel-live-region {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Hero-Section Überschrift in weiß für bessere Lesbarkeit */
.hero-section h2 {
    color: white !important;
}

/* Minimaler Mobile-Fix nur für URL-Umbrechen */
@media (max-width: 768px) {
    /* Nur Links müssen umbrechen - sonst nichts ändern */
    a {
        word-break: break-all;
        overflow-wrap: anywhere;
        hyphens: auto;
    }
    
    /* Verhindere horizontales Scrollen */
    body, html {
        overflow-x: hidden;
    }
} 