/* ============================================================
   ErgoKind — stylesheet
   Kleurpalet, typografie, layout, componenten
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;700&display=swap');

/* ------------------------------------------------------------
   1. CSS-variabelen
   ------------------------------------------------------------ */
:root {
  /* Kleuren */
  --kleur-basis:          #1D6B48;
  --kleur-basis-donker:   #0F6E56;
  --kleur-basis-licht:    #E1F5EE;
  --kleur-accent:         #E07B2A;
  --kleur-accent-hover:   #C9691A;
  --kleur-accent-licht:   #FFF3E0;
  --kleur-achtergrond:    #F7F5F0;
  --kleur-wit:            #ffffff;
  --kleur-tekst:          #1a2e22;
  --kleur-tekst-zacht:    #3a5c47;
  --kleur-rand:           #d6e8dd;

  /* Typografie */
  --font-kop:   'Baloo 2', system-ui, sans-serif;
  --font-body:  system-ui, -apple-system, sans-serif;

  /* Witruimte */
  --ruimte-xs:  .375rem;
  --ruimte-sm:  .75rem;
  --ruimte-md:  1.25rem;
  --ruimte-lg:  2rem;
  --ruimte-xl:  3.5rem;

  /* Layout */
  --max-breedte: 1080px;
  --radius:       8px;
  --radius-lg:   14px;
}

/* ------------------------------------------------------------
   2. Reset & basis
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--kleur-achtergrond);
  color: var(--kleur-tekst);
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--kleur-basis);
  text-decoration: underline;
}

a:hover {
  color: var(--kleur-basis-donker);
}

ul, ol {
  padding-left: 1.25rem;
}

/* ------------------------------------------------------------
   3. Typografie
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-kop);
  font-weight: 700;
  line-height: 1.2;
  color: var(--kleur-tekst);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); margin-bottom: var(--ruimte-md); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.375rem); margin-bottom: var(--ruimte-sm); }
h4 { font-size: 1rem; margin-bottom: var(--ruimte-xs); }

p { margin-bottom: var(--ruimte-md); }
p:last-child { margin-bottom: 0; }

.tagline {
  font-family: var(--font-kop);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.5vw, 1.375rem);
  color: var(--kleur-tekst-zacht);
}

/* ------------------------------------------------------------
   4. Layout — container & grid
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-breedte);
  margin-inline: auto;
  padding-inline: var(--ruimte-md);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--ruimte-lg); }
}

.sectie {
  padding-block: var(--ruimte-xl);
}

.sectie--licht {
  background-color: var(--kleur-basis-licht);
}

.sectie--wit {
  background-color: var(--kleur-wit);
}

/* Groene band — o.a. voor het 'Voor scholen'-blok op de homepage */
.sectie--groen {
  background-color: var(--kleur-basis);
  color: #eaf7f0;
}

.sectie--groen h2,
.sectie--groen h3 {
  color: var(--kleur-wit);
}

.sectie--groen .sectie-header__label {
  color: #b9e6d3;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ruimte-lg);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ruimte-md);
}

@media (min-width: 640px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ------------------------------------------------------------
   5. Knoppen
   ------------------------------------------------------------ */
.knop {
  display: inline-block;
  font-family: var(--font-kop);
  font-weight: 700;
  font-size: 1rem;
  padding: .625rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, transform .1s ease;
}

.knop:active { transform: scale(.98); }

.knop--primair {
  background-color: var(--kleur-accent);
  color: var(--kleur-wit);
}

.knop--primair:hover {
  background-color: var(--kleur-accent-hover);
  color: var(--kleur-wit);
}

.knop--secundair {
  background-color: transparent;
  color: var(--kleur-basis);
  border: 2px solid var(--kleur-basis);
}

.knop--secundair:hover {
  background-color: var(--kleur-basis-licht);
  color: var(--kleur-basis);
}

/* ------------------------------------------------------------
   6. Navigatie
   ------------------------------------------------------------ */
.nav {
  background-color: var(--kleur-wit);
  border-bottom: 1px solid var(--kleur-rand);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-family: var(--font-kop);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--kleur-basis);
  text-decoration: none;
}

