:root {
  --gap: 12px;
  /* map club theme to generic vars used below */
  --primary: var(--club-primary, #7a0c0c);
  --secondary: var(--club-secondary, #1a1a1a);
  --accent: var(--club-accent, #c9a227);
  --text-on-primary: var(--club-text-on-primary, #ffffff);
  --text-on-secondary: var(--club-text-on-secondary, #ffffff);
  /* light defaults */
  --bg: #f8f9fb;
  --text: #1a1a1a;
  --card-bg: #ffffff;
  --card-border: rgba(0,0,0,0.08);
  --light-gray: rgba(0,0,0,0.12);
  --dark-gray: #4a5568;
  --bg-soft: #f2f2f2;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Fade-in animation for lazy-loaded content */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-visible {
  animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-hidden {
  opacity: 0;
}

/* Loading skeleton */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-soft) 0%,
    color-mix(in srgb, var(--bg-soft) 80%, white) 50%,
    var(--bg-soft) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* Chakra adds .chakra-ui-dark on the html element when in dark mode */
.chakra-ui-dark {
  --bg: #0f1115;
  --text: #e8eaf0;
  --card-bg: #1a1d29;
  --card-border: rgba(255,255,255,0.12);
  --dark-gray: #a0aec0;
  --bg-soft: #1a1f29;
  --ring: rgba(255,255,255,0.10);
  --light-gray: rgba(255,255,255,0.12);
  background: #0f1115;
  color: #e8eaf0;
}

.home-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.home-header h1 {
  display: block;
  color: var(--text);
}
.home-header .subtitle {
  color: var(--dark-gray) !important; /* readable subtitle */
}
.home-header img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
}

.categories-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gap);
  margin-bottom: 24px;
}
.hero-grid {
  /* Make the big card height equal to two small cards + the gap */
  --hero-small-h: 220px;
}
.hero-grid .small { height: var(--hero-small-h); }
.hero-grid .big { height: calc(var(--hero-small-h) * 2 + var(--gap)); }
.hero-grid .big {
  position: relative;
}
.hero-grid .small-col {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: var(--gap);
}
.hero-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.hero-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15), 
              0 8px 16px rgba(0,0,0,0.08),
              0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);
}
.hero-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.hero-card .bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: brightness(0.85);
  transition: transform 0.5s ease, filter 0.3s ease;
}
.hero-card:hover .bg {
  transform: scale(1.05);
  filter: brightness(0.75);
}
.hero-card .overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px;
  background: linear-gradient(
    to bottom, 
    transparent 0%, 
    color-mix(in srgb, var(--primary) 60%, transparent) 40%, 
    color-mix(in srgb, var(--primary) 92%, black) 100%
  );
  color: #ffffff;
  transition: padding 0.3s ease, background 0.3s ease;
}
.hero-card:hover .overlay {
  background: linear-gradient(
    to bottom, 
    transparent 0%, 
    color-mix(in srgb, var(--primary) 70%, transparent) 30%, 
    color-mix(in srgb, var(--primary) 95%, black) 100%
  );
}

.next-match {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 24px 48px;
  background: var(--primary);
  border: 2px solid color-mix(in srgb, var(--primary) 40%, transparent);
  color: var(--text-on-primary);
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15), 
              0 0 40px color-mix(in srgb, var(--primary) 20%, transparent);
  transition: all 0.3s ease;
}
.next-match:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.2), 
              0 0 50px color-mix(in srgb, var(--primary) 30%, transparent);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}
.next-match a { color: var(--text-on-primary); font-weight: 600; text-decoration: underline; }
.next-match .team {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform 0.3s ease;
  color: var(--text-on-primary);
  font-weight: 600;
}
.next-match:hover .team {
  transform: scale(1.03);
}
.next-match img.logo { 
  width: 72px; 
  height: 72px; 
  object-fit: cover; 
  border-radius: 50%; 
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 3px solid color-mix(in srgb, #fff 60%, transparent);
  transition: all 0.3s ease;
}
.next-match:hover img.logo {
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3), 
              0 0 20px color-mix(in srgb, var(--accent) 40%, transparent);
  transform: scale(1.05);
}
.next-match .countdown { 
  font-weight: 800; 
  font-size: 1.2rem; 
  text-align: center; 
  color: var(--text-on-primary);
}

