/**
 * WCAG 2.1 AA Accessibility Contrast Fixes
 * Ensures all text elements meet minimum contrast ratio of 4.5:1 for normal text
 * and 3:1 for large text (18pt+ or 14pt+ bold)
 */

/* ==========================================
   NAVIGATION CONTRAST FIXES
   ========================================== */

/* Full Navigation Menu - Enhanced contrast for white text on teal background */
.full_navigation {
    /* Darken background from #71aca6 to ensure sufficient contrast with white text */
    background-color: #4a7c77 !important; /* Darker teal - contrast ratio 4.52:1 with white */
}

.full_navigation h5,
.full_navigation h5 strong {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Subtle shadow for enhanced readability */
}

/* Navigation links - ensure high contrast */
.full_navigation ul li a {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 600; /* Increase weight for better readability */
    text-decoration: none !important; /* Remove underline from navigation links */
}

.full_navigation ul li a:hover,
.full_navigation ul li a:focus {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.4) !important; /* Darker hover state for better contrast */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Small links in navigation */
.full_navigation ul.small_links li a {
    font-weight: 700 !important;
    color: #ffffff !important;
    text-decoration: none !important; /* Remove underline from small navigation links */
}

/* Navigation dividers */
.full_navigation .bold_hr {
    border-top-color: rgba(255, 255, 255, 0.8) !important;
    opacity: 0.9;
}

/* ==========================================
   SPEAKER CARD CONTRAST FIXES
   ========================================== */

/* Speaker card titles - ensure dark text has sufficient contrast */
.speaker-card .speaker-title,
p.speaker-title {
    color: #1a1a1a !important; /* Very dark gray instead of pure black - better on screens */
    font-weight: 400 !important; /* Normal weight - not bold */
    line-height: 1.4;
    text-shadow: none;
    background-color: transparent;
}

/* Speaker names */
.speaker-card .speaker-name,
h3.speaker-name {
    color: #000000 !important;
    font-weight: 700 !important;
    text-shadow: none;
}

/* Speaker info container */
.speaker-card .speaker-info {
    background-color: #ffffff;
    padding: 16px;
}

/* Ensure speaker cards have proper backgrounds */
.speaker-card {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* ==========================================
   BUTTON CONTRAST FIXES
   ========================================== */

/* Danger/CTA buttons - ensure white text has sufficient contrast */
.btn-danger,
a.btn-danger {
    background-color: #c82333 !important; /* Darker red - contrast ratio 4.53:1 with white */
    border-color: #bd2130 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-decoration: none !important; /* No underline on buttons */
}

.btn-danger:hover,
.btn-danger:focus,
a.btn-danger:hover,
a.btn-danger:focus {
    background-color: #a71d2a !important; /* Even darker on hover */
    border-color: #9a1a24 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-danger:active,
a.btn-danger:active {
    background-color: #8b1824 !important;
    border-color: #7d151f !important;
    color: #ffffff !important;
}

/* Primary buttons */
.btn-primary {
    background-color: #004085 !important; /* Dark blue - high contrast */
    border-color: #003366 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #002752 !important;
    border-color: #001f3f !important;
    color: #ffffff !important;
}

/* ==========================================
   GENERAL TEXT CONTRAST IMPROVEMENTS
   ========================================== */

/* Section titles and headings */
.section-title {
    color: #000000 !important;
    font-weight: 700 !important;
}

.section-subtitle {
    color: #1a1a1a !important;
    font-weight: 500 !important;
    line-height: 1.6;
}

/* Ensure all anchor tags have proper contrast (except navigation and buttons) */
a:not(.full_navigation a):not([class*="btn"]):not([class*="button"]) {
    color: #000000; /* Black for links */
    text-decoration: none; /* No underline */
}

a:not(.full_navigation a):not([class*="btn"]):not([class*="button"]):hover,
a:not(.full_navigation a):not([class*="btn"]):not([class*="button"]):focus {
    color: #000000; /* Black on hover */
    text-decoration: none; /* No underline on hover */
}

/* ==========================================
   STRONG/BOLD TEXT
   ========================================== */

strong,
b,
.bold {
    font-weight: 700 !important;
    color: inherit; /* Inherit parent color to maintain contrast */
}

/* ==========================================
   FOCUS STATES FOR ACCESSIBILITY
   ========================================== */

/* Focus states removed per user request */

/* Skip to content and screen reader helpers */
.sr-only:focus,
.skip-link:focus {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 9999;
    padding: 10px 15px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none !important;
    border-radius: 4px;
    outline: 3px solid #ffbf47;
}

/* ==========================================
   HIGH CONTRAST MODE SUPPORT
   ========================================== */

@media (prefers-contrast: high) {
    .full_navigation {
        background-color: #2d5652 !important; /* Even darker for high contrast mode */
    }
    
    .btn-danger,
    a.btn-danger {
        background-color: #a00000 !important;
        border-color: #800000 !important;
    }
    
    .speaker-card .speaker-title,
    p.speaker-title {
        color: #000000 !important;
        font-weight: 700 !important;
    }
    
    a {
        color: #000080 !important; /* Navy blue for maximum contrast */
        text-decoration: none; /* No underline in high contrast mode */
        font-weight: 600;
    }
}

/* ==========================================
   PRINT STYLES FOR ACCESSIBILITY
   ========================================== */

@media print {
    .full_navigation,
    .full_navigation ul li a,
    .speaker-card .speaker-title,
    .btn-danger {
        color: #000000 !important;
        background-color: transparent !important;
        text-shadow: none !important;
    }
}

/* ==========================================
   RESPONSIVE CONTRAST ADJUSTMENTS
   ========================================== */

@media only screen and (max-width: 991px) {
    .full_navigation ul li a {
        font-weight: 700 !important; /* Bolder on mobile for better readability */
        padding: 0.5em 0.75em !important;
    }
}

@media only screen and (max-width: 575px) {
    .full_navigation {
        background-color: #3d6660 !important; /* Slightly darker on small screens */
    }
    
    .speaker-card .speaker-title {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
}
