/* Panel w przepływie dokumentu, aby nie zasłaniał tekstu ani fokusu. */
body.site-v7 {
  font-size: 1rem;
  overflow-x: clip;
}

body.site-v7 .v4-access-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-block: .35rem;
  row-gap: .25rem;
}

body.site-v7 .v4-access-caption {
  display: inline-flex;
  align-items: center;
  grid-area: 1 / 1;
  align-self: start;
  justify-self: start;
  position: relative;
  z-index: 1;
  max-width: 40%;
  min-height: 44px;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}

body.site-v7 .v4-access-details {
  grid-area: 1 / 1;
  margin: 0;
  min-width: 0;
}

body.site-v7 .v4-access-details > summary {
  width: fit-content;
  max-width: 58%;
  margin-inline-start: auto;
  justify-content: space-between;
  gap: .65em;
  min-height: 44px;
  font-size: .95rem;
  line-height: 1.35;
}

body.site-v7 .v4-access-details > summary::after {
  content: "";
  flex: 0 0 .5em;
  height: .5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-.12em) rotate(45deg);
}

body.site-v7 .v4-access-details[open] > summary::after {
  transform: translateY(.12em) rotate(225deg);
}

body.site-v7 .v4-access-menu {
  position: static;
  width: 100%;
  max-height: none;
  overflow: visible;
  margin-block: .45rem .35rem;
  padding: clamp(.75rem, 3vw, 1.25rem);
  box-shadow: none;
}

body.site-v7 .v4-access-menu label {
  font-size: .95rem;
}

body.site-v7 .v4-access-menu label:has(input:checked) {
  background: #e0f3e8;
  border-inline-start: 3px solid #08704a;
  padding-inline-start: 7px;
}

body.site-v7 .v4-access-menu label:focus-within {
  outline: 2px solid #865000;
  outline-offset: -2px;
}

body.site-v7 .v7-access-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: .18em;
}

body.site-v7 .skip-new {
  position: fixed;
  top: .5rem;
  left: .5rem;
  max-width: calc(100% - 1rem);
  transform: translateY(calc(-100% - 1rem));
}

body.site-v7 .skip-new:focus {
  transform: none;
}

body.site-v7 :is(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid #915000 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 2px #fff !important;
}

body.site-v7 :is(a, button, input, summary, [tabindex]) {
  scroll-margin-block: .5rem;
}

body.site-v7 #ustawienia-widoku:target {
  outline: 3px solid #915000;
  outline-offset: 3px;
}

body.site-v7 .v5-contact-pocket {
  position: relative;
  inset: auto;
  z-index: auto;
  width: min(100% - 2rem, 35rem);
  margin: 1.5rem auto;
}

body.site-v7 .v5-contact-pocket > summary {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  transform: none;
}

body.site-v7 .v5-contact-panel {
  position: static;
  width: 100%;
  max-height: none;
  overflow: visible;
  margin-top: .75rem;
}

body.site-v7 .cozl-source-table {
  max-width: 100%;
  margin-block: .75rem;
  overflow-x: auto;
}

body.site-v7 .v71-source-content .cozl-source-table table {
  display: table;
  width: 100%;
  overflow: visible;
  margin-block: 0;
}

body.site-v7 .cozl-help-links li {
  margin-block: .5em;
}

body.site-v7 .cozl-unavailable {
  overflow-wrap: anywhere;
}

