/* ==========================================================================
   Gmina Oporów — style główne
   Paleta i typografia dobrane pod kątem WCAG 2.1 AA (kontrast min. 4.5:1)
   ========================================================================== */

:root {
  /* Paleta oparta na barwach herbu Gminy Oporów (czerwień i złoto) */
  --color-primary: #a31621;
  --color-primary-dark: #7a1019;
  --color-primary-light: #c41e3a;
  --color-primary-tint: #f6dce0;
  --color-accent: #c9971c;
  --color-accent-dark: #8a6508;
  --color-accent-tint: #f8edd3;
  --color-warning: #c1440e;
  --color-warning-dark: #963309;
  --color-text: #1a1f24;
  --color-text-muted: #5c544c;
  --color-bg: #ffffff;
  --color-bg-alt: #faf8f5;
  --color-border: #e7e0d8;
  --color-focus: #1d4ed8;
  --color-focus-on-dark: #ffffff;
  --font-base: "Source Sans 3", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-base);
  --max-width: 1240px;
  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  /* Zapobiega chowaniu się fokusu pod przyklejonym paskiem górnym (WCAG 2.4.11) */
  scroll-padding-top: 130px;
  /* Zapobiega przesuwaniu strony w poziomie przez niewidoczne, szerokie podmenu */
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-accent);
}

/* Linki w treści — odróżnione od tekstu grubością, bez podkreślenia */
.entry-content a,
.card p a {
  font-weight: 600;
}

/* Widoczny focus dla nawigacji klawiaturą — wymóg dostępności */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* Na ciemnych tłach (stopka, kolorowe przyciski) biały fokus jest lepiej widoczny */
.site-footer a:focus-visible,
.hero a:focus-visible,
.menu-toggle:focus-visible,
.btn--primary:focus-visible,
.search-form button:focus-visible,
.skip-link:focus-visible {
  outline-color: var(--color-focus-on-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ==========================================================================
   Przyciski
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(163, 22, 33, 0.25);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 10px 20px rgba(163, 22, 33, 0.3);
}

.btn--outline {
  background: #fff;
  color: var(--color-primary-dark);
  border-color: var(--color-border);
  box-shadow: 0 1px 3px rgba(20, 20, 40, 0.06);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 8px 18px rgba(20, 20, 40, 0.1);
}

.btn--ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn--sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* Pasek ostrzeżeń (aktualne komunikaty z kategorii "Ostrzeżenia meteorologiczne" itp.) */
.site-alerts {
  background: var(--color-warning);
  color: #fff;
}

.site-alerts a {
  color: #fff;
  font-weight: 600;
}

.site-alerts .container {
  padding-block: 0.6rem;
}

.site-alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.site-alert + .site-alert {
  margin-top: 0.4rem;
}

.site-alert__icon {
  flex-shrink: 0;
}

/* Pasek górny + nagłówek przyklejone do góry przy przewijaniu */
.site-header-sticky {
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(20, 20, 40, 0.08);
}

/* Pasek narzędziowy (kontakt, BIP, ePUAP) */
.top-bar {
  background: #f2f2f2;
  color: var(--color-text);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.top-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 0.5rem;
}

.top-bar a {
  color: var(--color-text);
}

.top-bar a:hover {
  color: var(--color-primary);
}

.top-bar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-bar__links li > a:not(.top-bar__logo-link):not(.top-bar__icon-link) {
  display: inline-block;
  padding-block: 5px;
}

.top-bar__weather {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 5px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.top-bar__weather-date {
  text-transform: capitalize;
}

.top-bar__weather-data {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--color-border);
  font-weight: 600;
  color: var(--color-text);
}

.top-bar__weather-icon {
  font-size: 1rem;
  line-height: 1;
}

.top-bar__odpady {
  padding-block: 5px;
  border-left: 1px solid var(--color-border);
  padding-left: 0.25rem;
}

.top-bar__odpady-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.top-bar__odpady-link:hover,
.top-bar__odpady-link:focus-visible {
  color: var(--color-primary);
}

.top-bar__odpady-icon {
  display: inline-flex;
  color: var(--color-accent-dark);
}

.top-bar__odpady-icon .icon {
  width: 1rem;
  height: 1rem;
}

.top-bar__weather-alert {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.4rem;
  padding: 0.3rem 0.6rem;
  background: transparent;
  color: var(--color-text-muted);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.top-bar__weather-alert:hover,
.top-bar__weather-alert:focus-visible {
  color: var(--color-primary);
}

.top-bar__weather-alert--active {
  background: #f2740c;
  color: #2b1400;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(242, 116, 12, 0.55);
}

.top-bar__weather-alert--active:hover,
.top-bar__weather-alert--active:focus-visible {
  background: #d85f00;
  color: #2b1400;
  transform: translateY(-1px);
}

.top-bar__weather-alert--high {
  background: #c8102e;
  color: #fff;
  box-shadow: 0 1px 4px rgba(200, 16, 46, 0.6);
  animation-name: weather-alert-highlight-high;
}

.top-bar__weather-alert--high:hover,
.top-bar__weather-alert--high:focus-visible {
  background: #96001f;
  color: #fff;
}

@keyframes weather-alert-highlight {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(242, 116, 12, 0.6);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(242, 116, 12, 0);
  }
}

@keyframes weather-alert-highlight-high {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.6);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(200, 16, 46, 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .top-bar__weather-alert--active {
    animation: weather-alert-highlight 1.8s ease-in-out infinite;
  }
}

.top-bar__logo-link {
  display: block;
  line-height: 0;
  padding: 5px 2px;
}

.top-bar__logo-link img {
  height: 22px;
  width: auto;
}

.top-bar__logo-link--epuap img {
  height: 30px;
}

.top-bar__icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  padding: 3px;
}

