/* ============================================================
   TWC Echt — Stylesheet
   Dark cycling aesthetic in the club kit colours: navy + teal
   Mobile-first, no build tools required
   ============================================================ */

:root {
  /* Club kit: teal jersey, navy bibs. Neutrals are tinted toward the navy. */
  --bg:          #0b1016;
  --bg-section:  #0f151d;
  --bg-card:     #141c26;
  --bg-card-h:   #1a2430;
  --accent:      #3cc6bd;   /* jersey teal, lifted for dark surfaces */
  --accent-dark: #6ad8d0;   /* hover on filled teal (lighter, dark text stays legible) */
  --on-accent:   #061619;   /* text on teal fills */
  --accent-soft: rgba(60,198,189,0.12);
  --text:        #e6ebef;
  --text-muted:  #8d9bab;
  --border:      #223041;
  --border-h:    #2f8f8a;
  --radius:      14px;
  --shadow-h:    0 12px 28px rgba(0,0,0,0.45);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --trans:       0.2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img   { max-width: 100%; display: block; }
a     { color: inherit; text-decoration: none; transition: color var(--trans); }
ul    { list-style: none; }
button { font-family: var(--font); }

.icon {
  width: 1em; height: 1em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection { background: rgba(60,198,189,0.32); color: #fff; }

html { scrollbar-color: #2a3a4c var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a3a4c; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #36495e; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 3000;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 0.9rem;
  padding: 0.6rem 1rem; border-radius: 8px;
  transform: translateY(-160%);
  transition: transform var(--trans);
}
.skip-link:focus { transform: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(11,16,22,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-size: 1.2rem; font-weight: 800; color: var(--accent);
  letter-spacing: -0.5px;
}
.nav-logo:hover { color: var(--accent-dark); }

.nav-links {
  display: flex; gap: 2rem;
}
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
}
.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text); font-size: 1.3rem;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 10px; cursor: pointer; transition: border-color var(--trans);
}
.nav-toggle:hover { border-color: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--bg-section);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,16,22,0.35) 0%, rgba(11,16,22,0.15) 35%, rgba(11,16,22,0.55) 70%, var(--bg) 100%),
    rgba(11,16,22,0.25);
}

.hero-content {
  position: relative; z-index: 1;
  text-align: center; padding: 2rem 1.5rem;
  max-width: 800px;
}

.hero-content h1 {
  font-size: clamp(3.25rem, 11vw, 6rem);
  font-weight: 800; line-height: 0.95;
  letter-spacing: -0.04em; color: #ffffff;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.hero-content p {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  color: rgba(255,255,255,0.82);
  margin-bottom: 2.25rem;
}

/* Wide screens: the riders fill the right of the photo, so the text sits left */
@media (min-width: 900px) {
  #hero { justify-content: flex-start; }
  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(11,16,22,0.88) 0%, rgba(11,16,22,0.6) 34%, rgba(11,16,22,0.08) 62%),
      linear-gradient(180deg, rgba(11,16,22,0.3) 0%, transparent 30%, transparent 72%, var(--bg) 100%);
  }
  .hero-content {
    text-align: left; max-width: none; width: 100%;
    padding-left:  max(1.5rem, calc((100vw - 1200px) / 2 + 1.5rem));
    padding-right: 1.5rem;
  }
  .hero-content h1,
  .hero-content p { max-width: 34rem; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 0.95rem;
  padding: 0.9rem 2.1rem; border-radius: 999px;
  border: none; cursor: pointer;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.btn-primary:active { transform: none; box-shadow: none; }
.btn-primary .icon { font-size: 1.1em; stroke-width: 2.2; }

/* Hero call to action: label plus the weekly ride times, arrow in a dark badge */
.hero-cta {
  display: inline-flex; align-items: center; gap: 1rem;
  background: var(--accent); color: var(--on-accent);
  padding: 0.7rem 0.75rem 0.7rem 1.6rem; border-radius: 999px;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
}
.hero-cta .cta-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.hero-cta .cta-main { font-weight: 800; font-size: 1rem; }
.hero-cta .cta-sub  { font-weight: 600; font-size: 0.76rem; opacity: 0.78; font-variant-numeric: tabular-nums; }
.hero-cta .cta-icon {
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--on-accent); color: var(--accent); font-size: 1.15rem;
  transition: transform var(--trans);
}
.hero-cta .icon { stroke-width: 2.2; }
.hero-cta:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.hero-cta:hover .cta-icon { transform: translateY(2px); }
.hero-cta:active { transform: none; box-shadow: none; }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: 5rem 0; }
#gereden { padding-top: 0; }
#over-ons { background: var(--bg-section); }

