body {
    margin: 0;
    background-color: #1a1a1a;
    font-size: 17px;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 0;
}

nav {
    font-family: Arial, sans-serif;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0;
}

.nav-container {
    background-color: #1a1a1a;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.nav-links {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.nav-links li {
    margin: 0 20px;
}

.nav-links a {
    color: #f8f8f8;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ffa726;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .nav-links {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .nav-links li {
        margin: 0 10px;
    }

    .nav-container {
        padding: 10px 15px;
    }
}

/* Wrapper style for content under the nav */
.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 60px; /* Adjust to ensure space below the fixed nav */
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

p {
    width: 63%;
    font-size: 17px;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 1px;
}

/* Link container */
p a {
    display: inline-block;
    padding: 4px 8px;
    font-size: 16px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 20px;
    background-color: #1a1a1a;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

/* Hover effect for links */
p a:hover {
    background-color: #ff9800;
    color: #1a1a1a;
    transform: scale(1.01);
}

/* Adds a subtle shadow when the link is hovered */
p a:active {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

h3 {
    width: 70%;
    margin: 0 auto;
    text-align: center;
    margin-block-start: 0;
    margin-block-end: 0;
}

.dropdown {
    height: 100%;
    position: relative;
}

/* The button inside the nav */
.dropbtn {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0px 5px;  /* good size for clickable area */
    display: flex;
    align-items: center; /* vertical centering */
    justify-content: center; /* horizontal centering */
    height: 100%; /* ensure it fills parent li */
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 160%; /* now this really means: below navbar */
    left: 0;
    background-color: #1a1a1a;
    z-index: 999;
    min-width: 110px;
    border: 1px solid #333;
    border-radius: 4px;
    transform: translateX(-24%);
    box-shadow: 0px 5px 10px rgba(0,0,0,0.3); /* Optional */
}

/* Add an invisible "buffer" element to extend hover */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -20px;      /* 20px above the dropdown */
    left: 0;
    width: 100%;
    height: 20px;    /* buffer height */
    /* transparent background so it's invisible */
    background: transparent;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Dropdown menu links */
.dropdown-content a {
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #333;
    color: #ff9800;
}

.nav-links li {
    margin: 0 20px;
    height: 100%; /* Add this */
    position: relative; /* Needed for dropdown positioning */
}

a.underline-anim {
  color: #007bff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

a.underline-anim:hover {
  border-bottom-color: #007bff;
  cursor: pointer;
}

/* Popup wrapper: dark background, light text by default */
.leaflet-popup-content-wrapper {
  background-color: #222 !important;
  color: #eee !important;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Arrow (tip) styling */
.leaflet-popup-tip {
  background: #222 !important;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15));
}

.leaflet-popup-content > div {
  color: #ff4d4d;
}

/* Override for title and "Coordinates:" */
.leaflet-popup-content > div > b,
.leaflet-popup-content > div > strong {
  color: #eee !important;
}

/* Coordinate value styling */
.leaflet-popup-content code {
  color: #ff4d4d;
  background: transparent;
  font-family: inherit; /* makes font match description */
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

#leaflet-map,
#mapbox-map {
  width: 75%;
  height: 500px;
  margin: 10px auto 50px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Optionally: ensure parent wrappers have no collapsing issues */
.wrapper2, .wrapper3 {
  width: 100%;
}

#leaflet-map {
  display: none; /* hidden initially */
}

/* Active button style */
.map-toggle-buttons button {
  padding: 8px 16px;
  margin: 0 6px;
  border: none;
  background-color: white;
  color: black;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.map-toggle-buttons button:hover {
  background-color: #c19456;
}

.map-toggle-buttons button.active {
  background-color: #ff9800;
  color: #1a1a1a;
}

.space {
  margin-top: 80px;
  width: 100%;
  display: block;
  background-color: transparent;
}

/* Force dark mode popup for Mapbox */
.mapboxgl-popup,
.mapboxgl-popup-content,
.mapboxgl-popup-content-wrapper {
  background-color: #222 !important;
  color: #eee !important;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Popup arrow (tip) */
.mapboxgl-popup-tip {
  background: #222 !important;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15));
}

/* Main content inside popup */
.mapboxgl-popup-content > div {
  color: #ff4d4d !important;
}

/* Titles and labels */
.mapboxgl-popup-content > div > b,
.mapboxgl-popup-content > div > strong {
  color: #eee !important;
}

/* Coordinates styling */
.mapboxgl-popup-content code {
  color: #ff4d4d !important;
  background: transparent !important;
  font-family: inherit;
}


