/* PPL XXVI – Key Visual: granat, złoto, stadion nocą */
:root {
  --navy: #0a1628;
  --navy-mid: #122240;
  --navy-light: #1a3358;
  --gold: #d4af37;
  --gold-bright: #f0c94a;
  --white: #ffffff;
  --muted: #8fa3bf;
  --live-red: #ff3b3b;
  --success: #2ecc71;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,.35);
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Bebas Neue', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--navy);
  color: var(--white);
  line-height: 1.5;
  min-height: 100vh;
}

.container { width: min(1120px, 92vw); margin: 0 auto; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,22,40,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212,175,55,.2);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0; gap: 1rem;
}
.logo { display: flex; align-items: baseline; gap: .35rem; text-decoration: none; color: var(--white); }
.logo-edition { font-family: var(--font-display); font-size: 1.75rem; color: var(--gold); letter-spacing: .05em; }
.logo-text { font-weight: 800; font-size: 1rem; opacity: .8; }
.main-nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; }
.main-nav a { color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: none; padding: .35rem 0; }
.main-nav a:hover, .main-nav a.active { color: var(--gold); }
.main-nav .nav-live { color: var(--gold-bright); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy-mid); flex-direction: column; padding: 1rem;
    border-bottom: 1px solid rgba(212,175,55,.2);
  }
  .main-nav.open { display: flex; }
}

/* Hero */
.hero {
  position: relative; min-height: 72vh;
  display: flex; align-items: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #0d1f3c 0%, var(--navy) 45%, #050d18 100%);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../img/bg-banner.jpg');
  background-repeat: no-repeat;
  /* mobile: prawo, środek w pionie */
  background-position: right center;
  background-size: cover;
}
@media (min-width: 768px) {
  .hero-bg::after {
    /* desktop: prawy dolny róg */
    background-position: right bottom;
    background-size: cover;
  }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 22, 40, 0.92) 0%, rgba(10, 22, 40, 0.55) 42%, transparent 72%),
    linear-gradient(180deg, rgba(10, 22, 40, 0.35) 0%, transparent 40%);
}
.hero-content { position: relative; z-index: 1; padding: 4rem 0 3rem; }
.hero-edition {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 8rem);
  line-height: .9;
  margin: 0 0 -.25rem;
  letter-spacing: .04em;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.5px var(--gold);
  paint-order: stroke fill;
}
@media (min-width: 768px) {
  .hero-edition { -webkit-text-stroke-width: 2px; }
}
.hero-title {
  font-size: clamp(1.35rem, 3.8vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 1rem;
  max-width: 22ch;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.15;
}
.hero-meta-list { margin-bottom: 1.35rem; }
.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.4rem;
  font-size: clamp(0.95rem, 2.5vw, 1.125rem);
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero-meta-row .bi { font-size: 1.15em; flex-shrink: 0; opacity: 0.95; }
.hero-meta-row--venue { color: var(--white); }
.hero-meta-row--venue .bi { color: var(--white); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Bootstrap Icons – wspólne */
.leader-card h3 .bi,
.info-card .bi { color: var(--gold); }
.leader-card h3 .bi { margin-right: 0.35rem; }
.info-card { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.info-card .bi { font-size: 1.5rem; }
.ev-icon-goal { color: var(--white); }
.ev-icon-yellow { color: #f0c94a; }
.ev-icon-red { color: #ff4d4d; }
.ev-icon-mvp { color: var(--gold-bright); }
.ev-icon-warn { color: #ffb020; }
.ev-icon-muted { color: var(--muted); font-size: 0.5rem; }
.confirmed-badge .bi { margin-right: 0.35rem; color: var(--success); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.25rem; border-radius: var(--radius);
  font-weight: 700; font-size: .9375rem; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-bright)); color: var(--navy); border-color: var(--gold); }
.btn-primary { background: var(--navy-light); color: var(--white); border-color: var(--gold); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.35); }
.btn-ghost { background: rgba(255,255,255,.08); color: var(--white); }
.btn-sm { padding: .5rem .85rem; font-size: .8125rem; }
.btn-block { display: flex; width: 100%; }

/* Sections */
.section { padding: 3rem 0; }
.section-dark { background: var(--navy-mid); }
.section h2 { font-size: 1.5rem; margin: 0 0 1.25rem; }
.section-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }

.live-pulse-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--live-red); color: #fff; font-size: .7rem; font-weight: 800;
  padding: .25rem .6rem; border-radius: 999px; animation: pulse 1.5s infinite;
}
.live-pulse-badge::before { content: ''; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
@keyframes pulse { 50% { opacity: .7; } }

/* Live pitches */
.live-pitches-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .live-pitches-grid { grid-template-columns: 1fr; } }
.pitch-card {
  background: var(--navy-light); border-radius: var(--radius);
  padding: 1.25rem; border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}
