/* Motywy świąteczne — <html> dostaje klasę .holiday oraz nazwę motywu:
   .xmas (Boże Narodzenie i Nowy Rok), .easter (Wielkanoc),
   .flag (Majówka / 3 Maja, 11 Listopada), .zaduszki (Wszystkich Świętych).
   Poza świętami strona wygląda normalnie. */

.h-only,
.only-xmas, .only-easter, .only-flag, .only-zaduszki { display: none; }
html.holiday .h-only { display: revert; }
html.holiday .no-holiday { display: none; }
html.xmas .only-xmas,
html.easter .only-easter,
html.flag .only-flag,
html.zaduszki .only-zaduszki { display: revert; }

/* ---------- Kolory: jasny ---------- */
html.xmas {
  --bg: #f7f5f2;
  --blue: #b81d2c;
  --blue-soft: #fbe3e5;
  --accent2: #17734a;
  --accent2-soft: #dff1e7;
  --accent-shadow: #7a0f19;
  --line: #e6dcd6;
}
html.easter {
  --bg: #fbf9ef;
  --blue: #3f8f3a;
  --blue-soft: #e3f2dc;
  --accent2: #9a6700;
  --accent2-soft: #fdf1c9;
  --accent-shadow: #24591f;
  --line: #e7e3cc;
}
html.flag {
  --bg: #fbf7f7;
  --blue: #d4213d;
  --blue-soft: #fbe1e5;
  --accent2: #9b1328;
  --accent2-soft: #f6e7e9;
  --accent-shadow: #8a0f22;
  --line: #efdcdf;
}
html.zaduszki {
  --bg: #f6f5f3;
  --blue: #4a4560;
  --blue-soft: #e7e5ee;
  --accent2: #a85c0b;
  --accent2-soft: #f7ebdc;
  --accent-shadow: #2a2638;
  --line: #e2e0e6;
}

/* ---------- Kolory: ciemny ---------- */
@media (prefers-color-scheme: dark) {
  html.xmas {
    --bg: #0e1311; --ink: #eef0ec; --muted: #a6b1aa; --card: #151c19; --line: #24302a;
    --blue: #e5505d; --blue-soft: #3a1519; --on-accent: #ffffff; --accent-shadow: #7a0f19;
    --accent2: #4cc38a; --accent2-soft: #14301f;
  }
  html.easter {
    --bg: #10130c; --ink: #f0f2e8; --muted: #abb29c; --card: #171b12; --line: #283020;
    --blue: #7cc96f; --blue-soft: #1d3318; --on-accent: #0f1a0c; --accent-shadow: #2e6b28;
    --accent2: #f2c94c; --accent2-soft: #3a3112;
  }
  html.flag {
    --bg: #120c0d; --ink: #f4ecec; --muted: #b8a6a8; --card: #1b1214; --line: #332225;
    --blue: #ff5a70; --blue-soft: #3a1219; --on-accent: #1a0508; --accent-shadow: #8a0f22;
    --accent2: #ff8a99; --accent2-soft: #2c1519;
  }
  html.zaduszki {
    --bg: #0d0d10; --ink: #ecebf0; --muted: #a5a3af; --card: #15151a; --line: #26252e;
    --blue: #b9b1dd; --blue-soft: #24223a; --on-accent: #121019; --accent-shadow: #4a4560;
    --accent2: #f2a03d; --accent2-soft: #33240f;
  }
}

html.holiday .grid-bg { opacity: 0.35; }

/* ---------- Akcenty wspólne dla wszystkich świąt ---------- */
html.holiday .icon { background: var(--accent2-soft); }
html.holiday .card:nth-child(even) .icon { background: var(--blue-soft); }
html.holiday .card:hover { border-color: var(--accent2); }
html.holiday .num { color: var(--accent2); }
html.holiday .tag { background: var(--accent2-soft); color: var(--accent2); }
html.holiday .checklist li::before { color: var(--accent2); }
html.xmas .checklist li::before { content: "❄"; }
html.easter .checklist li::before { content: "✿"; }
html.flag .checklist li::before { content: "★"; }
html.zaduszki .checklist li::before { content: "✦"; }
html.holiday .footer .h-only { color: var(--blue); font-weight: 600; }

