:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --text-main: #f5f5f5;
  --text-muted: #a0a0a0;
  --gold-primary: #FFD700;
  --gold-hover: #F2C900;
  --gold-dark: #B8860B;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 215, 0, 0.1);
  --nav-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: white;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold-primary);
}

.text-gold {
  color: var(--gold-primary);
}

.text-muted {
  color: var(--text-muted);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  transition: transform 0.3s ease-in-out;
}

nav.hidden {
  transform: translateY(-100%);
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.logo span {
  color: var(--gold-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  outline: none;
}

/* Animated SVG Hamburger */
.ham {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 400ms;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  width: 60px;
}

.hamRotate.active {
  transform: rotate(45deg);
}

.ham .line {
  fill: none;
  transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
  stroke: var(--gold-primary);
  stroke-width: 5.5;
  stroke-linecap: round;
}

.ham7 .top {
  stroke-dasharray: 40 82;
}

.ham7 .middle {
  stroke-dasharray: 40 111;
}

.ham7 .bottom {
  stroke-dasharray: 40 161;
}

.ham7.active .top {
  stroke-dasharray: 17 82;
  stroke-dashoffset: -62px;
}

.ham7.active .middle {
  stroke-dashoffset: 23px;
}

.ham7.active .bottom {
  stroke-dashoffset: -83px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--gold-primary);
  color: #000;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  color: #000;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold-primary);
  color: var(--gold-primary);
}

.btn-outline:hover {
  background: var(--gold-primary);
  color: #000;
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 215, 0, 0.3);
}

/* Views & Layouts */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

section {
  padding: 6rem 0;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: 0;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: brightness(0.4);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.1) 60%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  z-index: 1;
  text-align: left;
  margin: 0;
  padding: 0 2rem 3rem 5%;
  /* Top, Right, Bottom, Left. % left matches nav padding */
}

