/* Basis */
body {
  margin: 0;
  font-family: sans-serif;
  background: #f9f9f9;
  color: #333;
  padding: 1rem;
}

h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/* Kaart */
#map {
  width: 100%;
  height: 50vh;       /* flexibel */ 50
  min-height: 200px;  /* nooit kleiner dan 300px */
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  position: sticky;   /* kaart blijft bovenaan */
  top: 0;
  z-index: 1000;
}

/* Blogsecties */
.blog {
  margin: 2rem auto;
max-width: 1400px;   /* was 800 */
   /*    width: auto;        /* neemt volledige breedte */
  padding: 1rem;
  background-color: #fff;
  border-left: 6px solid var(--track-color, #3399ff);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.blog:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.blog h2 {
  margin-top: 0;
  font-size: 1.4rem;
  color: #333;
}

.blog-card {
  padding: 1rem;
  background: #fff;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1.6;
}

/* Blog header */
.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.blog-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.blog-header .back-to-map,
.blog-header .show-track {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  background: var(--track-color, #3399ff);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Media-knop */
.media-launch {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--track-color, #3399ff);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.media-launch:hover {
  background: #267acc;
}

/* Modal viewer */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: #000;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.modal-content img,
.modal-content video {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

/* Navigatieknoppen in modal */
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.3);
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 10;
  color: #fff;
  border-radius: 50%;
}

.nav-button.left { left: 10px; }
.nav-button.right { right: 10px; }

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 20;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  padding: 0.2em 0.5em;
  line-height: 1;
}

/* Popup overlay */
.popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.popup-content {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: #000;
  display: flex;
  flex-direction: column;
}

.popup-content iframe {
  flex: 1;
  width: 90%;
  height: 90%;
  border: none;
}

@media (max-width: 480px) {
  .popup-content { width: 90%; height: 90%; }
}

/* Reacties */
.blog-reactions {
  margin-top: 0.25rem;
  border-top: 1px solid #ddd;
  padding-top: 0.25rem;
}

.reaction-list {
  margin-bottom: 1rem;
}

.reaction-list p {
  background: #f0f0f0;
  padding: 0.5rem;
  border-radius: 4px;
  margin: 0.5rem 0;
}

.reaction-form textarea {
  width: 100%;
  height: 40px;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  resize: vertical;
}

.reaction-form button {
  margin-top: 0.5rem;
  padding: 0.5rem 0.5rem;
  background: var(--track-color, #3399ff);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Afstandssamenvatting */
.distance-summary {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  background: #f7f7f7;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border-left: 4px solid var(--track-color, #3399ff);
}

.distance-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  background: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.distance-item .icon { font-size: 1.2rem; }
.distance-item .label { font-weight: bold; color: #444; }
.distance-item .value { color: #222; }

/* Algemene knoppen */
button, .close-btn {
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  background: #0078D7;
  color: #fff;
}

.close-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: #f44336;
  color: #fff;
  padding: 5px 10px;
  z-index: 1000;
}

/* Downloadknop */
.map-download {
  margin-top: 8px;
  text-align: center;
}

.download-btn {
  display: inline-block;
  padding: 8px 10px;
  background-color: #e63946;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.download-btn:hover {
  background-color: #b71c1c;
}

.download-btn i { margin-right: 8px; }
