/* =========================================================
   OSP KSRG Skrzyszów — motyw „Żar” (v2)
   Czysty CSS, bez zależności (opcjonalnie Google Fonts)
   ========================================================= */
:root {
  --bg: #0d0d0f;
  --bg-2: #141417;
  --bg-3: #1b1b1f;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f2ede6;
  --muted: #a39d95;
  --dim: #6f6a64;
  --red: #e12a1f;
  --red-2: #ff4a2b;
  --red-deep: #7c120c;
  --amber: #ffb02e;
  --amber-2: #ffd27a;
  --fire: linear-gradient(100deg, #ff3b1f 0%, #ff7a1a 55%, #ffb02e 100%);
  --radius: 18px;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before { /* delikatne ziarno + poświata */
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(225, 42, 31, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 176, 46, 0.06), transparent 60%),
    var(--bg);
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--amber); color: #111; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; }
.show-sm { display: none; }

/* ---------- Pasek alarmowy ---------- */
.alertbar {
  background: #070708;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.alertbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.alertbar b { color: var(--text); font-weight: 600; }
.alertbar a:hover b { color: var(--amber); }
.live { display: inline-flex; align-items: center; gap: 8px; }
.live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red-2); box-shadow: 0 0 0 0 rgba(255, 74, 43, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 74, 43, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(255, 74, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 74, 43, 0); }
}
.alertbar .nums { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 13, 15, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(10, 10, 12, 0.94); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.site-header::after { /* płonąca linia */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--fire); opacity: .0; transition: opacity .3s;
}
.site-header.scrolled::after { opacity: .9; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand .emblem { width: 46px; height: 46px; flex-shrink: 0; filter: drop-shadow(0 0 14px rgba(255, 90, 31, .35)); }
.brand strong {
  display: block; font-family: var(--display); font-weight: 800; font-size: 1.35rem;
  letter-spacing: 0.02em; text-transform: uppercase; line-height: 1;
}
.brand strong em { font-style: normal; color: var(--red-2); }
.brand span { display: block; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 4px; }

.menu { display: flex; align-items: center; gap: 2px; }
.menu a {
  position: relative;
  padding: 8px 10px;
  font-size: 0.86rem; font-weight: 500;
  color: #d7d1c9;
  border-radius: 8px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.menu a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px;
  background: var(--fire); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.menu a:hover { color: #fff; background: rgba(255,255,255,.04); }
.menu a:hover::after, .menu a.active::after { transform: scaleX(1); }
.menu a.active { color: #fff; }
.menu a.cta {
  margin-left: 8px; background: var(--red); color: #fff; font-weight: 700; padding: 9px 16px;
  box-shadow: 0 6px 20px rgba(225, 42, 31, .35);
}
.menu a.cta::after { display: none; }
.menu a.cta:hover, .menu a.cta.active { background: var(--red-2); }

.burger {
  display: none;
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line-2);
  cursor: pointer; position: relative;
}
.burger span, .burger span::before, .burger span::after {
  position: absolute; left: 50%; width: 20px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .3s, background .3s; content: "";
}
.burger span { top: 50%; transform: translate(-50%, -50%); }
.burger span::before { left: 0; transform: translateY(-7px); }
.burger span::after { left: 0; transform: translateY(7px); }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: rotate(45deg); background: var(--amber); }
.burger[aria-expanded="true"] span::after { transform: rotate(-45deg); background: var(--amber); }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 12px;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-fire { background: var(--fire); color: #1a0a05; box-shadow: 0 10px 30px rgba(255, 90, 31, .35); }
.btn-fire:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(255, 90, 31, .5); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber-2); transform: translateY(-2px); }

/* ---------- Typografia ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--amber); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.74rem; font-weight: 700;
}
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--fire); }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; line-height: 0.98; letter-spacing: 0.005em; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; margin-top: 12px; }
h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.01em; }
.lead { color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.fire-text {
  background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(88vh, 860px);
  display: flex; align-items: center;
  padding: 90px 0 120px;
  border-bottom: 1px solid var(--line);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg::before { /* żar od dołu */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -35%; height: 80%;
  background:
    radial-gradient(50% 60% at 70% 100%, rgba(255, 90, 31, .55), transparent 70%),
    radial-gradient(40% 50% at 30% 100%, rgba(225, 42, 31, .45), transparent 70%),
    radial-gradient(30% 40% at 85% 90%, rgba(255, 176, 46, .35), transparent 70%);
  filter: blur(10px);
  animation: breathe 6s ease-in-out infinite alternate;
}
.hero-bg::after { /* siatka */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}
@keyframes breathe { from { opacity: .75; transform: scale(1); } to { opacity: 1; transform: scale(1.06); } }

