﻿/* ================================================================
   ROVERki.pl – główny arkusz stylów
   Motyw: ciemny #111, akcenty czerwień #cc0000, złoto #f8b228
   ================================================================ */

/* ----------------------------------------------------------------
   Zmienne
---------------------------------------------------------------- */
:root {
  --bg:           #f1f5f9;
  --bg-panel:     #ffffff;
  --bg-panel-alt: #f8fafc;
  --bg-hover:     #fef2f2;
  --border:       #e2e8f0;
  --border-light: #cbd5e1;

  --red:          #cc0000;
  --red-dark:     #990000;
  --red-hover:    #e60000;
  --gold:         #f8b228;
  --gold-light:   #facc5a;

  --text:         #1e293b;
  --text-muted:   #64748b;
  --text-dark:    #334155;
  --link:         #cc0000;
  --link-hover:   #990000;

  --radius:       4px;
  --radius-lg:    10px;
  --shadow:       0 2px 8px rgba(0,0,0,.6);
  --transition:   0.18s ease;
}

/* ----------------------------------------------------------------
   Reset / Base
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--link-hover); }

img { max-width: 100%; height: auto; display: block; }

h1,h2,h3,h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .5em;
}

p { margin-bottom: 1em; }

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

/* ----------------------------------------------------------------
   Buttons
---------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: .45rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.btn-red     { background: var(--red);  color: #fff;  border-color: var(--red-dark); }
.btn-red:hover { background: var(--red-hover); color:#fff; }
.btn-gold    { background: var(--gold); color: #111; border-color: #a07000; }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-light); }
.btn-outline:hover { background: var(--bg-panel-alt); color: var(--red); border-color: var(--red); }
.btn-green   { background: #1a7a1a; color:#fff; border-color:#155015; }
.btn-green:hover { background:#22a022; }
.btn-secondary   { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.btn-secondary:hover { background: #e2e8f0; color: #1e293b; }
.btn-danger      { background: #dc2626; color: #fff; border-color: #b91c1c; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm   { padding: .25rem .6rem; font-size: .8rem; }
.btn-full { width: 100%; }
.btn-block { display: block; width: 100%; text-align: center; padding: .6rem 1rem; }

/* ----------------------------------------------------------------
   Alerts
---------------------------------------------------------------- */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
}
.alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }

/* ----------------------------------------------------------------
   TOPBAR  (cienki, biały – jak na starej stronie)
---------------------------------------------------------------- */
.site-header {
  background: var(--bg);
  position: static;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: .45rem 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #dde4ec;
  justify-content: space-between;
  gap: 1rem;
  position: relative;   /* potrzebne dla mobile dropdown */
}
.logo-block  { flex-shrink: 0; }
.header-auth { flex-shrink: 0; }

.logo-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
}
.logo-img { height: 38px; width: auto; max-width: 120px; object-fit: contain; }
.logo-text { line-height: 1.15; }
.logo-title {
  display: block;
  font-size: 1.45rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -.5px;
}
.logo-dot { color: var(--red); }
.logo-sub {
  display: block;
  font-size: .68rem;
  color: #78909c;
}

/* Ikonki w topbarze */
.header-auth {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .25rem;
}

.hicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #607d8b;
  text-decoration: none;
  background: transparent;
  border: none;
  transition: background .15s, color .15s;
  cursor: pointer;
}
.hicon:hover { background: #f0f4f8; color: var(--red); }
.hicon-txt { display: none !important; }
.hicon .material-symbols-rounded { font-size: 1.35rem; }

/* Dropdown zalogowanego użytkownika */
.hicon-user-wrap { position: relative; }
.hicon-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0 .2rem;
  width: auto;
  border-radius: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #607d8b;
  transition: background .15s, color .15s;
}
.hicon-user-btn:hover { background: #f0f4f8; color: var(--red); }
.hicon-user-btn .material-symbols-rounded { font-size: 1.35rem; }
.hicon-chevron { font-size: 1rem !important; }
.hicon-user-dropdown {
  display: none;
  position: absolute;
  top: 100%;           /* bez przerwy – padding-top tworzy bufor */
  right: 0;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 10px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 400;
  padding: .4rem;
  padding-top: .6rem;  /* górny padding zastępuje gap – mysz nie traci :hover */
  flex-direction: column;
  gap: 2px;
}
.hicon-user-wrap:hover .hicon-user-dropdown,
.hicon-user-wrap:focus-within .hicon-user-dropdown { display: flex; }
.hicon-user-name {
  display: block;
  padding: .5rem .7rem .3rem;
  font-size: .78rem;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #f0f4f8;
  margin-bottom: .3rem;
}
.hicon-drop-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .7rem;
  font-size: .82rem;
  color: #334155;
  text-decoration: none;
  border-radius: 6px;
  transition: background .12s;
}
.hicon-drop-link:hover { background: #fef2f2; color: var(--red); }
.hicon-drop-logout:hover { background: #fef2f2; color: #dc2626; }
.hicon-drop-link .material-symbols-rounded { font-size: 1rem; color: #94a3b8; }

.user-greeting { display: none; }

/* ================================================================
   HERO BANNER
   2 kolumny: [czerwony gradient + tekst] | [slider – zdjęcia bez rozciągania]
   Gradient łączy obie sekcje.
================================================================ */
.site-hero {
  background: var(--bg);   /* tło strony po bokach, nie czarne */
  position: relative;
  z-index: 50;
}

/* Ciemne tło – max-width identyczna jak treść menu (1280px - 2×1.5rem) */
.site-hero-inner {
  display: grid;
  grid-template-columns: 1fr 460px;  /* nadpisywane przez PHP <style> z ustawień admina */
  max-width: calc(1280px - 3rem);   /* = 1232px – ta sama szerokość co nav i content */
  margin: 0 auto;
  height: 148px;                    /* nadpisywane przez PHP <style> z ustawień admina */
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(200,30,0,.4);
  background: #060000;
}

/* Lewa strefa: ciepły czerwono-ciemny gradient + tekst */
.hero-content {
  background: linear-gradient(
    to right,
    rgba(165,14,0,1)    0%,
    rgba(130,10,0,1)   20%,
    rgba(90,7,0,.97)   38%,
    rgba(55,4,0,.88)   55%,
    rgba(22,2,0,.60)   72%,
    rgba(6,0,0,.15)    88%,
    rgba(6,0,0,0)      98%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 1.5rem 0 1.5rem;
  gap: .3rem;
  position: relative;
}

.hero-headline {
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.06;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0,0,0,.95), 0 0 30px rgba(180,30,0,.5);
}

.hero-sub {
  font-size: .65rem;
  color: #f5cdb8;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0;
}

.hero-cta {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .38rem .95rem;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid var(--red-dark);
  border-bottom: 2px solid #700000;
  align-self: flex-start;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(180,0,0,.5);
}
.hero-cta:hover {
  background: var(--red-hover);
  color: #fff;
  box-shadow: 0 3px 14px rgba(220,0,0,.65);
}

/* Prawa strefa: slider ze zdjęciami */
.hero-right {
  position: relative;
  overflow: hidden;
  background: #060000;
  display: flex;
  align-items: center;            /* centruje slider pionowo */
}

/* Lewy brzeg slidera – krótkie wtopienie tylko na styku z gradientem */
.hero-right::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(6,0,0,.9)   0%,
    rgba(6,0,0,.35) 12%,
    transparent     26%
  );
  z-index: 2;
  pointer-events: none;
}

/* Slider – naturalna wysokość zdjęcia (139px), pełna szerokość kolumny */
.hero-slider {
  position: relative;
  width: 100%;
  height: 139px;                  /* naturalna wysokość oryginalnych zdjęć */
  overflow: hidden;
  flex-shrink: 0;
}

/* Slajdy – naturalna wielkość (bez rozciągania), od lewej */
.banner-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: none;              /* naturalna wielkość zdjęcia – nie rozciąga */
  object-position: left center;  /* wyrównanie do lewej krawędzi slidera */
  opacity: 0;
  transition: opacity .9s ease;
}
.banner-slide.is-active { opacity: 1; }
.banner-slide:only-child { opacity: 1; }

/* Kropki */
.banner-dots {
  position: absolute;
  bottom: .4rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: .35rem;
  z-index: 5;
}
.banner-dot {
  width: 6px; height: 6px;
  border-radius: 50%; border: none;
  background: rgba(255,255,255,.35);
  cursor: pointer; padding: 0;
  transition: background .2s;
}
.banner-dot.is-active { background: var(--red); }

/* ── Responsywność hero ── */
@media (max-width: 900px) {
  .site-hero-inner { grid-template-columns: 1fr 220px; height: 148px; }
  .hero-headline { font-size: 1.4rem; }
  .hero-content { padding: 0 1rem 0 1rem; }
}
@media (max-width: 620px) {
  .site-hero-inner { grid-template-columns: 1fr 100px; height: 120px; }
  .hero-slider { height: 111px; }   /* proporcjonalnie mniej */
  .hero-headline { font-size: .95rem; }
  .hero-sub { display: none; }
  .hero-cta { font-size: .65rem; padding: .32rem .65rem; }
}


/* ----------------------------------------------------------------
   Layout główny
---------------------------------------------------------------- */
.site-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: .9rem 1.5rem 1.5rem;  /* mniejszy odstęp pod menu */
}

