/**
 * EJUS Accessibility – Contrast Fixes
 *
 * Korrektur aller Farbkombinationen, die WCAG AA Kontrast-Anforderungen
 * nicht erfüllen (min. 4.5:1 für normalen Text, 3:1 für großen Text).
 *
 * WCAG 1.4.3 Contrast (Minimum) (Level AA)
 *
 * Problematische Original-Farbe: #bcb723 (Grün) auf Weiß = ~1.87:1
 * Korrektur: #7a7816 auf Weiß = ~4.57:1 (AA-konform)
 *
 * Für Hintergründe, auf denen weißer Text stehen muss:
 *   #6b6a13 auf Weiß = ~5.5:1 → Weiß auf #6b6a13 = ~5.5:1 (AA-konform)
 */

/* ===================================================================
   CSS Custom Properties – zentrale Kontrast-sichere Farbvariablen
   =================================================================== */

:root {
	--ejus-green-original: #bcb723;
	--ejus-green-accessible: #7a7816;
	--ejus-green-bg-dark: #6b6a13;
	--ejus-blue-dark: #0d3756;
	--ejus-gold: #fab617;
	--ejus-gold-accessible: #9a6f00;
	--ejus-white: #ffffff;
	--ejus-text-dark: #333333;
}

/* ===================================================================
   1. Breadcrumb-Leiste
   Original: Weiß (#fff) auf #bcb723 = 1.87:1 → FAIL
   Fix: Dunklerer Hintergrund #6b6a13 auf Weiß = 5.5:1 → PASS
   =================================================================== */

.row-breadcrumb.row-breadcrumb-light {
	border-color: var(--ejus-green-bg-dark);
	background-color: var(--ejus-green-bg-dark);
}

.row-breadcrumb.row-breadcrumb-light .breadcrumb-title,
.style-light .breadcrumb > li a,
.style-light .breadcrumb {
	color: var(--ejus-white);
}

/* Hover: Opacity-basierter Hover ersetzt durch Farb-basiert */
.style-light .breadcrumb > li a:hover,
.style-light .breadcrumb > li a:focus {
	opacity: 1;
	color: var(--ejus-gold);
}

/* ===================================================================
   2. Onepage Section-Header (gelbe Abschnitte)
   Weiß auf farbigem Hintergrund muss 4.5:1 erreichen
   =================================================================== */

.row-container.with-bg .heading-text[class*="style-light"] {
	color: var(--ejus-white);
}

/* ===================================================================
   3. Scroll-Dot-Navigation
   Original: rgba(255,255,255,0.5) = schwer zu erkennen
   Fix: Mindest-Kontrast sicherstellen
   =================================================================== */

.no-touch .onepage-pagination .cd-dot {
	background-color: rgba(255, 255, 255, 0.7);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
}

/* Aktiver/Hover-Zustand: Gold mit dunklem Ring für Kontrast */
.no-touch .onepage-pagination span.cd-dot-cont:hover .cd-dot,
.no-touch .onepage-pagination a.is-selected .cd-dot {
	background-color: var(--ejus-gold);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
}

/* ===================================================================
   4. Links auf hellem Hintergrund
   Stellt sicher, dass alle Links mind. 4.5:1 Kontrast haben
   =================================================================== */

.style-light a:not(.btn) {
	color: var(--ejus-blue-dark);
}

/* ===================================================================
   5. Disabled-Zustände
   Auch deaktivierte Elemente brauchen erkennbaren Kontrast (3:1)
   =================================================================== */

input:disabled,
button:disabled,
select:disabled,
textarea:disabled {
	opacity: 0.6;
	color: #595959;
	border-color: #999999;
}

/* ===================================================================
   6. Auswahl-Hervorhebung (::selection)
   Kontrast sicherstellen bei Textauswahl
   =================================================================== */

::selection {
	background: var(--ejus-blue-dark);
	color: var(--ejus-white);
}

/* ===================================================================
   7. Links in Textblöcken müssen auch ohne Farbe erkennbar sein
   WCAG 1.4.1 Use of Color (Level A)
   Lighthouse: link-in-text-block
   =================================================================== */

