/* ---- CSS Variables (easy theming) ---- */
:root {
  /* Pick ONE brand color. Default = staalblauw.  */
  --brand: #1f4f7b;           /* alternatief: #1e6f5c (diep groen), #7b4f1f (warm bruin) */
  --brand-600: color-mix(in oklab, var(--brand), black 15%);
  --brand-100: color-mix(in oklab, var(--brand), white 80%);

  --bg: #0f1115;              /* canvas */
  --surface: #141821;         /* cards/panels */
  --text: #e6e8ec;            /* primair */
  --muted: #aeb4bf;           /* secundair */
  --border: #232a36;          /* scheidingslijnen */
  --ok: #18a957;
  --warn: #e3b341;
  --err: #e25b5b;

  --radius: 12px;
  --shadow: 0 6px 24px rgba(0,0,0,.25);
  --maxw: 1200px;
}

/* ---- Fallbacks for Chrome variants that mis-handle color-mix/oklab ---- */
@supports not (color: color-mix(in oklab, white, black)) {
  :root {
    /* approximate fallbacks */
    --brand-600: #183c60; /* ~15% darker than --brand */
    --brand-100: #d3dde8; /* --brand mixed ~80% with white */
  }
}

/* ---- Modern CSS Reset (lite) ---- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  min-height: 100%;
  background:
    linear-gradient(180deg,
      #141821 0%,
      #0f1115 35%,
      #0d1018 70%,
      #0b0e13 100%
    ),
    radial-gradient(1200px 800px at 20% -10%, rgba(26,32,48,.6), transparent 70%),
    radial-gradient(1200px 800px at 110% 10%, rgba(16,21,32,.5), transparent 70%),
    var(--bg);
  /* background-attachment verplaatst naar desktop-queries i.v.m. mobile performance */
}
@media (min-width: 701px) {
  html { background-attachment: fixed, fixed, fixed, fixed; }
}
html:focus-within { scroll-behavior: smooth; }
body { 
  margin: 0; 
  font-family: "Eurostile", "Microgramma", "Orbitron", "Arial Black", sans-serif; 
  color: var(--text); 
  line-height: 1.55; 
}
img, video { max-width: 100%; height: auto; display: block; }
input, textarea, button, select { font: inherit; color: inherit; }

/* ---- Helpers ---- */
.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section__header { margin-bottom: 1.25rem; }
.section__header > h2 { margin: 0 0 .25rem; font-size: clamp(1.4rem, 1.4rem + 1vw, 2rem); letter-spacing: .2px; }
.section__header > p { margin: 0; color: var(--muted); }
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; left: 1rem; top: 1rem; width: auto; height: auto; background: var(--brand); color: #fff; padding: .5rem .75rem; border-radius: 8px; z-index: 9999; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 100; -webkit-backdrop-filter: saturate(1.2) blur(8px); backdrop-filter: saturate(1.2) blur(8px); background: color-mix(in oklab, var(--surface), transparent 20%); border-bottom: 1px solid var(--border); }

/* ---- Map / Plattegrond ---- */
.key-points { color: var(--muted); padding-left: 1rem; }
.map__figure { margin: 0; background: #0e121a; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map__figure img { width: 100%; height: auto; display: block; object-fit: contain; }
.map__figure figcaption { color: var(--muted); font-size: .9rem; padding: .5rem .75rem; border-top: 1px dashed var(--border); }

.map__layout { display: grid; gap: 1.5rem; }
.map__intro { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; align-items: center; }
.map__logo { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #0e121a; padding: .75rem; }
.map__figure--full { margin: 0; max-width: 100%; }

/* Map embeds samengevat */
/* Map embeds samengevat */
.map__embed { width: 100%; display: block; border-radius: var(--radius); }
embed.map__embed { height: min(75vh, 900px); border: none; border-radius: inherit; }
img.map__embed { height: auto; }

@media (max-width: 900px){
  .map__intro { grid-template-columns: 1fr; }
}

/* ---- Buttons ---- */
.btn { --_bg: color-mix(in oklab, var(--brand), black 5%); display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; cursor: pointer; border: 1px solid var(--brand-600); background: var(--_bg); color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: 0 2px 0 rgba(0,0,0,.25) inset, 0 8px 20px rgba(0,0,0,.25); transition: transform .06s ease, background .2s ease, box-shadow .2s ease; }
.btn:active { transform: translateY(0); }
.btn--primary { --_bg: linear-gradient(180deg, var(--brand), var(--brand-600)); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--sm { padding: .5rem .75rem; font-size: .95rem; }

/* ---- Contact ---- */
.section--contact .contact__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1rem, 3vw, 2rem); align-items: start; }

/* Make phone/email links white in contact section */
.section--contact a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: 2px;
}
.section--contact a:hover {
  text-decoration-color: color-mix(in oklab, var(--text), transparent 40%);
}

