:root {
  --asphalt: #17181A;
  --page: #F6F5F0;
  --card: #FFFFFF;
  --ink: #232420;
  --muted: #7A786F;
  --teal: #16915F;
  --teal-bg: #E6F5EE;
  --gold: #B8842A;
  --red: #C8202F;
  --line: #E7E4DA;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
}

a { color: inherit; text-decoration: none; }

.nav {
  background: var(--asphalt);
  color: #F2F0E8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-left { display: flex; align-items: center; gap: 18px; }

.brand {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.league-switcher { position: relative; font-family: 'IBM Plex Mono', monospace; font-size: 12px; }

.league-switcher summary {
  background: #26282B;
  border: 1px solid #3A3C3E;
  border-radius: 5px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #F2F0E8;
  cursor: pointer;
  list-style: none;
}

.league-switcher summary::-webkit-details-marker { display: none; }
.league-switcher[open] summary { border-color: var(--teal); }

.league-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #1F2123;
  border: 1px solid #3A3C3E;
  border-radius: 6px;
  min-width: 220px;
  overflow: hidden;
  z-index: 20;
}

.league-menu a { display: block; padding: 10px 14px; color: #E8E6DE; font-size: 13px; }
.league-menu a:hover { background: #2A2C2E; }
.league-menu a.active { color: #4FD8A0; }

.nav-links { display: flex; gap: 26px; font-size: 14px; font-weight: 500; flex-wrap: wrap; }
.nav-links a { color: #A6A49A; padding: 10px 0; display: inline-block; }
.nav-links a.active, .nav-links a:hover { color: #4FD8A0; }

.hero { background: var(--asphalt); color: #fff; padding: 44px 32px 56px; text-align: center; border-bottom: 5px solid var(--teal); }
.hero-title { font-size: 15px; margin-bottom: 16px; }
.hero-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #C9A24B;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-empty { color: #9A9890; font-size: 14px; }

.hero-player { display: grid; grid-template-columns: 1fr 1fr; width: 500px; margin: auto; place-items: center; }
.avatar-player { height: 250px; width: auto; box-shadow: 0 0 20px 3px var(--teal); }

.scoreboard { display: inline-flex; align-items: center; gap: 24px; }
.scoreboard .team { font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 500; width: 170px; }
.scoreboard .team.right { text-align: right; }
.scoreboard .score { font-family: 'Teko', sans-serif; font-weight: 600; font-size: 60px; line-height: 1; }
.scoreboard .score .sep { color: #6B6960; padding: 0 6px; }

.wrap { max-width: 1140px; margin: -28px auto 0; padding: 0 32px 48px; position: relative; }
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }

.grid h2 {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 5px 0;
}
.grid .excerpt {
	font-size: 15px;
}

.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before { content: ''; width: 4px; height: 16px; background: var(--teal); display: inline-block; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }

table.standings { width: 100%; border-collapse: collapse; font-size: 13px; }
table.standings th {
  text-align: left;
  background: var(--teal-bg);
  color: var(--teal);
  font-weight: 600;
  padding: 8px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.standings td { padding: 8px 12px; border-bottom: 1px solid var(--line); font-family: 'IBM Plex Mono', monospace; }
table.standings td.team-name { font-family: 'IBM Plex Sans', sans-serif; font-weight: 500; color: var(--ink); }
table.standings td.num { text-align: right; }

footer { text-align: center; padding: 24px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

.form-icons { display: flex; gap: 3px; justify-content: flex-end; }
.form-icon {
  width: 16px; height: 16px; border-radius: 3px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', monospace;
}
.form-icon.W { background: var(--teal-bg); color: var(--teal); }
.form-icon.D { background: #F5EDD9; color: var(--gold); }
.form-icon.L { background: #FBE4E4; color: var(--red); }

.hero-slider { position: relative; height: 500px; overflow: hidden; margin: -44px -32px -56px; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 0.6s ease; display: flex; align-items: flex-end;
}
.hero-slide.active { opacity: 1; }
.hero-slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,24,26,0.50) 0%, rgba(23,24,26,1) 100%); }
.hero-slide-overlay { position: absolute; z-index: 1; padding: 32px; text-align: center; width: 100%; transform: translateY(-50%); top: 50%; }
.hero-slide-label { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #C9A24B; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.hero-slide-headline { font-family: 'Oswald', sans-serif; font-size: 26px; font-weight: 600; color: #fff; max-width: 640px; margin: 0 auto 18px; line-height: 1.3; }
.hero-slide-btn { display: inline-block; background: var(--teal); color: #fff; padding: 10px 24px; border-radius: 5px; font-size: 13px; font-weight: 600; }
.hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: #fff;
  border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; z-index: 2;
}
.hero-nav.prev { left: 16px; }
.hero-nav.next { right: 16px; }

.news-cover { width: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }

/* Reusable component classes — replaces repeated inline styles */
.avatar { border-radius: 50%; object-fit: cover; display: block; flex-shrink: 0; }
.avatar-xs { width: 24px; height: 24px; }
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 56px; height: 56px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-placeholder {
  border-radius: 50%; background: var(--teal-bg); color: var(--teal); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-weight: 600;
}
.avatar-placeholder.avatar-xs { font-size: 11px; }
.avatar-placeholder.avatar-sm { font-size: 14px; }
.avatar-placeholder.avatar-md { font-size: 20px; }
.avatar-placeholder.avatar-lg { font-size: 22px; }

.card-pad { padding: 16px; }
.card-pad-lg { padding: 20px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.m-0 { margin: 0 !important; }
.m-auto { margin: auto !important; }
.mb-5 { margin-bottom: 5px; }
.mb-15 { margin-bottom: 15px; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.g-15 { gap: 15px; }

.slide-button {
	align-content: center;
	justify-content: center;
	align-items: center;
	height: 26px;
	gap: 10px;
}
.slide-button button.btn {
	width: 30px;
	display: inline-block;
	height: 25px;
	line-height: 1;
	padding: 0;
	text-align: center;
	font-size: 20px;
	align-content: center;
	background-color: transparent;
	border: 1px solid var(--card);
}
#matchSlider .match-slide-wrap {
    position: relative;
}

#matchSlider .match-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
}

#matchSlider .match-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative; /* aktivni slajd diktira visinu wrapper-a */
}
.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; transition: background 0.15s ease;
}
.list-row:last-child { border-bottom: none; }
a.list-row:hover { background: var(--page); margin: 0 -8px; padding: 10px 8px; }

.meta-mono { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--muted); }
.badge-pill { font-family: 'IBM Plex Mono', monospace; font-size: 11px; background: var(--teal-bg); color: var(--teal); padding: 4px 10px; border-radius: 4px; }

.team-cell { display: flex; align-items: center; gap: 8px; }
.score-lg { font-family: 'Teko', sans-serif; font-weight: 600; font-size: 24px; }

.stat-line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.stat-line:last-child { border-bottom: none; }
.stat-line dt { color: var(--muted); margin: 0; }
.stat-line dd { margin: 0; font-family: 'IBM Plex Mono', monospace; }

.grid-cards { display: grid; gap: 10px; }
.grid-cards .card.card-link { grid-template-columns: 1fr 2fr; display: grid; }
.grid-cards .card.card-link h2 { font-size: 16px; font-weight: 600; line-height: 1.2; padding: 0; margin: 0; }
.grid-cards .card.card-link p.meta-mono { margin-top: 6px; }
.grid-cards .card.card-link p.text { margin: 0; font-size: 13px; }
.grid-cards-wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.grid-cards.column-auto { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }

.related-link { grid-template-columns: 1fr 2fr; display: grid; gap: 10px; margin-bottom: 10px; }

.card-link { display: block; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.card-link:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-1px); }

.round-pill { font-family: 'IBM Plex Mono', monospace; font-size: 12px; padding: 6px 12px; border-radius: 5px; background: var(--teal-bg); color: var(--teal); }
.round-pill.active { background: var(--teal); color: #fff; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

.timeline-row { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.timeline-row:last-child { border-bottom: none; }
.timeline-side { display: flex; align-items: center; gap: 8px; }
.timeline-side.left { justify-content: flex-end; text-align: right; }
.timeline-side.right { justify-content: flex-start; text-align: left; }
.timeline-center { text-align: center; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--muted); font-weight: 600; }
.timeline-note { font-size: 11px; color: var(--muted); }

.compare-row { display: flex; align-items: center; background: var(--page); border-radius: 5px; margin-bottom: 6px; overflow: hidden; }
.compare-value { background: var(--asphalt); color: #fff; font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 13px; padding: 9px 0; width: 46px; text-align: center; flex-shrink: 0; }
.compare-label { flex: 1; text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-family: 'IBM Plex Mono', monospace; }
.compare-full { text-align: center; font-size: 12px; color: var(--muted); padding: 9px 0; background: var(--page); border-radius: 5px; margin-bottom: 6px; }

.search-input { width: 100%; max-width: 340px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; font-family: 'IBM Plex Sans', sans-serif; font-size: 14px; }
.filter-select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-family: 'IBM Plex Sans', sans-serif; }
.btn-primary { padding: 9px 18px; background: var(--teal); color: #fff; border: none; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; }
.filter-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.player-card { display: flex; align-items: center; gap: 10px; padding: 10px; }

.partners-bar {
  background: #1F2123; display: flex; align-items: center; gap: 20px; padding: 10px 32px;
  flex-wrap: wrap;
}
.partners-bar img { height: 33px; width: auto; object-fit: contain; filter: grayscale(0.15); opacity: 0.9; }
.federation + .sponsor,
.sponsor:first-child { margin-left: auto; }
.partners-bar a { line-height: 0; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 100px; width: auto; object-fit: contain; border-radius: 50%; }

nav[role="navigation"] div:first-child { display: none; }
nav[role="navigation"] div span { display: flex; gap: 10px; text-align: center; justify-content: center; }
nav[role="navigation"] div span svg { height: 16px; width: auto; }
nav[role="navigation"] div span a, nav[role="navigation"] div span span { vertical-align: middle; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
nav[role="navigation"] div span span { color: #16915F; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gallery-thumb { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.gallery-thumb:hover img { transform: scale(1.05); }


.lightbox {
  display: none; position: fixed; inset: 0; background: rgba(15,16,17,0.94); z-index: 100;
  align-items: center; justify-content: center; padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; display: block; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px; background: none; border: none; color: #fff;
  font-size: 32px; line-height: 1; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); color: #fff;
  border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer;
}
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

.gallery-thumb { border: none; background: none; padding: 0; cursor: pointer; font: inherit; }

.lightbox {
  display: none; position: fixed; inset: 0; background: rgba(23,24,26,0.95); z-index: 100;
  align-items: center; justify-content: center; flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 88vw; max-height: 80vh; object-fit: contain; border-radius: 4px; }
.lightbox-caption { color: #F2F0E8; font-family: 'IBM Plex Sans', sans-serif; font-size: 13px; margin-top: 14px; text-align: center; max-width: 70vw; }
.lightbox-close { position: absolute; top: 20px; right: 24px; background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; line-height: 1; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); color: #fff;
  border: none; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; cursor: pointer;
}
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 0;
}
.hamburger span { display: block; width: 100%; height: 2px; background: #F2F0E8; border-radius: 2px; }

/* Offcanvas panel */
.offcanvas {
  position: fixed; top: 0; right: 0; height: 100%; width: 78%; max-width: 300px;
  background: var(--asphalt); z-index: 101; transform: translateX(100%); transition: transform 0.25s ease;
  padding: 24px 20px; box-sizing: border-box; overflow-y: auto;
}
.offcanvas.open { transform: translateX(0); }
.offcanvas-links { display: flex; flex-direction: column; gap: 4px; margin-top: 36px; }
.offcanvas-links a { color: #E8E6DE; font-size: 15px; font-weight: 500; padding: 12px 4px; border-bottom: 1px solid #2A2C2E; }
.offcanvas-links a.active { color: #4FD8A0; }
.offcanvas-close { position: absolute; top: 18px; right: 18px; background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; }

.offcanvas-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100;
  opacity: 0; transition: opacity 0.25s ease;
}
.offcanvas-backdrop.open { display: block; opacity: 1; }

.team-logo { height: 150px; width: auto; border-radius: 0; }
.hero-team { background: #F0F0EF; background-size: cover; }
.hero-player-show { background-size: cover; padding: 50px 20px; text-align: center; color: white; }
.team-avatar { width: auto; border-radius: 0; margin: 0 auto 10px; max-width: 181px; object-fit: fill; }

.matches-filter > div {
	width: 100%;
}
.matches-filter select {
	display: block;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 100%;
	padding: 7px 26px 7px 12px;
	font-size: 14px;
	font-family: system-ui, -apple-system, sans-serif;
	color: #1e293b;
	background-color: #ffffff;
	border: 2px solid #cbd5e1;
	border-radius: 7px;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.matches-table {
	width: 100%;
}
.matches {
	display: table-row;
	text-align: center;
}
.matches th, .matches td {
	padding: 7px 10px;
	border-bottom: 1px solid var(--line);
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--muted);
	border: none;
	border-radius: 6px;
	padding: 0;
	box-shadow: 0 8px 20px rgba(0,0,0,0.25);
	opacity: 0;
	visibility: hidden;
	z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a { display: block; padding: 8px 16px; white-space: nowrap; color: inherit; text-decoration: none; font-size: 14px; transition: background 0.15s ease; }
.nav-dropdown-menu a:hover { color: var(--card); background-color: var(--teal); }

@media (max-width: 768px) {
    .nav-dropdown-menu {
      position: static;
      opacity: 1;
      visibility: visible;
      transform: none;
      box-shadow: none;
      border: none;
      background: transparent;
      margin-top: 0;
      padding-left: 16px;
      display: block;
      color: var(--line);
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }
}

@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .wrap { margin-top: 0; padding-top: 24px; }
  .grid-2 { display: block; }
  table.standings { overflow-x: scroll; display: block; }
  .standings tr { text-align: center; margin: auto; margin-bottom: 15px; box-shadow: 0 0 7px 0 #b2b0b0; display: grid; grid-template-columns: 1fr 1fr; gap: 0px; }
  .standings tr th:nth-child(1), .standings tr td:nth-child(1), .standings tr th:nth-child(4), .standings tr td:nth-child(4) { grid-column: 1 / -1; }
  table.standings tbody { width: 100%; display: block; }
  table.standings th { text-align: center; }
  table.standings td.team-name { text-align: center; margin: auto; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav { display: flex; flex-wrap: nowrap; }
  .nav-left { flex-direction: column; }
  .partners-bar { flex-wrap: initial; }
  .scoreboard { display: flex; }
  .grid-cards.column-auto { grid-template-columns: 1fr 1fr; }
  .hero-player { grid-template-columns: 1fr; width: auto; gap: 25px; }
  .list-row.matches { grid-template-columns: 1fr 1fr; display: grid; text-align: center; }
  .list-row.matches th:nth-child(1), .list-row.matches th:nth-child(2), .list-row.matches th:nth-child(3) { grid-column: 1 / -1; }
  .list-row.matches td:nth-child(1), .list-row.matches td:nth-child(2), .list-row.matches td:nth-child(3) { grid-column: 1 / -1; }
  .list-row.matches td:last-child { grid-column: 1/-1; }
  .list-row.matches td { text-align: center; margin: auto; }
  .list-row.matches td:nth-child(5) { font-weight: 600; font-size: 16px; }
  .matches th, .matches td { border: none !important; }
  table.standings {
	overflow-x: scroll;
	display: flex;
	width: 100%;
}
  .standings.tabela-standings tr {
	display: table-row;
	box-shadow: none;
}
.standings.tabela-standings tr td:nth-child(1) {
	position: sticky;
	width: 170px;
	background-color: var(--card);
	left: 0;
    z-index: 2;
}

.standings.tabela-standings tr th:nth-child(1) {
    position: sticky;    
	width: 170px;
	background-color: var(--teal-bg);
	left: 0;
    z-index: 2;
}
}