.nav__logo:hover { color: var(--kleur-basis-donker); }

/* Logo dropdown */
.nav__logo-wrapper {
  position: relative;
}

/* Invisible bridge: keeps hover active when moving into dropdown */
.nav__logo-wrapper::after {
  content: '';
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: .625rem;
}

.nav__logo-chevron {
  font-size: .7rem;
  opacity: .55;
  margin-left: .2rem;
  vertical-align: middle;
}

.nav__logo-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  background: var(--kleur-wit);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  min-width: 210px;
  padding: .375rem 0;
  z-index: 200;
}

.nav__logo-wrapper:hover .nav__logo-dropdown,
.nav__logo-wrapper:focus-within .nav__logo-dropdown {
  display: block;
}

.nav__logo-dropdown a {
  display: block;
  padding: .625rem 1rem;
  font-size: .9rem;
  color: var(--kleur-tekst);
  text-decoration: none;
  border-bottom: none;
  transition: background .12s ease;
}

.nav__logo-dropdown a:hover {
  background: var(--kleur-basis-licht);
  color: var(--kleur-basis);
}

.nav__links {
  display: none;
  list-style: none;
  padding: 0;
  gap: .9rem;
  align-items: center;
  white-space: nowrap;
}

/* Pas vanaf 1100px past het horizontale menu; daaronder hamburger */
@media (min-width: 1100px) {
  .nav__links { display: flex; }
}

.nav__links a {
  font-size: .875rem;
  color: var(--kleur-tekst);
  text-decoration: none;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}

.nav__links a:hover,
.nav__links a.actief {
  color: var(--kleur-basis);
  border-bottom-color: var(--kleur-accent);
}

/* Accent-item voor de schooldoelgroep */
.nav__links a.nav__scholen {
  background-color: var(--kleur-basis-licht);
  color: var(--kleur-basis);
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 999px;
  border-bottom: none;
}

.nav__links a.nav__scholen:hover,
.nav__links a.nav__scholen.actief {
  background-color: var(--kleur-basis);
  color: var(--kleur-wit);
  border-bottom-color: transparent;
}

/* Hamburger (mobiel) */
.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
}

@media (min-width: 1100px) {
  .nav__hamburger { display: none; }
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--kleur-tekst);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* Mobiel menu open */
.nav--open .nav__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--kleur-wit);
  border-bottom: 1px solid var(--kleur-rand);
  padding: var(--ruimte-md) var(--ruimte-md) var(--ruimte-lg);
  gap: var(--ruimte-sm);
}

/* ------------------------------------------------------------
   7. Hero-sectie
   ------------------------------------------------------------ */
.hero {
  background-color: var(--kleur-basis-licht);
  padding-block: var(--ruimte-xl);
  text-align: center;
}

.hero__label {
  display: inline-block;
  font-size: .8125rem;
  background-color: var(--kleur-basis-licht);
  color: var(--kleur-basis);
  border: 1px solid var(--kleur-rand);
  border-radius: 20px;
  padding: .25rem .875rem;
  margin-bottom: var(--ruimte-sm);
  font-weight: 500;
}

.hero__titel {
  font-family: var(--font-kop);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--kleur-tekst);
  margin-bottom: var(--ruimte-xs);
}

.hero__tagline {
  font-family: var(--font-kop);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.5vw, 1.375rem);
  color: var(--kleur-tekst-zacht);
  margin-bottom: var(--ruimte-lg);
}