/* Nav buttons overlay */
.next-match .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-on-primary) 15%, transparent);
  border: 2px solid color-mix(in srgb, var(--text-on-primary) 30%, transparent);
  color: var(--text-on-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}
.next-match .nav:hover { 
  background: var(--text-on-primary); 
  color: var(--primary);
  border-color: var(--text-on-primary);
}
.next-match .nav.prev { left: 8px; }
.next-match .nav.next { right: 8px; }

.switcher { margin-bottom: 24px; }
.switcher .tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.switcher .tabs button {
  padding: 8px 14px;
  border: 2px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.switcher .tabs button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 85%, var(--secondary)));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.switcher .tabs button:hover::before { opacity: 0.1; }
.switcher .tabs button:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.switcher .tabs button.active {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 85%, var(--secondary)));
  color: var(--text-on-primary);
  border-color: var(--primary);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 35%, transparent);
}
.switcher .tabs button.active::before { opacity: 0; }
.switcher .tabs button span { position: relative; z-index: 1; }
.switcher .tabs button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.three-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap);
}
/* Responsive breakpoints */
@media (max-width: 960px) {
  .hero-grid { 
    grid-template-columns: 1fr; 
  }
  .hero-grid .small-col {
    grid-template-rows: auto;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
  }
  .three-cols { 
    grid-template-columns: 1fr; 
    gap: 32px;
  }
  .next-match {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding: 24px;
    gap: 20px;
  }
  .next-match .nav {
    display: none;
  }
  .next-match .team {
    flex-direction: row;
    justify-content: center;
  }
  .next-match img.logo {
    width: 60px;
    height: 60px;
  }
  .table-card .tabs {
    gap: 6px;
  }
  .table-card .tabs button {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
  .sponsors-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .hero-grid .small-col {
    grid-template-columns: 1fr;
  }
  .home-header {
    flex-direction: column;
    text-align: center;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .sponsors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .match-card {
    min-width: 280px;
  }
  .player-card {
    width: 140px;
  }
}

.blog-list .card { 
  display:flex; 
  gap:12px; 
  padding:16px; 
  border:1px solid var(--card-border); 
  border-radius:12px; 
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
}
.blog-list .card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.blog-list .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}
.blog-list .card:hover::before {
  transform: scaleY(1);
}
.blog-list .thumb { 
  width: 104px; 
  height: 80px; 
  flex: 0 0 auto; 
  background: var(--bg-soft); 
  border-radius:8px; 
  background-position:center; 
  background-size:cover; 
  transition: transform 0.3s ease;
}
.blog-list .card:hover .thumb {
  transform: scale(1.05);
}
.blog-list h4 { 
  margin: 0 0 6px 0; 
  font-size: 1.05rem; 
  line-height: 1.4;
  transition: color 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.blog-list .card:hover h4 { color: var(--primary); }
.blog-list .card:hover { 
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12), 
              0 4px 12px rgba(0,0,0,0.08),
              0 0 0 2px var(--primary); 
  border-color: var(--primary);
}

.table-card { 
  border:1px solid var(--card-border); 
  border-radius:16px; 
  padding:18px; 
  background: var(--card-bg); 
  box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s ease;
}
.table-card:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
}
.table-card h3 { margin-top:0; margin-bottom: 10px; }
.table-card .tabs { display:flex; gap:8px; flex-wrap: wrap; }
.table-card .tabs button {
  padding:8px 14px;
  border:2px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.chakra-ui-dark .table-card .tabs button { background: var(--card-bg); }
.table-card .tabs button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 85%, var(--secondary)));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.table-card .tabs button:hover::before { opacity: 0.1; }
.table-card .tabs button:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 20%, transparent);
}
.table-card .tabs button.active {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 85%, var(--secondary)));
  color: var(--text-on-primary);
  border-color: var(--primary);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 35%, transparent);
}
.table-card .tabs button.active::before { opacity: 0; }
.table-card .tabs button span { position: relative; z-index: 1; }
.table-card .tabs button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Unified standings compact list */
.table-card .standings { margin-top: 8px; }
.table-card .standing-row {
  display: grid;
  grid-template-columns: 40px 1fr 48px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  transition: all 0.2s ease;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}