.top-bar__icon-link:hover {
  color: var(--color-primary);
}

/* Nagłówek — logo i menu w jednej linii (jak kleszczow.pl) */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.site-header__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.65rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.site-branding img,
.site-branding .custom-logo {
  height: 44px;
  width: auto;
  max-width: 44px;
}

.site-title-link {
  text-decoration: none;
}

.site-branding .site-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  line-height: 1.2;
  margin: 0;
}

.site-branding .site-subtitle {
  display: none;
}

/* Nawigacja główna — inline, obok logo */
.main-navigation {
  min-width: 0;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-navigation a {
  display: block;
  padding: 0.6rem 0.65rem;
  border-radius: 999px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.main-navigation a:hover,
.main-navigation a:focus-visible {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 8px 18px rgba(20, 20, 40, 0.14);
  transform: translateY(-2px);
}

.main-navigation .current-menu-item > a {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(20, 20, 40, 0.08);
}

/* Podmenu (rozwijane sekcje: Urząd Gminy, Rada Gminy, Jednostki organizacyjne…) */
.main-navigation li {
  position: relative;
}

.main-navigation ul ul {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  flex-direction: column;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: 0 16px 32px rgba(20, 20, 40, 0.16);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.main-navigation ul ul ul {
  top: 0;
  left: 100%;
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.main-navigation ul ul a {
  padding: 0.7rem 1rem;
  white-space: nowrap;
  color: var(--color-text);
  border-radius: 0;
  transition: background-color 0.2s var(--ease), padding-left 0.2s var(--ease), color 0.2s var(--ease);
}

.main-navigation ul ul a:hover,
.main-navigation ul ul a:focus-visible {
  padding-left: 1.35rem;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
}

.main-navigation .menu-item-has-children > a::after {
  content: "▾";
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.7em;
  transition: transform 0.25s var(--ease);
}

.main-navigation .menu-item-has-children:hover > a::after,
.main-navigation .menu-item-has-children:focus-within > a::after {
  transform: rotate(-180deg);
}

.menu-toggle {
  display: none;
  background: var(--color-primary);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.menu-toggle:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* Strona główna — sekcje */
.section {
  padding-block: 2.5rem;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section__header h2 {
  margin: 0;
}

.section__header p {
  color: var(--color-text-muted);
  margin: 0.5rem 0 0;
}

/* Baner projektów / partnerów — jeden wiersz, przewijany karuzelowo */
.project-banner,
.partner-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-banner__track,
.partner-banner__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0.5rem;
  flex: 1 1 auto;
}

.project-banner__track::-webkit-scrollbar,
.partner-banner__track::-webkit-scrollbar {
  display: none;
}

.project-banner__nav,
.partner-banner__nav {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-primary-dark);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(20, 20, 40, 0.1);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.project-banner__nav:hover,
.project-banner__nav:focus-visible,
.partner-banner__nav:hover,
.partner-banner__nav:focus-visible {
  background: var(--color-primary);
  color: #fff;
}

.project-banner__nav:active,
.partner-banner__nav:active {
  transform: scale(0.94);
}

.project-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 360px;
  height: 210px;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(20, 20, 40, 0.06);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.project-logo:hover,
.project-logo:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(20, 20, 40, 0.12);
  border-color: var(--color-primary);
}

.project-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.project-logo__placeholder {
  font-weight: 600;
  color: var(--color-primary-dark);
  text-align: center;
  font-size: 0.9rem;
}

/* Dodatkowe miejsce nad i po bokach kart na dymek z nazwą partnera (inaczej byłby przycięty przez przewijany kontener) */
.partner-banner__track {
  padding-top: 5.5rem;
  padding-inline: 3rem;
}

/* Kafelki logotypów partnerów — mniejsze, w odcieniach szarości do czasu najechania */
.partner-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 190px;
  height: 110px;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.partner-logo__name {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.6rem);
  transform: translate(-50%, 4px);
  width: max-content;
  max-width: 260px;
  padding: 0.45rem 0.75rem;
  background: var(--color-primary-dark);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}

.partner-logo__name::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-primary-dark);
}

.partner-logo:hover .partner-logo__name,
.partner-logo:focus-visible .partner-logo__name {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.partner-logo:hover,
.partner-logo:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(20, 20, 40, 0.1);
  border-color: var(--color-primary);
}

.partner-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.2s var(--ease), opacity 0.2s var(--ease);
}

