/* Gedeelde basis voor muldersappemeer.nl en mgelectro.nl.
   Kleuren en lettertype komen uit thema.css (per site). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--heading);
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); font-weight: var(--h1-weight, 700); letter-spacing: var(--h1-tracking, -.01em); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p, ul, ol, dl { margin: 0 0 1em; }
p, li, dd { max-width: 68ch; }
.lead { font-size: 1.2rem; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: .5rem; top: -4rem; z-index: 50;
  background: var(--ink); color: #fff; padding: .6rem 1rem; text-decoration: none;
}
.skip:focus { top: .5rem; }
.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.section--soft { background: var(--bg-soft); }

/* Header en navigatie */
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 5rem; }
.brand { display: block; flex: none; }
.brand img { height: 4.25rem; width: auto; }
.nav-toggle {
  margin-left: auto; font: inherit; font-weight: 600;
  background: none; border: 2px solid var(--nav-ink); color: var(--nav-ink);
  padding: .4rem .8rem; border-radius: 4px; cursor: pointer;
}
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 5rem; z-index: 20;
  background: var(--header-bg); border-bottom: 1px solid var(--line); padding: .5rem 1rem 1rem;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .7rem .25rem; color: var(--nav-ink); text-decoration: none; font-weight: 600;
}
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--brand); text-underline-offset: .4em; }
.site-header .header-call { display: none; }
.site-header { position: relative; }

@media (min-width: 56rem) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; padding: 0; border: 0; background: none; margin-left: auto; }
  .site-nav ul { display: flex; gap: 1.5rem; }
  .site-header .header-call { display: inline-flex; }
}

/* Knoppen */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.2rem; border-radius: var(--radius, 4px);
  font-weight: 700; text-decoration: none; line-height: 1.2;
  border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit;
}
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Vaste belbalk op mobiel */
.callbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: grid; grid-template-columns: 2fr 1fr; gap: 1px;
  background: var(--line); box-shadow: 0 -1px 0 var(--line);
}
.callbar a {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.5rem; font-weight: 700; text-decoration: none;
}
.callbar .call { background: var(--brand); color: var(--on-brand); }
.callbar .mail { background: var(--bg); color: var(--ink); }
.callbar svg { width: 1.2em; height: 1.2em; }
body { padding-bottom: 3.5rem; }
@media (min-width: 56rem) { .callbar { display: none; } body { padding-bottom: 0; } }

/* Lijsten van diensten (geen kaarten, gewoon rijen) */
.service-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 2.5rem; }
@media (min-width: 44rem) { .service-list { grid-template-columns: 1fr 1fr; } }
.service-list li { border-top: 1px solid var(--line); padding: 1rem 0; max-width: none; }
.service-list a { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--heading); text-decoration: none; }
.service-list a:hover { color: var(--brand); text-decoration: underline; }
.service-list p { margin: .25rem 0 0; color: var(--muted); }

/* Twee kolommen: tekst en beeld */
.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 56rem) { .split { grid-template-columns: 1.1fr 1fr; gap: 3rem; } }
.split--center { align-items: center; }

/* Foto's */
figure { margin: 0; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; }
.photo img { width: 100%; height: auto; border-radius: var(--photo-radius, 0); background: var(--bg-soft); }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin-top: 1.5rem; }
.gallery .photo img { aspect-ratio: 628 / 250; object-fit: cover; }

/* Projecten */
.projects { display: grid; gap: 2rem; }
@media (min-width: 44rem) { .projects { grid-template-columns: 1fr 1fr; } }
.project h3 { margin-top: .9rem; margin-bottom: .3rem; }
.project p { margin: 0; }
.project .photo img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Inhoud van dienstpagina's */
.prose h2 { margin-top: 2rem; font-size: 1.45rem; }
.prose h2:first-child { margin-top: 0; }
.page-head { padding-block: 2.5rem 1.5rem; }
.page-head p { font-size: 1.15rem; }
.aside-box { border-top: 4px solid var(--brand); background: var(--bg-soft); padding: 1.25rem 1.25rem .5rem; }
.aside-box h2 { font-size: 1.2rem; }
.aside-box ul { padding-left: 1.1rem; }

/* Keurmerken */
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; margin-top: 1rem; }
.badges img { height: 4.5rem; width: auto; }

/* Contact, formulier, vragen */
.contact-list { list-style: none; padding: 0; }
.contact-list li { padding: .35rem 0; }
.contact-list strong { display: inline-block; min-width: 6.5rem; }
form.request { display: grid; gap: 1rem; max-width: 36rem; }
.field label { display: block; font-weight: 700; margin-bottom: .3rem; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--field-line); border-radius: 4px; padding: .65rem .75rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field .hint { font-size: .9rem; color: var(--muted); margin: .25rem 0 0; }
.form-note { border-left: 4px solid var(--brand); padding: .5rem 1rem; background: var(--bg-soft); }
.form-note[hidden] { display: none; }
.faq details { border-top: 1px solid var(--line); padding: .9rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: .6rem 0 0; }