.table-card .standing-row + .standing-row { margin-top: 8px; }
.table-card .standing-row:hover { 
  transform: translateX(2px); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
  border-color: var(--primary); 
  background: var(--bg-soft);
}
.table-card .standing-row .pos { font-weight: 800; color: var(--primary); font-size: 0.95rem; }
.table-card .standing-row .team { display:flex; align-items:center; gap:10px; min-width:0; }
.table-card .standing-row .team img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); border: 1px solid var(--card-border); }
.table-card .standing-row .team .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--text); }
.table-card .standing-row .pts { text-align: right; font-weight: 800; color: var(--secondary); font-size: 1.1rem; }

/* Compact standings table with full statistics */
.standings-table-compact {
  font-size: 0.85rem;
}

.standings-table-compact thead th {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
  border-bottom: 2px solid var(--card-border);
}

.standings-table-compact tbody tr {
  position: relative;
}

.standings-table-compact tbody tr + tr {
  margin-top: 4px;
}

/* Hide score column on smaller screens to maintain compact layout */
@media (max-width: 1200px) {
  .standings-table-compact .hide-mobile {
    display: none !important;
  }
}

/* Enriched standings table (logos, colors, motion) */
.card.tables .table.enriched { margin-top: 8px; }
.card.tables .table.enriched .tr {
  display: grid;
  grid-template-columns: 44px 1fr 56px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.card.tables .table.enriched .tr + .tr { margin-top: 8px; }
.card.tables .table.enriched .tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--ring);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--card-border));
}
.card.tables .table.enriched .tr .pos { font-weight: 800; color: var(--secondary); }
.card.tables .table.enriched .tr .pts { font-weight: 800; text-align: right; }
.card.tables .table.enriched .team { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.card.tables .table.enriched .team img {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--bg-soft);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.02);
}
.card.tables .table.enriched .team .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sidebar compact rows (magazine/right rail) */
.row-table { display: grid; grid-template-columns: 36px 1fr 44px; align-items: center; gap: 8px; padding: 6px 0; }
.row-table .pos { font-weight: 700; color: var(--secondary); }
.row-table .team { display:flex; align-items:center; gap:8px; min-width:0; }
.row-table .team img { width: 18px; height: 18px; border-radius:50%; object-fit:cover; background: var(--bg-soft); }
.row-table .team .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-table .pts { text-align: right; font-weight: 700; }

/* Detailed table variant (edge/unified widget) */
.table.enriched.full { border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; }
.table.enriched.full .thead { display:grid; grid-template-columns: 44px 1fr repeat(5, 48px); gap: 8px; padding: 10px; font-weight: 700; background: color-mix(in srgb, var(--primary) 9%, var(--card-bg)); }
.table.enriched.full .tbody .tr { display:grid; grid-template-columns: 44px 1fr repeat(5, 48px); gap: 8px; align-items:center; padding: 8px 10px; border-top: 1px solid var(--card-border); }
.table.enriched.full .tbody .tr .team { display:flex; align-items:center; gap:8px; min-width:0; }
.table.enriched.full .tbody .tr .team img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); }
.table.enriched.full .tbody .tr .team .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table.enriched.full .tbody .tr .pos { font-weight: 800; color: var(--secondary); }
.table.enriched.full .tbody .tr .pts { font-weight: 800; }
.table.enriched.full .tbody .tr:nth-child(odd) { background: color-mix(in srgb, var(--card-bg) 93%, var(--bg)); }
.table.enriched.full .tbody .tr:hover { background: color-mix(in srgb, var(--primary) 7%, var(--card-bg)); }