.partner-logo:hover img,
.partner-logo:focus-visible img {
  filter: grayscale(0);
  opacity: 1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(20, 20, 40, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 8px 20px rgba(20, 20, 40, 0.1);
  transform: translateY(-2px);
}

.card--flat {
  border-color: transparent;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.card--flat h3,
.card--flat p,
.card--flat time,
.card--flat .card__tags {
  padding-inline: 0.1rem;
}

.card--flat:hover {
  box-shadow: none;
  transform: none;
}

.card {
  overflow: hidden;
}

.card > img,
.card > a > img {
  border-radius: calc(var(--radius) - 4px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.card:hover > img,
.card:hover > a > img {
  transform: scale(1.04);
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card time {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Tagi kategorii na kartach aktualności */
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.card:hover .tag {
  background: var(--color-primary);
  color: #fff;
}

.card:hover .tag--accent {
  background: var(--color-accent-dark);
  color: #fff;
}

.card:hover .tag--warning {
  background: var(--color-warning);
  color: #fff;
}

.tag--accent {
  background: var(--color-accent-tint);
  color: var(--color-accent-dark);
}

.tag--warning {
  background: #fbe3d6;
  color: var(--color-warning-dark);
}

.card a.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card {
  position: relative;
}

/* Hero / baner powitalny */
.hero {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  padding-block: 3rem;
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0 0 0.75rem;
}

.hero p {
  max-width: 60ch;
  font-size: 1.1rem;
}

/* Karuzela hero (strona główna) */
.hero-carousel {
  position: relative;
  height: min(560px, 72vh);
  min-height: 380px;
  overflow: hidden;
  background: var(--color-primary-dark);
}

.hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}

.hero-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-carousel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-carousel__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(30, 6, 9, 0.88) 0%, rgba(30, 6, 9, 0.45) 55%, rgba(30, 6, 9, 0.35) 100%);
}

.hero-carousel__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding-block: 3rem;
  color: #fff;
}

.hero-carousel__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-accent-tint);
  margin: 0 0 0.5rem;
}

.hero-carousel__content h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  margin: 0 0 0.75rem;
  max-width: 40ch;
}

.hero-carousel__content p {
  max-width: 60ch;
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
}

.hero-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  z-index: 3;
}

.hero-carousel__arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-carousel__arrow--prev {
  left: 1.5rem;
}

.hero-carousel__arrow--next {
  right: 1.5rem;
}

.hero-carousel__dots {
  position: absolute;
  bottom: 1.25rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.hero-carousel__dots button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-carousel__dots button::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  border: 1px solid #fff;
  transition: background-color 0.2s ease;
}

.hero-carousel__dots button.is-active::before {
  background: #fff;
}