/* ---------- Pasek z życzeniami ---------- */
.h-banner {
  position: relative;
  z-index: 11;
  text-align: center;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.08) 0 12px, transparent 12px 24px),
    var(--banner, var(--accent2));
}
html.xmas { --banner: #17734a; }
html.easter { --banner: #3f8f3a; }
html.flag { --banner: #c8102e; }
html.flag .h-banner { box-shadow: inset 0 4px 0 #fff; padding-top: calc(0.55rem + 4px); }
html.zaduszki { --banner: #2a2638; }

/* ---------- Girlanda pod nawigacją ---------- */
html.holiday .nav { border-bottom: 0; }
html.holiday .h-lights { display: flex; }
html.zaduszki .h-lights { display: none; }
html.zaduszki .nav { border-bottom: 1px solid var(--line); }
.h-lights {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 18px;
  justify-content: space-around;
  pointer-events: none;
  border-top: 2px solid #3b4a3f;
  overflow: hidden;
}

/* Boże Narodzenie: migające lampki */
html.xmas .h-lights i {
  width: 9px;
  height: 14px;
  margin-top: 1px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c, #e23b3b);
  box-shadow: 0 2px 10px 1px var(--c, #e23b3b);
  animation: h-blink 1.6s ease-in-out infinite;
}
html.xmas .h-lights i:nth-child(4n+1) { --c: #e23b3b; animation-delay: 0s; }
html.xmas .h-lights i:nth-child(4n+2) { --c: #f1c232; animation-delay: 0.4s; }
html.xmas .h-lights i:nth-child(4n+3) { --c: #2fbf71; animation-delay: 0.8s; }
html.xmas .h-lights i:nth-child(4n+4) { --c: #3d8bfd; animation-delay: 1.2s; }

@keyframes h-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; box-shadow: none; }
}

/* Wielkanoc: kolorowe pisanki */
html.easter .h-lights { border-top-color: #b99a5b; }
html.easter .h-lights i {
  width: 10px;
  height: 13px;
  margin-top: 1px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background:
    linear-gradient(transparent 40%, rgba(255,255,255,0.7) 40% 55%, transparent 55%),
    var(--c);
  transform-origin: top center;
  animation: h-sway 3s ease-in-out infinite;
}
html.easter .h-lights i:nth-child(4n+1) { --c: #f7a8c4; }
html.easter .h-lights i:nth-child(4n+2) { --c: #ffd35c; animation-delay: 0.5s; }
html.easter .h-lights i:nth-child(4n+3) { --c: #8fd18a; animation-delay: 1s; }
html.easter .h-lights i:nth-child(4n+4) { --c: #8fc3f7; animation-delay: 1.5s; }

@keyframes h-sway {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

/* Święta narodowe: biało-czerwone chorągiewki */
html.flag .h-lights { border-top-color: #8a8a8a; bottom: -16px; height: 18px; }
html.flag .h-lights i {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 14px solid var(--c);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
}
html.flag .h-lights i:nth-child(odd) { --c: #ffffff; }
html.flag .h-lights i:nth-child(even) { --c: #dc143c; }

/* ---------- Dekoracje na ramce zdjęcia ---------- */
html.holiday .window { overflow: visible; position: relative; }
html.holiday .window img { border-radius: 0 0 calc(var(--radius) - 3px) calc(var(--radius) - 3px); }
.h-deco {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(3px 4px 0 rgba(0,0,0,0.12));
}
.h-deco.only-xmas { top: -62px; right: -40px; width: 120px; transform: rotate(22deg); }
.h-deco.only-easter { top: -82px; left: 50%; width: 110px; transform: translateX(-50%) rotate(-4deg); z-index: 0; }
.h-deco.only-flag { top: -70px; right: -34px; width: 100px; transform: rotate(8deg); }
.h-deco.only-zaduszki { bottom: -26px; right: -30px; width: 70px; filter: drop-shadow(0 0 14px rgba(255, 170, 60, 0.45)); }

.h-flame { transform-origin: 35px 30px; animation: h-flicker 1.4s ease-in-out infinite alternate; }
@keyframes h-flicker {
  0% { transform: scale(1, 1) rotate(-2deg); opacity: 1; }
  100% { transform: scale(0.92, 1.08) rotate(2deg); opacity: 0.85; }
}
.h-flag-cloth { transform-origin: 18px 14px; animation: h-wave 2.4s ease-in-out infinite; }
@keyframes h-wave {
  0%, 100% { transform: skewY(0deg); }
  50% { transform: skewY(-5deg); }
}

/* ---------- Opady (śnieg, płatki, konfetti) ---------- */
.h-fx {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

@media (max-width: 820px) {
  .h-deco.only-xmas { width: 92px; top: -48px; right: -26px; }
  .h-deco.only-easter { width: 90px; top: -68px; }
  .h-deco.only-flag { width: 80px; top: -56px; right: -22px; }
  .h-deco.only-zaduszki { width: 56px; right: -18px; }
  .h-banner { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .h-lights i, .h-flame, .h-flag-cloth { animation: none !important; }
}
