/* =============================================================
   Motyw sezonowy: Narodowe Święto Niepodległości (GOK „Perła”, paczka H 6.11.2026).
   Ładowany przez header.php TYLKO wtedy, gdy motyw jest aktywny (assets/includes/motyw.php).
   Strona główna: pierwszy slajd banera o Święcie (flaga – wideo bez dźwięku, Ojcowie Niepodległości),
   po 10 s przesuwa się na zwykły baner GOK. „Ogranicz ruch” i przycisk pauzy zatrzymują wideo; „Wysoki kontrast” = bez dekoracji.
   ============================================================= */

/* 1. Biało-czerwona wstęga pod menu i nad stopką – na każdej podstronie. */
.site-header header { position: relative; }
.site-header header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px;
  background: linear-gradient(#fff 0 50%, #DC143C 50% 100%); box-shadow: 0 2px 6px rgba(0,0,0,.15); pointer-events: none;
}
.site-header.menu-open header::after { display: none; }
footer { position: relative; }
footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(#fff 0 50%, #DC143C 50% 100%); }

/* 2. Slajd o Święcie nad zwykłym banerem; po 10 s wyjeżdża w lewo. */
.home { overflow: hidden; }
.home > .wrapper, .home > .hero-skroty { position: relative; z-index: 2; }
.motyw-slajd {
  position: absolute; top: 0; left: 0; right: 0; bottom: var(--motyw-skroty, 0px); z-index: 3;
  overflow: hidden; background: #2a0a12 url("/assets/images/motyw/niepodleglosc/flaga.webp") center / cover no-repeat;
  display: flex; align-items: center;
  transition: transform .9s cubic-bezier(.77, 0, .18, 1), visibility 0s linear 0s;
}
.motyw-slider--gok .motyw-slajd { transform: translateX(-100%); visibility: hidden; transition: transform .9s cubic-bezier(.77, 0, .18, 1), visibility 0s linear .9s; }
.motyw-slider .hero-c2 { transition: opacity .7s ease .35s, transform .9s cubic-bezier(.22, .61, .36, 1) .2s; }
.motyw-slider--swieto .hero-c2 { opacity: 0; transform: translateX(60px); }
.motyw-tlo { position: absolute; inset: 0; }
.motyw-wideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.86) saturate(1.05); }
.motyw-tlo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12,8,20,.86) 0%, rgba(12,8,20,.7) 30%, rgba(12,8,20,.2) 58%, rgba(12,8,20,.05) 80%),
    linear-gradient(180deg, rgba(12,8,20,.25) 0%, rgba(12,8,20,0) 30%, rgba(12,8,20,.45) 100%);
}

/* 3. Ojcowie Niepodległości – duży biały rysunek z prawej, dół schowany za krawędzią. */
.motyw-ojcowie {
  position: absolute; right: -2vw; bottom: -4%; width: clamp(640px, 58vw, 1100px); opacity: .9; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 50%, rgba(0,0,0,.4) 72%, transparent 90%);
          mask-image: linear-gradient(180deg, #000 0, #000 50%, rgba(0,0,0,.4) 72%, transparent 90%);
}
.motyw-ojcowie { animation: motyw-pojaw 2.4s ease-out 1.2s both; }
@keyframes motyw-pojaw { from { opacity: 0; } to { opacity: var(--motyw-ojc, .9); } }
.motyw-ojcowie img { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 1px rgba(0,0,0,.45)) drop-shadow(0 18px 36px rgba(0,0,0,.4)); }

