:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --ink: #15212b;
  --ink-2: #33414d;
  --muted: #66727c;
  --line: #e2dfd8;
  --accent: #0f4a54;
  --accent-ink: #ffffff;
  --accent-soft: #e3eeee;
  --ok: #1d7448;
  --ok-soft: #e2f1e8;
  --warn: #a8661a;
  --warn-soft: #f8ecd9;
  --off: #4b5661;
  --off-soft: #e6e8ea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(21, 33, 43, .06), 0 6px 20px rgba(21, 33, 43, .06);
  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.015em; line-height: 1.2; margin: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ---------- Header ---------- */
/* De balk staat vast bovenin en schuift mee bij het scrollen. */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: var(--shadow); }
body { padding-top: 68px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.bm-bg { fill: var(--accent); }
.bm-fg { fill: var(--accent-ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.bt-1 { font-family: var(--font-head); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.bt-2 { font-weight: 600; font-size: 10.5px; letter-spacing: .34em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 6px; }
.nav a {
  text-decoration: none; font-weight: 500; color: var(--ink-2); padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.cta { background: var(--accent); color: var(--accent-ink); }
.nav a.cta:hover { filter: brightness(1.1); background: var(--accent); }
@media (max-width: 600px) { .nav a:not(.cta) { display: none; } }

/* ---------- Hero ---------- */
/* Kop: petrol uit het logo, met de foto van het uitgelichte pand doorschijnend erachter. */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #1a6873; color: #fff; padding: 56px 0 72px; }
.hero-photo { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 45%; opacity: 0; transform: scale(1.06); transition: opacity 1.6s ease, transform 9s ease-out; }
.hero-photo.on { opacity: 1; transform: scale(1); }
.hero-dots { position: absolute; left: max(24px, calc(50% - 596px)); bottom: 40px; display: flex; gap: 6px; z-index: 1; }
.hero-dots button { width: 22px; height: 4px; border: 0; padding: 0; border-radius: 2px; background: rgba(255,255,255,.35); cursor: pointer; }
.hero-dots button.on { background: #fff; }
@media (max-width: 600px) { .hero-dots { left: 16px; bottom: 36px; } }

/* terugknop pandpagina */
.p-head .back { flex: none; align-self: center; }
@media (max-width: 600px) { .p-head .back { order: -1; align-self: flex-start; } }
.back { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; }
.back:hover { border-color: var(--accent); color: var(--accent); }
.back svg { width: 18px; height: 18px; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(15,74,84,.94) 0%, rgba(19,92,103,.80) 48%, rgba(26,110,122,.42) 100%); }
@media (max-width: 700px) { .hero::after { background: linear-gradient(180deg, rgba(19,92,103,.80) 0%, rgba(15,74,84,.94) 100%); } }
.hero .wrap { position: relative; }
.hero h1 { font-family: "Inter Tight", "Inter", system-ui, sans-serif; font-size: clamp(30px, 4.2vw, 48px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; max-width: 760px; }
.hero p { color: #d6e9eb; font-size: 17px; max-width: 640px; margin: 14px 0 0; }
.hero-stats { display: flex; gap: 20px 40px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats div { border-left: 2px solid #9ad6dc; padding-left: 14px; }
.hero-stats b { display: block; font-family: var(--font-head); font-size: 28px; font-weight: 800; line-height: 1.1; }
.hero-stats span { color: #d6e9eb; font-size: 13px; }
.hero-credit { position: absolute; right: 24px; bottom: -32px; font-size: 13px; color: #d6e9eb; text-decoration: none; background: rgba(0,0,0,.18); padding: 5px 10px; border-radius: 6px; backdrop-filter: blur(4px); }
.hero-credit b { color: #fff; font-weight: 600; }
.hero-credit:hover { background: rgba(0,0,0,.3); }
@media (max-width: 700px) { .hero .wrap { display: flex; flex-direction: column; } .hero-credit { position: static; order: 9; align-self: flex-start; margin-top: 24px; } }

/* ---------- Filterbalk ---------- */
.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-top: -28px; position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px;
}
.seg { display: flex; background: var(--bg); border-radius: 8px; padding: 3px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; font: inherit; font-weight: 500; color: var(--ink-2);
  padding: 7px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.seg button .n { color: var(--muted); font-weight: 400; margin-left: 4px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.filters select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 32px 8px 12px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2366727c' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.filters .spacer { flex: 1; }
@media (max-width: 760px) {
  .filters .spacer { display: none; }
  .filters select { flex: 1 1 140px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 7px 8px; }
}

.result-line { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 14px; color: var(--muted); }
.result-line h2 { font-size: 20px; color: var(--ink); }

/* ---------- Raster met panden ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; padding-bottom: 64px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--off-soft); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.03); }
.card.verhuurd .card-img img { filter: saturate(.75); }
.card-img .count {
  position: absolute; right: 10px; bottom: 10px; background: rgba(21,33,43,.75); color: #fff;
  font-size: 12px; padding: 3px 8px; border-radius: 6px; display: flex; gap: 5px; align-items: center;
}
.card-img .feat {
  position: absolute; right: 10px; top: 10px; background: var(--surface); color: var(--accent);
  font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-place { font-size: 14px; color: var(--muted); line-height: 1.4; }
.card-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; gap: 14px; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.card-price { margin-top: auto; padding-top: 10px; font-weight: 700; font-size: 16px; }
.card-price small { font-weight: 400; color: var(--muted); font-size: 13px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px; line-height: 1.3;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.beschikbaar { background: var(--ok-soft); color: var(--ok); }
.badge.onder-optie { background: var(--warn-soft); color: var(--warn); }
.badge.verhuurd { background: var(--off-soft); color: var(--off); }
.card-badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 20px); }
.card-badges .badge { box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.badge.tot { background: #fde68a; color: #5c4300; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.badge.tot::before { display: none; }
.badges-row { display: flex; gap: 6px; flex-wrap: wrap; }

.noimg {
  width: 100%; height: 100%; display: grid; place-items: center; color: #9aa3aa;
  background: repeating-linear-gradient(135deg, #eceae4 0 12px, #e5e2db 12px 24px);
}

.empty { text-align: center; padding: 64px 16px; color: var(--muted); grid-column: 1 / -1; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* skeleton */
.skel .card-img, .skel .line { background: linear-gradient(90deg, #ebe9e3, #f4f3ef, #ebe9e3); background-size: 200% 100%; animation: sh 1.2s infinite; }
.skel .line { height: 12px; border-radius: 4px; margin: 6px 0; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c5ced5; padding: 48px 0 32px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: 16px; margin-bottom: 10px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal { border-top: 1px solid #2b3945; margin-top: 32px; padding-top: 16px; font-size: 13px; color: #8697a3; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* =================== PANDPAGINA =================== */
.crumbs { font-size: 13px; color: var(--muted); padding: 18px 0 10px; }
.crumbs a { text-decoration: none; color: var(--accent); }
.crumbs a:hover { text-decoration: underline; }

.p-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.p-head h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.p-head .addr { color: var(--muted); margin-top: 6px; font-size: 16px; }
.p-head .badges { display: flex; gap: 8px; margin-bottom: 10px; }

/* galerij */
.gallery {
  display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px;
  height: clamp(320px, 46vw, 520px); border-radius: var(--radius); overflow: hidden; position: relative;
}
.gallery button { border: 0; padding: 0; margin: 0; cursor: zoom-in; background: var(--off-soft); overflow: hidden; }
.gallery button img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.03); }
.gallery .g0 { grid-row: 1 / 3; }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery.n1 .g0 { grid-row: 1 / 3; }
.gallery.n2 { grid-template-columns: 2fr 1fr; }
.gallery.n2 .g1 { grid-row: 1 / 3; }
.gallery.n3 { grid-template-columns: 2fr 1fr; }
.gallery.n4 { grid-template-columns: 2fr 1fr 1fr; }
.gallery.n4 .g3 { grid-column: 2 / 4; }
.gallery > .all-photos {
  position: absolute; right: 16px; bottom: 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  font: inherit; font-size: 15px; font-weight: 600; padding: 11px 18px; border-radius: 10px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center;
  box-shadow: var(--shadow);
}
.gallery > .all-photos:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) {
  .gallery, .gallery.n2, .gallery.n3, .gallery.n4 { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 62vw; }
  .gallery button:not(.g0):not(.all-photos) { display: none; }
  .gallery .g0 { grid-row: auto; }
}

.p-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; margin: 32px 0 64px; align-items: start; }
@media (max-width: 960px) { .p-layout { grid-template-columns: 1fr; gap: 24px; } .p-aside { order: -1; } }

.p-section { padding: 28px 0; border-top: 1px solid var(--line); }
.p-section:first-child { border-top: 0; padding-top: 0; }
.p-section h2 { font-size: 21px; margin-bottom: 14px; }
.lead { font-size: 17px; color: var(--ink-2); margin: 0 0 12px; }
.rich { color: var(--ink-2); }
.rich p { margin: 0 0 12px; }
.rich h2, .rich h3 { margin: 18px 0 8px; font-size: 17px; }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 600px) { .specs { grid-template-columns: 1fr; } }

.checks { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; }
.checks li { break-inside: avoid; padding: 6px 0 6px 28px; position: relative; color: var(--ink-2); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='%230f4a54' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
@media (max-width: 600px) { .checks { columns: 1; } }

.docs { display: grid; gap: 10px; }
.docs a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); text-decoration: none; font-weight: 500;
}
.docs a:hover { border-color: var(--accent); }
.docs .ic { width: 34px; height: 34px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }

.map { width: 100%; height: 340px; border: 0; border-radius: var(--radius); background: var(--off-soft); }

/* zijkolom */
.p-aside { position: sticky; top: 88px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.box .price { font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1.15; margin: 10px 0 2px; }
.box .price-note { color: var(--muted); font-size: 14px; }
.box .facts { list-style: none; padding: 0; margin: 18px 0; border-top: 1px solid var(--line); }
.box .facts li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.box .facts span { color: var(--muted); }
.box .facts b { font-weight: 600; }
.btn {
  display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; padding: 13px 16px; border-radius: 8px; text-decoration: none;
}
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); margin-top: 8px; }
.btn.ghost:hover { border-color: var(--accent); filter: none; }
.btn:disabled { opacity: .6; cursor: default; }
.box .contact-line { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }
.box .contact-line a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* formulier */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea {
  font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.form textarea { min-height: 120px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .msg { grid-column: 1 / -1; padding: 12px 14px; border-radius: 8px; display: none; }
.form .msg.ok { display: block; background: var(--ok-soft); color: var(--ok); }
.form .msg.err { display: block; background: #fbe7e5; color: #a3261b; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

.more { padding: 48px 0 64px; border-top: 1px solid var(--line); }
.more h2 { font-size: 22px; margin-bottom: 18px; }
.more .grid { padding-bottom: 0; }

/* lightbox */
.lb { position: fixed; inset: 0; background: rgba(10, 15, 20, .94); z-index: 100; display: none; flex-direction: column; }
.lb.open { display: flex; }
.lb-top { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 14px 18px; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; padding: 0 64px 24px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lb button {
  background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; font-size: 22px; display: grid; place-items: center;
}
.lb button:hover { background: rgba(255,255,255,.22); }
.lb .prev, .lb .next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb .prev { left: 12px; } .lb .next { right: 12px; }
@media (max-width: 600px) { .lb-stage { padding: 0 0 24px; } .lb .prev, .lb .next { top: auto; bottom: 28px; transform: none; } }

.notfound { text-align: center; padding: 96px 16px; }
.notfound h1 { font-size: 26px; margin-bottom: 8px; }
.notfound a { color: var(--accent); }
[hidden] { display: none !important; }
@media (max-width: 960px) { .p-aside { position: static; } }
