@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

/* ── Loader ──────────────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-border {
  border-color: var(--primary) transparent var(--primary) transparent !important;
}

/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
  --primary:      #c4922a;
  --primary-dim:  rgba(196, 146, 42, 0.15);
  --primary-glow: rgba(196, 146, 42, 0.25);
  --dark:         #0f1117;
  --surface:      #1a1e27;
  --surface2:     #22273a;
  --surface3:     #1e2230;
  --light:        #e8e8e8;
  --muted:        #8a8f9a;
  --border:       rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
}

/* ── Base reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--dark);
  color: var(--light);
  margin: 0;
  padding: 0;
  font-size: 1.155rem;
  line-height: 1.7;
}

/* ── Back-to-top ────────────────────────────────────────────────────────────── */
#topBtn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 999;
  font-size: 16.5px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--light);
  cursor: pointer;
  padding: 11px 14px;
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
#topBtn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* NAVBAR */

.navbar {
  background: transparent !important;
  box-shadow: none;
  border-bottom: none;
  backdrop-filter: none;
  transition: background 0.35s ease, box-shadow 0.35s ease;
  z-index: 1030;
  padding-top: 0;
  padding-bottom: 0;
  min-height: 56px;
}

.navbar .container-fluid {
  align-items: center;
  min-height: 56px;
}

.navbar.scrolled {
  background: rgba(10, 12, 18, 0.94) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.5);
}

.navbar-brand {
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
  padding: 0;
  line-height: 1;
}
.navbar-brand:hover { opacity: 0.75; }

/* ── Nav links — left-aligned next to logo ──────────────────────────────────── */
.navbar-nav {
  gap: 0.11rem;
  align-items: center;
  margin-right: auto !important;
  margin-left: 0 !important;
}

.navbar-nav .nav-link {
  position: relative;
  color: var(--light) !important;
  font-size: 0.902rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.605rem 0.77rem;
  transition: color 0.25s;
  line-height: 1;
}

/* Animated underline — only as wide as the text */
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0.77rem;
  bottom: 0.33rem;
  height: 2px;
  width: calc(100% - 1.54rem);
  background: linear-gradient(90deg, var(--primary), #e0b060);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  border-radius: 2px;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { transform: scaleX(1); }

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--primary) !important; }

/* ── Hamburger icon ──────────────────────────────────────────────────────────── */
.navbar-toggler {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
}
.navbar-toggler:focus { box-shadow: none; }

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28232,232,232,0.85%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ── Mobile dropdown ────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .navbar-collapse {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 1040;
    background: var(--surface) !important;  /* tło zawsze, nie tylko po .show */
  }

  /* Animacja rozwinięcia — sam panel */
  .navbar-collapse.show,
  .navbar-collapse.collapsing {
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.65);
    padding: 0.825rem 0 1.375rem;
  }

  /* Linki centered, shrink-wrapped */
  .navbar-collapse .navbar-nav {
    align-items: center;
    gap: 0.165rem;
  }

  .navbar-collapse .navbar-nav .nav-link {
    display: inline-block;
    text-align: center;
    padding: 0.605rem 1.1rem;
    color: var(--light) !important;
  }

  .navbar-collapse .navbar-nav .nav-link::after {
    left: 0;
    width: 100%;
    bottom: 0.275rem;
  }

  .navbar-collapse .navbar-nav .nav-link:hover,
  .navbar-collapse .navbar-nav .nav-link.active { color: var(--primary) !important; }
}

/* HERO */

