@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #FDF6EF;
  --primary: #1A6B8A;
  --primary-dark: #134f66;
  --secondary: #D95F52;
  --accent: #F0B429;
  --text: #2D3748;
  --text-light: #718096;
  --card: #FFFFFF;
  --border: #EDE5DC;
  --success: #38A169;
  --shadow: 0 4px 24px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 18px;
  --nav-h: 64px;
  --mob-nav-h: 68px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── NAV DESKTOP ── */
nav {
  background: var(--primary);
  height: var(--nav-h);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .logo {
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
  white-space: nowrap;
}
nav .logo span { color: var(--accent); }
nav a.nav-link {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s;
  white-space: nowrap;
}
nav a.nav-link:hover, nav a.nav-link.active {
  background: rgba(255,255,255,0.15);
  color: white;
}
nav a.nav-link.active { background: rgba(255,255,255,0.2); }

/* ── NAV MOBIEL (ONDERAAN) ── */
.mob-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  height: var(--mob-nav-h);
  border-top: 1px solid var(--border);
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}
.mob-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.mob-nav a i { font-size: 1.25rem; }
.mob-nav a.active, .mob-nav a:hover { color: var(--primary); }
.mob-nav a.active i { color: var(--primary); }

/* ── HERO ── */
.hero {
  background: linear-gradient(140deg, var(--primary) 0%, #0d3d54 100%);
  color: white;
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 44px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.hero p { color: rgba(255,255,255,0.78); font-size: 1.05rem; }

/* ── PAGE HEADER ── */
.page-header {
  background: linear-gradient(140deg, var(--primary) 0%, #0d3d54 100%);
  color: white;
  padding: 2rem;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
}
.page-header p { color: rgba(255,255,255,0.75); margin-top: 0.3rem; }

/* ── CONTAINER ── */
.container { max-width: 1400px; margin: 0 auto; padding: 2rem; }

/* ── DASHBOARD GRID ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

/* ── CARDS ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-title i { color: var(--secondary); font-size: 0.95rem; }

/* ── JUBILEUM ── */
.jubileum-card { grid-column: span 12; }

/* ── COUNTDOWN ── */
.countdown-card { grid-column: span 12; }
.countdown-inner {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.countdown-unit {
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 14px;
  padding: 1.1rem 1.6rem;
  min-width: 90px;
  box-shadow: 0 4px 16px rgba(26,107,138,0.3);
}
.countdown-unit .num {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}
.countdown-unit .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
  margin-top: 0.3rem;
}
.quote-bar {
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.6;
}
.quote-bar strong { color: var(--secondary); }

/* ── DEELNEMERS ── */
.deelnemers-card { grid-column: span 12; }
.deelnemers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.deelnemer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.deelnemer-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}
.deelnemer:hover .deelnemer-avatar { border-color: var(--primary); transform: scale(1.05); }
.deelnemer-name { font-size: 0.82rem; font-weight: 600; color: var(--text); text-align: center; }
.upload-hint { font-size: 0.68rem; color: var(--text-light); }
.deelnemer-upload { display: none; }
.avatar-placeholder {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #2d8fb5);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem; font-weight: 700; color: white;
  border: 3px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}
.deelnemer:hover .avatar-placeholder { border-color: var(--primary); transform: scale(1.05); }

/* ── WEER ── */
.weer-card { grid-column: span 8; }
.weer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}
.weer-dag {
  text-align: center;
  background: var(--bg);
  border-radius: 12px;
  padding: 0.75rem 0.4rem;
  border: 1px solid var(--border);
}
.weer-dag .dag-naam { font-size: 0.72rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; }
.weer-dag .datum { font-size: 0.68rem; color: var(--text-light); margin-bottom: 0.3rem; }
.weer-dag .icon { font-size: 1.6rem; margin: 0.3rem 0; }
.weer-dag .temp-max { font-size: 1rem; font-weight: 700; color: var(--secondary); }
.weer-dag .temp-min { font-size: 0.8rem; color: var(--text-light); }
.weer-dag .regen { font-size: 0.68rem; color: var(--primary); margin-top: 0.25rem; }
.weer-refresh { font-size: 0.72rem; color: var(--text-light); text-align: right; margin-top: 0.75rem; }

/* ── BIER INDEX ── */
.bier-card { grid-column: span 4; }
.bier-list { list-style: none; }
.bier-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  border-radius: 6px;
}
.bier-list li:last-child { border-bottom: none; }
.bier-list .land { display: flex; align-items: center; gap: 0.5rem; }
.bier-list .prijs { font-weight: 700; color: var(--primary); }
.bier-list li.highlight { background: #FFF0EE; padding: 0.5rem 0.75rem; margin: 0.15rem -0.25rem; }
.bier-list .highlight .prijs { color: var(--secondary); }

/* ── KAART ── */
.kaart-card { grid-column: span 7; min-height: 400px; }
#map { height: 350px; border-radius: 12px; overflow: hidden; }

/* ── REISINFO ── */
.reisinfo-card { grid-column: span 5; }
.reisinfo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.reisinfo-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 0.9rem;
  border: 1px solid var(--border);
}
.reisinfo-item .ri-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-light); font-weight: 600; margin-bottom: 0.3rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.reisinfo-item .ri-value { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.reisinfo-item .ri-value.placeholder { color: var(--text-light); font-style: italic; font-weight: 400; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all 0.2s;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,107,138,0.3); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #c04d42; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }

/* ── TABS (inpaklijst) ── */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--border);
  border-radius: 12px;
  padding: 0.3rem;
}
.tab-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
}
.tab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ── GALLERY ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-item {
  border-radius: 14px; overflow: hidden;
  aspect-ratio: 4/3; position: relative;
  cursor: pointer; box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.gallery-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item .overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.gallery-item:hover .overlay { opacity: 1; }
.gallery-upload-box {
  border: 2px dashed var(--border);
  border-radius: 14px; padding: 3rem;
  text-align: center; cursor: pointer;
  color: var(--text-light); transition: all 0.2s;
}
.gallery-upload-box:hover { border-color: var(--primary); color: var(--primary); background: #f0f8ff; }

/* ── ACTIVITEITEN ── */
.activity-card {
  background: var(--card); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
  border: 1px solid var(--border); margin-bottom: 1rem;
  transition: box-shadow 0.2s;
}
.activity-card:hover { box-shadow: var(--shadow-hover); }
.activity-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.activity-title { font-size: 1.05rem; font-weight: 700; font-family: 'Playfair Display', serif; }
.activity-meta { font-size: 0.82rem; color: var(--text-light); margin-top: 0.25rem; line-height: 1.5; }
.activity-tag {
  background: var(--bg); color: var(--primary);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 0.2rem 0.7rem; font-size: 0.75rem; font-weight: 600;
}
.activity-cost { font-weight: 700; color: var(--secondary); }
.deelnemers-check { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.check-person {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 0.22rem 0.65rem;
  font-size: 0.78rem; cursor: pointer; transition: all 0.2s;
}
.check-person input { display: none; }
.check-person.checked { background: #EBF8EE; border-color: var(--success); color: var(--success); }
.check-person .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); transition: background 0.2s;
}
.check-person.checked .dot { background: var(--success); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000; display: flex;
  align-items: center; justify-content: center;
  padding: 1rem; opacity: 0;
  pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: white; border-radius: var(--radius);
  padding: 2rem; width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px); transition: transform 0.2s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal h2 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 1.5rem; color: var(--primary);
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.83rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 0.9rem; font-family: 'Inter', sans-serif;
  background: white; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; }

/* ── CHECKLIST ── */
.checklist-section { margin-bottom: 2rem; }
.checklist-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 700;
  color: var(--primary); margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.checklist-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.5rem; }