.hero-year {
  position: absolute; right: -2vw; top: 50%; transform: translateY(-46%);
  font-family: var(--display); font-weight: 800; line-height: .8;
  font-size: clamp(12rem, 30vw, 30rem); letter-spacing: -0.02em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 140, 60, .22);
  z-index: -1; user-select: none; pointer-events: none;
}
.embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ember {
  position: absolute; bottom: -20px; border-radius: 50%;
  background: radial-gradient(circle, #ffe2a8 0%, #ffb02e 35%, rgba(255, 74, 43, 0) 70%);
  animation: rise linear infinite;
  opacity: 0;
}
@keyframes rise {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(var(--dx, 40px), -95vh) scale(.3); opacity: 0; }
}

.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.hero h1 {
  font-size: clamp(3.2rem, 8.2vw, 7.4rem);
  font-weight: 800; line-height: .9;
  margin: 18px 0 24px;
  text-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.hero h1 .outline { color: transparent; -webkit-text-stroke: 2px var(--text); }
.hero p.lead { color: #cfc8bf; font-size: 1.12rem; }
.actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }

.hero-emblem { position: relative; justify-self: center; width: min(360px, 80%); aspect-ratio: 1; }
.hero-emblem svg { width: 100%; height: 100%; filter: drop-shadow(0 20px 60px rgba(255, 74, 43, .35)); }
.hero-emblem .ring { animation: spin 40s linear infinite; transform-origin: 50% 50%; }
@keyframes spin { to { transform: rotate(360deg); } }


/* pasek z taśmą ostrzegawczą */
.hazard {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 16px, #111 16px 32px);
  opacity: .9;
}

/* ---------- Liczby / fakty ---------- */
.facts { position: relative; z-index: 2; margin-top: -64px; }
.facts-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(20, 20, 23, .85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.5);
}
.fact { padding: 28px 26px; border-right: 1px solid var(--line); position: relative; }
.fact:last-child { border-right: 0; }
.fact b {
  display: block; font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1;
  background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fact span { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* ---------- Sekcje ---------- */
section { padding: 96px 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head .lead { max-width: 46ch; }

/* ---------- Karty ---------- */
.grid-3, .grid-2 { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .3s ease, border-color .3s, box-shadow .3s;
}
.card::before { /* górna płonąca krawędź */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--fire); transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.card::after { /* poświata pod kursorem */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 106, 31, .12), transparent 45%);
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 120, 50, .35); box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.card:hover::before { transform: scaleX(1); }
.card:hover::after { opacity: 1; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); }
.card p strong { color: var(--text); }

.module { display: flex; flex-direction: column; min-height: 220px; }
.module .num {
  font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .12em;
  color: var(--dim); margin-bottom: auto;
}
.module .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(225, 42, 31, .12); border: 1px solid rgba(225, 42, 31, .3); color: var(--red-2);
  position: absolute; top: 24px; right: 24px; transition: background .3s, color .3s;
}
.module .ico svg { width: 22px; height: 22px; }
.module:hover .ico { background: var(--red); color: #fff; }
.module h3 { margin-top: 40px; font-size: 1.9rem; }
.module .go {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber);
}
.module .go::after { content: "→"; transition: transform .25s; }
.module:hover .go::after { transform: translateX(6px); }

.meta { color: var(--amber); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }

.placeholder {
  position: relative;
  min-height: 190px; border-radius: 12px; margin: -6px -6px 20px;
  display: grid; place-items: center; text-align: center;
  color: var(--dim); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(255, 90, 31, .22), transparent 60%),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.025) 0 12px, transparent 12px 24px),
    #111114;
  border: 1px dashed var(--line-2);
  overflow: hidden;
}
.placeholder::before {
  content: ""; display: block; width: 40px; height: 40px; margin: 0 auto 10px;
  background: currentColor; opacity: .7;
  -webkit-mask: var(--ph-icon) center / contain no-repeat; mask: var(--ph-icon) center / contain no-repeat;
}
.placeholder > span { display: block; }
.placeholder {
  --ph-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 16-5-5-8 8'/%3E%3C/svg%3E");
}
.soon {
  display: inline-block; margin-top: 12px; padding: 4px 10px; border-radius: 999px;
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber-2); background: rgba(255, 176, 46, .08); border: 1px solid rgba(255, 176, 46, .25);
}