/* Map onder details, volle breedte */
.section--contact .contact__map { grid-column: 1 / -1; }
/* Google Maps block — consistent rounded corners like photos */
.section--contact .contact__map {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;             /* ensures iframe is clipped in all browsers */
  background: #0e121a;          /* match card bg */
  box-shadow: var(--shadow);
  height: clamp(480px, 55vh, 720px);
}
.section--contact .contact__map iframe,
.section--contact .contact__map embed,
.section--contact .contact__map .map__embed {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;       /* propagate radius to inner content where supported */
}

/* Force map iframe to fill its container even if the embed has inline height */
.section--contact .contact__map iframe[height],
.section--contact .contact__map embed[height] {
  height: 100% !important;
}
.contact__details { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; background: #0f141e; box-shadow: var(--shadow); }
.contact-list { display: grid; gap: .75rem; margin: 0; }
.contact-list dt { color: var(--muted); font-weight: 600; }
.contact-list dd { margin: 0; }

.contact__form { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; border: 1px solid var(--border); border-radius: var(--radius); background: #0f141e; padding: 1rem; box-shadow: var(--shadow); }
.contact__form label { display: grid; gap: .4rem; }
.contact__form label.full { grid-column: 1 / -1; }
.contact__form input[type="text"],
.contact__form input[type="email"],
.contact__form input[type="tel"],
.contact__form textarea { width: 100%; background: #0d121b; color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; }
.contact__form textarea { resize: vertical; }
.contact__form .checkbox { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; }
.form-note { grid-column: 1 / -1; color: var(--muted); margin: 0; font-size: .9rem; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.22) 60%, rgba(0,0,0,.35) 100%); padding: 1rem 0; }
.site-footer p { margin: 0; color: var(--muted); text-align: center; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .section--contact .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .nav-title { display: none; } /* geef de knoppen en het logo lucht op ultra-klein scherm */
  .nav-contact, .nav-units { font-size: .85rem; padding: .35rem .55rem; }
  .hero-slider { height: 58vh; }
}

/* ---- Utilities ---- */
.u-center { text-align: center; }
.u-muted { color: var(--muted); }

/* ---- Navigatiebalk ---- */
.nav-bar {
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* boven slides en kaarten */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(5, 16, 40, 0.85); /* donker + transparant */
  color: #fff;
  position: sticky; /* volgt mee met scrollen */
}
.nav-title {
  position: static;
  transform: none;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .5px;
}
.nav-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nav-contact, .nav-units {
  color: #fff;
  text-decoration: none;
  padding: .5rem .9rem;
  border-radius: 8px;
  line-height: 1;
  transition: background .2s;
  display: inline-block;
  background: transparent;
  border: 1px solid #fff;
  font-weight: 500;
}
.nav-logo { width: 48px; height: auto; }

/* ---- Hero-slider ---- */
.hero-slider {
  position: relative;
  /* Use modern viewport units so Chrome mobile matches Safari */
  height: 100svh;   /* small viewport (iOS/Chrome address bar aware) */
  height: 100dvh;   /* dynamic viewport */
  height: 100vh;    /* fallback */
  overflow: hidden;
  isolation: isolate;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;            /* header vult volledig */
  background-position: center 35%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  opacity: 0;
  transition: opacity .6s ease-in-out;
  z-index: 0;
  pointer-events: none;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 65%, rgba(0,0,0,0.75) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
  pointer-events: none;
}
.hero-slide h1, .hero-slide h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  margin: 0 2rem;
  z-index: 1;
  position: relative;
  pointer-events: auto;
}
.hero-slide.active { opacity: 1; z-index: 1; }

/* Pijlen en indicatoren */
.hero-nav {
  position: absolute;
  bottom: 2rem;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s;
  z-index: 10;
}
.hero-prev { left: 1.5rem; }
.hero-next { right: 1.5rem; }
.hero-indicators {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 10;
}
.hero-indicators span {
  display: block;
  width: 32px;
  height: 3px;
  background: rgba(255,255,255,0.4);
}
.hero-indicators span.active { background: #fff; }
.hero-nav, .hero-indicators { pointer-events: auto; }

/* Fallback zonder JS */
html:not(.has-js) .hero-slider .hero-slide:first-child { opacity: 1; }
html:not(.has-js) .hero-slider .hero-indicators span:first-child { background: #fff; }

/* Heading & body fonts */
h1, h2, h3, .nav-title, .nav-brand { font-family: "Eurostile", "Orbitron", "Arial Black", sans-serif; font-weight: 700; }
p, li, .section__header > p { font-family: "Roboto", "Segoe UI", sans-serif; }

/* ---- Kaarten / Carousels (desktop) [simple] ---- */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); background: rgba(13,18,27,.6); box-shadow: var(--shadow); }
.carousel__track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y pinch-zoom; /* allow both axes; browser chooses natural direction */
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { scroll-snap-align: start; }
.carousel__btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; pointer-events: auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--surface), transparent 15%); border: 1px solid var(--border); box-shadow: var(--shadow); color: #fff; transition: background .2s, transform .1s; }
.carousel__btn--prev { left: .75rem; }
.carousel__btn--next { right: .75rem; }

