/* ==========================================================================
   EMV Elektrotechniek - stylesheet
   Eén bestand, geen build-stap. Volgorde: variabelen, basis, layout,
   header, hero, secties, projecten, formulier, footer, media queries.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variabelen
   -------------------------------------------------------------------------- */
:root {
  --kleur-inkt: #131a21;
  --kleur-inkt-diep: #0b1016;
  --kleur-tekst: #2b3440;
  --kleur-tekst-zacht: #5c6875;
  --kleur-wit: #ffffff;
  --kleur-vlak: #f4f5f7;
  --kleur-lijn: #dfe3e8;
  --kleur-accent: #b8531d;
  --kleur-accent-donker: #964216;

  --breedte-inhoud: 1120px;
  --breedte-tekst: 720px;

  --ruimte-xs: 0.5rem;
  --ruimte-s: 1rem;
  --ruimte-m: 2rem;
  --ruimte-l: 4rem;
  --ruimte-xl: 6rem;

  --radius: 4px;
  --schaduw: 0 1px 2px rgba(19, 26, 33, 0.06), 0 8px 24px rgba(19, 26, 33, 0.08);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Basis
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--kleur-tekst);
  background: var(--kleur-wit);
}

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

a {
  color: var(--kleur-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

h1,
h2,
h3 {
  color: var(--kleur-inkt);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 var(--ruimte-s);
  font-weight: 700;
}

h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 var(--ruimte-s);
}

p:last-child {
  margin-bottom: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--kleur-lijn);
  margin: var(--ruimte-m) 0;
}

:focus-visible {
  outline: 3px solid var(--kleur-accent);
  outline-offset: 2px;
}

.overslaan {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--kleur-wit);
  color: var(--kleur-inkt);
  padding: var(--ruimte-s);
  z-index: 200;
}

.overslaan:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.inhoud {
  width: 100%;
  max-width: var(--breedte-inhoud);
  margin: 0 auto;
  padding: 0 var(--ruimte-s);
}

.sectie {
  padding: var(--ruimte-l) 0;
}

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

.sectie--donker {
  background: var(--kleur-inkt);
  color: #c9d1da;
}

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

.tekstkolom {
  max-width: var(--breedte-tekst);
}

.sectiekop {
  margin-bottom: var(--ruimte-m);
}

.sectiekop::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--kleur-accent);
  margin-top: var(--ruimte-s);
}

.sectiekop--midden {
  text-align: center;
}

.sectiekop--midden::after {
  margin-left: auto;
  margin-right: auto;
}

.bovenkop {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kleur-accent);
  font-weight: 600;
  margin-bottom: var(--ruimte-xs);
}

/* --------------------------------------------------------------------------
   4. Knoppen
   -------------------------------------------------------------------------- */
.knop {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: var(--kleur-accent);
  color: var(--kleur-wit);
  border: 1px solid var(--kleur-accent);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

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

.knop--rand {
  background: transparent;
  color: var(--kleur-accent);
}

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

.knop--licht {
  background: var(--kleur-wit);
  border-color: var(--kleur-wit);
  color: var(--kleur-inkt);
}

.knop--licht:hover {
  background: #e7eaee;
  border-color: #e7eaee;
  color: var(--kleur-inkt);
}

/* --------------------------------------------------------------------------
   5. Header en navigatie
   -------------------------------------------------------------------------- */
.kop {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--kleur-inkt);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kop__balk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ruimte-s);
  min-height: 72px;
}

.kop__logo img {
  height: 34px;
  width: auto;
}

/* Volgorde in de balk: logo, menu, telefoon. In de HTML staat het menu
   achteraan, zodat het op mobiel netjes onder de balk uitklapt. */
.kop__logo { order: 1; }
.kop__nav { order: 2; margin-left: auto; }
.kop__telefoon { order: 3; }
.kop__schakelaar { order: 4; }

.kop__nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.kop__nav a {
  display: block;
  padding: 0.55rem 0.85rem;
  color: #cfd6de;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
}

.kop__nav a:hover {
  color: var(--kleur-wit);
  background: rgba(255, 255, 255, 0.07);
}

.kop__nav a[aria-current="page"] {
  color: var(--kleur-wit);
  box-shadow: inset 0 -2px 0 var(--kleur-accent);
}

.kop__telefoon {
  color: var(--kleur-wit);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.kop__telefoon:hover {
  color: var(--kleur-wit);
  background: rgba(255, 255, 255, 0.1);
}

.kop__schakelaar {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  color: var(--kleur-wit);
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  align-items: center;
  gap: 0.5rem;
}

.kop__streepjes {
  display: block;
  width: 18px;
  height: 12px;
  position: relative;
}

.kop__streepjes span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--kleur-wit);
}