.uncode_text_column p a:not(.btn),
.t-entry-excerpt a:not(.btn),
.post-content .uncont a:not(.btn):not(.heading-module-link) {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.uncode_text_column p a:not(.btn):hover,
.t-entry-excerpt a:not(.btn):hover,
.post-content .uncont a:not(.btn):not(.heading-module-link):hover {
	text-decoration-thickness: 2px;
}

/* ===================================================================
   8. Header-Titel auf farbigen Hintergründen
   Weiß auf EJUS-Grün (#bcb723) hat zu wenig Kontrast.
   Text-Shadow erhöht die Lesbarkeit ohne das Design zu verändern.
   WCAG 1.4.3 Contrast (Minimum) (Level AA)
   =================================================================== */

/* Hintergrundfarbe bleibt original (#bcb723).
   Stattdessen wird die Textfarbe auf Dunkel gewechselt
   für ausreichenden Kontrast. #333 auf #bcb723 ≈ 4.7:1. */

.header-basic[class*="style-color-166321"] .header-title,
.header-basic[class*="style-color-166321"] .header-title span,
[class*="style-color-166321-bg"] .heading-text h1,
[class*="style-color-166321-bg"] .heading-text h1 span,
[class*="style-color-166321-bg"] .heading-text h2,
[class*="style-color-166321-bg"] .heading-text h2 span,
[class*="style-color-166321-bg"] .heading-text h3,
[class*="style-color-166321-bg"] .heading-text h3 span {
	color: var(--ejus-text-dark) !important;
}

/* ===================================================================
   9. Borlabs Cookie Content-Blocker-Button
   Play-Button auf eingebetteten Medien hat zu wenig Kontrast.
   =================================================================== */

a._brlbs-btn._brlbs-icon-play-white {
	background-color: rgba(0, 0, 0, 0.7);
	border: 2px solid var(--ejus-white);
}

a._brlbs-btn._brlbs-icon-play-white:hover,
a._brlbs-btn._brlbs-icon-play-white:focus {
	background-color: rgba(0, 0, 0, 0.85);
}

/* ===================================================================
   10. Download-Button auf Über-uns-Seite
   .btn-color-700680 hat zu wenig Kontrast (axe-core).
   Uncode-generierte Farbklasse, daher expliziter Override.
   =================================================================== */

.btn-color-700680 {
	color: var(--ejus-white) !important;
	background-color: var(--ejus-blue-dark) !important;
	border-color: var(--ejus-blue-dark) !important;
}

.btn-color-700680:hover,
.btn-color-700680:focus {
	background-color: #0a2940 !important;
	border-color: #0a2940 !important;
}

/* ===================================================================
   11. Slider-Text-Kontrast auf Fotos
   Weißer Text direkt auf Foto hat bei hellen Slides < 3:1 Kontrast.
   Halbtransparentes Overlay hinter dem Text erzwingt Kontrast.
   WCAG 1.4.3 Contrast (Minimum) (Level AA)
   =================================================================== */

.rs-layer[data-color="#ffffff"],
.rs-layer[data-color="rgb(255,255,255)"],
.rs-layer.slider-headline,
.rs-layer.slider-subline {
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7),
	             0 0 12px rgba(0, 0, 0, 0.5);
}

/* ===================================================================
   12. Türkis-Header Kontrast (AAA)
   Weiß auf rgb(3,162,151) = 3.17:1 – AAA braucht 4.5:1 für großen Text.
   Override auf dunkleres Türkis: #006B63 auf Weiß = 5.34:1.
   WCAG 1.4.6 Contrast (Enhanced) (Level AAA)
   =================================================================== */

[style*="background-color: rgb(3, 162, 151)"],
[style*="background-color:#03a297"],
[style*="background-color: #03a297"] {
	background-color: #006B63 !important;
}

/* ===================================================================
   13. abbr[title] Styling
   Abkürzungen mit <abbr> erhalten eine gepunktete Unterstreichung.
   WCAG 3.1.4 Abbreviations (Level AAA)
   =================================================================== */

abbr[title] {
	text-decoration: underline dotted;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	cursor: help;
}
