/* ==========================================================================
   Alati za pristupačnost – samostalan modul (ne mijenja ostatak stranice).
   Sve postavke se primjenjuju klasama na <html> (a11y-*) i vrijede samo za
   sadržaj stranice, ne za sam panel s alatima (#a11y).
   ========================================================================== */

/* ---------- gumb i panel ---------- */
#a11y { font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.4; color: #1b2533; }
#a11y *, #a11y *::before, #a11y *::after { box-sizing: border-box; }
#a11y .a11y-toggle {
  position: fixed; left: 18px; bottom: 18px; z-index: 9998;
  width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff;
  background: #0b5fc6; color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3); transition: transform .15s;
}
#a11y .a11y-toggle:hover { transform: scale(1.06); }
#a11y .a11y-toggle:focus-visible, #a11y button:focus-visible, #a11y a:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
#a11y .a11y-toggle svg { width: 30px; height: 30px; }
#a11y .a11y-toggle .a11y-dot { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; border-radius: 50%; background: #d8141f; border: 2px solid #fff; display: none; }
#a11y.has-active .a11y-toggle .a11y-dot { display: block; }

#a11y .a11y-panel {
  position: fixed; left: 18px; bottom: 84px; z-index: 9999;
  width: 360px; max-width: calc(100vw - 36px); max-height: calc(100vh - 110px); overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: 0 16px 50px rgba(0, 0, 0, .35);
  border: 1px solid #d5dce6;
}
#a11y .a11y-panel[hidden] { display: none; }
#a11y .a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: #123a5a; color: #fff; border-radius: 14px 14px 0 0; position: sticky; top: 0; }
#a11y .a11y-head h2 { margin: 0; font-size: 17px; color: #fff; font-family: inherit; letter-spacing: 0; }
#a11y .a11y-close { background: rgba(255, 255, 255, .15); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 8px; font-size: 22px; line-height: 1; cursor: pointer; }
#a11y .a11y-body { padding: 14px 16px 6px; }
#a11y .a11y-size { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
#a11y .a11y-size span { flex: 1; font-weight: 700; }
#a11y .a11y-size output { min-width: 52px; text-align: center; font-weight: 700; color: #0b5fc6; }
#a11y .a11y-size button { width: 40px; height: 40px; border-radius: 9px; border: 2px solid #d5dce6; background: #fff; font-size: 20px; font-weight: 700; cursor: pointer; color: #123a5a; }
#a11y .a11y-size button:hover { border-color: #0b5fc6; }
#a11y .a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#a11y .a11y-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 82px; padding: 10px 8px; border-radius: 10px; border: 2px solid #e2e7ee; background: #f6f8fb;
  font: inherit; font-size: 13.5px; font-weight: 700; color: #1b2533; cursor: pointer;
}
#a11y .a11y-opt:hover { border-color: #0b5fc6; }
#a11y .a11y-opt svg { width: 26px; height: 26px; color: #0b5fc6; }
#a11y .a11y-opt[aria-pressed="true"] { background: #0b5fc6; border-color: #0b5fc6; color: #fff; }
#a11y .a11y-opt[aria-pressed="true"] svg { color: #fff; }
#a11y .a11y-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px 16px; flex-wrap: wrap; }
#a11y .a11y-reset { border: 2px solid #d8141f; color: #d8141f; background: #fff; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }
#a11y .a11y-reset:hover { background: #d8141f; color: #fff; }
#a11y .a11y-foot a { color: #0b5fc6; font-size: 13.5px; }
#a11y .a11y-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* vodič za čitanje */
#a11y .a11y-guide { position: fixed; left: 0; right: 0; height: 44px; z-index: 9997; pointer-events: none; display: none;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); border-top: 3px solid #ffbf47; border-bottom: 3px solid #ffbf47; }
html.a11y-guide #a11y .a11y-guide { display: block; }