/* Subtle pop-in animation for table rows */
@keyframes row-pop {
  from { transform: translateY(4px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.card.tables .table.enriched .tr { animation: row-pop .25s ease both; }
.table.enriched.full .tbody .tr { animation: row-pop .25s ease both; }

/* Decorative heading underline */
.section-head h3, .three-cols h3, .table-card h3 { position: relative; }
.section-head h3::after, .three-cols h3::after, .table-card h3::after {
  content: '';
  position: absolute; left: 0; bottom: -6px; height: 3px; width: 48px;
  background: linear-gradient(90deg, var(--secondary), transparent);
  border-radius: 2px;
}

/* Shared section header */
.section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin: 24px 0 12px; }
.section-head h3 { margin:0; }
.see-all { 
  color: var(--primary); 
  text-decoration: none; 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  font-weight: 600; 
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 6px;
}
.see-all:hover { 
  text-decoration: none;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  transform: translateX(2px);
}
.see-all:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Unified button styles */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 85%, var(--secondary)));
  color: var(--text-on-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 25%, transparent);
  text-align: center;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent);
  filter: brightness(1.05);
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Players scroller */
.players-scroller { margin-top: 8px; }
.scroll-x { display:flex; gap:12px; overflow-x:auto; padding: 6px 2px 6px 2px; scroll-snap-type:x mandatory; }
.scroll-x::-webkit-scrollbar { height:8px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--light-gray); border-radius:999px; }
.player-card {
  flex: 0 0 auto;
  width: 170px;
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--primary);
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  scroll-snap-align: start;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.player-card:hover::before {
  transform: scaleX(1);
}
.player-card .photo { 
  width: 100%; 
  height: 130px; 
  background: var(--bg-soft); 
  border-radius:10px; 
  background-position:center; 
  background-size:cover; 
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.player-card:hover .photo {
  transform: scale(1.05);
}
.player-card .meta { margin-top: 10px; font-weight: 700; transition: color 0.2s ease; }
.player-card:hover .meta { color: var(--primary); }
.player-card .meta .nr { color: var(--secondary); margin-right: 6px; }
.player-card .pos { font-size: 0.85rem; color: var(--dark-gray); }
.player-card:hover { 
  transform: translateY(-6px); 
  box-shadow: 0 12px 28px var(--ring); 
  border-color: var(--primary); 
}

/* Merchandise CTA */
.merch-cta { margin: 20px 0; }
.merch-cta .card {
  display:grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(180deg, var(--card-bg), color-mix(in srgb, var(--card-bg) 70%, var(--bg)));
}
.merch-cta .card h3 { margin: 0 0 6px 0; }
.merch-cta .card p { margin: 0 0 12px 0; color: var(--dark-gray); }
.merch-cta .mockup { display:flex; justify-content:center; align-items:center; }
.merch-cta .shirt { width: 160px; height: 120px; background: var(--bg-soft); border-radius: 8px; position: relative; }
.merch-cta .shirt::before { content:''; position:absolute; top:10px; left:10px; right:10px; height: 10px; background: #ddd; border-radius:6px; }
@media (max-width: 720px) { .merch-cta .card { grid-template-columns: 1fr; } }

/* Sponsors */
.sponsors { margin: 20px 0 40px; }
.sponsors.dark { 
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 85%, #000) 0%, color-mix(in srgb, var(--primary) 70%, #000) 100%);
  padding: 28px 16px; border-radius: 12px; color: var(--text-on-primary);
}
.sponsors.dark .section-head h3 { color: var(--text-on-primary); }
.sponsors.dark .layout-pill button { background: transparent; color: #fff; border-color: rgba(255,255,255,0.25); }
.sponsors.dark .layout-pill button.active { background: rgba(255,255,255,0.15); color: #fff; border-color: transparent; }
.sponsors .layout-pill { display:flex; gap:6px; }
.sponsors .layout-pill button { padding:6px 10px; border:1px solid var(--card-border); background:#fff; border-radius:999px; cursor:pointer; }
.sponsors .layout-pill button.active { background: var(--secondary); color: var(--primary); border-color: transparent; }

.title-sponsor { display:flex; justify-content:center; align-items:center; padding: 16px 0 12px; }
.title-sponsor .sponsor-tile { border: none; background: transparent; }
.title-sponsor img { max-height: 72px; max-width: 280px; width: auto; }
.divider { height:1px; background: var(--light-gray); margin: 14px 0 18px; opacity: 0.5; }
.sponsors.dark .divider { background: rgba(255,255,255,0.2); }

.sponsors-grid {
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .sponsors-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .sponsors-grid { grid-template-columns: repeat(2, 1fr); } }
.sponsor-tile { 
  display:flex; 
  align-items:center; 
  justify-content:center; 
  border:1px solid transparent; 
  border-radius:12px; 
  background: transparent; 
  padding: 16px; 
  min-height: 90px; 
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); 
  cursor: pointer;
  will-change: transform;
}
.sponsor-tile:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.sponsor-tile img { 
  max-width: 100%; 
  max-height: 60px; 
  object-fit: contain; 
  opacity: 0.9; 
  filter: grayscale(20%);
  transition: all 0.3s ease;
}
.sponsor-tile:hover { 
  transform: translateY(-6px) scale(1.08); 
  border-color: var(--card-border);
  background: color-mix(in srgb, var(--primary) 5%, var(--card-bg));
  box-shadow: 0 12px 32px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
}
.sponsor-tile:hover img { 
  opacity: 1; 
  filter: grayscale(0%);
}
.sponsors.dark .sponsor-tile img { filter: brightness(0) invert(1); opacity: 0.9; }
.sponsors.dark .sponsor-tile:hover img { opacity: 1; }

.sponsors-slider { overflow: hidden; border-radius:10px; background: transparent; }
.sponsors-slider .track { display:flex; gap: 40px; padding: 12px; width: max-content; animation: slide-left 25s linear infinite; }
.sponsors-slider:hover .track { animation-play-state: paused; }
@keyframes slide-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Sponsors scroller (continuous belt) */
.sponsors-scroller { overflow: hidden; border-radius: 10px; }
.sponsors-scroller .belt { display:flex; gap: 40px; padding: 12px; width: max-content; animation: belt-left 40s linear infinite; }
.sponsors-scroller:hover .belt { animation-play-state: paused; }
@keyframes belt-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

/* Matches slider */
.matches-slider { margin: 12px 0 20px; }
.matches-slider .matches-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Variant: compact_split - two columns (slider left, tabs right) */
.matches-slider[data-variant="compact_split"] .matches-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .matches-slider .matches-grid,
  .matches-slider[data-variant="compact_split"] .matches-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
}
.matches-slider .matches-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 2px 16px 2px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.matches-slider .matches-track::-webkit-scrollbar {
  height: 12px;
}
.matches-slider .matches-track::-webkit-scrollbar-track {
  background: var(--bg-soft);
  border-radius: 999px;
  margin: 0 12px;
}
.matches-slider .matches-track::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 80%, var(--secondary) 20%));
  border-radius: 999px;
  transition: all 0.3s ease;
  border: 2px solid var(--bg-soft);
}
.matches-slider .matches-track::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 120%, #000), var(--primary));
  transform: scaleY(1.1);
}
.match-card {
  flex: 0 0 auto;
  min-width: 340px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}
