:root {
  --bg: #08111f;
  --bg-soft: #0f1b31;
  --card: rgba(15, 27, 49, 0.76);
  --card-solid: #11213d;
  --text: #eaf3ff;
  --muted: #b7c6dd;
  --accent: #3fd5ff;
  --accent-2: #2f8dff;
  --accent-3: #ff4f6d;
  --border: rgba(255,255,255,0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --radius-sm: 18px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(63, 213, 255, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(47, 141, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #08111f 0%, #0c1730 48%, #08111f 100%);
  color: var(--text);
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 17, 31, 0.45);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-kicker {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.brand-title {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease;
}
.top-nav a:hover { color: #fff; }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-video,
.hero-overlay,
.hero-gradient {
  position: absolute;
  inset: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  background: rgba(6, 12, 24, 0.46);
}

.hero-gradient {
  background:
    linear-gradient(180deg, rgba(8,17,31,0.4) 0%, rgba(8,17,31,0.28) 28%, rgba(8,17,31,0.88) 100%),
    radial-gradient(circle at 20% 20%, rgba(63, 213, 255, 0.18), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(255, 79, 109, 0.14), transparent 24%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 8rem;
  padding-bottom: 5rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.95;
  max-width: 11ch;
}

.hero-text {
  max-width: 700px;
  font-size: 1.12rem;
  color: #eef6ff;
  margin: 1.25rem 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.22);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06101b;
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
  max-width: 860px;
}

.stat {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(10, 19, 35, 0.55);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
}

.stat strong {
  display: block;
  font-size: 1.85rem;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.96rem;
}

.section {
  padding: 5.6rem 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: start;
}

.intro h2,
.section-heading h2,
.section-info h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.05;
}

.intro p,
.section-heading p,
.info-banner p {
  color: var(--muted);
  margin: 0;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.info-card,
.day-card,
.gallery-card,
.info-banner {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.info-card {
  border-radius: var(--radius);
  padding: 1.3rem;
}

.info-card span {
  font-size: 1.55rem;
}
.info-card h3 {
  margin: 0.9rem 0 0.45rem;
  font-size: 1.1rem;
}
.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-heading {
  margin-bottom: 2rem;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.day-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
  min-height: 265px;
}

.day-card:hover {
  transform: translateY(-6px);
  border-color: rgba(63, 213, 255, 0.42);
  background: rgba(17, 33, 61, 0.92);
}

.day-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.22rem 0.72rem;
  border-radius: 999px;
  background: rgba(63, 213, 255, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.day-card h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.15;
}

.day-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.day-link {
  margin-top: auto;
  color: #fff;
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.24s ease;
}
.gallery-card:hover {
  transform: translateY(-6px);
}
.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery-card figcaption {
  padding: 1rem 1.15rem 1.15rem;
  color: var(--muted);
}

.info-banner {
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.info-banner span { color: var(--accent); }

.site-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(5, 10, 20, 0.65);
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 7, 14, 0.88);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: min(1100px, 100%);
  max-height: 80vh;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}

.lightbox-caption {
  margin: 1rem 0 0;
  color: #fff;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .days-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .info-cards { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; max-width: 460px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .info-banner,
  .footer-wrap { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .site-header { position: sticky; }
  .nav-wrap { align-items: flex-start; flex-direction: column; }
  .top-nav { gap: 0.8rem; }
  .hero-content { padding-top: 5rem; }
  .days-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 9.5ch; }
  .section { padding: 4.6rem 0; }
}

/* --- aktualizacja galerii i winiety --- */
.brand {
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  min-width: 118px;
  padding: 0.34rem 0.5rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.brand-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.stat-icon {
  font-size: 1.55rem !important;
  line-height: 1 !important;
}

.gallery-subheading {
  margin: 2rem 0 1rem;
  font-size: 1.35rem;
}

.gallery-subheading-collages {
  margin-top: 3rem;
}

.gallery-grid-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.collage-card {
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}

.collage-card img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  background: #f5f0e7;
}

.gallery-photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.footer-links a {
  color: var(--accent);
  font-weight: 700;
}
.footer-links a:hover { color: #fff; }

@media (max-width: 1000px) {
  .collage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .brand-logo-shell {
    width: 96px;
    min-width: 96px;
  }
  .brand-kicker { font-size: 0.66rem; }
  .brand-title { font-size: 1.08rem; }
  .gallery-grid-groups,
  .collage-grid { grid-template-columns: 1fr; }
}

/* --- belka wsparcia Miasta Chorzów --- */
.city-support-wrap {
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(6, 14, 27, 0.82);
}
.city-support {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  text-align: center;
}
.city-support p {
  margin: 0;
  color: #d8e6f7;
  font-size: 0.86rem;
  line-height: 1.35;
}
.city-support strong { color: #fff; }
.city-crest {
  width: 30px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.2));
}

/* fixed header jest teraz wyższy o belkę Miasta */
.hero-content { padding-top: 11rem; }

/* --- wiadomości z panelu administratora --- */
.news-section { padding-top: 1.2rem; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.news-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16,31,55,.94), rgba(10,22,41,.9));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.news-card h3 {
  margin: .3rem 0 .55rem;
  font-size: 1.18rem;
}
.news-card p {
  margin: 0;
  color: var(--muted);
}
.news-date {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.uploaded-gallery { margin-top: 0; }

@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .city-support {
    justify-content: flex-start;
    text-align: left;
    min-height: 54px;
    gap: .6rem;
  }
  .city-support p { font-size: .77rem; }
  .city-crest { width: 27px; height: 32px; }
  .hero-content { padding-top: 5.5rem; }
}

/* --- GPX + podgląd mapy po najechaniu --- */
.day-card {
  position: relative;
}

.day-main-link {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.day-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.day-card-actions-preview {
  justify-content: flex-end;
}

.gpx-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.48rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(63,213,255,0.3);
  background: rgba(63,213,255,0.1);
  color: #bdefff;
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.gpx-download:hover,
.gpx-download:focus-visible {
  transform: translateY(-1px);
  background: rgba(63,213,255,0.2);
  border-color: rgba(63,213,255,0.58);
  color: #fff;
}

.preview-hint {
  color: #91a5c1;
  font-size: 0.74rem;
  font-weight: 650;
  white-space: nowrap;
}
.preview-hint-muted { color: #71839b; }

.map-preview-card { cursor: default; }

.map-hoverbox {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(2,7,14,0.34);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.map-hoverbox.open {
  opacity: 1;
  visibility: visible;
}

.map-hoverbox-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: min(900px, calc(100vw - 3rem));
  max-height: 82vh;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 22px;
  background: #0b1729;
  box-shadow: 0 34px 90px rgba(0,0,0,.55);
  transform: translateY(12px) scale(.985);
  transition: transform .22s ease;
}

.map-hoverbox.open .map-hoverbox-card {
  transform: translateY(0) scale(1);
}

.map-hoverbox-image {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #eaf1e7;
}

.map-hoverbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .72rem .9rem;
  color: #dce9f8;
  background: rgba(8,17,31,.98);
}

.map-hoverbox-meta strong {
  color: #fff;
  font-size: .92rem;
}

.map-hoverbox-meta span {
  color: var(--muted);
  font-size: .76rem;
}

@media (hover: none), (max-width: 720px) {
  .map-hoverbox { display: none; }
  .preview-hint:not(.preview-hint-muted) { display: none; }
  .day-card-actions { justify-content: flex-start; }
  .day-card-actions-preview { justify-content: flex-start; }
}
