/* =========================================================
   Global Accessibility Baseline
   File: public/css/style3.css

   Purpose:
   - Fix WCAG 1.4.1 Use of Color for links
   - Improve WCAG 2.4.7 keyboard focus visibility
   - Avoid global link spacing/layout issues
   - Preserve navbar/button/card styling
   ========================================================= */


/* ---------------------------------------------------------
   1. Base link styling
   Do not use margin-left globally on all links.
   --------------------------------------------------------- */

a {
  color: #0645ad;
  font-weight: 500;
  text-underline-offset: 0.18em;
}


/* ---------------------------------------------------------
   2. Content and footer links
   Links inside main page content and footer must not rely
   only on color. Underline is the safest non-color cue.
   --------------------------------------------------------- */

main a,
footer a {
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
}


/* ---------------------------------------------------------
   3. Hover and keyboard focus link states
   Keep links readable and visibly interactive.
   --------------------------------------------------------- */

main a:hover,
main a:focus-visible,
footer a:hover,
footer a:focus-visible {
  color: #1f2937;
  text-decoration-thickness: 0.14em;
}


/* ---------------------------------------------------------
   4. Exempt navigation/button/card style links
   These are usually visually distinguishable by layout,
   button shape, or navigation grouping.
   --------------------------------------------------------- */

.nav-link,
.navbar-brand,
.btn,
.button,
.card-link {
  text-decoration: none;
}


/* ---------------------------------------------------------
   5. Footer adjacent link spacing only
   Avoid applying margin-left to every link globally.
   --------------------------------------------------------- */

footer a + a {
  margin-left: 10px;
}


/* ---------------------------------------------------------
   6. Visible keyboard focus
   WCAG 2.4.7 Focus Visible
   --------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #111827;
}


/* ---------------------------------------------------------
   7. Minimum touch target support
   Do not force height on all links because it may disturb
   inline legal/policy text links.
   --------------------------------------------------------- */

button,
input,
select,
textarea {
  min-height: 44px;
}


/* ---------------------------------------------------------
   8. Reduced motion support
   WCAG 2.2 AA supportive improvement
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}