/* =========================================================
   RESET + PODSTAWY
========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f6f7f9;
    --white: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #0b3c6d;
    --accent: #d4af37;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* =========================================================
   HEADER
========================================================= */
header {
    background: var(--primary);
    color: var(--white);
    padding: 20px 24px;
}

header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

header nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

header nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

/* =========================================================
   LAYOUT
========================================================= */
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

h2 {
    font-size: 20px;
    margin-bottom: 16px;
    font-weight: 700;
}

/* =========================================================
   SEKCJE
========================================================= */
.section {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* =========================================================
   TABELA – DESKTOP
========================================================= */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
	
}

thead {
    background: #f1f5f9;
}

th {
    text-align: left;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
table th,
table td {
    text-align: center;
    vertical-align: middle;
}

/* SINCLAIR – kolumny M / K */
.col-m {
    color: #15803d;        /* zielony */
    font-weight: 600;
}

.col-k {
    color: #15803d;        /* ten sam zielony */
    font-weight: 600;
}
button.toggle {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: #f3f4f6;
    cursor: pointer;
}

button.toggle.active {
    background: #15803d;   /* zielony */
    color: #fff;
    border-color: #15803d;
}

/* nagłówki trochę mocniejsze */
th.col-m,
th.col-k {
    font-weight: 700;
}



/* =========================================================
   LINKI / TEKST
========================================================= */
a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

/* =========================================================
   FOOTER
========================================================= */
footer {
    margin-top: 60px;
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* =========================================================
   INDEX – MOBILE – JEDNA LINIA
========================================================= */
@media (max-width: 768px) {

  body:not(.page-zawody) table thead {
    display: none;
  }

  body:not(.page-zawody) table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name name"
      "date place";
    gap: 6px 10px;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }

  body:not(.page-zawody) td {
    padding: 0;
    border: none;
    white-space: nowrap;
  }

  body:not(.page-zawody) td::before {
    display: none;
  }

  /* DATA */
  body:not(.page-zawody) td:nth-child(1) {
    grid-area: date;
    font-size: 13px;
    color: var(--muted);
  }

  /* NAZWA */
  body:not(.page-zawody) td:nth-child(2) {
    grid-area: name;
    font-weight: 600;
  }

  /* MIEJSCE */
  body:not(.page-zawody) td:nth-child(3) {
    grid-area: place;
    text-align: right;
    font-size: 13px;
    color: var(--muted);
  }
}


/* =========================================================
   ZAWODY – MOBILE GRID KOMPAKT
========================================================= */
@media (max-width: 768px) {

  .page-zawody table thead {
    display: none;
  }

  .page-zawody table tbody tr {
    display: grid;
    grid-template-columns:
      minmax(120px, 1fr)
      40px
      50px
      50px;
    gap: 6px;
    align-items: center;
    padding: 8px 6px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }

  .page-zawody tbody td {
    padding: 0;
    border: none;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

}
/* INDEX – MOBILE – UKRYJ NAGŁÓWKI */
@media (max-width: 768px) {
  body:not(.page-zawody) h2 {
    display: none;
  }
}

/* statystyki sekcje */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.stat-block {
    background: #E8FFF9;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
}
.stats-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
}

.stat-block {
    min-width: 280px;
}
.stat-baza {
    order: 1;
}

.stat-last {
    order: 4;
}

.stat-sinclair {
    order: 3;
}

.stat-top {
    order: 2;
	
}
.stat-ur {
    order: 5;	
}
.stat-block.hide {
    display: none !important;
}

/* wspolpraca reklamy   */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.ad-block {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
}

.ad-main {
    grid-column: span 2;
}

.ad-cta {
    background: #f8fafc;
    border-style: dashed;
}

