/* ==========================================================
   GAVERTRIMMERS 
========================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: #f3f3f3;
  color: #333;
}

/* CONTAINER
========================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5px;
}

/* HEADER
========================================================== */

.site-header {
  background: #fff;
}

.site-header .container {
  text-align: center;
  padding: 15px 0;
}

.site-header img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* MENU
========================================================== */

.main-menu {
  background: #fff;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #dcdcdc;
}

.main-menu .container {
  display: flex;
  justify-content: center;
}

.main-menu ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.main-menu li {
  margin: 0;
}

.main-menu a {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  color: #1d5fa7;
  font-weight: bold;
  transition: 0.25s;
}

.main-menu a:hover {
  background: #f2f2f2;
}

/* actieve pagina */

.main-menu a.active,
.main-menu .active a {
  background: #1d5fa7;
  color: #fff;
}

/* DROPDOWN MENU
========================================================== */

.main-menu li {
  position: relative;
}

/* submenu standaard verborgen */
.main-menu ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 180px;
  border: 1px solid #dcdcdc;
  z-index: 999;
  flex-direction: column;
}

/* submenu items onder elkaar */
.main-menu ul ul li {
  width: 100%;
}

/* links in submenu */
.main-menu ul ul a {
  padding: 10px 14px;
  white-space: nowrap;
}

/* tonen bij hover */
.main-menu li:hover > ul {
  display: flex;
}

/* hover styling submenu */
.main-menu ul ul a:hover {
  background: #f2f2f2;
}

/* BANNER
========================================================== */

.banner {
  background: #fff;
}

.banner .container {
  padding: 0;
}

.banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================================
   CONTENT
========================================================== */

.layout {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  padding: 25px;
  background: #fff;
}

.content {
  flex: 1;
  min-width: 0;
}

.content h1 {
  font-size: 32px;
  color: #1d5fa7;
  margin-bottom: 20px;
}

.content h2 {
  font-size: 24px;
  color: #1d5fa7;
  margin: 25px 0 15px;
}

.content h3 {
  font-size: 20px;
  margin: 20px 0 10px;
}

.content p {
  margin-bottom: 16px;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.pdf-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url("/gavertrimmers/images/pdf.svg") no-repeat center;
  background-size: contain;
}

.stat-info {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.stat-info a {
  display: inline-block;
  margin-top: 5px;
}

.stat-separator {
  display: inline-block;
  width: 30px;
}

.zoekbalk-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

#zoekMarathon {
  width: 170px;
  padding: 5px 8px;
}

#resultaatTeller {
  font-size: 14px;
}

/* ==========================================================
  IMAGE - LINKS UITGELIJJND MET TEKST OMLOOP
========================================================== */

.links-img {
  float: left;
  margin: 0 15px 10px 0;
  max-width: 300px; /* of wat past in je layout */
}

/* ==========================================================
   UNORDERED LIST - LIJST MET BOLLETJES (ordered list is met cijfers)
========================================================== */

ul {
  padding-left: 25px;
  margin-left: 0;
}

/* ==========================================================
   TABELLEN
========================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #fff;
}

th {
  background: #1d5fa7;
  color: #fff;
  padding: 10px;
  text-align: left;
}

td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

tr:nth-child(even) {
  background: #f8f8f8;
}

tr:hover {
  background: #eef5fc;
}

/* ==========================================================
   TABEL VARIANTEN
========================================================== */

.tabel-compact th {
  padding: 0;
  user-select: none;
}

.tabel-compact th[data-kolom] {
  cursor: pointer;
}

.tabel-compact td {
  padding: 0;
}

.tabel-klein th,
.tabel-klein td {
  padding: 4px;
}

.tabel-normaal th,
.tabel-normaal td {
  padding: 8px;
}

.jaar-kop {
  margin-top: 25px;
  margin-bottom: 10px;
  color: #0d6efd;
  border-bottom: 2px solid #0d6efd;
  padding-bottom: 5px;
}

.download-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.download-table th {
  background: #0d6efd;
  color: white;
  padding: 5px 10px;
  text-align: left;
  font-weight: 600;
}

.download-table td {
  padding: 3px 10px;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
}

.download-table tr:nth-child(even) {
  background: #f8f8f8;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.download-link img {
  width: 16px;
  height: 16px;
}

.download-link:hover {
  text-decoration: underline;
}

.marathon-tabel {
  width: 100%;
  border-collapse: collapse;
}

.marathon-tabel th {
  text-align: left;
  font-size: 14px;
  padding: 8px;
  border-bottom: 2px solid #ccc;
}

/* Enkel sorteerbare kolommen */
#marathonTabel th[data-kolom] {
  cursor: pointer;
  transition: background-color 0.2s ease;
}
ultras #marathonTabel th[data-kolom]:hover {
  background-color: #4a90d9;
}

.marathon-tabel td {
  padding: 6px 8px;
  font-size: 14px;
}

td.plaats {
  text-align: right;
  width: 45px;
  padding-right: 15px;
}

