/* === Skalowanie tekstu === */
html { font-size: 100%; }
html.font-minus2 { font-size: 75%; }
html.font-minus  { font-size: 87.5%; }
html.font-plus   { font-size: 112.5%; }
html.font-plus2  { font-size: 125%; }

/* === Skala szarości === */
html.grayscale { filter: grayscale(100%); }

/* === Skip link === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #733647;
  color: #fff;
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 10000;
  border-radius: 0 0 5px 0;
}
.skip-link:focus {
  top: 0;
}

/* === Widget dostępności === */
.a11y-widget {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 990;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* === Przycisk otwierający menu === */
.a11y-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #fff;
  color: #000;
  border: 0;
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  box-shadow: -2px 2px 8px rgba(0, 0, 0, .2);
  padding: 0;
  line-height: 1;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}
.a11y-toggle:hover {
  background-color: #f0f0f0;
}
.a11y-toggle:focus-visible {
  outline: 3px solid #161616;
  outline-offset: 2px;
}
.a11y-toggle .material-symbols-outlined {
  font-size: 1.6rem;
  user-select: none;
}

/* === Menu rozwijane === */
.a11y-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
  order: -1;
}
.a11y-menu[hidden] {
  display: none;
}

/* === Pozycje menu === */
.a11y-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: transparent;
  color: #111;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  transition: background-color 0.2s ease;
  text-align: left;
  width: 100%;
}
.a11y-menu-item:hover {
  background-color: #f0f0f0;
}
.a11y-menu-item[aria-pressed="true"] {
  background-color: #733647;
  color: #fff;
}
.a11y-menu-item:focus-visible {
  outline: 3px solid #161616;
  outline-offset: 2px;
}
.a11y-menu-item .material-symbols-outlined {
  font-size: 1.25rem;
  user-select: none;
  flex-shrink: 0;
}

/* === Responsywność — małe ekrany === */
@media (max-width: 400px) {
  .a11y-toggle {
    width: 44px;
    height: 44px;
  }
  .a11y-toggle .material-symbols-outlined {
    font-size: 1.4rem;
  }
  .a11y-menu-item {
    padding: 7px 12px;
    font-size: 0.8rem;
  }
}

/* === Tryb wysokiego kontrastu === */
html.high-contrast body {
  background-color: #000 !important;
  color: #ffff00 !important;
}

html.high-contrast * {
  background-color: #000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
  box-shadow: none !important;
}

html.high-contrast a,
html.high-contrast a:visited {
  color: #ffff00 !important;
  text-decoration: underline !important;
}

html.high-contrast img,
html.high-contrast svg,
html.high-contrast video,
html.high-contrast iframe {
  filter: contrast(1) !important;
  opacity: 0.85;
}

html.high-contrast svg path,
html.high-contrast svg rect,
html.high-contrast svg circle,
html.high-contrast svg polygon,
html.high-contrast svg polyline,
html.high-contrast svg line {
  fill: #ffff00 !important;
  stroke: #ffff00 !important;
}

html.high-contrast input,
html.high-contrast textarea,
html.high-contrast select {
  background-color: #000 !important;
  color: #ffff00 !important;
  border: 2px solid #ffff00 !important;
}

html.high-contrast ::placeholder {
  color: #cccc00 !important;
}

html.high-contrast :focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 2px !important;
}

/* Widget w trybie kontrastowym */
html.high-contrast .a11y-toggle,
html.high-contrast .a11y-menu {
  background: #000 !important;
  border: 2px solid #ffff00 !important;
}
html.high-contrast .a11y-toggle,
html.high-contrast .a11y-menu-item {
  color: #ffff00 !important;
}
html.high-contrast .a11y-toggle:hover,
html.high-contrast .a11y-menu-item:hover {
  background: #1a1a1a !important;
}
html.high-contrast .a11y-menu-item[aria-pressed="true"] {
  background: #333 !important;
  color: #ffff00 !important;
}

/* Tła hero i sekcji ze zdjęciami — ciemna nakładka */
html.high-contrast .hero,
html.high-contrast .section-3,
html.high-contrast [style*="background-image"],
html.high-contrast [class*="hero"],
html.high-contrast [class*="slider"] {
  background-image: none !important;
}

/* Skip link w trybie kontrastowym */
html.high-contrast .skip-link {
  background: #000 !important;
  color: #ffff00 !important;
  border: 2px solid #ffff00 !important;
}

/* === Etykiety pól formularza === */
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  margin-top: 8px;
  color: inherit;
}

/* Logo nawigacji — biała podkładka */
html.high-contrast .w-nav-brand img {
  background-color: #fff !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  filter: none !important;
  opacity: 1 !important;
}

/* Logotypy nagród i partnerów — biała podkładka */
html.high-contrast .logo-box img,
html.high-contrast .partnerts-logo-box img {
  background-color: #fff !important;
  padding: 6px !important;
  border-radius: 4px !important;
  filter: none !important;
  opacity: 1 !important;
}

/* === Defekt 1 — Slider hero: transparentne kontenery === */
html.high-contrast .w-slider,
html.high-contrast .w-slider-mask,
html.high-contrast .w-slide,
html.high-contrast .slider-content,
html.high-contrast .slider-nav,
html.high-contrast .slider-nav-wrapper,
html.high-contrast .slider-nav1,
html.high-contrast .w-slider-arrow-left,
html.high-contrast .w-slider-arrow-right {
  background-color: transparent !important;
}

/* === Defekt 3 — Ikony w sekcjach treści: biały filtr === */
html.high-contrast .image,
html.high-contrast .image-2,
html.high-contrast .image-3,
html.high-contrast .image-4,
html.high-contrast .slider-row img,
html.high-contrast .slider-dot {
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
}

/* === Defekt 4A — Brązowo-różowe teksty === */
html.high-contrast .toggle-text,
html.high-contrast .text-oferta,
html.high-contrast .main-heading,
html.high-contrast .second-slider-heading,
html.high-contrast .slider-text,
html.high-contrast strong,
html.high-contrast b,
html.high-contrast em {
  color: #ffff00 !important;
}

/* === Element Facebook box — schemat kontrastowy === */
html.high-contrast .facebook-link .facebook-box {
  background-color: #000 !important;
  border: 2px solid #ffff00 !important;
}
