:root {
  --bg: #ffffff;
  --bg-muted: #f5f4f1;
  --text: #1c1c1a;
  --text-muted: #74726c;
  --border: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.25);
  --radius: 10px;
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

/* Header */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px 18px;
}
.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  letter-spacing: 0.5px;
}
.brand-sub { color: var(--text-muted); font-size: 18px; margin-left: 4px; }
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-left: 22px;
}
.site-nav a:hover { color: var(--text); }

/* Filter bar */
.filterbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 24px;
}
.filter-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-selects { margin-left: auto; display: flex; gap: 8px; }

.chip {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active { background: var(--text); color: #fff; border-color: var(--text); }

.filter-selects select {
  appearance: none;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  font-size: 13px;
  padding: 6px 30px 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%2374726c'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.filter-selects select:hover { border-color: var(--border-strong); }

/* Gallery (masonry via CSS columns) */
.gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px 60px;
  column-count: 3;
  column-gap: 16px;
}
@media (max-width: 900px) { .gallery { column-count: 2; } }
@media (max-width: 560px) { .gallery { column-count: 1; } }

.tile {
  position: relative;
  margin: 0 0 16px;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-muted);
}
.tile img { width: 100%; height: auto; transition: transform .4s ease; }
.tile:hover img { transform: scale(1.04); }
.tile-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 12px 10px;
  color: #fff;
  font-size: 13px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity .2s ease;
}
.tile:hover .tile-cap { opacity: 1; }

.empty { text-align: center; color: var(--text-muted); padding: 40px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 15, 15, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox[hidden] { display: none; }
.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lb-figure img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 6px;
}
.lb-figure figcaption { color: #e8e8e8; font-size: 14px; text-align: center; }

.lb-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  width: 48px;
  height: 48px;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lb-close { top: 20px; right: 20px; font-size: 30px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) {
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* Wereldbol-pagina (kaart.html) */
.globe-page { background: #0b0f14; color: #e8eef5; }
.globe-page .brand-name { color: #f3f6fa; }
.globe-page .brand-sub { color: #9fb0c2; }
.globe-page .site-nav a { color: #9fb0c2; }
.globe-page .site-nav a:hover,
.globe-page .site-nav a[aria-current="page"] { color: #fff; }

#globe { width: 100%; height: calc(100vh - 150px); min-height: 420px; cursor: grab; }
#globe:active { cursor: grabbing; }
.globe-status { text-align: center; color: #9fb0c2; font-size: 13px; margin: 4px 0 14px; padding: 0 16px; }

.city-marker { position: relative; width: 46px; height: 46px; cursor: pointer; }
.city-marker img {
  width: 46px; height: 46px; object-fit: cover; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: block; transition: transform .15s ease;
}
.city-marker:hover img { transform: scale(1.14); }
.city-marker .badge {
  position: absolute; top: -6px; right: -6px; background: #e24b4a; color: #fff;
  font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 999px; padding: 0 4px; font-weight: 500;
}

.city-panel {
  position: fixed; left: 0; right: 0; bottom: 0; max-height: 55vh; overflow-y: auto;
  background: rgba(12, 17, 23, 0.97); border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 20px 24px; z-index: 40;
}
.city-panel[hidden] { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { font-size: 18px; font-weight: 500; margin: 0 0 12px; color: #f3f6fa; }
.panel-actions { display: flex; align-items: center; gap: 14px; }
.panel-gallery { color: #8fb3d9; text-decoration: none; font-size: 13px; white-space: nowrap; }
.panel-gallery:hover { color: #fff; }
.panel-map { height: 220px; border-radius: 8px; overflow: hidden; margin: 0 0 12px; }
.panel-map.map-full { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999; border-radius: 0; margin: 0; }
.map-expand { background: transparent; border: 1px solid rgba(255, 255, 255, 0.25); color: #cdd7e2; font-size: 13px; padding: 5px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.map-expand:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.map-expand.floating { position: fixed; top: 18px; right: 24px; z-index: 10000; background: rgba(12, 17, 23, 0.9); }
.panel-close { background: transparent; border: none; color: #cdd7e2; font-size: 26px; cursor: pointer; line-height: 1; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.panel-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform .15s ease; }
.panel-grid img:hover { transform: scale(1.03); }

/* Twee-opties schakelaar (Foto's | Wereldbol) */
.view-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.view-switch a { padding: 8px 20px; font-size: 14px; text-decoration: none; color: var(--text-muted); transition: background .15s ease, color .15s ease; }
.view-switch a:hover { color: var(--text); }
.view-switch a.is-active { background: var(--text); color: #fff; }
.globe-page .view-switch { border-color: rgba(255, 255, 255, 0.25); }
.globe-page .view-switch a { color: #9fb0c2; }
.globe-page .view-switch a:hover { color: #fff; }
.globe-page .view-switch a.is-active { background: #e8eef5; color: #0b0f14; }
