/* Accessibility helpers (WCAG 2.2 AA): visible keyboard focus, skip link, reduced motion */

:focus-visible {
  outline: 3px solid #137ac5;
  outline-offset: 2px;
}

.navbar-toggler:focus-visible,
.swiper-button-prev:focus-visible,
.swiper-button-next:focus-visible,
.accordion-button:focus-visible {
  outline: 3px solid #137ac5;
  outline-offset: 2px;
  box-shadow: none;
}

/* dark backgrounds (banner, footer, top bar): use a light ring */
.footer :focus-visible,
.footer__under :focus-visible,
.tiles-bg :focus-visible,
.top-bar :focus-visible {
  outline-color: #ffd042;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: #fff;
  color: #322972;
  font-weight: 700;
  text-decoration: underline;
}

main:focus {
  outline: none;
}

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

/* --- colour contrast (WCAG 1.4.3) -------------------------------------------------------------- */
/* accordion button text colour is chosen per background in script.js (page themes differ) */

/* news pagination: grey #7a7a7a on white is 4.3:1 */
.f3-widget-paginator li:not(.current),
.f3-widget-paginator li:not(.current) a {
  color: #595959;
}

/* cookie banner attribution */
.powered-by,
.powered-by a {
  color: #d0d0d0 !important;
  opacity: 1 !important;
}

/* --- target size (WCAG 2.5.8): slider bullets --------------------------------------------------- */
.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  margin: 0 10px !important;
}

/* --- slider pause / play button (WCAG 2.2.2), icon only ------------------------------------------
   32x32 px (min. 24x24 px, WCAG 2.5.8); icon #322972 on a light background = 12:1 (min. 3:1, WCAG 1.4.11) */
.a11y-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eeeef5;
  color: #322972;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.a11y-pause svg {
  display: block;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.a11y-pause:hover {
  background: #322972;
  color: #fff;
}

/* bottom right of the slider picture; the exact top offset is set by script.js (fallback: bottom) */
.a11y-pause--slider {
  position: absolute;
  right: 24px;
  bottom: 149px;
  z-index: 5;
}

@media (max-width: 992px) {
  .a11y-pause--slider {
    right: 14px;
  }
}

.swiper-wrap {
  position: relative;
}

/* --- links inside running text must not rely on colour alone (WCAG 1.4.1) -------------------------------------------
   plain links from the rich text editor (no class) get an underline; buttons / styled links keep their own design */
main p a:not([class]),
main li a:not([class]),
main td a:not([class]),
main dd a:not([class]) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* the breadcrumb is navigation, not running text: no underline there (as before) */
main .breadcrumb li a {
  text-decoration: none;
}

/* --- red theme: #ff0000 is too bright for white text (4.0:1) -> slightly darker red #eb0000 (white = 4.6:1, WCAG 1.4.3) ---------- */
:root {
  --red: #eb0000;
}

.page-baner__content-box[data-color="#FF0000"],
.page-baner__content-box[data-color="#ff0000"] {
  background: #eb0000;
}

.page-baner__content-box[data-color="#FF0000"] .breadcrumb li,
.page-baner__content-box[data-color="#FF0000"] .breadcrumb a,
.page-baner__content-box[data-color="#ff0000"] .breadcrumb li,
.page-baner__content-box[data-color="#ff0000"] .breadcrumb a {
  color: #fff;
}

.page[data-color="#FF0000"] .rectangle-color,
.page[data-color="#FF0000"] .top-bar,
.page[data-color="#FF0000"] .acc-section-page .accordion-item .accordion-button,
.page[data-color="#FF0000"] .acc-section .accordion-item .accordion-button,
.indexSwiper__content-box[data-color="#FF0000"] {
  background: #eb0000;
}
