/* Algemene layout */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


html {
  height: 100%;
}


/* Bovenbalk */
header {
  background-color: #a60000;
  color: white;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}


header h1 {
  margin: 0;
  font-size: 1.5em;
}


/* Navigatie desktop */
nav {
  display: flex;
  gap: 20px;
}


nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}


nav a:hover {
  text-decoration: underline;
}


nav a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}


/* Hamburger-knop (mobiel) */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}


.menu-toggle span {
  height: 3px;
  width: 25px;
  background: white;
  margin: 4px 0;
  border-radius: 2px;
}


/* Hamburger menu hidden by default */
nav.mobile {
  display: none;
  flex-direction: column;
  background: #a60000;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 1200;
}


nav.mobile a {
  padding: 10px;
  border-top: 1px solid #fff3;
}


/* Footer */
footer {
  background-color: #222;
  color: white;
  padding: 10px 20px;
  text-align: center;
  font-size: 0.9em;
  margin-top: auto;
}


/* Kaart */
#map {
  flex: 1;
  min-height: 400px;
}


.map-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
}


.map-page header {
  z-index: 1200;
}


.map-page #map {
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  z-index: 1;
}


.map-page .leaflet-container {
  width: 100%;
  height: 100%;
}

#controls {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
}

#sidebar {
  position: absolute;
  top: 115px;
  right: 0;
  width: 300px;
  height: calc(100vh - 120px);
  background: white;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2);
  padding: 10px;
  overflow-y: auto;
  z-index: 998;
}


.map-page footer {
  display: none;
}


main {
  padding: 20px;
  margin-bottom: 60px;
}

.form-page {
  width: min(100% - 32px, 760px);
  margin: 0 auto 60px;
}


.form-page form {
  display: grid;
  gap: 18px;
}


.form-page fieldset {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
}


.form-page legend {
  font-weight: bold;
  padding: 0 6px;
}


.form-page label,
.field-label {
  display: block;
  font-weight: bold;
  margin: 12px 0 6px;
}


.form-page input[type="number"],
.form-page input[type="file"],
.form-page textarea {
  box-sizing: border-box;
  max-width: 520px;
  width: 100%;
  padding: 9px;
}


.radio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}


.radio-row input {
  width: auto;
}


.radio-row label {
  display: inline;
  font-weight: normal;
  margin: 0 18px 0 0;
}


.hunt-summary {
  background: white;
  border-left: 4px solid #a60000;
  border-radius: 6px;
  margin-bottom: 18px;
  padding: 14px 16px;
}


.hunt-summary h2 {
  margin-top: 0;
}


.button-link {
  display: inline-block;
  background: #a60000;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  margin-top: 12px;
  padding: 10px 14px;
  text-decoration: none;
}


.button-link:hover {
  background: #cc0000;
}


.muted {
  color: #555;
  line-height: 1.5;
}


.hidden {
  display: none !important;
}


#status a {
  color: #a60000;
  font-weight: bold;
}


.photo-header {
  width: 100%;
  height: 360px;
  display: block;
  object-fit: cover;
  object-position: center center;
}


.home-content {
  width: min(100% - 32px, 950px);
  margin: 0 auto 60px;
  padding: 28px 0 0;
}


.intro-section h1 {
  margin: 0 0 12px;
  color: #222;
}


.intro-section p,
.thanks-section p {
  max-width: 760px;
  line-height: 1.6;
}


.how-it-works {
  margin-top: 28px;
}


.how-it-works ol {
  padding-left: 24px;
  line-height: 1.7;
}


.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}


.home-links a {
  background: #a60000;
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 12px 16px;
  border-radius: 6px;
}


.home-links a:hover {
  background: #cc0000;
}


.thanks-section {
  border-top: 1px solid #ddd;
  padding-top: 22px;
}


/* Homepagina galerij */
.gallery {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 20px;
}


.gallery img {
  height: 200px;
  flex-shrink: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s;
}


.gallery img:hover {
  transform: scale(1.05);
}


/* Mobiel */
@media (max-width: 768px) {
  nav {
    display: none;
  }


  .menu-toggle {
    display: flex;
  }


  nav.mobile.show {
    display: flex;
  }


  .map-page #map {
    width: 100%;
    height: 100%;
    min-height: 0;
  }


  #controls {
    top: 68px;
    left: 10px;
    right: 10px;
    width: auto;
    justify-content: center;
  }


  #controls button {
    width: auto;
    flex: 1;
    max-width: 160px;
  }


  #sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: auto;
    max-height: 38vh;
    box-sizing: border-box;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.25);
    padding: 14px 16px;
    z-index: 1100;
  }


  #sidebar h3 {
    margin-top: 0;
  }


  #markerList img {
    max-height: 180px;
    object-fit: cover;
  }


  .gallery img {
    height: 150px;
  }


  input, button, textarea {
    width: 100%;
    font-size: 1em;
  }


  .photo-header {
    height: 260px;
  }


  .home-links {
    flex-direction: column;
  }


  .home-links a {
    text-align: center;
  }
}
#controls {
  position: absolute;
  top: 70px;
  left: 20px;
  z-index: 1000;
}


#controls button {
  margin: 5px;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  background-color: #a60000;
  color: white;
}


#controls button:hover {
  background-color: #cc0000;
}


@media (max-width: 768px) {
  #controls {
    top: 68px;
    left: 10px;
    right: 10px;
  }
}