.hero-carousel__playpause {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.hero-carousel__playpause:hover {
  background: rgba(0, 0, 0, 0.45);
}

.hero-carousel__playpause-icon {
  display: block;
  width: 10px;
  height: 10px;
  position: relative;
}

.hero-carousel__playpause-icon::before,
.hero-carousel__playpause-icon::after {
  content: "";
  position: absolute;
  top: 0;
  width: 3px;
  height: 10px;
  background: currentColor;
}

.hero-carousel__playpause-icon::before {
  left: 1px;
}

.hero-carousel__playpause-icon::after {
  right: 1px;
}

.hero-carousel__playpause.is-paused .hero-carousel__playpause-icon {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 9px solid currentColor;
  background: none;
}

.hero-carousel__playpause.is-paused .hero-carousel__playpause-icon::before,
.hero-carousel__playpause.is-paused .hero-carousel__playpause-icon::after {
  content: none;
}

/* Wyszukiwarka w górnej belce */
.top-bar__search {
  flex: 1 1 auto;
  max-width: 260px;
}

.top-bar__search .search-form {
  display: flex;
  gap: 0.4rem;
}

.top-bar__search .search-form input[type="search"] {
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  border-radius: 999px;
  min-width: 0;
}

.top-bar__search .search-form button {
  padding: 0.3rem 0.7rem;
  border-radius: 50%;
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0;
}

.top-bar__search .search-form button::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Siatka funkcji (4 kolumny z ikoną) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.75rem;
}

.feature {
  text-align: center;
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.feature__icon .icon {
  width: 1.6rem;
  height: 1.6rem;
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.feature p {
  color: var(--color-text-muted);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.section__header--center {
  flex-direction: column;
  text-align: center;
  align-items: center;
}

.section__more {
  text-align: center;
  margin-top: 2rem;
}

/* Siatka kafelków (przydatne linki) */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.1rem;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

.tile .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.tile:hover,
.tile:focus-visible {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(163, 22, 33, 0.28);
}

.tile:nth-child(3n+2) {
  background: var(--color-accent-dark);
}

.tile:nth-child(3n+2):hover,
.tile:nth-child(3n+2):focus-visible {
  background: #6b4c06;
  box-shadow: 0 14px 24px rgba(138, 101, 8, 0.28);
}

/* Stopka */
.site-footer {
  background: #fff;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  padding-block: 3rem 1.5rem;
  margin-top: 3rem;
}

.site-footer a {
  color: var(--color-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
}

.footer-grid h2 {
  color: var(--color-primary-dark);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0;
}

.footer-electronic {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.site-footer a.footer-bip-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.35rem 0.9rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}

.site-footer a.footer-bip-badge:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.hours-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 320px;
}

.hours-table th,
.hours-table td {
  text-align: left;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border);
  font-weight: 400;
}

.hours-table th {
  color: var(--color-text-muted);
  font-weight: 400;
}

.hours-table td {
  text-align: right;
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.footer-bottom__links {
  display: flex;
  gap: 1.25rem;
}

/* Treść stron/wpisów */
.entry-content {
  max-width: 75ch;
}

.entry-content > * + * {
  margin-top: 1rem;
}

.page-header {
  padding-block: 2rem;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

/* Paginacja */
.pagination {
  margin-top: 2.5rem;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding-inline: 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-primary-dark);
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}

a.page-numbers:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(163, 22, 33, 0.2);
}

.pagination .page-numbers.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Formularz wyszukiwania */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
}

.search-form input[type="search"] {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input[type="search"]:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-tint);
}

.search-form button {
  background: var(--color-primary);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 0.6rem 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search-form button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(163, 22, 33, 0.25);
}

/* Dostępność — panel (wielkość czcionki, warianty kontrastu) */
.a11y-widget {
  position: relative;
}

.a11y-widget__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.a11y-widget__icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
}

.a11y-widget__toggle:hover {
  transform: translateY(-1px);
}

.a11y-widget__toggle:focus-visible {
  outline-offset: 3px;
}

.a11y-widget__toggle[aria-expanded="true"] .a11y-widget__icon {
  box-shadow: 0 0 0 3px var(--color-primary-tint);
}

.a11y-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.6rem;
  width: 290px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 16px 32px rgba(20, 20, 40, 0.18);
  padding: 1rem;
  z-index: 300;
}

