* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #1a1a1a;
  color: #f5f5f5;
}

header {
  background: linear-gradient(135deg, #1f1f1f, #292929);
  color: #ffcc00;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

header h1 {
  font-size: 2.5rem;
  margin: 0;
  color: #ffcc00;
}

header p {
  margin-top: 0.5rem;
  font-weight: 300;
  color: #ccc;
}

/* Universal navigation bar styles */
.navigationbar nav,
nav {
  background: #2a2a2a;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.8rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.navigationbar a,
nav a {
  color: #f5f5f5;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.navigationbar a img,
nav a img {
  height: 40px;
  margin-right: 8px;
  vertical-align: middle;
}

.navigationbar a:hover,
nav a:hover {
  background: #ffcc00;
  color: #1a1a1a;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

.titleunitsel {
  text-align: center;
  font-size: 2rem;
  padding: 2rem 1rem 0.5rem;
  color: #ffcc00;
}

#map {
  width: 95vw;
  height: 75vh;
  margin: 2rem auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  position: relative;
  cursor: pointer;
}

#map-info-box {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 1em;
  color: #1a237e; /* dark blue */
  font-family: 'Poppins', sans-serif;
  max-width: 320px;
  margin: 1em auto;
  z-index: 2000; /* Make sure this is high */
}

.search-bar-inside {
  margin-top: 1rem;
  position: relative;
}

.search-bar-inside input {
  width: 80%;
  padding: 10px 14px;
  border: 1.5px solid #ffcc00;
  border-radius: 25px;
  font-size: 0.95rem;
  background: #1a1a1a;
  color: #fff;
  box-shadow: inset 2px 2px 8px #111, inset -2px -2px 5px #333;
  outline: none;
}

.suggestions {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  background: #fffde7; /* light gold */
  border: 1px solid #ffd600;
  color: #1a237e;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.7);
  max-height: 180px;
  overflow-y: auto;
  z-index: 1000;
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: #1a237e; /* Use dark blue for visibility */
  background: transparent;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: #ffd600;
  color: #1a237e;
}

.mapdivider {
  height: 80px;
  background: linear-gradient(to right, #2a2a2a, #1a1a1a);
  margin-top: 2rem;
}

#routes-list .route-list-item:hover {
  background: #ffd600;
  color: #1a237e;
}

#routes-list {
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  background: #fffde7;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(255, 204, 0, 0.08);
  color: #1a237e;
  font-size: 1rem;
  padding: 0.5em 0;
  margin-bottom: 0.5em;
  border: 1.5px solid #ffd600;
  transition: max-height 0.3s;
}

.route-list-item {
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 1px solid #ffe082;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  border-radius: 8px;
  margin: 2px 8px;
}
.route-list-item:last-child {
  border-bottom: none;
}
.route-list-item:hover, .route-list-item.active {
  background: #ffd600;
  color: #1a237e;
}
.routes-list-collapsed {
  max-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none !important;
  box-shadow: none !important;
}

.routes-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem auto 0 auto;
  max-width: 370px;
  z-index: 9999;
  position: relative;
  background: #232323;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(255,215,0,0.07);
  padding: 1.5rem 1.5rem 1rem 1.5rem;
}
#show-all-routes {
  background: linear-gradient(90deg, #ffd600 60%, #ffcc00 100%);
  color: #1a237e;
  border: none;
  border-radius: 25px;
  padding: 0.7em 2em;
  font-size: 1.1em;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 1em;
  box-shadow: 0 2px 8px rgba(255, 204, 0, 0.13);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.03em;
}
#show-all-routes:hover {
  background: #1a237e;
  color: #ffd600;
  box-shadow: 0 4px 16px rgba(26,35,126,0.13);
}

.leaflet-interactive.route-glow {
  filter: drop-shadow(0 0 8px #ffd600) drop-shadow(0 0 16px #ffd600);
  /* Makes the route line glow */
}

#enlarge-map-btn {
  position: absolute;
  bottom: 18px;
  left: 18px;   /* Changed from right to left */
  z-index: 2100;
  background: #ffd600;
  color: #1a1a1a;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
#enlarge-map-btn:hover {
  background: #1a1a1a;
  color: #ffd600;
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .navigationbar nav,
  nav {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }
  .navigationbar a,
  nav a {
    margin: 0.5rem 0;
    width: 90%;
    text-align: center;
  }

  #map {
    height: 60vh;
  }

  #map-info-box {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    top: 10px;
    width: 85vw;
  }
}