/* 4. Tekst slajdu. */
.motyw-slajd__tresc {
  position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) max(1.25rem, env(safe-area-inset-left, 0px)) 4.5rem;
  color: #fff; text-align: left;
}
.motyw-slajd__znak { display: block; width: 56px; height: 8px; margin-bottom: 26px; background: linear-gradient(#fff 0 50%, #DC143C 50% 100%); box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.motyw-slajd__data { margin: 0; font-size: clamp(3rem, 6.4vw, 5.75rem); font-weight: 700; line-height: .95; letter-spacing: -.02em; text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.motyw-slajd__tytul { margin: 14px 0 0; max-width: 14em; font-size: clamp(1.375rem, 2.4vw, 2.125rem); font-weight: 600; line-height: 1.2; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.4); }
.motyw-slajd__opis { margin: 18px 0 0; font-size: clamp(1rem, 1.2vw, 1.125rem); color: rgba(255,255,255,.82); }
.home .motyw-zyczenia { display: none; }

/* 5. Kreski przełączające slajdy. */
.motyw-kreski {
  position: absolute; z-index: 4; bottom: calc(var(--motyw-skroty, 0px) + 22px);
  right: max(1.25rem, calc((100% - 1200px) / 2 + 1.25rem)); display: flex; gap: 8px;
}
.motyw-kreska { width: 44px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.motyw-kreska span { position: relative; display: block; width: 100%; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.motyw-kreska span::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.motyw-kreska[aria-current="true"] span::after { transform: scaleX(1); }
.motyw-slider--swieto .motyw-kreska:first-child span::after { animation: motyw-postep 10s linear forwards; }
.motyw-kreska:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@keyframes motyw-postep { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 6. Pauza (zatrzymuje flagę). */
.motyw-pauza {
  position: absolute; right: max(12px, env(safe-area-inset-right, 0px)); top: calc(var(--header-h) + 14px); z-index: 4;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: rgba(2,9,43,.55); color: #fff; font-size: .9rem; cursor: pointer;
}
.motyw-pauza:hover { background: rgba(2,9,43,.8); }
.motyw-pauza:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.motyw-slider--gok .motyw-pauza { display: none; }

@media (max-width: 1099px) {
  .motyw-ojcowie { right: auto; left: 50%; bottom: auto; top: calc(var(--header-h) - 10px); transform: translateX(-50%); width: min(900px, 130vw); opacity: .8; --motyw-ojc: .8;
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 30%, transparent 62%); mask-image: linear-gradient(180deg, #000 0, #000 30%, transparent 62%); }
  .motyw-slajd { align-items: flex-end; }
  .motyw-slajd__tresc { padding-bottom: 4.75rem; }
  .motyw-tlo::after { background: linear-gradient(180deg, rgba(12,8,20,.15) 0%, rgba(12,8,20,.35) 40%, rgba(12,8,20,.85) 75%, rgba(12,8,20,.92) 100%); }
}
@media (max-width: 575px) {
  .motyw-slajd__znak { margin-bottom: 18px; }
  .motyw-kreski { bottom: calc(var(--motyw-skroty, 0px) + 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .motyw-pauza { display: none; }
  .motyw-slajd, .motyw-slider .hero-c2, .motyw-slider--gok .motyw-slajd { transition: none; }
  .motyw-ojcowie { animation: none; }
  .motyw-slider--swieto .motyw-kreska:first-child span::after { animation: none; transform: scaleX(1); }
}
html.high-contrast .site-header header::after, html.high-contrast footer::before,
html.high-contrast .motyw-pauza, html.high-contrast .motyw-slajd, html.high-contrast .motyw-kreski { display: none; }
html.high-contrast .motyw-slider--swieto .hero-c2 { opacity: 1; transform: none; }
@media print { .site-header header::after, footer::before, .motyw-slajd, .motyw-pauza, .motyw-kreski { display: none !important; } .motyw-slider .hero-c2 { opacity: 1 !important; transform: none !important; } }

/* === Slajd 11 listopada na telefonie (paczka M, 6.11.2026) === */
/* Telefon: rysunek Ojców cały pod menu, tekst zaraz pod nim, całość wyśrodkowana; pauza na dole z lewej, w jednym rzędzie z kreskami. Komputer i tablet bez zmian. */
@media (max-width: 767.98px) {
  .motyw-slajd {
    flex-direction: column; justify-content: center; align-items: center;
    padding: calc(var(--header-h) + 12px) 0 64px;
  }
  .motyw-tlo::after {
    background:
      radial-gradient(120% 60% at 50% 38%, rgba(12,8,20,.35) 0%, rgba(12,8,20,0) 70%),
      linear-gradient(180deg, rgba(12,8,20,.62) 0%, rgba(12,8,20,.5) 42%, rgba(12,8,20,.72) 72%, rgba(12,8,20,.9) 100%);
  }
  .motyw-ojcowie {
    position: relative; left: auto; right: auto; top: auto; bottom: auto; transform: none;
    flex: none; width: min(108vw, 540px); margin: 0 auto -6px; opacity: .95; --motyw-ojc: .95;
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 62%, rgba(0,0,0,.35) 84%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 0, #000 62%, rgba(0,0,0,.35) 84%, transparent 100%);
  }
  .motyw-slajd__tresc { flex: none; padding: 0 1.25rem; text-align: center; }
  .motyw-slajd__znak { margin: 0 auto 16px; width: 48px; height: 7px; }
  .motyw-slajd__data { font-size: clamp(2.75rem, 13vw, 3.5rem); line-height: 1; }
  .motyw-slajd__tytul { margin: 10px auto 0; max-width: 16em; font-size: clamp(1.125rem, 5.2vw, 1.375rem); line-height: 1.3; font-weight: 500; color: rgba(255,255,255,.92); }
  .motyw-pauza { top: auto; right: auto; left: 1.25rem; bottom: calc(var(--motyw-skroty, 0px) + 12px); width: 40px; height: 40px; font-size: .8rem; }
}
@media (max-width: 767.98px) and (max-height: 640px) {
  .motyw-ojcowie { width: min(92vw, 460px); }
}