.check-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: white; border: 1.5px solid var(--border);
  border-radius: 12px; cursor: pointer;
  transition: all 0.2s; user-select: none;
}
.check-item:hover { border-color: var(--primary); transform: translateX(2px); }
.check-item.done { background: #F0FFF4; border-color: #9AE6B4; }
.check-item.done .check-label { text-decoration: line-through; color: var(--text-light); }
.check-box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--border); display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s;
  font-size: 0.75rem; color: white;
}
.check-item.done .check-box { background: var(--success); border-color: var(--success); }
.progress-bar-wrap { background: var(--border); border-radius: 99px; height: 8px; margin: 0.5rem 0 1.5rem; overflow: hidden; }
.progress-bar { height: 8px; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 99px; transition: width 0.4s ease; }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 10px; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  color: white; font-size: 2rem;
  cursor: pointer; background: none; border: none;
}

/* ── HUISJE FOTO GRID ── */
.huisje-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.5rem;
  height: 300px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.huisje-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.huisje-grid img:first-child { grid-row: span 2; }

/* ── CHECKLIST EXPANDED ITEM ── */
.check-item-expanded {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s;
}
.check-item-expanded:hover { box-shadow: var(--shadow); }
.check-item-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.6rem;
}
.check-item-naam { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.check-persons { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── LOCATIE ZOEK SUGGESTIES ── */
#locatie-suggesties > div:last-child { border-bottom: none; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .weer-card { grid-column: span 12; }
  .bier-card { grid-column: span 12; }
  .kaart-card { grid-column: span 12; }
  .reisinfo-card { grid-column: span 12; }
}

@media (max-width: 768px) {
  body { padding-bottom: var(--mob-nav-h); }

  /* Desktop nav verbergen, mobiel nav tonen */
  nav { display: none; }
  .mob-nav { display: flex; }

  .hero { padding: 2rem 1rem 2rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero p { font-size: 0.9rem; }

  .container { padding: 1rem; }
  .dashboard-grid { gap: 1rem; }

  .countdown-card, .deelnemers-card, .jubileum-card,
  .weer-card, .bier-card, .kaart-card, .reisinfo-card { grid-column: span 12; }

  .countdown-inner { gap: 0.75rem; }
  .countdown-unit { padding: 0.9rem 1.1rem; min-width: 72px; }
  .countdown-unit .num { font-size: 2.1rem; }

  .weer-grid { grid-template-columns: repeat(5, minmax(60px, 1fr)); overflow-x: auto; }

  .reisinfo-grid { grid-template-columns: 1fr 1fr; }

  .form-row { grid-template-columns: 1fr; }

  #map { height: 280px; }
  #mini-map { height: 220px; }

  .checklist-items { grid-template-columns: 1fr; }

  .huisje-grid {
    display: flex;
    overflow-x: auto;
    height: 200px;
    gap: 0.4rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }
  .huisje-grid img { width: 80vw; flex-shrink: 0; scroll-snap-align: start; height: 100%; border-radius: 0; }
  .huisje-grid img:first-child { width: 88vw; grid-row: auto; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Activiteiten layout op mobiel */
  .activities-layout { grid-template-columns: 1fr !important; }
  .map-sticky { position: static !important; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .countdown-unit .num { font-size: 1.8rem; }
  .countdown-unit { min-width: 62px; padding: 0.75rem 0.8rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .deelnemers-grid { gap: 0.75rem; }
  .avatar-placeholder, .deelnemer-avatar { width: 64px; height: 64px; }
  .reisinfo-grid { grid-template-columns: 1fr; }
}