.match-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.match-card:hover::after {
  transform: scaleX(1);
}
.match-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12), 
              0 6px 16px rgba(0,0,0,0.08),
              0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent);
  border-color: var(--primary);
}
.match-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.match-card .match-meta { 
  color: var(--dark-gray); 
  font-size: 0.85rem; 
  display:flex; 
  gap:6px; 
  align-items:center; 
  margin-bottom: 10px; 
  font-weight: 600;
}
.match-card .teams { 
  display:grid; 
  grid-template-columns: 1fr auto 1fr; 
  align-items:center; 
  gap: 12px; 
}
.match-card .team { 
  display:flex; 
  align-items:center; 
  gap:10px; 
  transition: transform 0.2s ease;
}
.match-card:hover .team {
  transform: scale(1.02);
}
.match-card .team img { 
  width: 40px; 
  height: 40px; 
  border-radius: 50%; 
  background: var(--bg-soft); 
  object-fit: cover; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s ease;
}
.match-card:hover .team img {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.match-card .team .name { font-weight: 700; }
.match-card .score { 
  display:flex; 
  align-items:center; 
  gap:8px; 
  font-weight: 800; 
  font-size: 1.2rem; 
  color: var(--primary);
}
.match-card .score .sep { opacity: 0.6; font-weight: 600; }
.match-card .score .time { font-weight: 600; color: var(--dark-gray); font-size: 0.95rem; }

.matches-tabs { display:flex; flex-direction: row; gap: 8px; flex-wrap: wrap; }
/* Vertical tabs for compact_split variant */
.matches-slider[data-variant="compact_split"] .matches-tabs { 
  flex-direction: column; 
  flex-wrap: nowrap;
}
.matches-tabs button {
  padding: 10px 16px;
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--primary) 15%, var(--card-bg)),
    color-mix(in srgb, var(--primary) 8%, var(--card-bg)));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Text alignment for compact_split variant tabs */
