/* ============================================
   Basisstijl
   ============================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #f4f4f6;
  color: #222;
}

.site-header {
  background-color: #1f4e79;
  color: white;
  padding: 24px 16px;
  text-align: center;
}

.site-header h1 {
  margin: 0 0 8px 0;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ============================================
   Filter- en zoekbalk (Flexbox, geen floats)
   ============================================ */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-group label {
  font-size: 0.9rem;
  font-weight: bold;
}

.control-group input,
.control-group select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

#status-message {
  min-height: 1.2em;
  color: #555;
  font-style: italic;
}

/* ============================================
   Overzicht: kaarten in een flexibel grid
   ============================================ */
.overzicht {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.kaart {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  width: 180px;
  overflow: hidden;
  cursor: pointer;
  border: none;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
}

.kaart:hover,
.kaart:focus {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  outline: 2px solid #1f4e79;
}

.kaart img {
  width: 100%;
  display: block;
}

.kaart-inhoud {
  padding: 8px 10px;
}

.kaart-inhoud h3 {
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  color: white;
}

.status-alive { background-color: #2e7d32; }
.status-dead { background-color: #c62828; }
.status-unknown { background-color: #757575; }

/* ============================================
   Detailweergave (overlay)
   ============================================ */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.detail-overlay.hidden {
  display: none;
}

.detail-venster {
  background: white;
  border-radius: 8px;
  max-width: 420px;
  width: 100%;
  padding: 24px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.detail-venster img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

.detail-sluiten {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.detail-velden {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
}

.detail-velden dt {
  font-weight: bold;
  width: 140px;
}

.detail-velden dd {
  margin: 0;
  flex: 1;
}

/* ============================================
   Basis responsive gedrag
   ============================================ */
@media (max-width: 480px) {
  .controls {
    flex-direction: column;
  }

  .kaart {
    width: 100%;
  }
}