.hero {
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* dynamic viewport — accounts for mobile browser chrome */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-image:
    linear-gradient(rgba(0,0,0,0.82), rgba(15,17,23,0.58)),
    url("../img/header.729c01565cdf.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

/* Grain overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.3;
  z-index: 1;
}

@media (max-width: 480px) {
  .hero {
    background-image:
      linear-gradient(rgba(0,0,0,0.65), rgba(15,17,23,0.45)),
      url("../img/header_mob.729c01565cdf.jpg");
    background-attachment: scroll;
    /* Pad for notch / home-indicator on modern phones */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* On mobile the scroll-hint sits absolute at 5% from bottom —
     nudge content up slightly so it reads centred visually */
  .hero-content {
    margin-bottom: 10vh;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1.1rem;
}

.hero-eyebrow {
  font-size: clamp(1.584rem, 2.8vw, 1.936rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1.32rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s 0.2s ease forwards;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.12;
  margin-bottom: 1.54rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.45s ease forwards;
}

.hero-subtitle {
  font-size: clamp(1.584rem, 2.8vw, 1.936rem);
  color: rgba(232,232,232,0.72);
  max-width: 500px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.7s ease forwards;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 5%;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  opacity: 0;
  animation: fadeSlideUp 0.8s 1.1s ease forwards;
}

.hero-scroll-hint span {
  font-size: 0.715rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  animation: bounceArrow 1.4s ease infinite;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounceArrow {
  0%,100% { transform: rotate(45deg) translate(0, 0); }
  50%      { transform: rotate(45deg) translate(0, 5px); }
}

/* SECTIONS — shared */

.page-section {
  padding: 5.5rem 0;
  background: var(--dark);
}

.page-section.bg-light {
  background: var(--surface) !important;
}

.page-section .container {
  padding-left: 1.65rem;
  padding-right: 1.65rem;
}

/* Section heading */
.page-section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.815rem, 3vw, 2.365rem);
  color: var(--light);
  text-align: center;
  margin-bottom: 0.385rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Gold rule under section title */
.page-section h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #e0b060);
  margin: 10px auto 32px;
  border-radius: 2px;
}

.page-section h5.text-muted,
.page-section .text-muted {
  color: var(--muted) !important;
}

/* No italic anywhere — <em> tags render as normal weight */
em, i, .text-muted em, h5 em, p em {
  font-style: normal;
}

.info {
  margin-top: 1.65rem !important;
  margin-bottom: 2.2rem !important;
}

/* AOS: prevent FOUC */
[data-aos] { opacity: 0; }

/* INFO SECTION  (#info) */

#info h4 { color: var(--light); font-weight: 700; font-size: 1.155rem; }
#info .text-muted { color: var(--muted) !important; font-size: 1.067rem; }
#info strong { color: var(--primary); }

.fa-stack .fa-circle { color: var(--primary) !important; }

/* MEDIA / CARDS  (#media) */

.card {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--light) !important;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-color: var(--primary) !important;
}
.card .text-muted,
.card p.text-muted { color: var(--muted) !important; font-size: 0.968rem; }
.card .card-body > p:first-child { font-weight: 600; margin-bottom: 0.22rem; font-size: 1.067rem; }

/* Image zoom on card hover */
.card > img,
.card .img-fluid:not(.ratio *) {
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
  display: block;
  width: 100%;
}
.card:hover > img,
.card:hover .img-fluid:not(.ratio *) {
  transform: scale(1.06);
}

/* ── YouTube thumbnail card ─────────────────────────────────────────────────── */
.yt-thumb-link {
  display: block;
  text-decoration: none;
}

.yt-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
}

.yt-thumb-img {
  display: block;
  width: 100%;
  transition: transform 0.4s ease, opacity 0.3s ease;
  opacity: 0.9;
}

.yt-thumb-link:hover .yt-thumb-img {
  transform: scale(1.05);
  opacity: 0.75;
}

.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform 0.25s ease;
}

.yt-thumb-link:hover .yt-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
}

