:root {
  --green: #2e9b5a;
  --green-light: #39b76c;
  --text: #0a0a0a; /* zwart */
  --muted: #4b5563; /* grijs voor subtiele tekst */
  --bg: #ffffff; /* witte achtergrond */
  --border: #e5e7eb;
}


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

body {
  font-family: Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}


/* --- Header --- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
  backdrop-filter: blur(6px);
}

/* --- Header / Logo --- */
#logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
}

.logo-nl {
  color: #6b7280;
  font-weight: 500;
  margin-left: 0px; /* trekt .nl net wat dichter tegen het woord */
  letter-spacing: -0.02em;
}


#logo svg {
  height: 30px;
  width: 30px;
}
/* --- Header zelf iets cleaner --- */
header {
  background: #ffffff;
  border-bottom: 1px solid #f1f1f1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

/* --- Navigatie lichter en strakker --- */
nav a {
  color: #111;
  font-weight: 500;
  margin-left: 1.8rem;
  text-decoration: none;
  padding-bottom: .25rem;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}

nav a:hover,
nav a.active {
  color: var(--green);
  border-bottom-color: var(--green);
}


.hero {
  position: relative;
  background:
    linear-gradient(rgba(0,100,50,0.1), rgba(0,100,50,0.1)),
    url('hero.png')
    center/cover no-repeat;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.hero::after { display: none; }



.hero-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
  padding: 0 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease-out .25s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: .6rem;
}

.hero-content p {
  font-size: 1.1rem;
  color: #e5e7eb;
  margin-bottom: 1.1rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}

.controls input,
.controls button {
  font: inherit;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.controls input:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(57, 183, 108, .2);
}

.controls button {
  background: var(--green);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s;
  border: none;
}

.controls button:hover {
  background: var(--green-light);
}

.controls button:disabled {
  background: var(--muted);
  cursor: not-allowed;
}

/* --- Layout --- */
main {
  max-width: 920px;
  margin: 5rem auto;
  padding: 0 2rem;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.2rem;
  margin-bottom: .5rem;
  border-left: 4px solid var(--green);
  padding-left: .6rem;
}

/* --- Kaart & Grafiek --- */
#map {
  height: 360px;
  width: 100%;
  margin: 24px auto;
  border-radius: 12px;
  overflow: hidden;
  /* box-shadow: 0 5px 12px rgba(0, 0, 0, .08); */
  border: none;
  display: none;
}

/* --- Weekvoorspelling gelijk trekken met vandaag/morgen --- */
/* --- Fix breedte van weekvoorspelling --- */
#chartContainer {
  width: 100%;
  max-width: 720px !important;
  margin: 28px auto 16px auto !important;
  background: #fff !important;
  border-radius: 12px;
  /* box-shadow: 0 10px 12px rgba(0, 0, 0, .05) !important; */
  padding: 26px !important;
  border: none !important;
  height: 360px !important;
  overflow: hidden;
}


#weekChart {
  height: 420px;
  padding-bottom: 30px;
}

/* --- Gecombineerd blok: grafiek + resultaten --- */
.data-block {
  max-width: 760px;
  margin: 30px auto;
  background: #fff;
  border-radius: 16px;
  /* box-shadow: 0 6px 18px rgba(0,0,0,0.06); */
  padding: 28px 32px;
  border: none;
}

#chartContainer {
  display: block;
  background: transparent;
  /* box-shadow: none; */
  border: none;
  padding: 10;
  margin: 0;
  height: 380px;
}

#weekChart {
  width: 100% !important;
  height: 100% !important;
  border-radius: 10px;
}

.result-card {
  background: transparent;
  border: none;
  /* box-shadow: none; */
  margin-top: 24px;
  padding: 0;
  color: #0b3d29;
  font-family: Inter, sans-serif;
}

.result-card p {
  margin: 0.4em 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.result-card b {
  color: #0f5c3a;
}

.result-card strong {
  font-weight: 600;
  color: #0c422b;
}

/* Subtle divider tussen grafiek en tekst */
.result-card::before {
  content: "";
  display: block;
  height: 1px;
  background: #e5e9e7;
  margin: 24px 0;
}


/* --- Footer / kleine tekst --- */
small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: .9rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #fafafa;
  margin-top: 3rem;
}

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

.icon-btn {
  background: var(--green);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 0.6rem;
  transition: background .25s ease, transform .15s ease;
  vertical-align: middle;
  /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); */
}
.icon-btn:hover {
  background: var(--green-light);
  transform: rotate(10deg);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}
/* --- Extra: Vandaag-grafiek --- */
#todayChartContainer {
  width: 100%;
  max-width: 720px;
  margin: 28px auto 16px auto;
  background: #fff;
  border-radius: 12px;
  /* box-shadow: 0 5px 12px rgba(0, 0, 0, .05); */
  padding: 0px;
  padding-bottom: 50px;
  border: none;
  display: none;
  height: 360px;
}

#todayChart {
  width: 100% !important;
  height: 100% !important;
  border-radius: 10px;
}

#tomorrowChartContainer {
  width: 100%;
  max-width: 720px;
  margin: 28px auto 16px auto;
  background: #fff;
  border-radius: 12px;
  /* box-shadow: 0 5px 12px rgba(0, 0, 0, .05); */
  padding: 0px;
  padding-bottom: 50px;
  border: none;
  display: none;
  height: 360px;
}

#tomorrowChart {
  width: 100% !important;
  height: 100% !important;
  border-radius: 10px;
}

#incomeChartContainer {
  width: 100%;
  max-width: 720px;
  margin: 28px auto 16px auto;
  background: #fff;
  border-radius: 12px;
  /* box-shadow: 0 5px 12px rgba(0, 0, 0, .05); */
  padding: 26px;
  padding-bottom: 100px;
  border: none;
  height: 360px;        /* ✅ vast hoogte */
  overflow: hidden;     /* ✅ voorkomt DOM groei */
}

#incomeChart {
  width: 100% !important;
  height: 100% !important;
  display: block;       /* ✅ voorkomt dubbele inline sizing */
}

/* --- Gezamenlijke wrapper voor grafieken --- */
/* Grafieken onder elkaar */
#chartsWrapper {
  max-width: 720px;
  margin: 32px auto;
  background: #fff;
  border-radius: 12px;
  /* box-shadow: 0 5px 12px rgba(0,0,0,0.05); */
  padding: 26px 26px 42px 26px;
}

.chart-block {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 32px;
  margin-bottom: 32px;
}

/* laatste grafiek zonder divider */
.chart-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* canvassen */
.chart-block canvas {
  width: 100% !important;
  height: 360px !important;
  display: block;
  border-radius: 8px;
}

/* Voor de zekerheid oude gridregels uitschakelen */
@media (min-width: 1024px) {
  #chartsWrapper {
    grid-template-columns: none;
  }
  #chartContainer {
    grid-column: auto;
  }
}


/* zelfde styling voor alle grafiekkaarten */
.data-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 12px rgba(0,0,0,0.05);
  padding: 26px 26px 48px 26px;   /* extra onderruimte */
  border: none;
  height: auto;                   /* laat hoogte meegroeien */
  min-height: 360px;              /* behoud basisformaat */
  overflow: visible;              /* labels mogen buiten canvas vallen */
}

.data-card canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border-radius: 10px;
}


/* optioneel: twee kolommen op desktop */
@media (min-width: 1024px) {
  #chartsWrapper {
    grid-template-columns: repeat(2, 1fr);
  }
  #chartContainer {
    grid-column: span 2; /* weekgrafiek breder */
  }
}