.matches-slider[data-variant="compact_split"] .matches-tabs button {
  text-align: left;
  padding: 12px 16px;
}
@media (max-width: 900px) {
  .matches-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .matches-tabs button {
    text-align: center;
  }
}
.matches-tabs button:hover { 
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--primary) 25%, var(--card-bg)),
    color-mix(in srgb, var(--primary) 15%, var(--card-bg)));
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  transform: translateY(-1px);
}
.matches-tabs button.active {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 85%, var(--secondary)));
  color: var(--text-on-primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.matches-tabs button.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 3px;
  width: 60%;
  transform: translateX(-50%);
  background: var(--accent);
  border-radius: 2px;
}
/* Left indicator for compact_split variant */
.matches-slider[data-variant="compact_split"] .matches-tabs button.active::after {
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  height: auto;
  transform: none;
  border-radius: 0 4px 4px 0;
}

/* Shared section header */
.section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin: 24px 0 12px; }
.see-all { 
  color: var(--primary); 
  text-decoration: none; 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  font-weight: 600; 
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 6px;
}
.see-all:hover { 
  text-decoration: none;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  transform: translateX(2px);
}
.see-all:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Subtle pop-in animation for table rows */
@keyframes row-pop {
  from { transform: translateY(4px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.card.tables .table.enriched .tr { animation: row-pop .25s ease both; }
.table.enriched.full .tbody .tr { animation: row-pop .25s ease both; }

/* Detailed table variant (edge/unified widget) */
.table.enriched.full { border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; }
.table.enriched.full .thead { display:grid; grid-template-columns: 44px 1fr repeat(5, 48px); gap: 8px; padding: 10px; font-weight: 700; background: color-mix(in srgb, var(--primary) 9%, var(--card-bg)); }
.table.enriched.full .tbody .tr { display:grid; grid-template-columns: 44px 1fr repeat(5, 48px); gap: 8px; align-items:center; padding: 8px 10px; border-top: 1px solid var(--card-border); }
.table.enriched.full .tbody .tr .team { display:flex; align-items:center; gap:8px; min-width:0; }
.table.enriched.full .tbody .tr .team img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); }
.table.enriched.full .tbody .tr .team .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table.enriched.full .tbody .tr .pos { font-weight: 800; color: var(--secondary); }
.table.enriched.full .tbody .tr .pts { font-weight: 800; }
.table.enriched.full .tbody .tr:nth-child(odd) { background: color-mix(in srgb, var(--card-bg) 93%, var(--bg)); }
.table.enriched.full .tbody .tr:hover { background: color-mix(in srgb, var(--primary) 7%, var(--card-bg)); }

.card.tables .table.enriched .team { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.card.tables .table.enriched .team img {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--bg-soft);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.02);
}

/* Standings section (Další aktuality + Tabulky) - default two-column layout */
section.standings {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
/* Variant: standard - single column layout */
section.standings[data-variant="standard"] {
  display: block;
}
@media (max-width: 900px) {
  section.standings {
    grid-template-columns: 1fr;
  }
}

/* ===== DARK MODE COMPREHENSIVE STYLING ===== */
.chakra-ui-dark .home-header h1,
.chakra-ui-dark .home-header .subtitle,
.chakra-ui-dark h1,
.chakra-ui-dark h2,
.chakra-ui-dark h3,
.chakra-ui-dark h4 {
  color: var(--text);
}

.chakra-ui-dark .hero-card,
.chakra-ui-dark .blog-list .card,
.chakra-ui-dark .table-card,
.chakra-ui-dark .player-card,
.chakra-ui-dark .match-card,
.chakra-ui-dark .merch-cta .card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

.chakra-ui-dark .blog-list h4,
.chakra-ui-dark .table-card h3,
.chakra-ui-dark .section-head h3 {
  color: var(--text);
}

.chakra-ui-dark .table-card .tabs button {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--card-border);
}

.chakra-ui-dark .table-card .standing-row,
.chakra-ui-dark .card.tables .table.enriched .tr {
  background: var(--card-bg);
  border-color: var(--card-border);
}

.chakra-ui-dark .table-card .standing-row .team .name,
.chakra-ui-dark .card.tables .table.enriched .team .name {
  color: var(--text);
}

.chakra-ui-dark .sponsors.dark {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 75%, #000) 0%, color-mix(in srgb, var(--primary) 60%, #000) 100%);
}

/* Newsletter CTA - remove background in dark mode */
.chakra-ui-dark .newsletter-cta .card {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Enhanced see-all links in dark mode */
.chakra-ui-dark .see-all {
  color: color-mix(in srgb, var(--primary) 120%, white);
  font-weight: 700;
}

.chakra-ui-dark .see-all:hover {
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  color: white;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent);
}
