/* =================================================================
   ACCESSIBILITY FIXES – WCAG 2.1 AA
   Autohaus Richter & Zech – Child Theme
   Erstellt: 2026-02-12
   ================================================================= */

/* --- 1. Link-Unterstreichung (WCAG 1.4.1) ---
   Links in Fliesstext muessen sich nicht nur durch Farbe
   von normalem Text unterscheiden. */
.entry-content a,
.gb-text a,
.gb-headline a,
.post-content a,
article a:not(.wp-block-button__link):not(.wp-block-navigation-item__content) {
    text-decoration: underline;
}
/* Navigation/Buttons NICHT unterstreichen */
nav a,
.mega-menu a,
.wp-block-navigation a,
.wp-block-button__link,
.button,
button,
.skip-link,
.wp-block-social-links a {
    text-decoration: none;
}

/* --- 2. Fokus-Indikatoren (WCAG 2.4.7) ---
   Sichtbarer Fokus NUR bei Tastatur-Navigation */
*:focus-visible {
    outline: 3px solid var(--accent, #c81717) !important;
    outline-offset: 2px !important;
}
*:focus:not(:focus-visible) {
    outline: none;
}

/* --- 3. Kontrast-Korrekturen Light Mode (WCAG 1.4.3) --- */

/* Footer-Bar Text: Dunklere Farbe fuer bessere Lesbarkeit */
.site-footer,
.footer-bar {
    color: var(--contrast-2, #192a47);
}

/* Subnavigation Text: base-3 auf contrast = 2.8:1 FAIL
   Fix: base (#edeef0) fuer besseren Kontrast */
.main-navigation .sub-menu a,
.mega-sub-menu a {
    color: var(--base, #edeef0);
}
.main-navigation .sub-menu a:hover,
.mega-sub-menu a:hover {
    color: #ffffff;
}

/* --- 4. Kontrast-Korrekturen Dark Mode (WCAG 1.4.3) --- */
body[data-theme='dark'] .site-footer,
body[data-theme='dark'] .footer-bar {
    color: var(--contrast-2, #d6d6d6);
}

/* --- 5. GenerateBlocks Footer-Bereich (spezifische Selektoren) ---
   .gb-element-1f8bfce1 hat hellen BG (#d2d4d9) → dunkler Text noetig!
   Hover: var(--base-2) = #d2d4d9 = gleich wie BG = unsichtbar!
   Fix: Accent-Rot als Hover-Farbe */
.gb-element-1f8bfce1 a {
    color: var(--contrast-2, #192a47);
}
.gb-element-1f8bfce1 a:hover {
    color: var(--accent, #c81717) !important;
}
.gb-element-1f8bfce1 .wp-block-navigation a {
    color: var(--contrast-2, #192a47);
}
.gb-element-1f8bfce1 .wp-block-navigation a:hover {
    color: var(--accent, #c81717) !important;
}

/* Footer-Widgets (falls vorhanden): gleicher Fix */
.footer-widgets a:hover,
.site-footer .widget a:hover {
    color: var(--accent, #c81717) !important;
}

body[data-theme='dark'] .gb-element-1f8bfce1 a {
    color: var(--contrast-2, #192a47);
}
body[data-theme='dark'] .gb-element-1f8bfce1 a:hover {
    color: var(--accent, #c81717) !important;
}

/* --- 6. Real Cookie Banner Shortcode Links (WCAG 1.4.3) ---
   RCB-Links im Footer: #edeef0 auf #d2d4d9 = 1.27:1 FAIL
   Fix: Dunklere Farbe var(--contrast) = ~5:1 PASS */
.rcb-sc-link {
    color: var(--contrast, #3c5873) !important;
    text-decoration: underline !important;
}
.rcb-sc-link:hover {
    color: var(--accent, #c81717) !important;
}