.hero-content p {
  font-size: 1.2rem;
  margin: 1.5rem 0 2.5rem;
  color: var(--text-muted);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: white;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Schedule & Sponsors */
.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.schedule-table th,
.schedule-table td {
  padding: 1.2rem;
  border: 1px solid var(--glass-border);
  text-align: center;
}

.schedule-table th {
  background: rgba(255, 215, 0, 0.1);
  color: var(--gold-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.schedule-table td {
  color: white;
  background: rgba(0, 0, 0, 0.4);
}

.schedule-table .time-col {
  font-weight: 700;
  color: var(--gold-primary);
  background: rgba(255, 215, 0, 0.05);
  white-space: nowrap;
}

/* Badges for classes */
.badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-adv {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
  border: 1px solid #3498db;
}

.badge-sharks {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid #e74c3c;
}

.badge-tigers {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
  border: 1px solid #f1c40f;
}

.sponsor-logo {
  width: calc(100% + 4rem);
  height: 220px;
  object-fit: contain;
  background-color: white;
  object-position: center;
  margin: -2rem -2rem 1.5rem -2rem;
  border-radius: 12px 12px 0 0;
  opacity: 0.9;
  transition: opacity 0.3s ease;
  display: block;
  padding: 1rem;
}

.glass-card:hover .sponsor-logo {
  opacity: 1;
}

/* Helpers */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* Table */
.plb-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

.plb-table th,
.plb-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.plb-table th {
  color: var(--gold-primary);
  font-weight: 600;
  text-transform: uppercase;
}

.plb-table tr:hover {
  background: rgba(255, 215, 0, 0.05);
}

/* Loader */
.loader {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--gold-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

/* Animations */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-content {
    padding: 0 5% 4rem 5%;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 999;
    padding-top: calc(var(--nav-height) + 4rem);
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
  }

  .nav-links.active {
    display: flex;
    animation: menuFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  @keyframes menuFadeIn {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 800;
    letter-spacing: -2px;
    text-transform: uppercase;
    color: #444; /* Dim color by default for high contrast on hover */
    transition: all 0.15s ease-out;
    display: inline-block;
    position: relative;
    line-height: 1.1;
    -webkit-text-stroke: 1px transparent;
  }

  .nav-links a.text-gold {
    color: var(--gold-primary);
  }

  .nav-links a:hover,
  .nav-links a.is-clicked {
    color: #fff;
    transform: translateX(10px);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), -2px -2px 0 var(--gold-primary);
  }

  /* Kreska podświetlająca po najechaniu */
  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gold-primary);
    transition: width 0.15s ease-out;
    box-shadow: 0 0 10px var(--gold-primary);
  }

  .nav-links a:hover::after,
  .nav-links a.is-clicked::after {
    width: 100%;
  }

  .hamburger {
    display: block;
    position: relative;
    z-index: 1001;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* AIO / SEO classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--accent);
  color: var(--light);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
  gap: 2rem;
  transform: translateY(0);
  transition: transform 0.5s ease-in-out, opacity 0.5s;
}

.cookie-banner.fade-out-down {
  transform: translateY(100%);
  opacity: 0;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cookie-content p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #ccc;
}

@media (max-width: 1024px) {
  .cookie-banner {
    flex-direction: column;
    padding: 1.5rem;
    text-align: center;
  }

  .cookie-content {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Ukrycie skrótów mobilnych na desktopach jako domyślne */
.show-mobile {
  display: none;
}

.show-mobile-flex {
  display: none;
}

/* ------------------------------------- */
/* RESPONSIVE TABLES (Mobilne dopasowanie) */
/* ------------------------------------- */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }

  .show-mobile {
    display: inline !important;
  }

  .show-mobile-flex {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .schedule-table,
  .plb-table {
    font-size: 0.75rem;
    table-layout: auto;
    width: 100%;
  }

  .schedule-table th,
  .schedule-table td,
  .plb-table th,
  .plb-table td {
    padding: 0.5rem 0.2rem;
  }

  /* Zmniejszenie flag dla Harmonogramu żeby się mieściły */
  .schedule-table .badge {
    font-size: 0.6rem;
    padding: 0.2rem;
    display: inline-block;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    line-height: 1.1;
  }

  /* Niech tylko nazwy klubów łamią się zachowując miejsce */
  .plb-table td:nth-child(2) {
    white-space: normal !important;
    word-break: break-word;
  }

  /* Zablokowanie łamania słowa 'PKT' i krótkich numerków */
  .plb-table th,
  .plb-table td:nth-child(1),
  .plb-table td:nth-child(3),
  .plb-table td:nth-child(4),
  .plb-table td:nth-child(5) {
    white-space: nowrap !important;
    word-break: normal !important;
    text-align: center;
  }

  .plb-table td:nth-child(2) {
    text-align: left;
  }

  /* Na najmniejszych ekranach ukrywamy kolumny z detalami z tabeli PLB 
       zostawiając tylko: Miejsce, Nazwę, Punkty, W i P */
  .plb-table th:nth-child(6),
  .plb-table td:nth-child(6),
  /* Mecze */
  .plb-table th:nth-child(7),
  .plb-table td:nth-child(7)

  /* Małe Punkty */
    {
    display: none !important;
  }

  /* Troche mniejsza czcionka dla dat w harmonogramie dla dopasowania */
  .schedule-table .time-col {
    font-size: 0.7rem;
  }

  /* Aktualności: usunięto padding żeby ramka mogła się rozciągnąć */
  .aktualnosci-section {
    width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .aktualnosci-panel {
    padding: 2rem 0 !important;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow-x: hidden !important;
  }

  .aktualnosci-panel .grid-2 {
    gap: 2rem !important;
  }

  .aktualnosci-panel > .grid-2 > div:first-child {
    padding: 0 1.5rem;
    text-align: center !important;
  }

  .fb-wrapper {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  /* CTA Banner na stronie głównej */
  .cta-banner {
    flex-direction: column !important;
    text-align: center;
    padding: 1.5rem !important;
  }

  .cta-banner > div {
    width: 100%;
  }

  .cta-banner .cta-text {
    min-width: unset !important;
  }

  .cta-banner .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer: wyrównanie tekstu na mobilnych */
  footer .grid-2 > div:last-child {
    text-align: left !important;
  }

  /* Hero na aktualnosci: mniejszy padding na dole */
  .hero-aktualnosci {
    padding-bottom: 4rem !important;
  }
}