.a11y-panel[hidden] {
  display: none;
}

.a11y-panel__group + .a11y-panel__group {
  margin-top: 1rem;
}

.a11y-panel__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.a11y-panel__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.a11y-font-btn,
.a11y-contrast-btn {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.a11y-font-btn {
  padding: 0.4rem 0.7rem;
  font-weight: 600;
}

.a11y-font-btn--default span {
  font-size: 0.85rem;
}

.a11y-font-btn--large span {
  font-size: 1rem;
}

.a11y-font-btn--largest span {
  font-size: 1.15rem;
}

.a11y-contrast-btn {
  width: 2.75rem;
  height: 2.25rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.a11y-contrast-btn--default {
  background: #fff;
  color: var(--color-text);
}

.a11y-contrast-btn--white-black {
  background: #000;
  color: #fff;
}

.a11y-contrast-btn--yellow-black {
  background: #000;
  color: #ffe600;
}

.a11y-contrast-btn--black-yellow {
  background: #ffe600;
  color: #000;
}

.a11y-font-btn:hover,
.a11y-contrast-btn:hover {
  transform: translateY(-1px);
}

.a11y-font-btn[aria-pressed="true"],
.a11y-contrast-btn[aria-pressed="true"] {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-tint);
}

/* Wielkość czcionki — skaluje cały serwis (jednostki rem liczą się od html) */
html.a11y-font-large {
  font-size: 112.5%;
}

html.a11y-font-largest {
  font-size: 125%;
}

/* Warianty wysokiego kontrastu — wymuszone kolory w całym serwisie */
html.a11y-contrast-white-black body,
html.a11y-contrast-white-black body * {
  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-white-black a {
  color: #ffe600 !important;
  text-decoration: underline !important;
}

html.a11y-contrast-yellow-black body,
html.a11y-contrast-yellow-black body * {
  background-color: #000 !important;
  background-image: none !important;
  color: #ffe600 !important;
  border-color: #ffe600 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html.a11y-contrast-yellow-black a {
  color: #fff !important;
  text-decoration: underline !important;
}

html.a11y-contrast-black-yellow body,
html.a11y-contrast-black-yellow body * {
  background-color: #ffe600 !important;
  background-image: none !important;
  color: #000 !important;
  border-color: #000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html.a11y-contrast-black-yellow a {
  color: #00248f !important;
  text-decoration: underline !important;
}

html[class*="a11y-contrast-"] img,
html[class*="a11y-contrast-"] .hero-carousel__overlay {
  opacity: 0.85;
}

/* W trybach kontrastowych przywracamy oryginalne kolory odznak w pasku dostępności, żeby podgląd trybu był czytelny */
html[class*="a11y-contrast-"] .a11y-contrast-btn--default,
html[class*="a11y-contrast-"] .a11y-contrast-btn--white-black,
html[class*="a11y-contrast-"] .a11y-contrast-btn--yellow-black,
html[class*="a11y-contrast-"] .a11y-contrast-btn--black-yellow {
  background-color: revert !important;
  color: revert !important;
}

html.a11y-contrast-white-black .a11y-contrast-btn--default { background-color: #fff !important; color: #000 !important; }
html.a11y-contrast-white-black .a11y-contrast-btn--white-black { background-color: #000 !important; color: #fff !important; }
html.a11y-contrast-white-black .a11y-contrast-btn--yellow-black { background-color: #000 !important; color: #ffe600 !important; }
html.a11y-contrast-white-black .a11y-contrast-btn--black-yellow { background-color: #ffe600 !important; color: #000 !important; }

html.a11y-contrast-yellow-black .a11y-contrast-btn--default { background-color: #fff !important; color: #000 !important; }
html.a11y-contrast-yellow-black .a11y-contrast-btn--white-black { background-color: #000 !important; color: #fff !important; }
html.a11y-contrast-yellow-black .a11y-contrast-btn--yellow-black { background-color: #000 !important; color: #ffe600 !important; }
html.a11y-contrast-yellow-black .a11y-contrast-btn--black-yellow { background-color: #ffe600 !important; color: #000 !important; }

html.a11y-contrast-black-yellow .a11y-contrast-btn--default { background-color: #fff !important; color: #000 !important; }
html.a11y-contrast-black-yellow .a11y-contrast-btn--white-black { background-color: #000 !important; color: #fff !important; }
html.a11y-contrast-black-yellow .a11y-contrast-btn--yellow-black { background-color: #000 !important; color: #ffe600 !important; }
html.a11y-contrast-black-yellow .a11y-contrast-btn--black-yellow { background-color: #ffe600 !important; color: #000 !important; }

@media (max-width: 782px) {
  .site-header__row {
    flex-wrap: wrap;
  }

  .site-branding {
    order: 1;
  }

  .menu-toggle {
    display: block;
    order: 2;
  }

  .main-navigation {
    order: 3;
    flex-basis: 100%;
    display: none;
    border-top: 1px solid var(--color-border);
    margin-top: 0.65rem;
    padding-top: 0.5rem;
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
  }

  .main-navigation ul li {
    width: 100%;
  }

  .main-navigation ul ul {
    position: static;
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    padding-left: 1rem;
  }

  .hero-carousel__arrow {
    display: none;
  }

  .hero-carousel {
    height: 420px;
  }
}

/* Baner zgody na cookies */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  background: #fff;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 24px rgba(20, 20, 40, 0.12);
  padding-block: 1rem;
}

.cookie-banner__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner__row p {
  margin: 0;
  max-width: 70ch;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Placeholder osadzonych treści (mapy, wideo) do czasu zgody */
.embed-facade {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  min-height: 280px;
  padding: 2rem;
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
}

.embed-facade p {
  max-width: 45ch;
  color: var(--color-text-muted);
  margin: 0;
}

.embed-facade iframe {
  width: 100%;
  min-height: 480px;
  border: 0;
  border-radius: var(--radius);
}

/* Harmonogram odbioru odpadów */

.harmonogram-page {
  padding-block: 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.harmonogram-upcoming h2 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
}

.harmonogram-upcoming__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.harmonogram-upcoming__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--fraction-color, var(--color-primary));
  border-radius: var(--radius);
}

.harmonogram-upcoming__item strong {
  display: block;
  font-size: 0.95rem;
}

.harmonogram-upcoming__date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.harmonogram-upcoming__dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  margin-top: 0.25rem;
  border-radius: 50%;
  background: var(--fraction-color, var(--color-primary));
}

.harmonogram-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.harmonogram-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.harmonogram-legend__swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.harmonogram-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  white-space: nowrap;
}

.harmonogram-table th,
.harmonogram-table td {
  padding: 0.6rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.harmonogram-table thead th {
  background: var(--color-bg-alt);
  font-weight: 700;
}

.harmonogram-table tbody th {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
}

.harmonogram-table tbody tr:last-child th,
.harmonogram-table tbody tr:last-child td {
  border-bottom: none;
}

.harmonogram-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.harmonogram-info__card {
  padding: 1.25rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.harmonogram-info__card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.harmonogram-info__card p {
  margin: 0;
  color: var(--color-text-muted);
}

.harmonogram-pdf {
  margin: 0;
}

/* Galeria zdjęć */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
}

.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg-alt);
  box-shadow: 0 1px 3px rgba(20, 20, 40, 0.12);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.gallery-tile:hover,
.gallery-tile:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(20, 20, 40, 0.18);
}

.gallery-tile__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.gallery-tile:hover .gallery-tile__img,
.gallery-tile:focus-visible .gallery-tile__img {
  transform: scale(1.05);
}

.gallery-tile__overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.75rem 1rem 0.75rem;
  text-align: left;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}

.gallery-tile__title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
}

.gallery-tile__count {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Siatka miniatur na stronie pojedynczej galerii */

.photo-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
  padding-block: 0.5rem 3rem;
}

.photo-page-grid__thumb {
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  background: var(--color-bg-alt);
  box-shadow: 0 1px 3px rgba(20, 20, 40, 0.12);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.photo-page-grid__thumb:hover,
.photo-page-grid__thumb:focus-visible {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.photo-page-grid__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 6, 0.92);
  padding: 1rem;
}

.photo-lightbox[hidden] {
  display: none;
}

body.has-lightbox-open {
  overflow: hidden;
}

.photo-lightbox__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: min(92vw, 1100px);
  max-height: 88vh;
}

.photo-lightbox__stage img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.photo-lightbox__caption {
  margin: 0;
  color: #f2ede6;
  font-size: 0.9rem;
  text-align: center;
  max-width: 70ch;
}

.photo-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}

.photo-lightbox__close:hover,
.photo-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.photo-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}

.photo-lightbox__nav:hover,
.photo-lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.photo-lightbox__nav--prev {
  left: 1rem;
}

.photo-lightbox__nav--next {
  right: 1rem;
}

.photo-lightbox__counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .photo-lightbox__nav {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   Modern refresh — warstwa nadpisań nadająca nowoczesny wygląd
   (szkło na nagłówku, mocniejszy hero, karty z cieniem, złote akcenty,
   animacje przy przewijaniu). Wszystkie funkcje bez zmian.
   ========================================================================== */

:root {
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(20, 20, 40, 0.05), 0 1px 2px rgba(20, 20, 40, 0.04);
  --shadow-md: 0 10px 24px rgba(20, 20, 40, 0.10), 0 2px 6px rgba(20, 20, 40, 0.05);
  --shadow-lg: 0 24px 48px rgba(20, 20, 40, 0.14), 0 4px 10px rgba(20, 20, 40, 0.06);
}

/* --- Przyklejony nagłówek: efekt szkła --- */
.site-header-sticky {
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(20, 20, 40, 0.06), 0 8px 24px rgba(20, 20, 40, 0.06);
}

.top-bar {
  background: rgba(244, 242, 238, 0.86);
  border-bottom-color: rgba(20, 20, 40, 0.06);
}

.site-header {
  background: rgba(255, 255, 255, 0.84);
}

.main-navigation a {
  font-weight: 600;
}

/* --- Hero: gradient ukośny, zaokrąglony dół, większy tytuł, pasek postępu --- */
.hero-carousel {
  border-radius: 0 0 28px 28px;
  box-shadow: 0 24px 48px rgba(30, 6, 9, 0.18);
}

.hero-carousel__overlay {
  background:
    linear-gradient(105deg, rgba(30, 6, 9, 0.92) 0%, rgba(30, 6, 9, 0.62) 42%, rgba(30, 6, 9, 0.18) 100%),
    linear-gradient(0deg, rgba(30, 6, 9, 0.55) 0%, rgba(30, 6, 9, 0) 45%);
}

.hero-carousel__content {
  padding-block: 3.25rem 3.5rem;
}

.hero-carousel__eyebrow {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #1c1300;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.hero-carousel__content h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero-carousel__content p {
  font-size: 1.08rem;
  opacity: 0.92;
}

.hero-carousel__arrow {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-carousel:has(.hero-carousel__dots) .hero-carousel__slide.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 0;
  z-index: 3;
  background: linear-gradient(90deg, var(--color-accent), #fff);
  animation: hero-progress 7s linear forwards;
}

.hero-carousel:has(.hero-carousel__playpause.is-paused) .hero-carousel__slide.is-active::after {
  animation-play-state: paused;
}

@keyframes hero-progress {
  to { width: 100%; }
}

/* --- Nagłówki sekcji: złoto-czerwony akcent --- */
.section {
  padding-block: 3.25rem;
}

.section__header h2 {
  position: relative;
  padding-bottom: 0.7rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
}

.section__header h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
}

.section__header--center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* --- Skróty (feature grid): karty --- */
.feature {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.9rem 1.25rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.feature__icon {
  width: 4.25rem;
  height: 4.25rem;
  background: linear-gradient(135deg, var(--color-primary-tint), #fff);
  box-shadow: inset 0 0 0 1px rgba(163, 22, 33, 0.14);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.feature__icon .icon {
  width: 1.8rem;
  height: 1.8rem;
}

.feature:hover .feature__icon {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  transform: scale(1.06) rotate(-4deg);
  box-shadow: 0 10px 22px rgba(163, 22, 33, 0.3);
}

/* --- Aktualności: karty z obrazem na całą szerokość --- */
.card--flat {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0 0 1.1rem;
  gap: 0.55rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card--flat:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card--flat > img,
.card--flat > a > img {
  border-radius: 0;
  margin-bottom: 0.4rem;
}

.card--flat h3,
.card--flat p,
.card--flat time,
.card--flat .card__tags {
  padding-inline: 1.1rem;
}

.card--flat h3 {
  font-size: 1.12rem;
  line-height: 1.3;
}

.card--flat h3 a {
  transition: color 0.2s var(--ease);
}

.card--flat:hover h3 a {
  color: var(--color-primary);
}

/* --- Przydatne linki: kafelki z gradientem --- */
.tile {
  background: linear-gradient(145deg, var(--color-primary-light), var(--color-primary-dark));
  box-shadow: 0 6px 16px rgba(163, 22, 33, 0.18);
  padding: 1.6rem 1rem;
}

.tile:nth-child(3n+2) {
  background: linear-gradient(145deg, #d3a22a, var(--color-accent-dark));
  box-shadow: 0 6px 16px rgba(138, 101, 8, 0.2);
}

.tile .icon {
  box-sizing: content-box;
  padding: 0.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

.tile:hover .icon,
.tile:focus-visible .icon {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.24);
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 18px 30px rgba(163, 22, 33, 0.3);
}

.tile:nth-child(3n+2):hover,
.tile:nth-child(3n+2):focus-visible {
  box-shadow: 0 18px 30px rgba(138, 101, 8, 0.3);
}

/* --- Przyciski --- */
.btn--primary {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

/* --- Stopka --- */
.site-footer {
  position: relative;
  border-top: 0;
  background: linear-gradient(180deg, #faf8f5 0%, #f2ede6 100%);
  margin-top: 0;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

/* --- Animacje przy przewijaniu (dodawane przez JS, tylko gdy dostępny IntersectionObserver) --- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-carousel__slide.is-active::after {
    display: none;
  }
}

@media (max-width: 782px) {
  .hero-carousel {
    border-radius: 0 0 20px 20px;
  }

  .section {
    padding-block: 2.5rem;
  }
}

/* --- Galeria na stronie głównej: karty spójne z resztą kompozycji --- */
.gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.gallery-tile {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.gallery-tile:hover,
.gallery-tile:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.gallery-tile__overlay {
  padding: 2.5rem 1.1rem 1rem;
  background: linear-gradient(to top, rgba(20, 6, 8, 0.86) 0%, rgba(20, 6, 8, 0.35) 60%, rgba(20, 6, 8, 0) 100%);
}

.gallery-tile__title {
  font-size: 1.05rem;
}

.gallery-tile__title::after {
  content: "→";
  display: inline-block;
  margin-left: 0.45rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.gallery-tile:hover .gallery-tile__title::after,
.gallery-tile:focus-visible .gallery-tile__title::after {
  opacity: 1;
  transform: none;
}

.gallery-tile__badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
}

.gallery-tile__badge .icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--color-primary);
}

/* --- Nagłówek: większe logo, przyklejony tylko pasek menu, kompaktowy po przewinięciu --- */
html {
  scroll-padding-top: 110px;
}

.top-bar {
  position: static;
}

.site-header__row {
  padding-block: 0.95rem;
  transition: padding 0.3s var(--ease);
}

.site-branding img,
.site-branding .custom-logo {
  height: 68px;
  max-width: 68px;
  transition: height 0.3s var(--ease), max-width 0.3s var(--ease);
}

.site-branding .site-title {
  font-size: 1.25rem;
  transition: font-size 0.3s var(--ease);
}

.site-header-sticky.is-compact .site-header__row {
  padding-block: 0.4rem;
}

.site-header-sticky.is-compact .site-branding img,
.site-header-sticky.is-compact .site-branding .custom-logo {
  height: 42px;
  max-width: 42px;
}

.site-header-sticky.is-compact .site-branding .site-title {
  font-size: 1.05rem;
}

.site-header-sticky.is-compact {
  box-shadow: 0 1px 0 rgba(20, 20, 40, 0.06), 0 10px 28px rgba(20, 20, 40, 0.10);
}

@media (max-width: 782px) {
  .site-branding img,
  .site-branding .custom-logo {
    height: 54px;
    max-width: 54px;
  }
}

/* Menu nieco gęstsze, żeby przy większym logo mieściło się w jednej linii */
.main-navigation a {
  padding: 0.6rem 0.55rem;
  font-size: 0.88rem;
}

.site-header__row {
  gap: 0.75rem;
}

/* Audyt: minimalne cele dotykowe (WCAG 2.2 2.5.8) i czytelność drobnego tekstu */
.footer-bottom__links a {
  display: inline-block;
  padding-block: 0.3rem;
}

.hero-carousel__eyebrow {
  font-size: 0.78rem;
}