.hero__acties {
  display: flex;
  gap: var(--ruimte-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   8. Kaarten
   ------------------------------------------------------------ */
.kaart {
  background-color: var(--kleur-wit);
  border-radius: var(--radius-lg);
  padding: var(--ruimte-lg);
  border: 1px solid var(--kleur-rand);
}

.kaart__icoon {
  width: 48px;
  height: 48px;
  background-color: var(--kleur-basis-licht);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--ruimte-sm);
  font-size: 1.5rem;
}

/* ------------------------------------------------------------
   9. Chips / tags
   ------------------------------------------------------------ */
.chip-lijst {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  padding: 0;
}

.chip {
  font-size: .875rem;
  background-color: var(--kleur-basis-licht);
  color: var(--kleur-basis-donker);
  border: 1px solid var(--kleur-rand);
  border-radius: 20px;
  padding: .25rem .875rem;
}

/* ------------------------------------------------------------
   10. Sectie-header
   ------------------------------------------------------------ */
.sectie-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--ruimte-xl);
}

.sectie-header__label {
  font-size: .8125rem;
  color: var(--kleur-basis);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: var(--ruimte-xs);
}

/* ------------------------------------------------------------
   11. Footer
   ------------------------------------------------------------ */
.footer {
  background-color: var(--kleur-tekst);
  color: #c8ddd0;
  padding-block: var(--ruimte-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ruimte-lg);
}

@media (min-width: 640px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer__logo {
  font-family: var(--font-kop);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--kleur-wit);
  text-decoration: none;
  display: block;
  margin-bottom: var(--ruimte-sm);
}

.footer h4 {
  color: var(--kleur-wit);
  font-family: var(--font-kop);
  font-size: 1rem;
  margin-bottom: var(--ruimte-sm);
}

.footer a {
  color: #c8ddd0;
  text-decoration: none;
}

.footer a:hover { color: var(--kleur-wit); }

.footer .knop--primair,
.footer .knop--primair:hover { color: var(--kleur-wit); }

.footer__links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

.footer__links a {
  font-size: .9375rem;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: var(--ruimte-lg);
  padding-top: var(--ruimte-md);
  font-size: .8125rem;
  color: rgba(255,255,255,.45);
  display: flex;
  flex-wrap: wrap;
  gap: var(--ruimte-sm);
  justify-content: space-between;
  align-items: center;
}

/* ------------------------------------------------------------
   12. Formulieren
   ------------------------------------------------------------ */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--kleur-tekst);
  background-color: var(--kleur-wit);
  border: 2px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--kleur-basis);
  box-shadow: 0 0 0 3px rgba(29, 107, 72, .15);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
  color: #9ab3a3;
}

textarea {
  resize: vertical;
  min-height: 130px;
}

/* ------------------------------------------------------------
   13. Hulpklassen
   ------------------------------------------------------------ */
.tekst-midden { text-align: center; }
.tekst-accent  { color: var(--kleur-accent); }
.tekst-basis   { color: var(--kleur-basis); }
.verborgen     { display: none; }

/* Toegankelijkheid — skip link */
.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  background: var(--kleur-accent);
  color: white;
  padding: .5rem 1rem;
  z-index: 999;
  font-size: .875rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus { top: 0; }

/* ------------------------------------------------------------
   14. Sitemelding (tijdelijke banner onder de navigatie)
   ------------------------------------------------------------ */
/* Wordt door een klein script in de pagina zelf getoond. Standaard
   staat er `hidden` op, zodat hij niet verschijnt als hij is weggeklikt
   of als de einddatum (data-tot) voorbij is. */
.melding {
  background-color: var(--kleur-accent-licht);
  border-bottom: 1px solid #F0D9B8;
  font-size: .9375rem;
}

.melding[hidden] { display: none; }

.melding__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ruimte-sm);
  padding-block: .625rem;
}

.melding__tekst {
  margin: 0;
  color: var(--kleur-tekst);
}

.melding__tekst a {
  color: var(--kleur-basis-donker);
  text-decoration: underline;
}

.melding__sluiten {
  flex-shrink: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--kleur-tekst-zacht);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 .25rem;
  border-radius: var(--radius);
}

.melding__sluiten:hover { color: var(--kleur-tekst); }

.melding__sluiten:focus-visible {
  outline: 2px solid var(--kleur-basis);
  outline-offset: 2px;
}

@media (max-width: 500px) {
  .melding { font-size: .875rem; }
}