/* ── Links inside about text ────────────────────────────────────────────────── */
.link-warning {
  color: var(--primary) !important;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.link-warning:hover { color: #e0b060 !important; }

/* TIMELINE  (#about) */

.timeline {
  position: relative;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 0; bottom: 0;
  left: 40px;
  width: 2px;
  margin-left: -1px;
  content: '';
  background: linear-gradient(to bottom, var(--primary) 60%, transparent);
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top center;
}

.timeline.line-visible::before {
  opacity: 0.4;
  transform: scaleY(1);
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.5s ease;
}

.timeline > li {
  position: relative;
  min-height: 50px;
  margin-bottom: 50px;
}
.timeline > li::after,
.timeline > li::before { display: table; content: ' '; }
.timeline > li::after   { clear: both; }

.timeline > li .timeline-panel {
  position: relative;
  float: right;
  width: 100%;
  padding: 0 20px 0 100px;
  text-align: left;
}

/* ── Timeline circle ──────────────────────────────────────────────────────── */
.timeline > li .timeline-image {
  position: absolute;
  z-index: 100;
  left: 0;
  width: 80px;
  height: 80px;
  text-align: center;
  border: 3px solid var(--primary);
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--primary-dim);
}

/* Final "Klub został rozwiązany" circle — white bg, dark text */
.timeline > li:last-child .timeline-image {
  background: #ffffff;
}

.timeline > li .timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* "Klub został rozwiązany" text — Bootstrap .text-muted adds color !important so we must too */
.timeline > li .timeline-image h4,
.timeline > li .timeline-image .h4,
.timeline > li .timeline-image h4.text-muted,
.timeline > li .timeline-image h4.text-uppercase {
  font-family: 'Montserrat', sans-serif;
  font-size: 9.4px;
  line-height: 1.3;
  margin: 0;
  padding: 4px 5px;
  color: #000 !important;     /* !important beats Bootstrap's .text-muted */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  word-break: break-word;
  hyphens: auto;
}

.timeline > li.timeline-inverted > .timeline-panel {
  float: right;
  padding: 0 20px 0 100px;
  text-align: left;
}

.timeline-heading h4 {
  color: var(--primary) !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.045rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.44rem;
  text-transform: uppercase;
}

.timeline-body p {
  color: var(--muted) !important;
  line-height: 1.75;
  font-size: 1.067rem;
  margin-bottom: 0;
}

/* Desktop timeline */
@media (min-width: 768px) {
  .timeline::before { left: 50%; }
  .timeline > li { min-height: 100px; margin-bottom: 100px; }
  .timeline > li .timeline-panel {
    float: left;
    width: 41%;
    padding: 0 20px 20px 30px;
    text-align: right;
  }
  .timeline > li .timeline-image {
    left: 50%;
    width: 100px;
    height: 100px;
    margin-left: -50px;
  }
  .timeline > li .timeline-image h4,
  .timeline > li .timeline-image .h4 { font-size: 10.5px; }
  .timeline > li.timeline-inverted > .timeline-panel {
    float: right;
    padding: 0 30px 20px 20px;
    text-align: left;
  }
}

@media (min-width: 992px) {
  .timeline > li { min-height: 150px; }
  .timeline > li .timeline-panel { padding: 0 20px 20px; }
  .timeline > li .timeline-image {
    width: 150px; height: 150px; margin-left: -75px;
  }
  .timeline > li .timeline-image h4,
  .timeline > li .timeline-image .h4 { font-size: 12.1px; }
  .timeline > li.timeline-inverted > .timeline-panel { padding: 0 20px 20px; }
}

@media (min-width: 1200px) {
  .timeline > li { min-height: 170px; }
  .timeline > li .timeline-panel { padding: 0 20px 20px 100px; }
  .timeline > li .timeline-image {
    width: 170px; height: 170px; margin-left: -85px;
  }
  .timeline > li .timeline-image h4,
  .timeline > li .timeline-image .h4 { font-size: 13.2px; }
  .timeline > li.timeline-inverted > .timeline-panel { padding: 0 100px 20px 20px; }
}

/* ACCORDION — archive  (#archive) */
.accordion {
  --bs-accordion-color:               var(--light);
  --bs-accordion-bg:                  var(--dark);
  --bs-accordion-border-color:        var(--border);
  --bs-accordion-border-radius:       8px;
  --bs-accordion-inner-border-radius: 7px;
  --bs-accordion-btn-color:           var(--light);
  --bs-accordion-btn-bg:              var(--dark);
  --bs-accordion-btn-icon:            url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e8e8e8'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-icon-transform:  rotate(-180deg);
  --bs-accordion-btn-active-icon:     url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e8e8e8'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-focus-border-color: transparent;
  --bs-accordion-btn-focus-box-shadow:   none;
  --bs-accordion-active-color:        var(--light);
  --bs-accordion-active-bg:           var(--dark);
  --bs-accordion-body-padding-x:      1.65rem;
  --bs-accordion-body-padding-y:      1.21rem;
}

.accordion-item {
  background: var(--dark) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

/* Subtle hover — no gold */
.accordion-item:hover {
  border-color: var(--border-hover) !important;
}

/* Hard-reset ALL pseudo-elements — kills gold bars from old style-g.css */
.accordion-item::before,
.accordion-item::after,
.accordion-button::before,
.accordion-button.btn-archive::before,
.accordion-button.btn-archive::after {
  display: none !important;
  content: none !important;
  background: none !important;
  border: none !important;
  height: 0 !important;
}

body .accordion-button,
body .accordion-button:not(.collapsed),
body .accordion-button:focus,
body .accordion-button:active {
  box-shadow: none !important;
  border-bottom: none !important;
  outline: none !important;
}

/* Also kill BS5's --bs-accordion-border-color bleed */
body .accordion-item .accordion-header .accordion-button:not(.collapsed) {
  box-shadow: none !important;
}

.accordion-button {
  background: var(--dark) !important;
  color: var(--light) !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  padding: 1.1rem 1.375rem;
  border-radius: 8px !important;
  box-shadow: none !important;
  border: none !important;
}

.accordion-button:not(.collapsed) {
  background: var(--dark) !important;
  color: var(--light) !important;
  box-shadow: none !important;
}

.accordion-button:focus {
  box-shadow: none !important;
  outline: none;
}

.accordion-button:focus-visible {
  outline: 2px solid var(--border-hover);
  outline-offset: -2px;
}

.accordion-button::after {
  background-image: var(--bs-accordion-btn-icon) !important;
  flex-shrink: 0;
}
.accordion-button:not(.collapsed)::after {
  background-image: var(--bs-accordion-btn-active-icon) !important;
  transform: rotate(-180deg);
}

/* Strong tag inside accordion — kill any serif inheritance */
.accordion-button strong {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: inherit;
}

.accordion-body {
  background: var(--dark) !important;
  color: var(--muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  line-height: 1.78;
  border-top: 1px solid var(--border);
}

/* Collapsed content panel background */
.accordion-collapse,
.accordion-collapse.collapse,
.accordion-collapse.collapsing {
  background: var(--dark) !important;
}

#archive .info h5 {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: var(--muted) !important;
}

/* FOOTER */

footer.footer {
  background: #080a0f !important;
  color: var(--muted);
  text-align: center;
  padding: 36px 20px;
  border-top: 1px solid rgba(196, 146, 42, 0.18);
}

footer.footer img {
  max-height: 128px;
  opacity: 0.65;
  margin-bottom: 1.1rem;
  filter: grayscale(20%);
}

footer.footer p {
  font-size: 0.957rem;
  margin-bottom: 0;
  color: var(--muted);
}

/* LANG SWITCHER */

.lang-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1.4;
}

.lang-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-dim);
}

.lang-btn.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-dim);
}

/* Mobile: lang buttons centred inside collapsed menu */
@media (max-width: 767.98px) {
  .navbar-collapse .lang-switcher-mobile {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0 0.25rem;
  }
}

/* FOCUS / ACCESSIBILITY */

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 3px;
}