/* ---- Basis ---- */
:root {
  --green-900: #1e3a2b;
  --green-700: #2d6a4f;
  --green-600: #40916c;
  --green-100: #e7f2ec;
  --cream: #faf7f0;
  --ink: #22301f;
  --muted: #6b7a6f;
  --line: #dde5dd;
  --amber: #e9a03b;
  --red: #c0392b;
  /* Kampvuur-oranje: het vrolijke accent naast het groen */
  --accent: #ff7a1f;
  --accent-dark: #e8630a;
  --accent-soft: #ffe9d9;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(30, 58, 43, 0.10), 0 4px 14px rgba(30, 58, 43, 0.06);
  --display-font: "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

h1 { font-family: var(--display-font); font-size: 1.8rem; margin: 0 0 0.25rem; color: var(--green-900); }
h2 { font-family: var(--display-font); font-size: 1.2rem; margin: 0 0 0.75rem; color: var(--green-900); }
h3 { font-family: var(--display-font); font-size: 1.05rem; margin: 0; }
a { color: var(--green-700); }
a:hover { color: var(--green-600); }

/* ---- Header & navigatie ---- */
.site-header {
  background: var(--green-900);
  color: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.brand .logo { height: 36px; width: auto; }
.brand-text { display: inline-flex; align-items: flex-start; font-family: var(--display-font); font-size: 1.35rem; font-weight: 700; color: #fff; line-height: 1; }
.brand-score { display: inline-flex; flex-direction: column; align-items: center; color: var(--accent); }
.brand-stars { font-size: 0.5rem; letter-spacing: 0.2em; color: var(--amber); margin-top: 2px; line-height: 1; }
.nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nav a { color: #d9e8df; text-decoration: none; font-weight: 500; }
.nav a:hover { color: #fff; }
.nav .nav-admin { color: var(--amber); }
.link-btn { background: none; border: none; color: #d9e8df; cursor: pointer; font: inherit; padding: 0; }
.link-btn:hover { color: #fff; text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.inline-form { display: inline; }

/* main.container (i.p.v. main) nodig: .container's eigen padding-regel heeft
   anders altijd voorrang, ongeacht volgorde in dit bestand (class > element) */
main.container { padding: 2.25rem 1rem 3rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); padding: 1.25rem 0; font-size: 0.9rem; }

/* ---- Knoppen ---- */
.btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
/* De "+ Locatie"-knop in de navigatie krijgt het accent: dé actie van de app */
.nav .btn-primary { background: var(--accent); }
.nav .btn-primary:hover { background: var(--accent-dark); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-600); color: #fff; }
.btn-outline { background: #fff; color: var(--green-700); border-color: var(--green-700); }
.btn-outline:hover { background: var(--green-100); }
.btn-danger-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-danger-outline:hover { background: #fbeae8; }
.btn-favorite-active { background: #b23a48; color: #fff; }
.btn-favorite-active:hover { background: #93313c; color: #fff; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.btn-lg { padding: 0.65rem 1.5rem; font-size: 1.05rem; }

/* ---- Kaarten (cards) ---- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section { padding: 1.25rem; margin-bottom: 1.25rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.location-card { overflow: hidden; display: flex; flex-direction: column; transition: transform 0.15s, box-shadow 0.15s; }
.location-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(30, 58, 43, 0.12), 0 10px 24px rgba(30, 58, 43, 0.10);
}
.card-image { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--green-100); }
.card-owner-pill {
  position: absolute; bottom: 6px; right: 6px; background: rgba(30, 58, 43, 0.75); color: #fff;
  font-size: 0.7rem; font-weight: 600; padding: 2px 7px; border-radius: 99px;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.location-card:hover .card-image img { transform: scale(1.04); }
.card-image-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; opacity: 0.5; }
.card-body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.card-title-row { display: flex; justify-content: space-between; align-items: start; gap: 0.5rem; }
.card-title-row a { text-decoration: none; color: var(--green-900); }
.card-meta { margin: 0; color: var(--muted); font-size: 0.9rem; }

.badge {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  white-space: nowrap;
}
.tags { margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag { background: var(--cream); border: 1px solid var(--line); border-radius: 99px; padding: 0.1rem 0.55rem; font-size: 0.78rem; color: var(--muted); }

/* ---- Sterren ---- */
.rating-row { display: flex; align-items: center; gap: 0.4rem; margin: 0; }
.star { color: var(--amber); font-size: 1.05rem; }
.star.empty { color: #d8d3c5; }
.star.half { position: relative; color: #d8d3c5; }
.star.half::before { content: '★'; position: absolute; left: 0; width: 50%; overflow: hidden; color: var(--amber); }

/* ---- Formulieren ---- */
label { display: block; margin-bottom: 0.75rem; font-weight: 500; font-size: 0.95rem; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  margin-top: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-600); outline-offset: 0; border-color: var(--green-600); }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 0.75rem; padding: 0.75rem; }
legend { font-weight: 600; padding: 0 0.35rem; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.25rem 0.75rem; }
.checkbox { display: flex; align-items: center; gap: 0.45rem; font-weight: 400; margin: 0; }
.checkbox input { width: auto; margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.form-actions { display: flex; gap: 0.75rem; margin: 1.25rem 0; }
.error-list { margin: 0; padding-left: 1.2rem; }

.auth-card { max-width: 420px; margin: 2rem auto; padding: 1.75rem; }

/* ---- Filterbalk ---- */
.filter-bar { padding: 1rem; margin-bottom: 1.25rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.filter-search { flex: 2 1 220px; }
.filter-row select { flex: 1 1 150px; width: auto; }
.filter-row input, .filter-row select { margin-top: 0; }
.filter-facilities { margin-top: 0.75rem; }
.filter-facilities summary { cursor: pointer; font-weight: 600; color: var(--green-700); }
.filter-facilities .checkbox-grid { margin-top: 0.6rem; }

/* ---- Kaart (map) ---- */
.map { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 1; }
.map-overview { height: 380px; margin-bottom: 0.5rem; }
.map-detail { height: 280px; margin-bottom: 1.25rem; }
.map-form { height: 300px; margin: 0.75rem 0; }
.map-owner-pill {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.15rem 0.6rem;
  margin: 0 8px 8px 0;
  font-size: 0.72rem;
  color: var(--muted);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ---- Detailpagina ---- */
.page-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.detail-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.25rem; align-items: start; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0; }
.info-list dt { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.facility-list { list-style: none; margin: 0; padding: 0; columns: 2; }
.facility-list li { margin-bottom: 0.25rem; break-inside: avoid; }
.prewrap { white-space: pre-wrap; }

/* ---- Foto's ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.photo { position: relative; margin: 0; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.photo-actions button {
  background: rgba(0, 0, 0, 0.55); color: #fff; border: none; border-radius: 50%;
  width: 26px; height: 26px; cursor: pointer; font-size: 0.85rem; line-height: 1;
}
.photo-actions form:last-child button:hover { background: var(--red); }
.photo-actions form:not(:last-child) button:hover { background: var(--amber); }
.photo-cover-badge {
  position: absolute; top: 6px; left: 6px; background: rgba(30, 58, 43, 0.75); color: #fff;
  font-size: 0.7rem; font-weight: 600; padding: 2px 7px; border-radius: 99px;
}
.upload-form { padding: 1rem; margin-bottom: 1.25rem; }
.upload-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }
.upload-row input[type="file"] { flex: 1; margin: 0; }

/* ---- Reviews ---- */
.review-form { border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; margin-bottom: 1.25rem; }
.review-form textarea { margin-bottom: 0.6rem; }
.star-input { display: inline-flex; flex-direction: row-reverse; margin-bottom: 0.5rem; }
.star-input input { display: none; }
.star-input label { font-size: 1.9rem; color: #d8d3c5; cursor: pointer; padding: 0 0.1rem; margin: 0; }
.star-input input:checked ~ label,
.star-input label:hover, .star-input label:hover ~ label { color: var(--amber); }
.review-list { list-style: none; margin: 0; padding: 0; }
.review { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.review:last-child { border-bottom: none; }
.review-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.review p { margin: 0.4rem 0 0; }

/* ---- Subscores (rust/sanitair/natuur) ---- */
.subscore-summary { display: flex; gap: 0.9rem; margin: 0.3rem 0 0; font-size: 0.85rem; color: var(--muted); }
.subscore-summary strong { color: var(--ink); }
.subscore-inputs { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 0.75rem; }
.subscore-inputs .star-input { transform: scale(0.7); transform-origin: left center; margin-bottom: -0.3rem; }
.subscore-label { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; }

/* ---- Bezoeken ---- */
.visit-form { border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1rem; }
.visit-form .field-row { margin-bottom: 0.6rem; }
.visit-list { list-style: none; margin: 0; padding: 0; }
.visit { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.visit:last-child { border-bottom: none; }

/* ---- Vergelijkbare locaties ---- */
.nearby-section { margin-top: 1.75rem; }
.nearby-section h2 { margin-bottom: 0.75rem; }

/* ---- Delen ---- */
.share-revoke { display: block; margin-top: 0.6rem; }
.share-banner {
  background: var(--green-100); color: var(--green-700); border: 1px solid var(--green-100);
  padding: 0.6rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-weight: 500; font-size: 0.92rem;
}

/* ---- Flash & lege staat ---- */
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-weight: 500; }
.flash-success { background: #e2f3e8; color: #1d6b3c; border: 1px solid #b7dfc5; }
.flash-error { background: #fbeae8; color: #96281b; border: 1px solid #efc4be; }
.flash-warning { background: #fdf3e0; color: #8a5a10; border: 1px solid #f3dba8; }
.flash-warning .checkbox { margin-top: 0.5rem; font-weight: 600; }
.empty-state { text-align: center; padding: 3rem 1.5rem; margin-top: 1.25rem; }

/* ---- Lightbox (KS-11) ---- */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(20, 28, 20, 0.92); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-image { max-width: min(92vw, 1100px); max-height: 88vh; object-fit: contain; border-radius: 6px; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255, 255, 255, 0.12); color: #fff; border: none;
  border-radius: 50%; cursor: pointer; font-size: 1.3rem; line-height: 1;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-close { top: 18px; right: 18px; width: 40px; height: 40px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 0.85rem; opacity: 0.8; margin: 0; }

/* ---- Kaartclusters (KS-13) ---- */
.cluster-marker {
  width: 36px; height: 36px; border-radius: 50%; background: var(--green-700); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem;
  border: 2px solid #fff; box-shadow: var(--shadow); cursor: pointer;
}

/* ---- Admin ---- */
.admin-nav { display: flex; gap: 0.25rem; margin-bottom: 1.25rem; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.admin-nav a { padding: 0.5rem 1rem; text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.admin-nav a.active, .admin-nav a:hover { color: var(--green-700); border-bottom-color: var(--green-700); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { padding: 1.1rem; text-align: center; }
.stat-number { display: block; font-family: var(--display-font); font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.5rem 0.6rem; border-bottom: 2px solid var(--line); }
.table td { padding: 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.row-inactive { opacity: 0.55; }
.actions-cell { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.comment-cell { max-width: 320px; }
.copy-link { width: 100%; min-width: 220px; max-width: 260px; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.76rem; padding: 0.35rem 0.5rem; cursor: text; }
input[readonly] { background: var(--cream); }

/* ---- Hulpklassen ---- */
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---- Minder beweging voor wie dat wil ---- */
@media (prefers-reduced-motion: reduce) {
  .location-card, .btn, .card-image img { transition: none; }
  .location-card:hover { transform: none; }
}

/* ---- Responsief ---- */
@media (max-width: 800px) {
  .form-grid, .detail-grid, .admin-columns { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .facility-list { columns: 1; }
  .table { display: block; overflow-x: auto; }
  /* Op smalle schermen wrapt de nav naar meerdere regels; extra ruimte eronder */
  main.container { padding-top: 2.75rem; }
}