/* Radioknoppen filter  */
.filter-type {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* CARDS
========================================================== */
/* Statistiek dashboard - informatiekaarten */

.statistiek-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.stat-card {
  background-color: #e3f2fd;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  padding: 5px;
}

.stat-card h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
}

.stat-waarde {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
}

/* Mobiele weergave */
@media (max-width: 900px) {
  .statistiek-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .statistiek-cards {
    grid-template-columns: 1fr;
  }
}

#grafiekContainer {
  display: flex;
  width: 100%;
}

#namenContainer {
  width: 250px;
  flex-shrink: 0;
}

.naamRij {
  height: 22px;
  display: flex;
  align-items: center;
  transform: translateY(14px);
  font-size: 13px;
}

.naamRij.gevonden {
  background-color: #e3f2fd;
  border-radius: 5px;
}

.rang {
  width: 25px;
  text-align: right;
  margin-right: 10px;
}

.naamRij a {
  color: #1e88e5;
  text-decoration: none;
}

#wedstrijdenPerLoper {
  max-width: 600px;
  flex: 1;
}

#aantallenContainer {
  width: 15px;
  flex-shrink: 0;
}

.aantalRij {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transform: translateY(14px);
  font-size: 13px;
}

/* Klikbare cards */
.stat-link-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.stat-link-card {
  position: relative;
  background-color: #e3f2fd;
  border-radius: 12px;
  padding: 20px;
  min-height: 130px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card-wedstrijden {
  background-color: #e8f5e9; /* zacht groen */
}

.card-marathons {
  background-color: #e3f2fd; /* zacht blauw */
}

.card-ultras {
  background-color: #e3f2fd; /* zacht blauw */
}

.card-tiegem {
  background-color: #f3e5f5; /* zacht paars */
}

.stat-link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
}

.card-wedstrijden:hover {
  background-color: #c8e6c9;
}

.card-marathons:hover {
  background-color: #bbdefb;
}

.card-ultras:hover {
  background-color: #bbdefb;
}

.card-tiegem:hover {
  background-color: #e1bee7;
}

.stat-link-card h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  text-align: center;
}

.stat-link-card p {
  margin: 0;
  font-size: 14px;
  text-align: center;
}

.card-arrow {
  position: absolute;
  right: 18px;
  bottom: 12px;
  font-size: 22px;
  color: #555;
  transition: transform 0.2s ease;
}

.stat-link-card:hover .card-arrow {
  transform: translateX(5px);
}

.ultra-card-grid {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 12px 25px;
}

.ultra-card-grid div {
  justify-content: space-between;
  align-items: center;
}

.ultra-card-grid strong {
  margin-top: 3px;
}

.chart-container {
  width: 100%;
  max-width: 900px;
  height: 300px;
  margin: 40px auto;
}

#grafiekContainer {
  display: grid;
  grid-template-columns: 210px minmax(500px, 1fr) 70px;
  gap: 10px;
}

#namenContainer {
  width: 280px;
  flex-shrink: 0;
}

#canvasContainer {
  flex: 1;
  position: relative;
  width: 100%;
  height: 3000px; /* voorlopig */
}

#aantallenContainer {
  width: 60px;
  flex-shrink: 0;
}

/* ==========================================================
   SPONSORS
========================================================== */

.sponsors {
  width: 240px;
  flex-shrink: 0;

  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sponsors img {
  display: block;
  width: 100%;
  height: auto;

  border: 1px solid #ddd;
  transition: 0.25s;
}

.sponsors img:hover {
  border-color: #1d5fa7;
  transform: scale(1.02);
}

/* ==========================================================
   LINKS
========================================================== */

a {
  color: #1d5fa7;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================
   KNOPPEN
========================================================== */

.button,
button,
input[type="submit"] {
  background: #1d5fa7;
  color: white;
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  transition: 0.2s;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  background: #154b84;
}

/* ==========================================================
   FOOTER
========================================================== */

.footer {
  margin-top: 30px;
  background: #73006d;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  background: #003b73 !important;
  padding: 25px;
  color: white;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-link {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}

.footer-link:hover {
  color: #9ed0ff;
}

.footer-copy {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  opacity: 0.8;
}

.fb-icon {
  width: 20px;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .sponsors {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .sponsors img {
    width: 220px;
  }

  .main-menu ul {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .main-menu ul {
    flex-direction: column;
    width: 100%;
  }

  .main-menu a {
    text-align: center;
    border-bottom: 1px solid #eee;
  }

  .layout {
    padding: 15px;
  }

  .content h1 {
    font-size: 26px;
  }

  .content h2 {
    font-size: 22px;
  }
}

/* ==========================================================
   PHOTO GRID
========================================================== */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.photo-grid-item {
  display: flex;
  flex-direction: column;
}

.photo-grid-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.photo-caption {
  font-size: 13px;
  color: #666;
  margin-top: 5px;
  text-align: center;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 8px;
}

.lightbox-content {
  text-align: center;
  color: #fff;
}

#lightbox-caption {
  margin-top: 10px;
  font-size: 16px;
}