/* ---------- Pas CTA / alarm ---------- */
.emergency {
  position: relative; overflow: hidden;
  border-radius: 24px; padding: 56px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(255, 176, 46, .35), transparent 60%),
    linear-gradient(120deg, #8e140d 0%, #d0231a 55%, #f0461f 100%);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  box-shadow: 0 30px 80px rgba(225, 42, 31, .25);
}
.emergency::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(-45deg, rgba(0,0,0,.06) 0 2px, transparent 2px 14px);
}
.emergency .kicker { color: #ffe1b0; }
.emergency .kicker::before { background: #ffe1b0; }
.emergency h2 { color: #fff; }
.emergency p { color: rgba(255,255,255,.85); margin-top: 14px; max-width: 46ch; }
.dial { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 1; }
.dial a {
  background: rgba(10, 4, 3, .35); border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px; padding: 22px 18px; transition: background .2s, transform .2s;
}
.dial a:hover { background: rgba(10, 4, 3, .55); transform: translateY(-3px); }
.dial b { display: block; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: #fff; white-space: nowrap; }
.dial a.wide b { font-size: 1.7rem; padding-top: 8px; }
.dial span { display: block; font-size: .8rem; color: rgba(255,255,255,.8); margin-top: 8px; }

/* ---------- Podstrony: nagłówek ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%; z-index: -1;
  background:
    radial-gradient(40% 50% at 80% 100%, rgba(255, 90, 31, .35), transparent 70%),
    radial-gradient(35% 45% at 20% 100%, rgba(225, 42, 31, .25), transparent 70%);
  animation: breathe 6s ease-in-out infinite alternate;
}
.page-hero .ghost {
  position: absolute; right: -1vw; bottom: -0.18em; z-index: -1;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(6rem, 16vw, 15rem); line-height: 1; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 140, 60, .18);
  pointer-events: none; user-select: none;
}
.page-hero h1 { font-size: clamp(3rem, 7vw, 6rem); font-weight: 800; margin: 16px 0 18px; max-width: 16ch; }
.crumbs { font-size: .8rem; color: var(--dim); margin-bottom: 26px; letter-spacing: .04em; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--amber); }
.crumbs span { margin: 0 8px; }

.subhead { display: flex; align-items: baseline; gap: 16px; margin: 0 0 22px; }
.subhead h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0; }
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.subhead + .grid-3, .subhead + .grid-2 { margin-bottom: 64px; }

/* ---------- Historia: wstęp ---------- */
.hist-intro { padding-bottom: 24px; }
.intro-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.intro-copy h2 { margin-bottom: 22px; }

/* Zdjęcie archiwalne we wstępie — rama „vintage” */
.intro-photo { margin: 0; position: relative; }
.intro-photo::before { /* poświata żaru za ramą */
  content: ""; position: absolute; inset: 8% -4% -6% 6%; z-index: -1; border-radius: 20px;
  background: radial-gradient(60% 60% at 60% 70%, rgba(255, 106, 31, .35), transparent 70%);
  filter: blur(24px);
}
.intro-photo a {
  position: relative; display: block; padding: 12px; border-radius: 6px;
  background: linear-gradient(145deg, #3a2a1c, #1d1510 55%, #2b1d12);
  box-shadow: 0 0 0 1px rgba(255, 176, 46, .35), 0 30px 70px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.6);
  transform: rotate(-1.2deg);
  transition: transform .4s ease, box-shadow .3s;
}
.intro-photo a::before { /* wewnętrzny passe-partout */
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(255, 210, 122, .28); border-radius: 3px; pointer-events: none;
}
.intro-photo a::after { /* winieta + ziarno */
  content: ""; position: absolute; inset: 12px; pointer-events: none; border-radius: 2px;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(30, 14, 4, .55) 100%),
    repeating-radial-gradient(circle at 30% 40%, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
}
.intro-photo img { width: 100%; height: auto; border-radius: 2px; filter: sepia(.25) contrast(1.05); }
.intro-photo a:hover, .intro-photo a:focus-visible { transform: rotate(0deg) translateY(-3px); box-shadow: 0 0 0 1px var(--amber), 0 34px 80px rgba(0,0,0,.65), 0 0 40px rgba(255, 106, 31, .25); }
.intro-photo-badge {
  position: absolute; left: 26px; top: 26px; z-index: 1;
  padding: 5px 10px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #2a1608; background: linear-gradient(100deg, #ffd27a, #ffb02e);
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.intro-photo figcaption { margin-top: 18px; font-size: .82rem; color: var(--muted); line-height: 1.5; padding-left: 14px; border-left: 2px solid var(--amber); }
.intro-text { font-size: 1.3rem; line-height: 1.55; color: var(--text); margin-bottom: 16px; }

/* ---------- Kategorie (tagi) ---------- */
.tag {
  --c: var(--amber);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  white-space: nowrap;
}
.tag svg { width: 14px; height: 14px; }
.tag-unit  { --c: #ffb02e; }
.tag-gear  { --c: #ff8a3d; }
.tag-fire  { --c: #ff4a2b; }
.tag-flood { --c: #6fb6ff; }
.tag-event { --c: #d9cfc2; }
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .tag { background: rgba(255,255,255,.04); border-color: currentColor; }
}
.legend { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Oś czasu (Historia) ---------- */
.timeline { position: relative; display: grid; gap: 18px; padding-left: 46px; }
.timeline::before {
  content: ""; position: absolute; left: 14px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--amber), var(--red-2) 50%, var(--amber) 90%, rgba(255,176,46,0));
}
.tl-year {
  position: relative;
  display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color .3s, box-shadow .3s;
}
.tl-year:hover { border-color: rgba(255, 120, 50, .35); box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.tl-dot {
  position: absolute; left: -40px; top: 34px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--red-2); box-shadow: 0 0 18px rgba(255, 74, 43, .6);
}
.tl-when {
  font-family: var(--display); font-weight: 800; font-size: 2.8rem; line-height: 1;
  background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent;
  position: sticky; top: calc(var(--header-h) + 20px);
}
.tl-items { display: grid; gap: 18px; }
.tl-item + .tl-item { padding-top: 18px; border-top: 1px dashed var(--line-2); }
.tl-item h3 { font-size: 1.5rem; margin: 10px 0 6px; }
.tl-item p { color: var(--muted); max-width: 70ch; }

/* ---------- Zdjęcia na osi czasu ---------- */
.tl-item.has-photo { display: grid; grid-template-columns: 1fr 240px; gap: 24px; align-items: start; }
.tl-photo { margin: 0; }
.tl-photo a {
  position: relative; display: block; overflow: hidden; border-radius: 14px;
  aspect-ratio: 3 / 2; background: #111114;
  border: 1px solid rgba(255, 138, 61, .25);
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.tl-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s; filter: saturate(.92); }
.tl-photo a::after { /* żar od dołu + ikona lupy */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m20 20-4.5-4.5M11 8v6M8 11h6'/%3E%3C/svg%3E") right 10px bottom 10px / 22px no-repeat,
    linear-gradient(180deg, transparent 55%, rgba(124, 18, 12, .55));
  opacity: .85; transition: opacity .3s;
}
.tl-photo a:hover, .tl-photo a:focus-visible { border-color: var(--amber); box-shadow: 0 16px 36px rgba(255, 90, 31, .28); transform: translateY(-2px); }
.tl-photo a:hover img { transform: scale(1.06); filter: saturate(1.05); }
.tl-photo figcaption { margin-top: 8px; font-size: .78rem; color: var(--dim); line-height: 1.4; }

/* Wycinek prasowy (portret), lista zarządu, źródło, link */
.tl-photo.portrait a { aspect-ratio: 3 / 4; }
.tl-photo.portrait img { object-position: top; filter: sepia(.1); }
.tl-sub { margin-top: 14px; font-size: .74rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber) !important; }
.tl-dl {
  margin: 10px 0 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; max-width: 560px;
}
.tl-dl div { display: flex; flex-direction: column; padding: 8px 12px; border-left: 2px solid rgba(255, 176, 46, .45); background: rgba(255,255,255,.025); border-radius: 0 8px 8px 0; }
.tl-dl dt { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.tl-dl dd { margin: 0; color: var(--text); font-weight: 600; }
.tl-source { margin-top: 10px; font-size: .8rem; color: var(--dim) !important; }
.tl-source cite { font-style: italic; color: var(--muted); }
.tl-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--amber);
}
.tl-link::after { content: "→"; transition: transform .25s; }
.tl-link:hover { color: var(--amber-2); }
.tl-link:hover::after { transform: translateX(5px); }

/* Mini-galeria pod wpisem */
.tl-gallery { margin-top: 4px; }
.tl-item.has-gallery .tl-text { grid-column: 1; grid-row: 1; }
.tl-item.has-gallery .tl-photo { grid-column: 2; grid-row: 1 / span 2; }
.tl-item.has-gallery .tl-gallery { grid-column: 1; grid-row: 2; }
.tl-gallery-label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: .72rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber) !important;
}
.tl-gallery-label svg { width: 16px; height: 16px; }
.tl-gallery ul { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.tl-gallery a {
  display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #111114;
  border: 1px solid rgba(255, 176, 46, .22);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.tl-gallery img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.2) contrast(1.05); transition: transform .4s ease, filter .3s; }
.tl-gallery a:hover, .tl-gallery a:focus-visible { border-color: var(--amber); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255, 90, 31, .25); }
.tl-gallery a:hover img { transform: scale(1.08); filter: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-rows: 1fr auto; place-items: center;
  padding: 64px 72px 24px;
  background: rgba(6, 6, 7, .94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity .25s, visibility 0s; }
.lb-figure { margin: 0; display: grid; justify-items: center; gap: 14px; max-width: 100%; max-height: 100%; min-height: 0; }
.lb-img {
  max-width: min(1600px, 100%); max-height: calc(100vh - 170px); width: auto; height: auto;
  border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,138,61,.25);
  transform: scale(.97); transition: transform .3s ease, opacity .2s;
  touch-action: pan-y;
}
.lightbox.open .lb-img { transform: none; }
.lb-img.loading { opacity: .35; }
.lb-cap { text-align: center; color: var(--text); font-size: .95rem; max-width: 70ch; }
.lb-count { display: block; margin-top: 4px; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); font-weight: 700; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 12px; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.06); border: 1px solid var(--line-2);
  transition: background .2s, border-color .2s, color .2s;
}
.lb-btn:hover { background: var(--red); border-color: var(--red); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }

/* Lightbox — tryb powiększenia (np. wycinki prasowe) */
.lb-img { cursor: zoom-in; }
.lb-zoom { top: 14px; right: 72px; }
.lb-zoom[hidden] { display: none; }
.lb-hint { display: block; margin-top: 4px; font-size: .72rem; color: var(--dim); }
.lightbox.zoomed { place-items: stretch; }
.lightbox.zoomed .lb-figure { display: block; overflow: auto; height: calc(100vh - 88px); width: 100%; text-align: center; -webkit-overflow-scrolling: touch; }
.lightbox.zoomed .lb-img { max-height: none; max-width: 100%; width: auto; cursor: zoom-out; margin: 0 auto 14px; }
.lightbox.zoomed .lb-prev, .lightbox.zoomed .lb-next { opacity: .45; }

/* ---------- Historia: bloki pod osią ---------- */
.hist-more { padding-top: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.chips li {
  padding: 6px 12px; border-radius: 10px; font-size: .86rem; font-weight: 600;
  background: rgba(255, 138, 61, .08); border: 1px solid rgba(255, 138, 61, .25); color: #f4d9c4;
}
.card p + p { margin-top: 10px; }
.sub-label { margin-top: 18px !important; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--dim) !important; }
.action-list { margin-top: 10px; display: grid; gap: 8px; }
.action-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px;
  background: rgba(255, 74, 43, .06); border: 1px solid rgba(255, 74, 43, .2); font-weight: 600;
}
.action-list svg { width: 18px; height: 18px; color: var(--red-2); flex-shrink: 0; }
.today-num { display: flex; align-items: baseline; gap: 14px; margin: 4px 0 14px; }
.today-num b {
  font-family: var(--display); font-weight: 800; font-size: 4.4rem; line-height: 1;
  background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.today-num span { font-family: var(--display); text-transform: uppercase; font-weight: 700; font-size: 1.3rem; letter-spacing: .04em; }

/* ---------- Osoby (Zarząd) ---------- */
.person { display: flex; align-items: center; gap: 18px; padding: 22px; }
.avatar {
  flex-shrink: 0; width: 60px; height: 60px; border-radius: 16px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: #fff; letter-spacing: .02em;
  background: linear-gradient(135deg, var(--red-deep), var(--red) 60%, #ff7a1a);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), 0 10px 24px rgba(225, 42, 31, .25);
}
.person h3 { font-size: 1.35rem; margin: 0 0 4px; }
.person p { color: var(--amber); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.person.lead-role { border-color: rgba(255, 120, 50, .35); }

/* ---------- Kontakt ---------- */
.contact-big { display: block; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1.05; color: var(--text); margin: 8px 0 4px; }
.contact-big:hover { color: var(--amber); }
.note { font-size: .8rem; color: var(--dim); }

/* ---------- Stopka ---------- */
.site-footer {
  position: relative; margin-top: 40px;
  background: #070708; border-top: 1px solid var(--line);
  padding: 72px 0 28px; overflow: hidden;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--fire);
}
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.foot h4 {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .95rem;
  color: var(--amber); margin-bottom: 14px;
}
.foot p, .foot li { color: var(--muted); font-size: .92rem; }
.foot li + li { margin-top: 6px; }
.foot a:hover { color: var(--amber); }
.foot .brand { margin-bottom: 18px; }
.foot-bottom {
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .8rem; color: var(--dim);
}
.foot-word {
  font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: .8;
  font-size: clamp(4rem, 13vw, 12rem); letter-spacing: -.01em; margin-top: 48px;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.07);
  white-space: nowrap; user-select: none;
}

/* ---------- Animacje wejścia ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsywność ---------- */
@media (max-width: 1180px) {
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(13, 13, 15, 0.96); }
  .burger { display: block; }
  .menu {
    position: fixed; left: 0; right: 0; top: var(--menu-top, var(--header-h)); bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 18px 24px 40px;
    background: #0b0b0d;
    overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .menu.open { opacity: 1; visibility: visible; transform: none; }
  .menu a {
    font-family: var(--display); font-size: 1.7rem; font-weight: 700; text-transform: uppercase;
    padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; letter-spacing: .02em;
  }
  .menu a::after { left: 4px; right: auto; width: 40px; bottom: -1px; }
  .menu a.cta { margin: 20px 0 0; text-align: center; border-radius: 12px; border: 0; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-emblem { display: none; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .emergency { grid-template-columns: 1fr; padding: 40px 28px; }
  .foot { grid-template-columns: 1fr 1fr; }
  .intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .tl-year { grid-template-columns: 1fr; gap: 10px; }
  .tl-when { position: static; }
  .tl-item.has-photo { grid-template-columns: 1fr 200px; }
}
@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .wrap { width: calc(100% - 32px); }
  .alertbar .hide-sm { display: none; }
  .alertbar .show-sm { display: inline; }
  .alertbar .wrap { flex-wrap: nowrap; font-size: .74rem; }
  .alertbar .nums { gap: 12px; }
  .brand .emblem { width: 40px; height: 40px; }
  .brand strong { font-size: 1.15rem; }
  .brand span { font-size: .64rem; }
  .hero { min-height: auto; padding: 64px 0 110px; }
  .hero h1 { font-size: clamp(2.9rem, 13.5vw, 4rem); }
  .hero .lead { font-size: 1rem; }
  .actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero-year { font-size: 11rem; right: -12vw; top: 22%; }
  .fact { padding: 20px 18px; }
  .fact b { font-size: 2.2rem; }
  .fact span { font-size: .8rem; }
  section { padding: 68px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .module { min-height: 0; }
  .module h3 { margin-top: 26px; }
  .dial { grid-template-columns: 1fr 1fr; }
  .dial a.wide { grid-column: 1 / -1; }
  .page-hero { padding: 56px 0 48px; }
  .foot { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot > div:nth-child(-n+2) { grid-column: 1 / -1; }
  .timeline { padding-left: 30px; }
  .tl-dot { left: -28px; top: 28px; width: 16px; height: 16px; }
  .timeline::before { left: 8px; }
  .tl-year { padding: 22px 20px; }
  .tl-when { font-size: 2.3rem; }
  .intro-text { font-size: 1.12rem; }
  .intro-photo a { padding: 8px; transform: none; }
  .intro-photo a::after { inset: 8px; }
  .intro-photo a::before { inset: 4px; }
  .intro-photo-badge { left: 16px; top: 16px; font-size: .6rem; }
  .today-num b { font-size: 3.6rem; }
  .tl-item.has-photo { grid-template-columns: 1fr; gap: 14px; }
  .tl-photo { max-width: 360px; }
  .tl-gallery ul { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 360px; }
  .tl-photo.portrait { max-width: 240px; }
  .tl-dl { grid-template-columns: 1fr; }
  .tl-item.has-gallery .tl-text, .tl-item.has-gallery .tl-photo, .tl-item.has-gallery .tl-gallery { grid-column: 1; grid-row: auto; }
  .lightbox { padding: 64px 12px 20px; }
  .lb-img { max-height: calc(100vh - 190px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-figure { padding-bottom: 56px; }
  .contact-big { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .embers { display: none; }
}
.contact-big.fire-text { color: transparent; }

/* ---------- Podział bojowy: pojazdy, alarmowanie ---------- */
.vehicle { padding: 18px 18px 24px; }
.vehicle-photo {
  display: block; position: relative; overflow: hidden; border-radius: 12px; margin-bottom: 18px;
  aspect-ratio: 16 / 9; background: #111114; border: 1px solid rgba(255, 138, 61, .25);
}
.vehicle-photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform .5s ease; }
.vehicle-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(124, 18, 12, .5));
}
.vehicle:hover .vehicle-photo img { transform: scale(1.05); }
.vehicle h3 { font-size: 2rem; }
.alarm-list { display: grid; gap: 10px; margin-top: 14px; }
.alarm-list li {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.025); border: 1px solid var(--line); color: var(--muted);
}
.alarm-list li strong { color: var(--text); }
.alarm-list svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--red-2); margin-top: 1px; }
.duty .today-num span { color: var(--text); }

.callsign {
  display: inline-flex; align-items: center; vertical-align: middle; margin-left: 8px;
  padding: 4px 10px 3px; border-radius: 8px;
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: .95rem; font-weight: 700; letter-spacing: .06em; text-transform: none; line-height: 1.2;
  color: #1a0a05; background: var(--fire);
  box-shadow: 0 6px 18px rgba(255, 90, 31, .3), inset 0 0 0 1px rgba(255,255,255,.25);
  white-space: nowrap; position: relative; top: -3px;
}

/* ---------- Zarząd: portrety ---------- */
.person { gap: 20px; padding: 20px; }
.portrait-link {
  position: relative; flex-shrink: 0; display: block;
  width: 120px; height: 120px; padding: 3px; border-radius: 26px;
  background: var(--fire);
  box-shadow: 0 10px 26px rgba(255, 90, 31, .28);
  transition: transform .3s ease, box-shadow .3s;
}
.portrait-link img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 23px; border: 2px solid var(--bg-2); background: #e9e7e3;
}
.portrait-link:hover, .portrait-link:focus-visible { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 34px rgba(255, 90, 31, .45); }
.person.lead-role .portrait-link { box-shadow: 0 0 0 4px rgba(255, 176, 46, .18), 0 12px 30px rgba(255, 90, 31, .4); }
@media (max-width: 640px) {
  .portrait-link { width: 104px; height: 104px; border-radius: 22px; }
  .portrait-link img { border-radius: 19px; }
}