.section--units .carousel { background: rgba(13,18,27,.6); }
.section--voorzieningen .carousel { background: rgba(13,18,27,.6); }

.section--units .carousel .card { flex: 0 0 calc(100% / 3); margin-inline: .25rem; aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: var(--radius); overflow: hidden; background: transparent; }
.section--voorzieningen .carousel .card { flex: 0 0 calc(100% / 3); margin-inline: .25rem; aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: var(--radius); overflow: hidden; background: transparent; }

.section--units .carousel .card img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; }
.section--voorzieningen .carousel .card img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; }

/* List-resets (één keer, clean) */
.carousel { list-style: none; margin: 0; padding: 0; }
.carousel ul { list-style: none; margin: 0; padding: 0; }
.carousel li { list-style: none; margin: 0; padding: 0; }
.carousel__track { list-style: none; margin: 0; padding: 0; }
.carousel__slide { list-style: none; margin: 0; padding: 0; }


/* ---- Tablets ---- */
@media (max-width: 900px) {
  :is(.section--units, .section--voorzieningen) .carousel .card { flex: 0 0 80%; margin-inline: 0.5rem; }
  :is(.section--units, .section--voorzieningen) .carousel .carousel__track { padding-inline: 0.5rem; }
}

/* ---- Desktop: hogere kaartverhouding voor volledige foto-weergave ---- */
@media (min-width: 901px) {
  .section--units .carousel .card { aspect-ratio: 4 / 5; }
  .section--voorzieningen .carousel .card { aspect-ratio: 4 / 5; }
}