.pitch-card.is-live { border-color: rgba(255,59,59,.5); box-shadow: 0 0 0 1px rgba(255,59,59,.3), var(--shadow); }
.pitch-card-head { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.pitch-label { font-weight: 700; }
.pitch-score { font-family: var(--font-display); font-size: 2.5rem; color: var(--gold); text-align: center; }
.pitch-timer { text-align: center; font-size: 1.25rem; font-weight: 700; color: var(--muted); margin: .5rem 0 1rem; }
.team-line { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.team-line.away { justify-content: flex-end; }
.crest-sm { width: 28px; height: 28px; object-fit: contain; }
.crest-xs { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }

/* Herb drużyny — logo w białym kole ze złotą obwódką */
.crest-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.92);
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
  padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  vertical-align: middle;
}

.crest-ring__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: scale(1.2);
  transform-origin: center center;
}

.crest-ring--xs {
  width: 26px;
  height: 26px;
  border-width: 1.5px;
}

.crest-ring--xs .crest-ring__img {
  transform: scale(1.15);
}

.crest-ring--sm {
  width: 32px;
  height: 32px;
}

.crest-ring--md {
  width: 72px;
  height: 72px;
}

.crest-ring--lg {
  width: 80px;
  height: 80px;
}

.crest-ring--xl {
  width: 140px;
  height: 140px;
  max-width: min(180px, 40vw);
  max-height: min(180px, 40vw);
}

.crest-ring--xl .crest-ring__img {
  transform: scale(1.22);
}
.status-badge { font-size: .7rem; font-weight: 700; padding: .2rem .5rem; border-radius: 4px; background: rgba(255,255,255,.1); }
.status-badge.live { background: var(--live-red); color: #fff; }
.status-badge.sm { font-size: .65rem; }

/* Match list */
.match-list { display: flex; flex-direction: column; gap: .5rem; }
.match-row {
  display: grid;
  grid-template-columns: 3.75rem minmax(5.25rem, auto) 1fr auto;
  gap: 0.65rem 0.85rem;
  align-items: center;
  padding: .85rem 1rem; background: var(--navy-light); border-radius: 8px;
  color: inherit; text-decoration: none; border: 1px solid transparent;
}
.match-row:hover { border-color: rgba(212,175,55,.3); text-decoration: none; }
.match-row.is-live { border-color: rgba(255,59,59,.4); }
.match-time { font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.match-score-inline { margin: 0; color: var(--gold); flex-shrink: 0; }
.match-teams-lineup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  min-width: 0;
}
.match-team-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 0;
}
.match-team-cell--home { justify-content: flex-end; }
.match-team-cell--away { justify-content: flex-start; }
.match-team-name {
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 7.5rem;
}
.pitch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
.pitch-badge--a {
  color: #e8d48a;
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.28);
}
.pitch-badge--b {
  color: #a8c8ff;
  background: rgba(72, 130, 210, 0.16);
  border-color: rgba(100, 149, 237, 0.32);
}