.kop__streepjes span:nth-child(1) { top: 0; }
.kop__streepjes span:nth-child(2) { top: 5px; }
.kop__streepjes span:nth-child(3) { top: 10px; }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 340px;
  padding: var(--ruimte-l) 0;
  background-color: var(--kleur-inkt);
  background-size: cover;
  background-position: center;
  color: var(--kleur-wit);
}

.hero--hoog {
  min-height: 72vh;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 16, 22, 0.55), rgba(11, 16, 22, 0.75));
}

.hero .inhoud {
  position: relative;
}

.hero h1 {
  color: var(--kleur-wit);
  max-width: 20ch;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.35);
}

.hero__onderschrift {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: #e2e7ec;
  max-width: 40ch;
  margin-top: var(--ruimte-s);
}

.hero__acties {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ruimte-s);
  margin-top: var(--ruimte-m);
}

/* --------------------------------------------------------------------------
   7. Slogan
   -------------------------------------------------------------------------- */
.slogan {
  background: var(--kleur-inkt);
  color: var(--kleur-wit);
  text-align: center;
  padding: var(--ruimte-m) 0;
}

.slogan p {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  max-width: 34ch;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   8. Kolommen (diensten, kerncijfers, contactgegevens)
   -------------------------------------------------------------------------- */
.kolommen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--ruimte-m);
}

.kolom {
  border-top: 3px solid var(--kleur-accent);
  padding-top: var(--ruimte-s);
}

.kolom h3 {
  margin-bottom: 0.35rem;
}

.kolom p {
  color: var(--kleur-tekst-zacht);
}

/* --------------------------------------------------------------------------
   8b. Geschiedenis (tekst met logo ernaast)
   -------------------------------------------------------------------------- */
.geschiedenis {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ruimte-m);
  align-items: center;
}

.geschiedenis__logo {
  max-width: 320px;
  width: 100%;
}

@media (min-width: 820px) {
  .geschiedenis {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

/* --------------------------------------------------------------------------
   9. Nieuwsblok
   -------------------------------------------------------------------------- */
.nieuws {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ruimte-m);
}

.nieuws__bericht + .nieuws__bericht {
  padding-top: var(--ruimte-m);
  border-top: 1px solid var(--kleur-lijn);
}

.fotorij {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--ruimte-s);
  margin-top: var(--ruimte-s);
}

/* --------------------------------------------------------------------------
   10. Projecten
   -------------------------------------------------------------------------- */
.project {
  padding: var(--ruimte-m) 0;
  border-top: 1px solid var(--kleur-lijn);
}

.project:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.project h2 {
  max-width: 34ch;
}

.project__tekst {
  max-width: var(--breedte-tekst);
  color: var(--kleur-tekst);
}

.project__link {
  display: inline-block;
  margin-top: var(--ruimte-xs);
  word-break: break-word;
}

.galerij {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem;
  margin-top: var(--ruimte-s);
  list-style: none;
  padding: 0;
}

.galerij li {
  margin: 0;
}

.galerij button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--kleur-vlak);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
}

.galerij img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.galerij button:hover img {
  transform: scale(1.03);
  opacity: 0.92;
}

/* Inhoudsopgave projecten */
.projectindex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.projectindex a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  background: var(--kleur-wit);
  border: 1px solid var(--kleur-lijn);
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--kleur-tekst);
}

.projectindex a:hover {
  border-color: var(--kleur-accent);
  color: var(--kleur-accent);
}

/* --------------------------------------------------------------------------
   11. Lichtbak
   -------------------------------------------------------------------------- */
.lichtbak {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 12, 16, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--ruimte-s);
}

.lichtbak[open],
.lichtbak.is-open {
  display: flex;
}

.lichtbak img {
  max-width: 100%;
  max-height: 82vh;
  margin: 0 auto;
  border-radius: var(--radius);
}

.lichtbak__teller {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  color: #aab4bf;
  font-size: 0.9rem;
}

.lichtbak button {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: var(--kleur-wit);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lichtbak button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lichtbak__sluiten { top: 1rem; right: 1rem; }
.lichtbak__vorige { left: 1rem; }
.lichtbak__volgende { right: 1rem; }

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */
.contactraster {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ruimte-l);
}

.gegevens {
  list-style: none;
  margin: 0 0 var(--ruimte-m);
  padding: 0;
}

.gegevens li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--kleur-lijn);
}

.gegevens li:first-child {
  border-top: 1px solid var(--kleur-lijn);
}

.gegevens dt,
.gegevens .label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kleur-tekst-zacht);
  margin-bottom: 0.15rem;
}

.gegevens .waarde {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--kleur-inkt);
  text-decoration: none;
}

.gegevens a.waarde:hover {
  color: var(--kleur-accent);
}