/* ---- Mobiel (geconsolideerd & efficiënt) ---- */
@media (max-width: 700px) {
  /* Lichtere shadows en background-attachments */
  :root { --shadow: 0 3px 10px rgba(0,0,0,.18); }
  html { background-attachment: scroll, scroll, scroll, scroll; }

  /* Layout spacing */
  .container { width: min(100% - 1.25rem, var(--maxw)); }
  .section { padding: clamp(36px, 10vw, 64px) 0; }

  /* Forms */
  .contact__form { grid-template-columns: 1fr; }

  /* Nav (geen fixed; sticky is al actief in base) */
  .nav-bar { padding: .75rem 1rem; flex-wrap: wrap; justify-content: space-between; }
  .nav-logo { width: 40px; }
  .nav-title { font-size: 1.1rem; white-space: normal; max-width: none; }
  .nav-brand { position: static; transform: none; order: 2; width: 100%; display: flex; justify-content: center; align-items: center; text-align: center; margin-top: 0.5rem; }
  .nav-contact, .nav-units { display: none; }

  /* Hero header */
  .hero-slider {
    height: 62svh;
    height: 62dvh;
    height: 62vh; /* fallback */
  }
  .hero-slide { background-size: cover; background-position: center 35%; background-repeat: no-repeat; }
  .hero-slide h1, .hero-slide h2 { font-size: clamp(1.4rem, 6.5vw, 2rem); margin: 0 1rem; }
  .hero-nav { bottom: 1rem; width: 40px; height: 40px; font-size: 1.6rem; }
  .hero-indicators { bottom: 1rem; gap: .35rem; }
  .hero-indicators span { width: 24px; height: 3px; }

  /* Units/voorzieningen – full-bleed, simpele carousel (geconsolideerd) */
  :is(.section--units, .section--voorzieningen) .carousel {
    background: transparent !important;
    box-shadow: none;
    border-radius: 0;
    margin-inline: calc(50% - 50vw);
    width: 100vw;
    padding-inline: .5rem;
    padding-bottom: 60px; /* buffer zodat bar + hitzones niet over de foto vallen */
    /* Slider hint variabelen (percentages) */
    --hint-track-left: 8%;
    --hint-track-width: 84%;
    --hint-thumb-width: 18%;
    --hint-thumb-left: var(--hint-track-left); /* JS update */
  }

  .carousel { position: relative; }
  .section--units .carousel .carousel__track,
  .section--voorzieningen .carousel .carousel__track {
    background: transparent !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    padding-inline: 0;
    gap: 4px;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y pinch-zoom; /* enable vertical page scroll when touching photos while keeping horizontal swipe */
  }
  .section--units .carousel .carousel__track::-webkit-scrollbar,
  .section--voorzieningen .carousel .carousel__track::-webkit-scrollbar { display: none !important; }
  .section--units .carousel .carousel__track.is-dragging,
  .section--voorzieningen .carousel .carousel__track.is-dragging { scroll-behavior: auto !important; scroll-snap-type: none; cursor: grabbing; }

  .section--units .carousel .card,
  .section--voorzieningen .carousel .card { flex: 0 0 100%; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; display: block; overflow: visible; }

  .section--units .carousel .card img,
  .section--voorzieningen .carousel .card img {
    width: 100%; height: auto; object-fit: contain; display: block; margin: 0; border-radius: 12px; border: 0; background: transparent;
    -webkit-user-drag: none;
    touch-action: pan-x pan-y pinch-zoom; /* allow both: swipe photos horizontally AND scroll page vertically */
  }

  /* Visible white bar (fake scrollbar) – pixel fallbacks */
  :is(.section--units, .section--voorzieningen) .carousel::after {
    content: "";
    position: absolute;
    left: var(--hint-track-left-px, var(--hint-track-left));
    bottom: 8px;                                /* in de onderbuffer */
    width: var(--hint-track-width-px, var(--hint-track-width));
    height: 6px;
    background: rgba(255,255,255,0.30);         /* track */
    border-radius: 999px;
    pointer-events: none;
    z-index: 2;
  }
  :is(.section--units, .section--voorzieningen) .carousel::before {
    content: "";
    position: absolute;
    bottom: 8px;                                /* in de onderbuffer */
    left: var(--hint-thumb-left-px, var(--hint-thumb-left));
    width: var(--hint-thumb-width-px, var(--hint-thumb-width));
    height: 6px;
    background: rgba(255,255,255,0.95);         /* witte schuiver */
    border-radius: 999px;
    pointer-events: none;
    z-index: 3;
  }

  /* Interactive hit zones (invisible) */
  :is(.section--units, .section--voorzieningen) .carousel .hint-thumb-drag {
    position: absolute;
    bottom: 8px;                                /* uitlijnen met balk */
    left: var(--hint-thumb-left-px, var(--hint-thumb-left));
    width: var(--hint-thumb-width-px, var(--hint-thumb-width));
    min-width: 72px;
    height: 52px;                               /* royale touch target */
    transform: none;                            /* NIET optillen */
    z-index: 4;
    background: transparent;
    touch-action: pan-x; /* only capture horizontal drags */
    -webkit-tap-highlight-color: transparent;
  }

  :is(.section--units, .section--voorzieningen) .carousel .hint-bar-hit {
    position: absolute;
    bottom: 8px;
    left: var(--hint-track-left-px, var(--hint-track-left));
    width: var(--hint-track-width-px, var(--hint-track-width));
    height: 72px;                               /* ruim voor duim */
    transform: none;
    z-index: 3;
    background: transparent;
    touch-action: pan-x; /* do not block vertical scroll */
    -webkit-tap-highlight-color: transparent;
  }

  :is(.section--units, .section--voorzieningen) .carousel .hint-swipe-zone {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 60px;                                /* match padding-bottom */
    z-index: 2;                                  /* onder thumb, boven content */
    background: transparent;
    pointer-events: auto;
    touch-action: pan-x; /* keep vertical scroll free */
  }

  /* Pijlen uit op mobiel */
  .section--units .carousel__btn { display: none; }
  .section--voorzieningen .carousel__btn { display: none; }

  /* Map & footer */
  .section--contact .contact__map { height: clamp(380px, 60vh, 560px); }
  .contact__map iframe { height: 100%; border-radius: inherit; }
  .site-footer { padding: .75rem 0; }
  .site-footer p { font-size: .95rem; }
}

/* Zorg dat de carousel een positioning-context heeft */
.section--units .carousel { position: relative; }
.section--voorzieningen .carousel { position: relative; }

/* ---- Ultra-small phones ---- */

/* Touch/drag feedback for carousels */
.carousel__track { cursor: grab; }
.carousel__track.is-dragging { cursor: grabbing; }

/* Ensure scrollbars (desktop) do not overlap images; keep a tiny padding-bottom for track */
.section--units .carousel .carousel__track,
.section--voorzieningen .carousel .carousel__track { padding-bottom: 6px; }

/* ---- Hover alleen op desktops/laptops ---- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); box-shadow: 0 2px 0 rgba(0,0,0,.2) inset, 0 12px 24px rgba(0,0,0,.35); }
  .hero-nav:hover { background: rgba(0, 0, 0, 0.6); }
  :is(.section--units, .section--voorzieningen) .carousel__btn:hover {
    background: color-mix(in oklab, var(--brand), transparent 70%);
    transform: translateY(-50%);
  }
}

/* ---- Respect reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  .carousel__track { scroll-behavior: auto; }
  .hero-slide { transition: none; }
  .hero-indicators, .hero-nav { transition: none; }
}