/* Tables */
.table-wrap { overflow-x: auto; }
.standings-table, .data-table {
  width: 100%; border-collapse: collapse; font-size: .875rem;
}
.standings-table th, .data-table th {
  text-align: left; padding: .5rem; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.standings-table td, .data-table td { padding: .5rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.standings-table .pts { font-weight: 800; color: var(--gold); }
.standings-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 0 0 1rem;
}
.standings-tabs { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .standings-tabs { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }

/* Leaders */
.stats-leaders-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.leader-card { background: var(--navy-light); padding: 1rem; border-radius: var(--radius); }
.leader-list { list-style: none; margin: 0; padding: 0; }
.leader-list li { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.leader-list .pos { color: var(--gold); font-weight: 700; margin-right: .5rem; }

.columns-2 { display: grid; gap: 2rem; }
@media (min-width: 768px) { .columns-2 { grid-template-columns: 1fr 1fr; } }
.feed-item { padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.feed-item time { color: var(--gold); font-weight: 600; margin-right: .5rem; }
.feed-card { border-left: 3px solid #c9a800; padding-left: .65rem; }
.feed-goal { border-left: 3px solid #3d8fd4; padding-left: .65rem; }
.stream-events-block { margin-top: 2rem; }
.stream-overlay-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1.25rem; }
.stream-timer { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--gold); }
.stream-events-block h2 { margin-bottom: 1rem; }
.info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.info-card {
  padding: 1rem; background: var(--navy-light); border-radius: 8px;
  text-align: center; color: var(--white); font-weight: 600; text-decoration: none;
}
.info-card.gold { border: 1px solid var(--gold); }

/* Match detail */
.match-detail-scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center;
  padding: 2rem 0; text-align: center;
}
.score-big { font-family: var(--font-display); font-size: 4rem; color: var(--gold); line-height: 1; }
.crest-lg { width: 72px; height: 72px; object-fit: contain; }
.events-timeline { list-style: none; padding: 0; }
.event-item { display: flex; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid rgba(255,255,255,.06); align-items: center; }
.event-item .ev-icon { display: inline-flex; width: 1.25rem; justify-content: center; flex-shrink: 0; }
.confirmed-badge { color: var(--success); font-weight: 600; }

/* Teams */
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.team-card {
  background: var(--navy-light); padding: 1.25rem; border-radius: var(--radius);
  text-align: center; color: inherit; text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-card .crest-ring {
  margin-bottom: 0.65rem;
}

.crest-md { width: 56px; height: 56px; object-fit: contain; }
.badge { display: inline-block; font-size: .7rem; background: rgba(212,175,55,.2); color: var(--gold); padding: .15rem .4rem; border-radius: 4px; }

/* Streams */
.stream-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.stream-player-wrap {
  position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden;
}
.stream-player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-overlay-bar {
  display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem;
  background: var(--navy-light); border-radius: 8px; margin-bottom: .75rem;
}
.stream-score { font-family: var(--font-display); font-size: 1.75rem; color: var(--gold); }
.stream-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--muted); }

/* Footer */
/* Footer — assets/css/footer.css */

.muted { color: var(--muted); }
.link-more { display: inline-block; margin-top: 1rem; font-weight: 600; }
.link-more.light { color: var(--gold); }
.filters-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filters-bar select, .filters-bar button { padding: .5rem .75rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: var(--navy-light); color: var(--white); }
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .5rem 1rem; border-radius: 8px; background: var(--navy-light); color: var(--muted); text-decoration: none; }
.tabs a.active { background: var(--gold); color: var(--navy); }

.sponsors-row { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: center; opacity: .85; }

/* Podgląd / tryb testowy */
.debug-banner {
  background: #8b0000;
  color: #fff;
  font-size: .8rem;
  padding: .35rem 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 9999;
}
.debug-banner a { color: #ffeb99; }
body.has-debug-banner .site-header { top: 0; }

.preview-banner {
  background: linear-gradient(90deg, #8b6914, var(--gold));
  color: var(--navy);
  font-size: .85rem;
  padding: .5rem 0;
  position: sticky;
  top: 0;
  z-index: 120;
}
.preview-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
}
.preview-banner a { color: var(--navy); font-weight: 700; text-decoration: underline; }
.preview-note { opacity: .85; font-size: .8rem; }
body.has-preview-banner .site-header { top: 0; }

/* Mobile: banery przewijają się z treścią; sticky tylko menu */
@media (max-width: 768px) {
  .debug-banner,
  .preview-banner {
    position: static;
    top: auto;
    z-index: auto;
  }

  body.has-debug-banner .site-header,
  body.has-preview-banner .site-header {
    top: 0;
  }
}

body.nav-mobile-open {
  overflow: hidden;
}
.page-preview .preview-form { max-width: 480px; margin: 1.5rem 0; padding: 1.25rem; }
.preview-form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.preview-form-row label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; }
.preview-form-row input { padding: .5rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: var(--navy-light); color: var(--white); }
.preview-form-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.preview-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 2rem; }
.preview-shortcuts { list-style: none; padding: 0; }
.preview-shortcuts li { margin: .35rem 0; }
.link-btn { background: none; border: none; color: var(--gold); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.preview-hint { padding: .75rem 1rem; border-radius: 8px; background: rgba(255,255,255,.06); margin-bottom: 1rem; }
.preview-hint.ok { border-left: 3px solid var(--gold); }
.badge-muted { background: rgba(255,255,255,.08); color: var(--muted); }
