/* High Contrast Mode Styles - WCAG AAA Compliant */

.high-contrast {
  --hc-bg: #000000;
  --hc-text: #ffffff;
  --hc-link: #ffff00;
  --hc-border: #ffffff;
  --hc-accent: #00ffff;
  --hc-button-bg: #ffff00;
  --hc-button-text: #000000;
}

/* Base styles */
.high-contrast body {
  background-color: var(--hc-bg) !important;
  color: var(--hc-text) !important;
}

/* Links */
.high-contrast a,
.high-contrast a:visited {
  color: var(--hc-link) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

.high-contrast a:hover,
.high-contrast a:focus {
  background-color: var(--hc-text) !important;
  color: var(--hc-bg) !important;
  outline: 3px solid var(--hc-accent) !important;
  outline-offset: 2px !important;
}

/* Header/Navbar */
.high-contrast .site-header,
.high-contrast .navbar {
  background: var(--hc-bg) !important;
  border-bottom: 3px solid var(--hc-border) !important;
  box-shadow: none !important;
}

.high-contrast .navbar-brand,
.high-contrast .nav-link {
  color: var(--hc-text) !important;
}

.high-contrast .nav-link:hover,
.high-contrast .nav-link:focus {
  background-color: var(--hc-text) !important;
  color: var(--hc-bg) !important;
}

.high-contrast .navbar-toggler {
  border-color: var(--hc-text) !important;
  background-color: var(--hc-bg) !important;
}

.high-contrast .navbar-toggler-icon {
  filter: invert(1) !important;
}

/* Hero section */
.high-contrast .hero-section {
  background: var(--hc-bg) !important;
  margin-bottom: 0 !important;
}

.high-contrast .hero-section *,
.high-contrast .hero-section [style*="background"] {
  background: transparent !important;
  color: var(--hc-text) !important;
}

.high-contrast .hero-section [style*="linear-gradient"] {
  background: var(--hc-bg) !important;
  opacity: 1 !important;
}

.high-contrast .hero-section img {
  filter: contrast(150%) brightness(1.2) grayscale(100%) !important;
  opacity: 0.25 !important;
  border: none !important;
}

.high-contrast .hero-section .btn-light,
.high-contrast .hero-section .btn-outline-light {
  background: var(--hc-button-bg) !important;
  color: var(--hc-button-text) !important;
  border: 3px solid var(--hc-border) !important;
}

/* Cards */
.high-contrast .card {
  background: var(--hc-bg) !important;
  border: 3px solid var(--hc-border) !important;
  box-shadow: none !important;
}

.high-contrast .card-title,
.high-contrast .card-text {
  color: var(--hc-text) !important;
}

/* Buttons */
.high-contrast .btn-primary,
.high-contrast .btn-light {
  background: var(--hc-button-bg) !important;
  color: var(--hc-button-text) !important;
  border: 3px solid var(--hc-border) !important;
}

.high-contrast .btn-outline-primary,
.high-contrast .btn-outline-light {
  background: var(--hc-bg) !important;
  color: var(--hc-text) !important;
  border: 3px solid var(--hc-text) !important;
}

/* Footer */
.high-contrast .site-footer {
  background: var(--hc-bg) !important;
  border-top: 3px solid var(--hc-border) !important;
}

.high-contrast .site-footer h3,
.high-contrast .site-footer h5,
.high-contrast .site-footer p,
.high-contrast .site-footer li,
.high-contrast .site-footer a {
  color: var(--hc-text) !important;
}

/* Headings & Text */
.high-contrast h1,
.high-contrast h2,
.high-contrast h3,
.high-contrast h4,
.high-contrast h5,
.high-contrast h6,
.high-contrast .lead,
.high-contrast .text-primary,
.high-contrast .text-muted {
  color: var(--hc-text) !important;
}

/* Sections & Backgrounds */
.high-contrast section,
.high-contrast section[class*="bg-"],
.high-contrast .bg-light,
.high-contrast .bg-primary,
.high-contrast .bg-white {
  background: var(--hc-bg) !important;
  border-top: none !important;
  border-bottom: none !important;
}

/* Borders & Dividers */
.high-contrast hr,
.high-contrast .border-top,
.high-contrast .border-bottom,
.high-contrast [class*="border-"] {
  border-color: var(--hc-border) !important;
  border-width: 2px !important;
}

/* Lists */
.high-contrast ul,
.high-contrast ol,
.high-contrast li {
  color: var(--hc-text) !important;
}

/* Blockquotes */
.high-contrast blockquote,
.high-contrast .blockquote-footer {
  border-left-color: var(--hc-text) !important;
  color: var(--hc-text) !important;
}

/* All other images - grayscale */
.high-contrast img:not(.hero-section img) {
  filter: contrast(150%) brightness(1.1) grayscale(100%) !important;
  border: 2px solid var(--hc-border) !important;
}

/* Skip link */
.high-contrast .skip-link {
  background: var(--hc-link) !important;
  color: var(--hc-bg) !important;
}

/* Focus states */
.high-contrast *:focus {
  outline: 3px solid var(--hc-accent) !important;
  outline-offset: 2px !important;
}

/* Theme toggle & search buttons */
.high-contrast #theme-toggle,
.high-contrast #search-btn {
  color: var(--hc-text) !important;
  border: 2px solid var(--hc-text) !important;
}