@media (max-width: 600px) {
  #map-info-box {
    width: 92vw;
    max-width: 320px;
    min-width: 180px;
    font-size: 0.97em;
    padding: 0.5em 0.5em;
    border-radius: 8px;
    top: 6px;
  }
  .search-bar-inside input {
    width: 100%;
    font-size: 0.97em;
    padding: 7px 8px;
  }
  .search-bar-inside {
    margin-top: 0.5rem;
  }
  .suggestions {
    font-size: 0.97em;
    max-width: 99vw;
  }
}

@media (max-width: 900px) {
  .titleunitsel {
    font-size: 1.3rem;
    padding: 1.2rem 0.5rem 0.5rem;
  }
  #map {
    width: 99vw;
    height: 55vh;
    margin: 1rem auto;
    border-radius: 10px;
  }
  .routes-controls {
    max-width: 98vw;
    padding: 1rem 0.5rem 0.7rem 0.5rem;
    border-radius: 10px;
  }
  #map-info-box {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    top: 10px;
    width: 80vw;
    max-width: 380px;
    min-width: 220px;
    font-size: 1em;
    padding: 0.7em 0.8em;
    border-radius: 10px;
  }
  .search-bar-inside input {
    width: 100%;
    font-size: 1em;
    padding: 8px 10px;
  }
}

@media (max-width: 700px) {
  .navigationbar nav,
  nav {
    flex-direction: column;
    align-items: center;
    padding: 0.7rem 0.2rem;
    gap: 0.2rem;
  }
  .navigationbar a,
  nav a {
    margin: 0.3rem 0;
    width: 98%;
    text-align: center;
    font-size: 1rem;
    padding: 0.7em 0.5em;
  }
  .titleunitsel {
    font-size: 1.1rem;
    padding: 1rem 0.2rem 0.2rem;
  }
  #map {
    height: 45vh;
    border-radius: 8px;
  }
  #map-info-box {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    top: 10px;
    width: 90vw;
    max-width: 350px;
    min-width: 160px;
    font-size: 0.98em;
    padding: 0.5em;
    border-radius: 10px;
  }
  .routes-controls {
    max-width: 99vw;
    padding: 0.7rem 0.2rem 0.5rem 0.2rem;
    border-radius: 8px;
  }
  #routes-list {
    font-size: 0.98rem;
    padding: 0.3em 0;
    border-radius: 8px;
  }
  .route-list-item {
    padding: 10px 8px;
    font-size: 0.98rem;
    border-radius: 6px;
    margin: 2px 4px;
  }
  #show-all-routes {
    font-size: 1rem;
    padding: 0.6em 1em;
    border-radius: 18px;
  }
}

@media (max-width: 480px) {
  .titleunitsel {
    font-size: 1rem;
    padding: 0.7rem 0.1rem 0.1rem;
  }
  #map {
    height: 38vh;
    border-radius: 6px;
  }
  #map-info-box {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    top: 6px;
    width: 94vw;
    max-width: 320px;
    min-width: 120px;
    font-size: 0.95em;
    padding: 0.3em 0.2em;
    border-radius: 8px;
  }
  .search-bar-inside input {
    font-size: 0.95em;
    padding: 6px 6px;
  }
  .routes-controls {
    max-width: 100vw;
    padding: 0.5rem 0.1rem 0.3rem 0.1rem;
    border-radius: 6px;
  }
  #routes-list {
    font-size: 0.95rem;
    padding: 0.2em 0;
    border-radius: 6px;
  }
  .route-list-item {
    padding: 8px 4px;
    font-size: 0.95rem;
    border-radius: 4px;
    margin: 1px 2px;
  }
  #show-all-routes {
    font-size: 0.95rem;
    padding: 0.5em 0.7em;
    border-radius: 14px;
  }
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}