.kaart {
  border: 1px solid var(--kleur-lijn);
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}

.kaart iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

/* Formulier */
.formulier {
  background: var(--kleur-vlak);
  border: 1px solid var(--kleur-lijn);
  border-radius: var(--radius);
  padding: var(--ruimte-m);
}

.veld {
  margin-bottom: var(--ruimte-s);
}

.veld label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--kleur-inkt);
  margin-bottom: 0.3rem;
}

.veld input,
.veld textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  color: var(--kleur-tekst);
  background: var(--kleur-wit);
  border: 1px solid var(--kleur-lijn);
  border-radius: var(--radius);
}

.veld input:focus,
.veld textarea:focus {
  border-color: var(--kleur-accent);
  outline: 2px solid rgba(184, 83, 29, 0.25);
  outline-offset: 0;
}

.veld textarea {
  min-height: 150px;
  resize: vertical;
}

.veld--verborgen {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.formulier__melding {
  margin-top: var(--ruimte-s);
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  display: none;
}

.formulier__melding.is-zichtbaar {
  display: block;
}

.formulier__melding.is-gelukt {
  background: #e7f3ec;
  border: 1px solid #b5d8c3;
  color: #1d5b36;
}

.formulier__melding.is-mislukt {
  background: #fbecea;
  border: 1px solid #eec3bc;
  color: #8a2e1c;
}

.formulier__voetnoot {
  margin-top: var(--ruimte-s);
  font-size: 0.9rem;
  color: var(--kleur-tekst-zacht);
}

/* --------------------------------------------------------------------------
   13. Voorwaarden
   -------------------------------------------------------------------------- */
.documenten {
  list-style: none;
  margin: 0;
  padding: 0;
}

.documenten li {
  border: 1px solid var(--kleur-lijn);
  border-radius: var(--radius);
  padding: var(--ruimte-s) var(--ruimte-s);
  margin-bottom: 0.75rem;
  background: var(--kleur-wit);
}

.documenten h3 {
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.documenten p {
  color: var(--kleur-tekst-zacht);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.documenten a.knop {
  font-size: 0.95rem;
  padding: 0.6rem 1.1rem;
}

/* --------------------------------------------------------------------------
   14. Oproepbalk
   -------------------------------------------------------------------------- */
.oproep {
  background: var(--kleur-inkt);
  color: #c9d1da;
  text-align: center;
  padding: var(--ruimte-l) 0;
}

.oproep h2 {
  color: var(--kleur-wit);
}

.oproep p {
  max-width: 46ch;
  margin: 0 auto var(--ruimte-m);
}

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

/* --------------------------------------------------------------------------
   15. Voettekst
   -------------------------------------------------------------------------- */
.voet {
  background: var(--kleur-inkt-diep);
  color: #97a3b0;
  padding: var(--ruimte-m) 0 var(--ruimte-s);
  font-size: 0.95rem;
}

.voet a {
  color: #cdd5dd;
  text-decoration: none;
}

.voet a:hover {
  color: var(--kleur-wit);
  text-decoration: underline;
}

.voet__raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--ruimte-m);
  padding-bottom: var(--ruimte-m);
}

.voet h2 {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6f7d8b;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.voet ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.voet li {
  margin-bottom: 0.35rem;
}

.voet__logo img {
  height: 30px;
  width: auto;
  margin-bottom: 0.75rem;
}

.voet__slot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--ruimte-s);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #6f7d8b;
}

/* --------------------------------------------------------------------------
   16. Media queries
   -------------------------------------------------------------------------- */
@media (min-width: 720px) {
  .inhoud {
    padding: 0 var(--ruimte-m);
  }

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

  .nieuws {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .contactraster {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .kaart iframe {
    height: 380px;
  }
}

@media (max-width: 899px) {
  .kop__schakelaar {
    display: inline-flex;
  }

  .kop__nav {
    display: none;
    width: 100%;
    order: 9;
    margin-left: 0;
    padding-bottom: var(--ruimte-s);
  }

  .kop__telefoon { order: 2; margin-left: auto; }
  .kop__schakelaar { order: 3; }

  .kop__nav.is-open {
    display: block;
  }

  .kop__balk {
    flex-wrap: wrap;
  }

  .kop__nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .kop__nav a {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
  }

  .kop__nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--kleur-accent);
    padding-left: 0.85rem;
  }

  .kop__telefoon {
    order: 1;
    font-size: 0.9rem;
    padding: 0.45rem 0.7rem;
  }
}

@media (max-width: 520px) {
  .kop__telefoon span {
    display: none;
  }

  .galerij {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .lichtbak button {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

@media print {
  .kop,
  .voet,
  .oproep,
  .hero {
    background: none !important;
    color: #000 !important;
  }
}