@media (max-width: 640px) {
  #a11y .a11y-toggle { width: 48px; height: 48px; left: 12px; bottom: 12px; }
  #a11y .a11y-panel { left: 8px; right: 8px; bottom: 70px; width: auto; max-width: none; }
}

/* ==========================================================================
   Učinci na sadržaj stranice (sve osim #a11y)
   ========================================================================== */

/* veličina teksta / uvećanje stranice */
html.a11y-zoom body > :not(#a11y) { zoom: var(--a11y-zoom, 1); }

/* visoki kontrast */
html.a11y-contrast body { background: #000 !important; }
html.a11y-contrast body > :not(#a11y),
html.a11y-contrast body > :not(#a11y) * {
  background-color: #000 !important; background-image: none !important; color: #fff !important;
  border-color: #fff !important; box-shadow: none !important; text-shadow: none !important;
}
html.a11y-contrast body > :not(#a11y) *::before,
html.a11y-contrast body > :not(#a11y) *::after { background-image: none !important; }
html.a11y-contrast body > :not(#a11y) a,
html.a11y-contrast body > :not(#a11y) a * { color: #ffeb3b !important; text-decoration: underline !important; }
html.a11y-contrast body > :not(#a11y) img { filter: none !important; }
html.a11y-contrast body > :not(#a11y) input,
html.a11y-contrast body > :not(#a11y) button { border: 2px solid #fff !important; }

/* inverzne boje */
html.a11y-invert body > :not(#a11y) { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert body > :not(#a11y) img,
html.a11y-invert body > :not(#a11y) iframe,
html.a11y-invert body > :not(#a11y) .hero__slide { filter: invert(1) hue-rotate(180deg); }

/* sivi tonovi */
html.a11y-gray body > :not(#a11y) { filter: grayscale(1); }
html.a11y-gray.a11y-invert body > :not(#a11y) { filter: grayscale(1) invert(1) hue-rotate(180deg); }

/* istaknute poveznice */
html.a11y-links body > :not(#a11y) a {
  text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important;
  outline: 2px dashed currentColor; outline-offset: 2px;
}

/* čitljiv font */
html.a11y-font body > :not(#a11y),
html.a11y-font body > :not(#a11y) *:not(i):not([class*="fa-"]) {
  font-family: Verdana, Tahoma, Arial, sans-serif !important; letter-spacing: .02em !important;
}

/* veći razmak teksta */
html.a11y-spacing body > :not(#a11y) p,
html.a11y-spacing body > :not(#a11y) li,
html.a11y-spacing body > :not(#a11y) td,
html.a11y-spacing body > :not(#a11y) dd,
html.a11y-spacing body > :not(#a11y) dt,
html.a11y-spacing body > :not(#a11y) a,
html.a11y-spacing body > :not(#a11y) span {
  line-height: 1.9 !important; letter-spacing: .08em !important; word-spacing: .16em !important;
}
html.a11y-spacing body > :not(#a11y) p { margin-bottom: 1.4em !important; }

/* bez animacija (slideshow staje na prvoj fotografiji) */
html.a11y-noanim body > :not(#a11y) *,
html.a11y-noanim body > :not(#a11y) *::before,
html.a11y-noanim body > :not(#a11y) *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
html.a11y-noanim .hero__slide { opacity: 0 !important; transform: none !important; }
html.a11y-noanim .hero__slide:first-child { opacity: 1 !important; }
html.a11y-noanim .hero__dots { display: none !important; }

/* veliki pokazivač miša */
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3l30 26-13 2 8 14-6 3-8-14-10 9z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* istaknut fokus tipkovnice */
html.a11y-focus body > :not(#a11y) *:focus { outline: 4px solid #ffbf47 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #000 !important; }

/* čitanje naglas: označen odlomak */
.a11y-speaking { outline: 3px solid #ffbf47 !important; background-color: rgba(255, 191, 71, .18) !important; }
