/* ============================================================
   a11y-fix.css — Accessibility fixes for sd.qdev.gr
   Load via child theme (see functions.php snippet)
   ============================================================ */

/* ─────────────────────────────────────────────
 * 1. SKIP LINK
 * Must be visually hidden but still focusable.
 * Using clip/clip-path instead of display:none
 * so it stays in the focus order.
 * ───────────────────────────────────────────── */
a.skip-link.screen-reader-text {
  position: absolute !important;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a.skip-link.screen-reader-text:focus,
a.skip-link.screen-reader-text:focus-visible {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 0.85rem 1.5rem !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;

  /* Visible, high-contrast style */
  background: #1a1a1a;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 3px solid #f5c400;
  z-index: 99999;

  /* Subtle focus ring on top of the bar */
  outline: 3px solid #f5c400;
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────
 * 2. GLOBAL FOCUS STYLES
 * Elementor themes often strip :focus outlines.
 * This restores a clear indicator for keyboard users.
 * ───────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 3px !important;
  border-radius: 2px;
}

/* Remove outline only for mouse clicks (pointer) */
:focus:not(:focus-visible) {
  outline: none !important;
}

/* ─────────────────────────────────────────────
 * 3. SLICK SLIDER — hidden slide links
 * Visually de-emphasise cloned/hidden slides
 * so focus never lands on them unexpectedly.
 * The JS handles tabindex; this is a safety net.
 * ───────────────────────────────────────────── */
.slick-slide[aria-hidden="true"] a,
.slick-slide[aria-hidden="true"] button {
  pointer-events: none;
  /* tabindex is managed by JS */
}

/* ─────────────────────────────────────────────
 * 4. SOCIAL LINKS
 * Ensure icon-only links have enough tap area
 * and a visible focus ring.
 * ───────────────────────────────────────────── */
ul.social-links li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;   /* WCAG 2.5.5 target size */
  min-height: 44px;
  border-radius: 50%;
}

ul.social-links li a:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 3px !important;
}

/* ─────────────────────────────────────────────
 * 5. GALLERY LIGHTBOX LINKS
 * Give lightbox triggers a visible focus ring
 * and communicate the interactive affordance.
 * ───────────────────────────────────────────── */
div.masonry-gallery--image > a[data-elementor-open-lightbox]:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 4px !important;
  border-radius: 3px;
}
