/* swiatwrazliwy.pl — dodatki do szablonu Cassiopeia: logo, bloki treści, zespół, galeria, stopka, dostępność. */

/* ---------- logo na ciemnym nagłówku ---------- */
.container-header .brand-logo img {
  max-height: 4.5rem;
  width: auto;
  filter: brightness(0) invert(1);
}

/* ---------- link „Przejdź do treści” ---------- */
.sw-skip {
  position: absolute;
  top: -10rem;
  left: .5rem;
  z-index: 10000;
  padding: .75rem 1rem;
  background: #fff;
  color: #000;
  border: 3px solid #000;
  font-weight: 700;
  text-decoration: underline;
}
.sw-skip:focus {
  top: .5rem;
}
main:focus,
.site-grid:focus,
.container-component:focus {
  outline: none;
}

/* ---------- wyraźny fokus dla obsługi klawiaturą ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #fff;
}
.container-header a:focus-visible,
.container-header button:focus-visible,
.container-header input:focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #000 !important;
}

/* ---------- górny pasek: „Mapa strony” i ustawienia dostępności w jednym wierszu ---------- */
.container-topbar {
  width: 100%;
  max-width: 79.5rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1rem;
}
.container-topbar .sw-mapa {
  margin: 0;
  font-size: .875rem;
}

/* ---------- pasek ustawień dostępności ---------- */
.sw-dost {
  position: relative;
  flex: 1 1 auto;
  font-size: .875rem;
}
.sw-dost .visually-hidden {
  top: 0;
  left: 0;
}
.sw-dost__wnetrze {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem 1.25rem;
  padding: .35rem 0;
}
.sw-dost__grupa {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.sw-dost__etykieta {
  margin-right: .15rem;
}
.sw-dost__btn {
  min-width: 2.75rem;
  min-height: 2.25rem;
  padding: .2rem .65rem;
  border: 2px solid currentColor;
  border-radius: .25rem;
  background: transparent;
  color: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.sw-dost__btn[aria-pressed="true"] {
  background: #fff;
  color: #10223e;
}
.container-topbar .mod-custom a {
  color: inherit;
}

/* ---------- nagłówek strony z obrazem (mod_custom, układ banner) ---------- */
.banner-overlay {
  min-height: 22rem;
  background-size: cover;
  background-position: center;
}
.banner-overlay .overlay {
  max-width: 48rem;
}
.banner-overlay h1,
.banner-overlay h2 {
  color: #fff;
}

/* ---------- bloki treści ---------- */
.sw-blok {
  display: grid;
  gap: 1.5rem 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
.sw-blok img {
  max-width: 100%;
  height: auto;
  border-radius: .5rem;
}
@media (min-width: 768px) {
  .sw-blok--obraz-tekst {
    grid-template-columns: 2fr 3fr;
  }
  .sw-blok--tekst-obraz {
    grid-template-columns: 3fr 2fr;
  }
}
.sw-cytat {
  margin: 0;
  padding-left: 1rem;
  border-left: 4px solid currentColor;
}
.sw-cytat p:first-child {
  font-style: italic;
}

/* ---------- zespół ---------- */
.sw-zespol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sw-zespol img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: .5rem;
}

/* ---------- galeria w artykule ---------- */
.sw-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: .75rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}
.sw-galeria img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: .35rem;
}

/* ---------- film ---------- */
.sw-film {
  position: relative;
  width: 100%;
  max-width: 56rem;
  aspect-ratio: 16 / 9;
  margin: 1rem 0;
}
.sw-film iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- kontakt i stopka ---------- */
.com-contact .com-contact__thumbnail img {
  max-width: 18rem;
  border-radius: .5rem;
}
.container-bottom-a .card-header {
  font-size: 1.2rem;
  line-height: 1.3;
}

/* ---------- treść: długie ciągi znaków (np. linia z kropek, długi adres) łamią się na telefonie ---------- */
.com-content-article__body,
.com-content-category-blog,
.com-content-category,
.com-contact,
.mod-custom {
  overflow-wrap: anywhere;
}

/* ---------- treść: obrazy i ramki nie wychodzą poza kolumnę ---------- */
.com-content-article img,
.com-contact img,
.container-footer img,
.container-bottom-a img {
  max-width: 100%;
  height: auto;
}
.com-content-article iframe,
.com-contact iframe {
  max-width: 100%;
}

/* ---------- informacja o plikach cookie ---------- */
.sw-cookie {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 1.5rem;
  padding: 1rem;
  background: #1c1c1c;
  color: #fff;
  font-size: .95rem;
}
.sw-cookie[hidden] {
  display: none;
}
.sw-cookie p {
  margin: 0;
}
.sw-cookie a {
  color: #fff;
  text-decoration: underline;
}
.sw-cookie__zamknij {
  min-height: 2.5rem;
  padding: .35rem 1.25rem;
  border: 2px solid #fff;
  border-radius: .25rem;
  background: #fff;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- wysoki kontrast: żółty tekst na czarnym tle ---------- */
html.sw-kontrast,
html.sw-kontrast body {
  background: #000 !important;
}
html.sw-kontrast body *:not(img):not(svg):not(path):not(iframe):not(video) {
  background-color: #000 !important;
  background-image: none !important;
  color: #ff0 !important;
  border-color: #ff0 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html.sw-kontrast a,
html.sw-kontrast a * {
  color: #ff0 !important;
  text-decoration: underline !important;
}
html.sw-kontrast .sw-dost__btn[aria-pressed="true"],
html.sw-kontrast .sw-cookie__zamknij,
html.sw-kontrast .btn-primary {
  background-color: #ff0 !important;
  color: #000 !important;
}
html.sw-kontrast :focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 2px;
}
html.sw-kontrast .container-header .brand-logo img {
  filter: brightness(0) invert(1);
}