section > .container > h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800; letter-spacing: -1.5px;
  color: #fff; margin-bottom: 2.5rem;
}
section > .container > h2::after {
  content: ''; display: block;
  width: 2.5rem; height: 3px;
  background: var(--accent);
  border-radius: 2px; margin-top: 0.6rem;
}

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel {
  position: relative;
  user-select: none;
}
.carousel.collapsed { display: none; }

.carousel-viewport {
  margin: 0 2.75rem; /* room for arrow buttons */
}

/* Paged grid: columns set by initCarousel() in main.js */
.carousel-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background var(--trans), border-color var(--trans), color var(--trans);
}
.carousel-btn:hover {
  background: var(--bg-card-h);
  border-color: var(--accent);
  color: var(--accent);
}
.carousel-btn .icon { stroke-width: 2.2; }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-status {
  text-align: center; margin-top: 1.25rem;
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   ROUTE CARDS
   ============================================================ */

.route-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
  display: flex; flex-direction: column;
}
.route-card[hidden] { display: none; }
.route-card { cursor: pointer; }
.route-card:hover,
.route-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-h);
  border-color: var(--border-h);
}
.route-card:focus-visible { outline-offset: 2px; border-radius: var(--radius); }

/* Map area */
.route-map {
  height: 185px;
  background: #10171f;
  flex-shrink: 0;
}
.route-map-placeholder {
  height: 185px;
  background: linear-gradient(135deg, #121b25 0%, #15232c 55%, #0f1a20 100%);
  display: flex; flex-direction: column; gap: 0.6rem;
  align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(60,198,189,0.4);
  flex-shrink: 0;
}
.route-map-placeholder .icon { stroke-width: 1.2; }
.route-thumb {
  height: 185px;
  background: #121b25;
  flex-shrink: 0;
  overflow: hidden;
}
.route-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.route-map-note { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }

/* Card body */
.route-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

.route-special {
  display: inline-block; align-self: flex-start;
  background: var(--accent-soft); color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(60,198,189,0.35);
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 0.2rem 0.65rem; border-radius: 999px;
  margin-bottom: 0.6rem;
}

.route-title {
  font-size: 1.05rem; font-weight: 700;
  color: #fff; line-height: 1.3;
  margin-bottom: 0.3rem;
}

.route-date {
  font-size: 0.82rem; font-weight: 600;
  color: var(--accent); margin-bottom: 0.5rem;
}

.route-desc {
  font-size: 0.8rem; color: var(--text-muted);
  line-height: 1.55; margin-bottom: 0.75rem; flex: 1;
}

.route-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem;
  margin-top: auto; padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.route-meta-item {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; color: var(--text-muted);
}
.route-meta-item .icon,
.modal-meta-item .icon { color: var(--accent); font-size: 1.05em; }
.route-meta-item strong { color: var(--text); font-weight: 600; }

/* ============================================================
   GEREDEN TOGGLE BUTTON
   ============================================================ */
.toggle-btn {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem; font-weight: 600;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: background var(--trans), border-color var(--trans);
  margin-bottom: 1.5rem;
}
.toggle-btn:hover { background: var(--bg-card-h); border-color: var(--accent); }

.chevron { transition: transform 0.3s ease; font-size: 1.15rem; color: var(--text-muted); }
.toggle-btn.open .chevron { transform: rotate(180deg); }

/* ============================================================
   OVER ONS — intro text & bestuur
   ============================================================ */
.over-intro {
  margin-bottom: 3rem;
}
.over-intro p {
  font-size: 0.95rem; color: var(--text-muted);
  line-height: 1.85; margin-bottom: 1rem;
}

.over-sub {
  font-size: 1.1rem; font-weight: 700; color: #fff;
  margin-bottom: 1.25rem;
}

.bestuur { margin-top: 3rem; }
.bestuur-intro {
  font-size: 0.92rem; color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.bestuur-lijst {
  list-style: none;
  max-width: 360px;
}
.bestuur-lijst li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem; color: var(--text);
  display: flex; align-items: center; gap: 0.75rem;
}
.bestuur-lijst li:first-child { border-top: 1px solid var(--border); }
.bestuur-rol {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--accent); min-width: 120px;
}