/* Łagodne efekty po wskazaniu. Fokus pozostaje widoczny w każdym trybie. */
body.site-v7 main a:hover {
  text-underline-offset: .25em;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  html:not(:has(#v4-a11y-motion:checked, #v7-a11y-simple:checked, #v4-a11y-contrast:checked))
    body.site-v7 .v4-access-details > summary {
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
  }

  html:not(:has(#v4-a11y-motion:checked, #v7-a11y-simple:checked, #v4-a11y-contrast:checked))
    body.site-v7 .v4-access-details > summary:hover {
    box-shadow: 0 3px 12px #11533524;
  }
}

body.site-v7 .home-hero .hero-image img {
  will-change: auto;
}

body.site-v7 :is(.v7-journey-step, .section-card, .v2-portal):focus-visible {
  background-color: #f0fbf4;
  border-color: #216847;
}

/* Ustawienia widoku. */
html:has(#cozl-a11y-links:checked) body.site-v7 :is(main, footer, .footer-cert-bar) a[href] {
  text-decoration: underline !important;
  text-decoration-thickness: max(2px, .11em) !important;
  text-underline-offset: .2em !important;
}

html:has(#cozl-a11y-links:checked) body.site-v7 main a[href] :is(h2, h3, strong) {
  text-decoration: underline;
  text-underline-offset: .2em;
}

html:has(#v7-a11y-spacing:checked) body.site-v7 main :is(p, li, dd, dt, th, td, h2, h3) {
  letter-spacing: .035em !important;
  word-spacing: .12em;
  line-height: 1.8 !important;
}

html:has(#v7-a11y-spacing:checked) body.site-v7 main p + p {
  margin-top: 1.5em;
}

html:has(#v4-a11y-contrast:checked) body.site-v7,
html:has(#v4-a11y-contrast:checked) body.site-v7 :where(*, *::before, *::after) {
  color: #111 !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: #242424 !important;
  text-shadow: none !important;
}

html:has(#v4-a11y-contrast:checked) body.site-v7,
html:has(#v4-a11y-contrast:checked) body.site-v7 :is(
  header, main, section, article, aside, footer, nav, details, summary, button, [popover],
  .topline, .v4-access-strip, .v4-access-menu, .v4-access-menu label,
  .footer-cert-bar, .v5-contact-panel, .hero-content, .skip-new,
  .v72-photo-magnify, .v72-gallery__zoom, .v72-gallery__photo-num
) {
  background-color: #fff !important;
  box-shadow: none !important;
}

html:has(#v4-a11y-contrast:checked) body.site-v7 a[href],
html:has(#v4-a11y-contrast:checked) body.site-v7 a[href] :is(h2, h3, strong) {
  color: #003481 !important;
  text-decoration: underline !important;
  text-underline-offset: .2em;
}

html:has(#v4-a11y-contrast:checked) body.site-v7 :is(button, summary, .button, .nav-primary) {
  border: 2px solid #242424 !important;
}

html:has(#v4-a11y-contrast:checked) body.site-v7 :is(a, button, input, summary, [tabindex]):focus-visible {
  outline-color: #003481 !important;
  box-shadow: 0 0 0 2px #fff !important;
}

html:has(#v4-a11y-contrast:checked) body.site-v7 .v4-access-menu label:has(input:checked) {
  background-color: #e2edff !important;
}

/* Wyłączamy dekoracyjny ruch również na pseudoelementach. */
html:has(#v4-a11y-motion:checked, #v7-a11y-simple:checked),
html:has(#v4-a11y-motion:checked, #v7-a11y-simple:checked) :where(*, *::before, *::after) {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

html:has(#v4-a11y-motion:checked, #v7-a11y-simple:checked) body.site-v7
  :is(.section-card, .v7-journey-step, .v7-directory-card, .v71-card, .shortcuts a, .v2-portal, .v71-home-latest-photo img, .v71-news-listing-img img):hover {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html, body, body :where(*, *::before, *::after) {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  body.site-v7 :is(.section-card, .v7-journey-step, .v7-directory-card, .v71-card, .shortcuts a, .v2-portal,
      .v71-home-latest-photo img, .v71-news-listing-img img):hover {
    transform: none !important;
  }
}

@media (forced-colors: active) {
  body.site-v7 :is(a, button, input, summary, [tabindex]):focus-visible {
    outline-color: Highlight !important;
    box-shadow: none !important;
  }

  body.site-v7 main a[href] {
    text-decoration: underline;
  }
}

@media (max-width: 640px) {
  :root {
    scroll-padding-top: 1rem;
  }

  body.site-v7 .site-header {
    position: relative;
  }

}

html:has(#v7-a11y-xl:checked) body.site-v7 .site-header-inner {
  flex-wrap: wrap;
}

@media (max-width: 1350px) {
  html:has(#v7-a11y-xl:checked) body.site-v7 .site-desktop-nav {
    display: none;
  }

  html:has(#v7-a11y-xl:checked) body.site-v7 .site-mobile-menu {
    display: block;
  }
}

@supports not selector(:popover-open) {
  body.site-v7 .site-desktop-nav,
  body.site-v7 .v5-mobile-trigger {
    display: none;
  }

  body.site-v7 .site-header-inner {
    flex-wrap: wrap;
  }

  body.site-v7 .site-mobile-menu {
    display: block;
    flex-basis: 100%;
    margin: 0;
  }

  body.site-v7 .site-mobile-menu > .v5-mobile-popover[popover] {
    display: block;
    position: static;
    width: 100%;
    max-height: none;
    margin: 0 0 .75rem;
    box-shadow: none;
  }

  html:has(#v7-a11y-xl:checked) body.site-v7 .site-desktop-nav {
    display: none;
  }
}

@media print {
  body.site-v7 :is(.v4-access-strip, .skip-new) {
    display: none !important;
  }

  body.site-v7 .cozl-source-table {
    overflow: visible;
  }
}

/* Kontakt: wysokość zdjęcia wynika z wysokości całego bloku danych. */
body.site-v7 #kontakt .contact-page > .hero-photo {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

body.site-v7 #kontakt .contact-page > .hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: cover;
  object-position: 50% 57%;
  filter: none;
  transform: none;
  transition: none;
}

body.site-v7 #kontakt .hero-photo::before {
  background: linear-gradient(180deg, transparent 65%, rgb(8 37 27 / 25%));
}

@media (max-width: 700px) {
  body.site-v7 #kontakt .contact-page > .hero-photo {
    height: clamp(260px, 92vw, 520px);
  }
}

/* Krótkie wyostrzenie kolorów i zbliżenie tylko podczas wskazania zdjęcia. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  html:not(:has(#v4-a11y-motion:checked, #v7-a11y-simple:checked, #v4-a11y-contrast:checked))
    body.site-v7 :is(.home-hero .hero-image, #kontakt .contact-page > .hero-photo) img {
    transition: transform .65s ease-out, filter .55s ease-out;
  }

  html:not(:has(#v4-a11y-motion:checked, #v7-a11y-simple:checked, #v4-a11y-contrast:checked))
    body.site-v7 :is(.home-hero .hero-image, #kontakt .contact-page > .hero-photo):hover img {
    transform: scale(1.025);
    filter: saturate(1.12) contrast(1.035);
  }
}