/* ---------- Kontakt: linki i mapa gminy ---------- */
.contact-links { display: grid; gap: 10px; margin-top: 14px; }
.contact-links li {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.025); border: 1px solid var(--line);
}
.cl-label { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--dim); }
.contact-links a { color: var(--amber); font-weight: 600; word-break: break-word; }
.contact-links a:hover { color: var(--amber-2); }
.map-figure { margin: 12px 0 0; }
.map-figure img {
  width: 100%; height: auto; display: block; border-radius: 14px;
  border: 1px solid rgba(255, 176, 46, .25); box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.map-figure figcaption { margin-top: 10px; font-size: .8rem; color: var(--dim); }

/* ---------- Aktualności (PHP) ---------- */
.tl-year { scroll-margin-top: calc(var(--header-h) + 28px); }
.news-grid { align-items: stretch; }
.news-card { display: flex; flex-direction: column; padding-top: 0; overflow: hidden; }
.news-card h3 a { color: var(--text); text-decoration: none; }
.news-card h3 a:hover { color: var(--amber-2); }
.news-thumb { display: block; margin: 0 -28px 18px; aspect-ratio: 16 / 10; overflow: hidden; background: #0f0f12; border-bottom: 1px solid var(--line); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.news-card:hover .news-thumb img { transform: scale(1.04); }
.news-thumb-blank { display: grid; place-items: center; width: 100%; height: 100%; color: var(--amber); background: radial-gradient(circle at 50% 75%, rgba(255,106,26,.35), transparent 60%), linear-gradient(180deg, #17171b, #0f0f12); }
.news-more { margin-top: auto; padding-top: 14px; color: var(--amber); font-weight: 700; font-size: .9rem; text-decoration: none; }
.news-more:hover { color: var(--amber-2); }
.news-empty { max-width: 640px; }
.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 36px; }
.pager a { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-weight: 700; }
.pager a.active, .pager a:hover { background: var(--fire); color: #1a0a05; border-color: transparent; }
.post-title { font-size: clamp(2rem, 5.5vw, 4rem); max-width: 22ch; }
.post-section { padding-top: 48px; }
.post-wrap { max-width: 860px; }
.post-cover { margin: 0 0 32px; }
.post-cover a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.post-cover img { width: 100%; height: auto; display: block; }
.prose { font-size: 1.06rem; line-height: 1.75; color: #ddd6cc; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; color: var(--text); line-height: 1.15; margin-top: 1.6em; }
.prose h2 { font-size: 1.9rem; } .prose h3 { font-size: 1.45rem; } .prose h4 { font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose ul li::marker { color: var(--amber); }
.prose ol li::marker { color: var(--amber); font-weight: 700; }
.prose a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--amber-2); }
.prose strong { color: var(--text); }
.prose blockquote { border-left: 3px solid var(--red); padding: 4px 0 4px 18px; color: var(--muted); font-style: italic; }
.post-history { display: grid; gap: 4px; margin-top: 36px; padding: 18px 20px; border-radius: 16px; border: 1px solid rgba(255,176,46,.3); background: linear-gradient(120deg, rgba(255,106,26,.1), rgba(255,255,255,.02)); text-decoration: none; color: var(--text); }
.post-history .meta { margin: 0; }
.post-history:hover { border-color: var(--amber); }
.post-history .news-more { padding-top: 4px; }
.post-gallery { margin-top: 44px; }
.post-gallery h2 { font-family: var(--display); text-transform: uppercase; font-size: 1.8rem; margin-bottom: 16px; }
.post-gallery h2 span { color: var(--muted); font-size: 1.1rem; }
.post-gallery ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.post-gallery a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.post-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-gallery a:hover img { transform: scale(1.05); }
.post-back { margin-top: 44px; }
.latest .section-head { align-items: end; }
@media (max-width: 640px) {
  .news-thumb { margin: 0 -22px 16px; }
  .post-gallery ul { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ---------- Fotogaleria (PHP) ---------- */
.album-card .news-thumb { position: relative; }
.album-count { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: #1a0a05; background: var(--fire); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.album-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.album-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.album-grid a { display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #0f0f12; }
.album-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s; }
.album-grid a:hover img { transform: scale(1.05); filter: brightness(1.08); }
.album-grid a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.archive-section { padding-top: 0; }
.archive-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: center; text-decoration: none; color: var(--text); padding: 18px; }
.archive-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.archive-thumbs img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; filter: sepia(.35) contrast(1.05); transition: filter .4s; }
.archive-card:hover .archive-thumbs img { filter: none; }
.archive-text { display: grid; gap: 8px; }
.archive-text strong { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.3rem); text-transform: uppercase; line-height: 1.05; }
.archive-text .meta { margin: 0; }
.post-album-link { margin-top: 28px; }
@media (max-width: 640px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .archive-card { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
}

/* ===== Historia (PHP, v17): wyróżnienie ★, linki do aktualności ===== */
.tl-text > .tl-link { margin-right: 22px; }
.tl-year-news { padding-top: 18px; border-top: 1px dashed var(--line-2); display: flex; flex-wrap: wrap; gap: 0 22px; }
.tl-year-news .tl-link { margin-top: 0; }
.tl-item.is-star { position: relative; }
.tl-item.is-star::before { content: ""; position: absolute; left: -15px; top: 0; bottom: 0; width: 3px; border-radius: 3px; background: var(--fire); box-shadow: 0 0 14px rgba(255, 120, 40, .55); }
.tl-item.is-star + .tl-item.is-star::before, .tl-item + .tl-item.is-star::before { top: 18px; }
.tl-star { color: var(--amber); margin-right: 8px; text-shadow: 0 0 14px rgba(255, 176, 46, .7); }
.tl-source em { font-style: italic; color: var(--muted); }
.prose .tl-dl { margin: 1em 0; }
