/* =========================================================
   ZWIERZAK 5.2.8 — dostępność WCAG bez nakładki
   Normalny tryb NIE zmienia układu strony. Panel jest małym
   przyciskiem w nagłówku i otwiera się nad treścią.
   ========================================================= */

:root{
  --a11y-focus:#083f23;
  --a11y-focus-ring:#fff;
}

/* Jednolity, widoczny fokus klawiatury. */
body :is(a,button,input,textarea,select,summary,[tabindex]:not([tabindex="-1"])):focus-visible{
  outline:3px solid var(--a11y-focus)!important;
  outline-offset:3px!important;
  box-shadow:0 0 0 6px var(--a11y-focus-ring)!important;
  transition:none!important;
}
.skip-link:focus{
  position:fixed!important;
  z-index:100000;
  top:12px;
  left:12px;
  width:auto;
  height:auto;
  margin:0;
  padding:12px 16px;
  overflow:visible;
  clip:auto;
  white-space:normal;
  border:2px solid #000;
  border-radius:8px;
  background:#fff;
  color:#000;
  font-weight:800;
}
.site-nav li:focus-within>.sub-menu{
  opacity:1;
  visibility:visible;
  transform:none;
}

/* Poprawki kontrastu potwierdzone w audycie. */
.visit-timeline small{color:#5e6b64}
.footer-bottom{color:#68756e}
.modality-item small{color:#56635d}
.clinic-gallery-card figcaption small{color:#61766d}
.stars{color:#9a6500}
.zw-atlas__species-tab small{opacity:1}
.zw-atlas__species-tab.is-active{background:linear-gradient(135deg,#07833e,#087a3c)}

/* Kompaktowy panel dostępności — nie zwiększa wysokości nagłówka. */
.a11y-tools{
  position:relative;
  z-index:96;
  flex:0 0 auto;
}
.a11y-tools__toggle{
  display:inline-grid;
  width:44px;
  height:44px;
  padding:0;
  place-items:center;
  border:1px solid #bfd3c6;
  border-radius:10px;
  background:#fff;
  color:#087a3c;
  font:900 15px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  cursor:pointer;
}
.a11y-tools__toggle[aria-expanded="true"]{
  border-color:#087a3c;
  background:#eef8f2;
}
.a11y-tools__panel{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:min(320px,calc(100vw - 24px));
  padding:18px;
  border:1px solid #b9cfc1;
  border-radius:15px;
  background:#fff;
  color:#121a29;
  box-shadow:0 18px 55px rgba(17,54,35,.2);
}
.a11y-tools__panel[hidden]{display:none!important}
.a11y-tools__title{margin:0 0 14px;font-size:17px;font-weight:900;line-height:1.25}
.a11y-tools__label{display:block;margin:0 0 8px;font-size:13px;font-weight:800}
.a11y-tools__sizes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:12px}
.a11y-tools__sizes button,
.a11y-tools__contrast{
  min-width:44px;
  min-height:44px;
  padding:8px 10px;
  border:1px solid #b8cec0;
  border-radius:9px;
  background:#fff;
  color:#14211f;
  font:800 12px/1.25 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  cursor:pointer;
}
.a11y-tools__sizes button[aria-pressed="true"],
.a11y-tools__contrast[aria-pressed="true"]{
  border-color:#087a3c;
  background:#087a3c;
  color:#fff;
}
.a11y-tools__contrast{
  display:flex;
  width:100%;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.a11y-tools__contrast svg{width:18px;height:18px}
.header-cta .header-cta__short{display:none}

/*
 * Powiększenie tekstu działa dopiero po świadomym wyborze A+ / A++.
 * Nie skaluje płótna atlasu, obrazów, współrzędnych hotspotów ani całego
 * layoutu. Zwiększane są teksty użytkowe i kontrolki.
 */
html[data-a11y-font="large"] :where(main,.site-footer) :where(p,li,label,input,textarea,select,.btn),
html[data-a11y-font="large"] .site-nav a{
  font-size:16px!important;
  line-height:1.58!important;
}
html[data-a11y-font="xlarge"] :where(main,.site-footer) :where(p,li,label,input,textarea,select,.btn),
html[data-a11y-font="xlarge"] .site-nav a{
  font-size:18px!important;
  line-height:1.64!important;
}

/* Kompaktowe komponenty dostają większy, ale kontrolowany rozmiar. */
html[data-a11y-font="large"] .service-tile b{font-size:14px!important;line-height:1.35!important}
html[data-a11y-font="xlarge"] .service-tile b{font-size:16px!important;line-height:1.38!important}
html[data-a11y-font="large"] .visit-timeline b{font-size:12px!important}
html[data-a11y-font="large"] .visit-timeline small,
html[data-a11y-font="large"] .visit-timeline em{font-size:11px!important}
html[data-a11y-font="xlarge"] .visit-timeline b{font-size:14px!important}
html[data-a11y-font="xlarge"] .visit-timeline small,
html[data-a11y-font="xlarge"] .visit-timeline em{font-size:12px!important}
html[data-a11y-font="large"] .team-card h3{font-size:13px!important}
html[data-a11y-font="large"] .team-card p{font-size:13px!important}
html[data-a11y-font="large"] .team-card small{font-size:11px!important}
html[data-a11y-font="xlarge"] .team-card h3{font-size:15px!important}
html[data-a11y-font="xlarge"] .team-card p{font-size:15px!important}
html[data-a11y-font="xlarge"] .team-card small{font-size:12px!important}
html[data-a11y-font="large"] .zw-atlas__tab-copy b{font-size:12px!important}
html[data-a11y-font="large"] .zw-atlas__tab-copy small{font-size:11px!important}
html[data-a11y-font="xlarge"] .zw-atlas__tab-copy b{font-size:14px!important}
html[data-a11y-font="xlarge"] .zw-atlas__tab-copy small{font-size:12px!important}
html[data-a11y-font="large"] .footer-bottom,
html[data-a11y-font="large"] .site-footer :where(a,li,p){font-size:13px!important;line-height:1.55!important}
html[data-a11y-font="xlarge"] .footer-bottom,
html[data-a11y-font="xlarge"] .site-footer :where(a,li,p){font-size:15px!important;line-height:1.6!important}

html[data-a11y-font="large"] :where(.diagnostic-card,.visit-timeline,.team-card,.service-tile),
html[data-a11y-font="xlarge"] :where(.diagnostic-card,.visit-timeline,.team-card,.service-tile){
  height:auto;
}

/* Wysoki kontrast — bez filtrów na obrazy i bez modyfikacji geometrii. */
html.is-high-contrast{
  --green:#004d24;
  --green2:#004d24;
  --ink:#000;
  --text:#171717;
  --line:#353535;
  --mint:#fff;
  --mint2:#fff;
  --shadow:none;
  --a11y-focus:#000;
  --a11y-focus-ring:#ffdf00;
}
html.is-high-contrast body{background:#fff;color:#000}
html.is-high-contrast :where(.site-header,.topbar,.hero-card,.service-ribbon,.service-tile,.diagnostic-card,.team-block,.review-card,.phone-banner,.site-footer,.services-round3-card,.about-v520-feature,.clinic-gallery-card,.clinic-gallery-cta){
  border-color:#353535;
  background-color:#fff;
  color:#000;
  box-shadow:none;
}
html.is-high-contrast :where(p,small,cite,.footer-bottom,.review-count,.visit-timeline small){color:#171717}
html.is-high-contrast :where(a:not(.btn):not(.brand):not(.footer-logo),.site-nav a){
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}
html.is-high-contrast :where(.btn,.zw-atlas__species-tab.is-active,.clinic-gallery-filters button.is-active,.a11y-tools__sizes button[aria-pressed="true"],.a11y-tools__contrast[aria-pressed="true"]){
  border-color:#000;
  background:#004d24;
  color:#fff;
  box-shadow:none;
}
html.is-high-contrast .btn-secondary{background:#fff;color:#000}
html.is-high-contrast .zw-atlas--full{border:2px solid #fff}
html.is-high-contrast .zw-atlas--full :where(.zw-atlas__tabs,.zw-atlas__sheet){background:#000;color:#fff}
html.is-high-contrast .zw-atlas--full :where(p,small,.zw-atlas__tab-copy span){color:#fff}
html.is-high-contrast .stars{color:#704900}

/* Fallback obrazu atlasu zanim JS policzy płótno 1400×900.
   Zapobiega chwilowemu zbliżeniu sierści przy wolnym JS lub w teście. */
.zw-atlas__canvas:not([data-canvas-ready="true"]){
  left:50%!important;
  top:50%!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:14/9;
  transform:translate(-50%,-50%) scale(var(--atlas-effective-scale,var(--atlas-base-scale,1)))!important;
}
.zw-atlas__canvas[data-canvas-ready="true"]{
  transform:scale(var(--atlas-effective-scale,var(--atlas-base-scale,1)))!important;
}

@media(max-width:1024px){
  body.zw-v510.home .header-cta{order:2}
  body.zw-v510.home .a11y-tools{order:3}
  body.zw-v510.home .nav-toggle{order:4}
  body.zw-v510.home .site-nav{order:5}
}

@media(max-width:860px){
  .header-cta{order:2;margin-left:auto}
  .a11y-tools{order:3;margin-left:0}
  .nav-toggle{order:4;margin-left:0}
  .site-nav{order:5}
  .header-cta .header-cta__full{display:none}
  .header-cta .header-cta__short{display:inline}
  .a11y-tools__panel{
    position:fixed;
    top:82px;
    right:12px;
    left:12px;
    width:auto;
    max-height:calc(100vh - 100px);
    overflow:auto;
  }
}

@media(max-width:768px){
  .nav-toggle,
  .a11y-tools__toggle,
  .header-cta,
  .site-nav a,
  .socials a,
  .clinic-gallery-filters button,
  .clinic-gallery-lightbox button,
  .zw-atlas__species-tab,
  .zw-atlas__tab,
  .zw-atlas__viewbtn,
  .zw-atlas__detail-close,
  .zw-atlas__sheet-handle{
    min-width:44px;
    min-height:44px;
  }
}

@media(max-width:480px){
  body.zw-v510.home .header-row{gap:7px}
  body.zw-v510.home .a11y-tools__toggle{width:44px;height:44px}
  body.zw-v510.home .nav-toggle{width:44px;height:44px}
  body.zw-v510.home .header-cta{min-height:44px}
}

@media(max-width:370px){
  body.zw-v510.home .header-row{gap:5px}
  body.zw-v510.home .header-cta{padding-inline:10px;font-size:10px!important}
  body.zw-v510.home .header-cta svg{width:15px;height:15px}
}

@media(prefers-reduced-motion:reduce){
  .a11y-tools *,
  :focus-visible{scroll-behavior:auto;transition:none!important}
}