/* Layout z menu bocznym (jak na starej stronie: lewa kolumna + treść) */
.site-wrap.has-side {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

/* ================================================================
   MENU BOCZNE – eleganckie accordion
================================================================ */
.side-nav {
  position: sticky;
  top: 1rem;
}

/* Kontener */
.snav {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Grupy (sekcje) */
.snav-group {
  border-bottom: 1px solid var(--border);
}
.snav-group:last-child { border-bottom: none; }

/* Nagłówek sekcji (separator/toggle z czerwonym tłem) */
.snav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .9rem;
  background: linear-gradient(to right, #7a0d12, #c0211f);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
  gap: .5rem;
}
.snav-header:hover { background: linear-gradient(to right, #5c0a0e, #a01c1a); }

/* Pozycja-model (z togglem) */
.snav-item-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #f3f4f6;
  transition: background .12s;
}
.snav-item-toggle:last-child { border-bottom: none; }
.snav-item-toggle:hover { background: #fef2f2; }
.snav-item-toggle.is-active { background: #fef2f2; }

.snav-item-link {
  flex: 1;
  display: block;
  padding: .55rem .9rem;
  color: #334155;
  font-size: .84rem;
  text-decoration: none;
  transition: color .12s;
}
.snav-item-link:hover    { color: var(--red); }
.snav-item-link.is-active {
  color: var(--red);
  font-weight: 700;
}

/* Pozycja bez podmenu */
.snav-flat-link {
  display: block;
  padding: .52rem .9rem;
  color: #334155;
  font-size: .84rem;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition: background .12s, color .12s;
}
.snav-flat-link:last-child { border-bottom: none; }
.snav-flat-link:hover     { background: #fef2f2; color: var(--red); }
.snav-flat-link.is-active { background: #fef2f2; color: var(--red); font-weight: 700; }

/* Chevron */
.snav-chevron {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-right: .6rem;
  opacity: .5;
  transition: transform .2s ease;
}
.snav-header.is-open .snav-chevron,
.snav-item-toggle.is-open .snav-chevron { transform: rotate(90deg); opacity: .8; }

/* Lista podmenu */
.snav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fafbfc;
  border-top: 1px solid var(--border);
}

/* Pozycja w podmenu */
.snav-sub-item {
  border-bottom: 1px solid #f0f0f0;
}
.snav-sub-item:last-child { border-bottom: none; }

.snav-sub-link {
  display: block;
  padding: .42rem .9rem .42rem 1.4rem;
  color: #475569;
  font-size: .81rem;
  text-decoration: none;
  transition: background .1s, color .1s;
  position: relative;
}
.snav-sub-link::before {
  content: '–';
  position: absolute;
  left: .7rem;
  color: #cbd5e1;
}
.snav-sub-link:hover    { background: #fef2f2; color: var(--red); }
.snav-sub-link.is-active {
  background: #fef2f2;
  color: var(--red);
  font-weight: 600;
  border-left: 3px solid var(--red);
  padding-left: calc(1.4rem - 3px);
}

/* Zagłębienie 3. poziomu */
.snav-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.snav-sub-list .snav-sub-link {
  padding-left: 2.2rem;
  font-size: .78rem;
}
.snav-sub-list .snav-sub-link::before { left: 1.4rem; }

/* Fallback starych klas (jeśli gdzieś użyte) */
.side-nav-header {
  background: linear-gradient(to right, #7a0d12, #c0211f);
  color: #fff; font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .06em; padding: .55rem .9rem;
}
.side-nav-list, .side-nav-sub { list-style: none; margin: 0; padding: 0; }
.side-nav-link { display: block; padding: .5rem .9rem; color: #334155; font-size: .84rem; }
.side-nav-link:hover { background: #fef2f2; color: var(--red); }
/* ================================================================
   TOP NAV  – poziomy pasek (standalone lub in-header)
================================================================ */
.top-nav {
  background: var(--bg);
  position: relative;
  z-index: 200;
  overflow-x: clip;
  margin-top: 9px;
}

/* ── Wariant: menu przeniesione do topbara ── */
.top-nav.in-header {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  margin: 0;
  overflow: visible;        /* podmenu musi wystawać poza header */
  z-index: 300;
}
.top-nav.in-header .top-nav-inner {
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
  min-height: 0;
}
.top-nav.in-header .nav-items {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0;
}
.top-nav.in-header .nav-link {
  font-size: .78rem !important;
  padding: .38rem .52rem;
  letter-spacing: .03em;
}
/* Dropdown tuż pod linkiem – bez przerwy, padding daje wizualny odstęp */
.top-nav.in-header .nav-sub {
  top: 100%;
  padding-top: 8px;
}
/* Ostatnie 3 pozycje: dropdown otwiera się w lewo żeby nie wypaść poza ekran */
.top-nav.in-header .nav-item:nth-last-child(-n+3) > .nav-sub {
  left: auto;
  right: 0;
}
/* Podpodmenu ostatnich pozycji: w lewo zamiast w prawo */
.top-nav.in-header .nav-item:nth-last-child(-n+3) .nav-sub .nav-sub {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: .25rem;
}
/* Mobile: dropdown wysuwa się pod cały header */
@media (max-width: 900px) {
  .top-nav.in-header {
    position: static;
  }
  .top-nav.in-header .nav-items.open {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
    z-index: 500;
    padding: .4rem 0;
    flex-direction: column;
  }
  .top-nav.in-header .nav-hamburger {
    display: flex;
  }
  .top-nav.in-header .nav-items:not(.open) {
    display: none;
  }
}

.top-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  padding: 0 1.5rem;             /* wyrównanie z bannerem i treścią */
  min-width: 0;
  border-bottom: 1px solid #dde4ec;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  padding: .5rem .8rem;
  cursor: pointer;
  align-self: center;
}

/* Kontener pozycji – jedna linia, bez zawijania, pozycje zgrupowane do lewej */
.nav-items {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

/* Pionowy separator | między pozycjami – jako flex-item (inline) */
.nav-item + .nav-item::before {
  content: '|';
  display: inline;     /* NIE flex – żeby nie tworzyć bloku pod linkiem */
  color: #b0b8c4;
  font-size: .9rem;
  pointer-events: none;
  flex-shrink: 0;
  padding: 0 2px;
}
/* W podmenu bez separatorów (podpunkty są w <li>, więc selektor i tak nie trafi,
   ale na wypadek flat sub: */
.nav-sub .nav-item + .nav-item::before { content: none; }

.nav-item {
  position: relative;
  display: flex;        /* separator ::before i nav-link side-by-side */
  align-items: center;
}

/* Flat text link – jak na starej stronie */
.nav-link {
  display: flex;
  align-items: center;
  position: relative;   /* potrzebne dla ::after bridge w in-header */
  padding: 1.15rem 1.1rem;
  color: #2c3e50;
  font-size: .94rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: color .15s, background .15s;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}
.nav-link:hover       { color: var(--red); background: #e6eaf0; }
.nav-item.is-active > .nav-link { color: var(--red); }
.nav-trigger { cursor: default; }

/* Dropdown – ładna lista */
.nav-sub {
  list-style: none;
  margin: 0;
  position: absolute;
  top: 100%;
  left: 0;
  padding: .35rem;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
  z-index: 300;
}

/* hover sterowany przez JS – fokus klawiaturowy nadal CSS */
.nav-item:focus-within > .nav-sub {
  display: flex;
}

.nav-sub li { list-style: none; }
.nav-sub .nav-item {
  width: 100%;
  position: relative;
}

.nav-sub .nav-link {
  width: 100%;
  padding: .55rem .7rem;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: .01em;
  white-space: nowrap;
}
.nav-sub .nav-link:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: none;
}

/* Podpodmenu – zawsze boczne, sterowane przez JS */
.nav-sub .nav-sub {
  top: 0;
  left: 100%;
  margin: 0;
  z-index: 400;
}
.nav-sub .nav-sub.open-left {
  left: auto;
  right: 100%;
}


/* Widget */
.widget {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem;
  margin-bottom: 1rem;
}

.widget-title {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold);
  margin-bottom: .6rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}

.widget-list { list-style: none; }
.widget-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .3rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: .82rem;
}
.widget-list li:last-child { border-bottom: none; }

.badge {
  display: inline-block;
  padding: .1rem .4rem;
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.4;
}
.badge-green       { background: #1a5a1a; color:#aaffaa; }
.badge-red         { background: #5a0000; color:#ffaaaa; }
.badge-access-public  { background:#1a3a1a; color:#99dd99; }
.badge-access-user    { background:#1a1a4a; color:#9999ff; }
.badge-access-member  { background:#3a2a00; color:#ddbb00; }
.badge-access-admin   { background:#3a0000; color:#ff8888; }

/* ----------------------------------------------------------------
   Main Content
---------------------------------------------------------------- */
.main-content {
  min-width: 0;
}

.section-heading {
  font-size: .85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 2px solid var(--red-dark);
  padding-bottom: .4rem;
  margin-bottom: 1rem;
}

.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: .8rem;
  border-bottom: 2px solid var(--red-dark);
}
.page-header h1 { font-size: 1.5rem; color: var(--text); }

/* ----------------------------------------------------------------
   Podgląd artykułu (na liście)
---------------------------------------------------------------- */
.article-preview {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  transition: border-color var(--transition);
}
.article-preview:hover { box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.article-preview a:focus:not(:focus-visible) { outline: none; }

.article-preview-title {
  font-size: 1.05rem;
  margin-bottom: .3rem;
}
.article-preview-title a { color: var(--link); }
.article-preview-title a:hover { color: var(--link-hover); text-decoration: underline; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: .6rem;
}
.meta-sep { color: var(--border-light); }
.meta-cat { color: var(--red); font-weight: 600; }

.article-intro { font-size: .92rem; color: var(--text-dark); overflow: hidden; }
.article-intro img { max-width: 100%; max-height: 300px; height: auto; border-radius: var(--radius); margin: .5rem 0; }

.read-more {
  display: inline-block;
  margin-top: .7rem;
  padding: .1rem .45rem;
  font-size: .72rem;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border-radius: 3px;
  transition: background var(--transition);
}
.read-more:hover { background: var(--red-dark); color: #fff; }

/* Nawigacja powrotna nad artykułem */
.article-back-nav {
  margin-bottom: .6rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  color: var(--text-muted);
  padding: .25rem .5rem;
  border-radius: var(--radius);
  transition: background .12s, color .12s;
}
.back-link:hover { background: var(--bg-panel); color: var(--red); }
.back-link .material-symbols-rounded { font-size: 1rem; }

/* ----------------------------------------------------------------
   Pełny artykuł
---------------------------------------------------------------- */
.article-full {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.article-header { margin-bottom: 1.2rem; }
.article-title { font-size: 1.6rem; color: var(--text); }

.article-body {
  font-size: .95rem;
  color: var(--text-dark);
  line-height: 1.75;
}
.article-body img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1rem 0;
  border: 1px solid var(--border);
}
.article-body h2, .article-body h3, .article-body h4 { color: var(--red-dark); margin: 1.2em 0 .5em; }
.article-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.article-body td, .article-body th { border: 1px solid var(--border); padding: .4rem .6rem; }
.article-body th { background: var(--bg-panel-alt); color: var(--gold); }
.article-body code { background: #f1f5f9; color: #991b1b; padding: .1em .4em; border-radius: 3px; font-size:.9em; border: 1px solid #e2e8f0; }
.article-body blockquote {
  border-left: 3px solid var(--red-dark);
  margin: 1em 0;
  padding: .5em 1em;
  background: #fef9ec;
  color: #64748b;
  font-style: italic;
}

.access-badge { margin-top: 1rem; }
.badge-members {
  background: #2a1a00;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: .3rem .7rem;
  border-radius: var(--radius);
  font-size: .82rem;
}

/* ----------------------------------------------------------------
   Komentarze
---------------------------------------------------------------- */
.comments-section {
  margin-top: 2rem;
}

.comment {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin-bottom: .8rem;
}

.comment-meta {
  display: flex;
  gap: .8rem;
  align-items: center;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .4rem;
}
.comment-author { color: var(--gold); font-weight: 700; }
.comment-reply-btn {
  font-size: .75rem;
  color: var(--red);
  cursor: pointer;
  margin-left: auto;
}
.comment-children {
  margin-top: .6rem;
  margin-left: 1.5rem;
  border-left: 2px solid var(--border);
  padding-left: .8rem;
}

.comment-form-wrap {
  margin-top: 2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.comment-form-title { font-size: 1rem; margin-bottom: 1rem; }

/* Formularz kontaktowy */
.contact-wrap { max-width: 640px; }
.contact-form .form-row { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.contact-form label { font-weight: 600; font-size: .9rem; color: #334155; }
.contact-form .req { color: var(--red); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: .95rem;
  font-family: inherit;
  box-sizing: border-box;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--red); }
.contact-form .form-actions { margin-top: .5rem; }

.comment-form .form-row { display: flex; gap: .5rem; margin-bottom: .7rem; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: .5rem .7rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .9rem;
  resize: vertical;
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--red);
}
.comment-logged-as {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .7rem;
}

/* Prompt logowania w sekcji komentarzy */
.comment-login-prompt {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.comment-login-prompt .material-symbols-rounded {
  font-size: 1.6rem;
  color: #94a3b8;
  flex-shrink: 0;
}
.comment-login-prompt p { margin: 0; flex: 1; font-size: .9rem; }
.comment-login-prompt .btn { flex-shrink: 0; white-space: nowrap; }

/* ----------------------------------------------------------------
   Galeria
---------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery-cat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition);
}
.gallery-cat-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

.gallery-cat-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-panel-alt);
}
.gallery-cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery-cat-card:hover .gallery-cat-thumb img { transform: scale(1.05); }
.gallery-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.gallery-cat-info { padding: .7rem .8rem; }
.gallery-cat-info h3 { font-size: .9rem; color: var(--text); margin-bottom: .2rem; }
.photo-count { font-size: .75rem; color: var(--text-muted); }

/* Grid zdjęć */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .8rem;
  margin-bottom: 2rem;
}

.photo-item {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
}
.photo-item:hover { border-color: var(--gold); }
.photo-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.photo-caption {
  padding: .3rem .5rem;
  font-size: .72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----------------------------------------------------------------
   Lightbox – nowoczesny
---------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.93);
  backdrop-filter: blur(6px);
}
.lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(92vw, 1200px);
  outline: none;
}
.lb-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 80px;
}
.lightbox-inner img {
  max-width: min(92vw, 1200px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.7);
  display: block;
  outline: none;
}
/* Przyciski nav */
.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  width: 48px; height: 72px;
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background .15s;
  outline: none;
  z-index: 2;
}
.lb-prev { left: .75rem; }
.lb-next { right: .75rem; }
.lb-prev:hover, .lb-next:hover { background: rgba(204,0,0,.75); }
/* Przycisk zamknięcia */
.lb-close {
  position: fixed;
  top: 1rem; right: 1rem;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  width: 40px; height: 40px;
  font-size: 1.2rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s;
  outline: none;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.lb-close:hover { background: rgba(204,0,0,.8); }
/* Stopka lightboxa */
.lb-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .75rem;
  width: 100%;
}
.lb-counter {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  flex-shrink: 0;
}
.lb-caption {
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  text-align: center;
  flex: 1;
}
/* Spinner */
.lb-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-spin {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lb-rotate .7s linear infinite;
}
@keyframes lb-rotate { to { transform: rotate(360deg); } }
.lb-error {
  color: #f5cdb8;
  font-size: .85rem;
  padding: 2rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----------------------------------------------------------------
   Strona główna – dwukolumnowy układ
---------------------------------------------------------------- */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}
.home-layout > * { min-width: 0; }

.club-info-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}
.box-title {
  background: var(--red-dark);
  color: #fff;
  padding: .6rem 1rem;
  font-size: .9rem;
  margin: 0;
}
.club-info-body {
  padding: 1rem;
  font-size: .85rem;
  color: var(--text-dark);
  line-height: 1.7;
}
.club-info-body .bank-no { overflow-wrap: break-word; font-size: .82rem; letter-spacing: .01em; word-break: break-all; }
.club-gallery-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
/* Losowe miniatury z galerii */
.club-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 4px;         /* odstęp od tytułu "Galeria" */
  margin-bottom: .8rem;
}
.club-gallery-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: #e2e8f0;
}
.club-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.club-gallery-thumb:hover img { transform: scale(1.08); }

/* ----------------------------------------------------------------
   Logowanie
---------------------------------------------------------------- */
.auth-page {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}
.auth-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}
.auth-title {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text);
}
.auth-form label {
  display: block;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .3rem;
}
.auth-form input {
  width: 100%;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: .6rem .8rem;
  border-radius: var(--radius);
  font-size: .95rem;
  margin-bottom: 1rem;
}
.auth-form input:focus { outline: none; border-color: var(--red); }
.auth-info {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: center;
}

/* ----------------------------------------------------------------
   Paginacja
---------------------------------------------------------------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
  padding: 1.5rem 0;
}
.page-btn {
  display: inline-block;
  padding: .35rem .7rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-dark);
  font-size: .85rem;
  transition: background var(--transition);
}
.page-btn:hover { background: var(--bg-hover); color: var(--link-hover); }
.page-btn.active { background: var(--red-dark); color: #fff; border-color: var(--red); }

/* ----------------------------------------------------------------
   Error page
---------------------------------------------------------------- */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}
.error-page h1 { font-size: 3rem; color: var(--red); }
.error-msg { font-size: 1.1rem; color: var(--text-muted); margin: 1rem 0 2rem; }

/* ----------------------------------------------------------------
   SEARCH OVERLAY
---------------------------------------------------------------- */
.search-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 90px;
}
.search-overlay.open { display: flex; }
.search-back-link {
  display: inline-block;
  margin-top: .35rem;
  font-size: .8rem;
  color: var(--text-muted);
}
.search-back-link:hover { color: var(--red); }
.search-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 60px rgba(0,0,0,.35);
  padding: 1.4rem 1.4rem 1rem;
  width: min(600px, 92vw);
}
.search-box-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.search-box-row {
  display: flex;
  gap: .5rem;
}
.search-box-input {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: .65rem .9rem;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.search-box-input:focus { border-color: var(--red); }
.search-box-btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .65rem 1.1rem;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; gap: .35rem;
  transition: background .15s;
}
.search-box-btn:hover { background: var(--red-hover); }
.search-box-close {
  display: flex;
  justify-content: flex-end;
  margin-top: .6rem;
}
.search-box-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .78rem;
  cursor: pointer;
  display: flex; align-items: center; gap: .25rem;
  padding: .2rem .4rem;
  border-radius: 4px;
  transition: color .15s;
}
.search-box-close-btn:hover { color: var(--red); }

/* ----------------------------------------------------------------
   Footer – 3-kolumnowy
---------------------------------------------------------------- */
.site-footer {
  background: #263347;
  border-top: 3px solid var(--gold);
  margin-top: 3rem;
  font-size: .83rem;
  width: 100%;
  box-sizing: border-box;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 0.65fr 1.35fr;
  gap: 2rem 3rem;
  align-items: start;
}

/* Nagłówki kolumn */
.footer-col-heading {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* Kolumna 1 – marka */
.footer-brand {
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1;
  margin-bottom: .55rem;
}
.footer-about {
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: .7rem;
}
.footer-legal-block { margin-top: .7rem; }
.footer-logo-wrap { margin-top: 1rem; }
.footer-logo-img  { max-height: 56px; width: auto; max-width: 160px; object-fit: contain; opacity: .9; }
.footer-legal-line {
  font-size: .74rem;
  color: #4e6073;
  line-height: 1.75;
}

/* Kolumna 2 – nawigacja */
.footer-nav-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.footer-nav-list a {
  color: #94a3b8;
  font-size: .85rem;
  transition: color .15s;
}
.footer-nav-list a:hover { color: #fff; }

/* Kolumna 3 – kontakt */
.footer-contact-block {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: 1.1rem;
}
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  color: #94a3b8;
  line-height: 1.5;
}
.footer-contact-item a { color: #94a3b8; }
.footer-contact-item a:hover { color: #fff; }
.footer-icon {
  font-size: 1.1rem !important;
  color: var(--footer-icon, #fff) !important;
  flex-shrink: 0;
  margin-top: .05rem;
}
.footer-form-link { margin-top: .2rem; }
.footer-form-link a {
  font-size: .78rem;
  color: #4e6073;
  transition: color .15s;
  border: 1px solid #2d3f52;
  border-radius: 20px;
  padding: .25rem .75rem;
  display: inline-block;
}
.footer-form-link a:hover { color: var(--gold); border-color: var(--gold); }

/* Box konta bankowego */
.footer-bank-box {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: .85rem 1rem;
  margin-top: .5rem;
}
.footer-bank-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: .4rem;
}
.footer-bank-hint {
  font-size: .7rem;
  color: #4e6073;
  margin-bottom: .25rem;
}
.footer-bank-number {
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: .03em;
  word-break: break-all;
}

/* Pasek dolny */
.footer-bottom {
  background: rgba(0,0,0,.15);
  text-align: center;
  padding: .9rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #4e6073;
  font-size: .78rem;
  max-width: 100%;
  box-sizing: border-box;
}
.footer-bottom a { color: #4e6073; }
.footer-bottom a:hover { color: var(--gold); }
.footer-bottom p { margin-bottom: .3rem; }
.footer-bottom p:last-child { margin-bottom: 0; }

/* Ikony social w stopce */
.footer-socials { display: flex; gap: .45rem; margin-top: 1rem; }
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: #94a3b8 !important;
  transition: background .15s, color .15s, transform .15s;
}
.footer-social:hover { color: #fff !important; transform: translateY(-2px); }
.footer-social.social-facebook:hover  { background: #1877f2; }
.footer-social.social-instagram:hover { background: #e1306c; }
.footer-social.social-youtube:hover   { background: #ff0000; }
.footer-social.social-tiktok:hover    { background: #000; }

/* ----------------------------------------------------------------
   Wysuwany pasek social media (prawa krawędź)
---------------------------------------------------------------- */
.social-rail {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(calc(100% - 38px));
  z-index: 500;
  display: flex;
  align-items: flex-start;
  transition: transform .3s ease;
}
.social-rail.open { transform: translateY(-50%) translateX(0); }
.social-rail-toggle {
  flex: 0 0 38px;
  height: 46px;
  border: none;
  background: var(--red);
  color: #fff;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-rail-toggle .material-symbols-rounded { font-size: 1.3rem; }
.social-rail-links {
  display: flex;
  flex-direction: column;
  background: #1e293b;
  padding: .4rem;
  gap: .35rem;
  border-radius: 0 0 0 8px;
  box-shadow: -4px 4px 14px rgba(0,0,0,.25);
}
.social-rail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(255,255,255,.06);
  transition: background .15s, color .15s;
}
.social-rail-link:hover { color: #fff; }
.social-rail-link.social-facebook:hover  { background: #1877f2; }
.social-rail-link.social-instagram:hover { background: #e1306c; }
.social-rail-link.social-youtube:hover   { background: #ff0000; }
.social-rail-link.social-tiktok:hover     { background: #000; }
@media (max-width: 640px) { .social-rail { top: auto; bottom: 70px; transform: translateY(0) translateX(calc(100% - 38px)); } .social-rail.open { transform: translateX(0); } }

/* ----------------------------------------------------------------
   Responsive
---------------------------------------------------------------- */
@media (max-width: 900px) {
  .site-wrap   { padding: .75rem 1rem 1.5rem; }
  .site-wrap.has-side { grid-template-columns: 1fr; }
  .side-nav    { position: static; }
  .home-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.8rem 2rem; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-col-brand { order: -1; }
  .footer-bank-number { font-size: .9rem; }

  /* Nav hamburger */
  .nav-hamburger { display: flex; }
  .nav-items {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #ffffff;
    border-top: 3px solid var(--red);
    z-index: 300;
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
  }
  .nav-items.open { display: flex; padding: .4rem 0; gap: 0; }
  .top-nav-inner { position: relative; flex-wrap: wrap; }
  .nav-item { width: 100%; }
  .nav-item + .nav-item::before { display: none; }
  .nav-link {
    width: 100%;
    border-radius: 0;
    padding: .7rem 1.2rem;
    border-bottom: 1px solid #f0f4f8;
    font-size: .85rem;
  }
  .nav-link:hover { background: #fef2f2; color: var(--red); }

  /* Podmenu w mobile: nie absolute, rozwijane wcięte */
  .nav-sub {
    position: static;
    border: none;
    box-shadow: none;
    background: #f8fafb;
    min-width: auto;
    width: 100%;
    border-radius: 0;
    margin: 0;
    padding: 0;
  }
  .nav-item:hover > .nav-sub,
  .nav-item:focus-within > .nav-sub { display: flex; }
  .nav-sub .nav-link { padding-left: 2rem; font-size: .82rem; }
  /* Na mobile sub-podmenu też wcięte, nie boczne */
  .nav-sub .nav-sub {
    position: static;
    left: auto;
    padding-left: 0;
    box-shadow: none;
    border: none;
    background: #eef2f6;
    border-radius: 0;
  }
  .nav-sub .nav-sub .nav-link { padding-left: 3rem; }
}

@media (max-width: 640px) {
  .header-inner { padding: .4rem .75rem; }
  .logo-title { font-size: 1.15rem; }
  .logo-sub { display: none; }
  /* banner height: auto */
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-col:last-child { grid-column: auto; }
  .footer-brand { font-size: 1.4rem; }
}

/* ═══════════════════════════════════════════════════════════
   BANER ZGODY NA COOKIES (RODO/GDPR)
═══════════════════════════════════════════════════════════ */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1e293b;
  border-top: 2px solid var(--red-dark, #990000);
  box-shadow: 0 -4px 24px rgba(0,0,0,.6);
  transform: translateY(100%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s ease;
}

#cookie-banner.cb-visible {
  transform: translateY(0);
  opacity: 1;
}

.cb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .9rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cb-text {
  flex: 1 1 300px;
}

.cb-title {
  display: block;
  font-size: .95rem;
  color: var(--gold, #f8b228);
  margin-bottom: .3rem;
  letter-spacing: .03em;
}

.cb-text p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.55;
  color: #b0b8c8;
}

.cb-link {
  color: var(--gold, #f8b228);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cb-link:hover { color: #fff; }

.cb-actions {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cb-btn {
  padding: .5rem 1.1rem;
  border: none;
  border-radius: 4px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter .2s, transform .15s;
  white-space: nowrap;
}

.cb-btn:hover  { filter: brightness(1.15); transform: translateY(-1px); }
.cb-btn:active { transform: translateY(0); }

.cb-btn--accept {
  background: var(--red-dark, #8b1a1a);
  color: #fff;
}

.cb-btn--necessary {
  background: #2a2a3a;
  color: #ccc;
  border: 1px solid #444;
}

/* ═══════════════════════════════════════════════════════════
   STRONA POLITYKI PRYWATNOŚCI
═══════════════════════════════════════════════════════════ */
.privacy-page {
  padding: 1.5rem 0;
}

.static-page .article-body h2 {
  color: var(--gold, #f8b228);
  font-size: 1.15rem;
  margin: 2rem 0 .6rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid #2a2a3a;
}

.static-page .article-body h3 {
  color: #ddd;
  font-size: 1rem;
  margin: 1.2rem 0 .4rem;
}

.static-page .article-body address {
  font-style: normal;
  background: #f8fafc;
  border-left: 3px solid var(--red-dark, #990000);
  padding: .8rem 1rem;
  margin: .8rem 0 1.2rem;
  border-radius: 0 4px 4px 0;
  line-height: 1.7;
}

.privacy-table {
  width: 100%;
  border-collapse: collapse;
  margin: .8rem 0 1.4rem;
  font-size: .85rem;
}

.privacy-table th,
.privacy-table td {
  padding: .55rem .8rem;
  text-align: left;
  border: 1px solid #2a2a3a;
}

.privacy-table th {
  background: #1a1a2e;
  color: var(--gold, #f8b228);
  font-weight: 600;
}

.privacy-table tr:nth-child(even) td {
  background: rgba(255,255,255,.03);
}

.privacy-table code {
  background: #111;
  padding: .1em .4em;
  border-radius: 3px;
  font-size: .82rem;
  color: #e88;
}

.privacy-reset-consent {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid #2a2a3a;
  text-align: center;
}

.btn-reset-consent {
  background: #1a1a2e;
  color: #aaa;
  border: 1px solid #444;
  padding: .45rem 1rem;
  border-radius: 4px;
  font-size: .82rem;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}

.btn-reset-consent:hover {
  color: #fff;
  border-color: #666;
}

@media (max-width: 600px) {
  .cb-inner { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .cb-actions { width: 100%; }
  .cb-btn { flex: 1; text-align: center; }
  .privacy-table { display: block; overflow-x: auto; }
}
