/* ============================================================
   LAYER 5 — mobile-fixes
   Enige laag waarin !important is toegestaan. Hier staan de
   WordPress-specifieke correcties die het concept niet nodig had:
   nav-markup van wp_nav_menu, admin bar, image-attributen,
   scroll-lock, sticky footer, runtime header-offset.
   ============================================================ */

/* --- 1. hidden moet hard hidden zijn (WP/plugins zetten display soms terug) --- */
[hidden] { display: none !important; }

/* --- 2. horizontale overflow: clip waar beschikbaar, anders hidden --- */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

/* --- 3. scroll-lock bij open mobiel menu (body krijgt .dfn-lock) --- */
body.dfn-lock { overflow: hidden; }
html:has(> body.dfn-lock) { overflow: hidden; }

/* --- 4. sticky footer: korte pagina's mogen niet in het niets eindigen --- */
html { background: var(--cream); }
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body > .site-main { flex: 1 0 auto; }
body > .site-footer { flex: 0 0 auto; }

/* --- 5. WordPress zet width/height op <img>; met aspect-ratio moet height auto --- */
.work-photo img,
.about-photo img,
.hero-img img,
.portfolio-item img,
.two-col-photo img,
.pb-photo img,
.photo-strip img,
.footer-logo img,
.brand img { height: auto; }
.hero-img img { height: 100% !important; }

/* --- 6. runtime-gemeten header-hoogte voor anchors en sticky elementen --- */
html { scroll-padding-top: calc(var(--hdr-real, 88px) + 24px); }
.jump-nav { top: calc(var(--hdr-real, 88px) + 8px); }
.two-col-photo.sticky { top: calc(var(--hdr-real, 88px) + 32px); }

/* --- 7. admin bar duwt de fixed header naar beneden --- */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* --- 8. wp_nav_menu-markup: WP geeft geen .nav-item/.sub-menu-div mee waar
         de walker dat niet doet. Vangnet voor de li/ul-variant. --- */
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav .sub-menu li { display: block; }
.main-nav .sub-menu li a { display: block; }

/* --- 9. formulier-elementen: thema's/plugins kunnen appearance resetten --- */
.contact-form input,
.contact-form textarea,
.contact-form select { max-width: 100%; font-family: var(--font-body); }
.contact-form input[type="date"] { -webkit-appearance: none; appearance: none; }

/* --- 10. inline svg-defs sprite mag nooit ruimte innemen --- */
.dfn-svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --- 11. meldingen van het contactformulier --- */
.dfn-notice {
  margin: 0 0 22px; padding: 14px 18px; border-radius: 4px;
  font-size: 14px; line-height: 1.6;
}
.dfn-notice-ok { background: rgba(216,154,150,.14); border: 1px solid var(--rose); color: var(--ink); }
.dfn-notice-err { background: #FDEDED; border: 1px solid #D98A8A; color: #7A3030; }
.dfn-field-error { display: block; margin-top: 6px; color: #A0453F; font-size: 12px; }
.contact-form .has-error input,
.contact-form .has-error textarea { border-color: #D98A8A; }
.dfn-hp { position: absolute !important; left: -9999px !important; }

/* --- 12. screen reader only --- */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --- 13. skip link --- */
.dfn-skip {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--white); color: var(--ink); padding: 12px 20px;
}
.dfn-skip:focus { left: 12px; top: 12px; }

/* --- 14. mobiel: fixed header + hero-hoogte op echte viewport-units --- */
@media (max-width: 900px) {
  .hero-full { min-height: 100svh; }
}

/* --- 15. zichtbare focus voor toetsenbordgebruik --- */
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--rose-deep); outline-offset: 2px;
}