/* ============================================================
   WAT BIEDEN WE
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.feature-icon {
  width: 3rem; height: 3rem; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  font-size: 1.5rem; margin-bottom: 1.1rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.feature-card p  { font-size: 0.855rem; color: var(--text-muted); line-height: 1.65; }

/* ============================================================
   LIDMAATSCHAP
   ============================================================ */
.lid-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem; align-items: start;
}

.lid-text > p {
  font-size: 1.05rem; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 1.75rem;
}

.lid-voordelen { margin-bottom: 2rem; }
.lid-voordelen li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem; color: var(--text);
  display: flex; align-items: center; gap: 0.6rem;
}
.check { color: var(--accent); font-size: 1.1rem; stroke-width: 2.4; }

.lid-info { display: flex; flex-direction: column; gap: 1rem; }

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.info-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-muted); }
.info-value { font-size: 1.2rem; font-weight: 700; color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #070b10;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}

.footer-logo {
  font-size: 1.15rem; font-weight: 800;
  color: var(--accent); margin-bottom: 0.75rem;
}

.footer-heading {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 1rem;
}

.footer-col p,
.footer-col li,
.footer-col a {
  font-size: 0.875rem; color: var(--text-muted); line-height: 1.9;
}
.footer-col a:hover { color: var(--accent); }

.social-links { display: flex; flex-direction: column; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem; text-align: center;
}
.footer-bottom p { font-size: 0.78rem; color: var(--text-muted); }

/* ============================================================
   STATES
   ============================================================ */
.loading, .no-routes {
  color: var(--text-muted); font-size: 0.9rem;
  padding: 3rem 1rem; text-align: center;
  grid-column: 1 / -1;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.72);
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%; max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
}

.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 1;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 1.25rem; line-height: 1;
  width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color var(--trans), color var(--trans);
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }

.modal-map {
  height: 400px;
  background: #10171f;
  flex-shrink: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.modal-body {
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}

.modal-title {
  font-size: 1.4rem; font-weight: 800; color: #fff;
  line-height: 1.2; padding-right: 3rem;
}

.modal-date {
  font-size: 0.88rem; font-weight: 600; color: var(--accent);
}

.modal-meta[hidden] { display: none; }
.modal-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.modal-meta-item {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.85rem; color: var(--text-muted);
}
.modal-meta-item strong { color: var(--text); font-weight: 600; }

.modal-waypoints-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); margin-bottom: 0.35rem;
}
.modal-waypoints-text {
  font-size: 0.85rem; color: var(--text-muted);
  line-height: 1.7;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.75rem;
}

.modal-download { align-self: flex-start; margin-top: 0.25rem; }

@media (max-width: 640px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box { max-width: 100%; max-height: 95vh; border-radius: var(--radius) var(--radius) 0 0; }
  .modal-map { height: 260px; border-radius: var(--radius) var(--radius) 0 0; }
}

/* ============================================================
   LEAFLET OVERRIDES
   ============================================================ */
.leaflet-container { background: #10171f !important; font-family: var(--font); }
.leaflet-container .leaflet-control-attribution {
  background: rgba(11,16,22,0.72); color: var(--text-muted);
  font-size: 0.6rem; line-height: 1.4; padding: 1px 6px;
  border-top-left-radius: 6px;
}
.leaflet-container .leaflet-control-attribution a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
/* Dark map: invert OSM tiles and pull them toward the kit navy */
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.88) saturate(0.22); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .lid-content   { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; }

  .carousel-viewport { margin: 0 2.5rem; }
  .carousel-btn { width: 40px; height: 40px; font-size: 1.2rem; }
  .carousel-btn::after { content: ''; position: absolute; inset: -4px; } /* 48px touch area */

  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(11,16,22,0.98);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .route-card:hover, .route-card:focus-visible, .btn-primary:hover, .hero-cta:hover, .hero-cta:hover .cta-icon { transform: none; }
}