/* Downloads */
.downloads { list-style: none; padding: 0; }
.downloads li { border-top: 1px solid var(--line); padding: .8rem 0; max-width: none; }
.downloads a { font-weight: 700; }
.downloads span { display: block; color: var(--muted); font-size: .95rem; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding-block: 2.5rem; font-size: .95rem; }
.site-footer a { color: var(--footer-ink); }
.site-footer .cols { display: grid; gap: 1.5rem; }
@media (min-width: 44rem) { .site-footer .cols { grid-template-columns: repeat(3, 1fr); } }
.site-footer h2 { font-size: 1.05rem; color: var(--footer-ink); margin-bottom: .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer p, .site-footer li { margin: 0 0 .3rem; }
.site-footer .legal { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--footer-line); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .callbar, .site-nav, .nav-toggle, .header-call { display: none !important; }
  body { padding: 0; }
}

.h3, .project h2 { font-size: 1.2rem; }
.h-item { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--heading); }

aside > * + * { margin-top: 1rem; }

/* ---- Verfijningen ---- */
main { isolation: isolate; overflow-x: clip; }
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .4em; }
@media (min-width: 56rem) {
  .site-header { position: sticky; top: 0; z-index: 40; }
}
.site-header .wrap { min-height: 5.25rem; }

/* Kopband op subpagina's, met kruimelpad */
.page-head { position: relative; padding-block: 1.75rem 2.25rem; margin-bottom: 2.5rem; }
.page-head::before {
  content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw);
  background: var(--band-bg); border-bottom: var(--band-edge);
}
.page-head h1, .page-head .lead { color: var(--band-ink); }
.page-head .lead { margin-bottom: 0; }
.page-head .lead a { color: inherit; }
.crumbs { font-size: .92rem; margin-bottom: 1.25rem; color: var(--band-muted); display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.crumbs a { color: var(--band-ink); }
.crumbs .sep { color: var(--band-muted); }

/* Feitenstrook onder de hero */
.facts-band { border-bottom: 1px solid var(--line); background: var(--bg); }
.facts { list-style: none; margin: 0 auto; padding-block: 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
@media (min-width: 56rem) { .facts { grid-template-columns: repeat(4, 1fr); padding-block: 1.5rem; } }
.facts li { border-left: 3px solid var(--fact-line); padding-left: .85rem; max-width: none; min-width: 0; }
.facts strong { display: block; font-family: var(--font-head); font-size: 1.2rem; line-height: 1.2; color: var(--heading); }
.facts span { display: block; color: var(--muted); font-size: .95rem; line-height: 1.4; margin-top: .15rem; }

/* Dienstenlijst: hele rij klikbaar */
.service-list li { position: relative; }
.service-list li:has(a):hover { border-top-color: var(--brand); }
.service-list a::after { content: ""; position: absolute; inset: 0; }
.service-list a:focus-visible { outline: none; }
.service-list li:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Projecten in een raster op ware grootte */
.projects { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 1.5rem; }
.project .photo img { aspect-ratio: 4 / 3; }

/* Keurmerken in gelijke vakken */
.badges { gap: .75rem; }
.badges picture { display: flex; align-items: center; justify-content: center; height: 6rem; min-width: 8rem; padding: .6rem 1.1rem; background: #fff; border: 1px solid var(--line); }
.badges img { height: auto; max-height: 100%; width: auto; max-width: 11rem; }

/* Contactblok naast de tekst: blijft in beeld op desktop */
.split > aside { align-self: stretch; display: flex; flex-direction: column; gap: 1rem; }
aside > * + * { margin-top: 0; }
@media (min-width: 56rem) { .aside-box { position: sticky; top: 7rem; } }
.aside-box { padding-bottom: 1.25rem; }
.btn-stack { display: grid; gap: .6rem; margin-block: 1rem .75rem; }
.btn-stack .btn { justify-content: center; }
.small { font-size: .92rem; color: var(--muted); }
.address-line { border-left: 3px solid var(--fact-line); padding-left: .85rem; }

/* Lijsten in lopende tekst iets ruimer */
.prose li + li { margin-top: .4rem; }
.prose ol, .prose ul { padding-left: 1.3rem; }
.prose .service-list { padding-left: 0; }
.prose .service-list li + li { margin-top: 0; }
.facts { padding-inline: 0; }

/* Vaste ruimte onder de laatste inhoud van elke pagina, ook als die niet in een sectie staat */
main > :last-child:not(section):not(.page-head) { padding-bottom: clamp(3rem, 2rem + 3vw, 4.5rem); }
.project h2, .project h3 { margin-top: .9rem; margin-bottom: .3rem; }
/* Contactpagina: kolommen met hetzelfde ritme als de andere pagina's */
.contact-cols h2 { font-size: 1.45rem; margin-top: 2rem; }
.contact-cols h2:first-child { margin-top: 0; }
.contact-cols .contact-list { margin-bottom: 0; }
form.request { margin-top: 1.25rem; }


/* Hulpklassen (geen inline stijlen, i.v.m. Content-Security-Policy) */
.section--flush-top { padding-top: 0; }
.mt { margin-top: 1.5rem; }
.mt-lg { margin-top: 2rem; }
