body {
  margin: 0;
  font-family: Arial, sans-serif;
}



/*$$$$$$$$$$$$$$$$$$$$*/
#p99 {
    color: #990000;
    font-weight: bold;
    font-style: italic;
}

/* Sidebar list */
#sidebarDiv ul {
  list-style-type: disc;
  margin: 0;
  padding-left: 20px;
}

#sidebarDiv ul ul {
  margin: 0;          /* remove default top/bottom margin */
  padding-left: 20px; /* keep indentation */
}

#sidebarDiv ul ul li {
  margin: 0;          /* remove vertical gap between bullets */
  padding: 0;         /* remove extra padding */
  line-height: 1.2;   /* lower vertical spacing */
}

ul li {
  margin-bottom: 2px; /* keep lower spacing globally */
}

/*$$$$$$$$$$$$$$$$$$$$*/
.map-summary-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
}

.map-panel {
  flex: 1; /* 2/3 width */
  height: 100%;
}

.summary-panel {
  flex: 1; /* 1/3 width */
  padding: 16px;
  background-color: #f9f9f9;
  border-left: 1px solid #ccc;
  overflow-y: auto;
}
/* General resets and base styles (efficient for all screens) */
html, body {
  /* Use 100% height for body/html to establish a consistent viewport height reference */
  height: 100%;
  /* Remove min-height: 100% from html/body as height: 100% achieves the goal more directly */
  /* Keep overflow-x hidden to prevent horizontal scrolling */
  overflow-x: hidden;
  /* Let content drive vertical scrolling on the body */
  overflow-y: auto;
  /* Add font-rendering optimizations */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


.container {
  /* Define width using max-width and margin for centering */
  max-width: 1200px;
  width: 100%; /* ensures it respects max-width while using full available space */
  /* Remove min-width: 50%; unless strictly necessary, it can cause layout issues on small screens */

  margin: 0 auto; /* Center the container */
  position: relative;

  display: flex;
  flex-direction: column;
  /* Use height: 100vh only if the container must fill the entire screen height exactly */
  height: 100vh;
  max-height: 1200px;
  /* ~14" laptop vertical space */
  overflow-y: auto;
  /* scroll if content exceeds */

  /* If you want it to scroll internally while other elements stay put, these are okay.
     If the whole BODY should scroll, remove these from the container. */
  overflow-y: auto;
  overflow-x: hidden; /* Use hidden to avoid scrollbars unless needed */
}
/* Desktop-first breakpoint + hover to target pointer devices */
/*@media (min-width: 769px) and (hover: hover) {*/
/* Desktop + Tablet (exclude phones in landscape) */


#gMap {
  flex: 1;
  overflow: hidden;
  padding: 30px;
  min-height: 400px;
  width: 100%;

  height: 80vh;
  /* proportional height */
  max-height: 1200px;
  /* cap for laptops */
  /* or 600px */
  padding: 0;
  /* remove padding so map fills */
}

.main-content {
  flex: 1;
  /* take remaining space */
  display: flex;
  min-height: 0;
  /* allow flex child (#gMap) to shrink properly */
}


@media (max-width: 1200px) {
  #gMap {
    height: 80vh;
    /* explicit height for phones */
    min-height: 80vh;
  }

  .container {
    min-height: auto;
    /* let content scroll naturally */
    height: auto;
  }
}



#gMapSmall {
  width: 300px;
  height: 300px;
  flex-shrink: 0;
}

.map-controls {
  padding: 10px;
  background: #f8f9fa;
  border-bottom: 1px solid #ccc;
}

.d-flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.align-items-center {
  align-items: center;
}

.gap-3 {
  gap: 1rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.form-control {
  padding: 4px;
  font-size: 14px;
  width: 80px;
}

.btn {
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary {
  background-color: #d5c9a2;
  color: rgb(2, 41, 6);
  border: none;
  border-radius: 4px;
}

.btn-primary:hover {
  background-color: rgb(205, 150, 21);
  color: rgb(157, 58, 8);
  border: none;
  border-radius: 4px;
}


.main-content {
  display: flex;
  flex: 1;
  overflow: auto;
  min-height: 0;
  min-width: 0;
}

/* Small map style */
.map-text-flex {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.map-box {
  width: 500px;
  height: 400px;
  border: 1px solid #ccc;
  flex-shrink: 0;
}



.text-box {
  flex: 1;
  min-width: 200px;
  padding: 20px;
}

/* Sidebar layout */
.sidebar,
.sidebarRoot {
  width: 300px;
  padding: 1rem;
  background-color: #f1f1f1;
  overflow-y: auto;
  border-right: 1px solid #ccc;
  position: sticky;
  top: 0;
  height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
}

#sidebarDiv {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.sidebar ul li {
  color: rgb(205, 150, 21);
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.sidebar ul li:hover,
.sidebar ul li.active {
  color: darkred;
}

.sidebar ul li a {
  color: inherit;
  text-decoration: none;
}

.sidebar ul li a:hover {
  color: darkred;
}




/* Navbar */
.navbar {
  overflow: hidden;
  background-color: #d5c9a2;
  margin-bottom: 3rem;
}

.navbar a {
  float: left;
  font-size: 16px;
  color: rgb(2, 41, 6);
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

.subnav {
  float: left;
  overflow: hidden;
}

.subnav .subnavbtn {
  font-size: 16px;
  border: none;
  outline: none;
  color: rgb(2, 41, 6);
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
}

.navbar a:hover,
.subnav:hover .subnavbtn {
  background-color: rgb(205, 150, 21);
  color: rgb(157, 58, 8);
}

.subnav-content {
  display: none;
  position: absolute;
  left: 0;
  background-color: rgb(205, 150, 21);
  width: 100%;
  z-index: 1;
}

.subnav-content a {
  float: left;
  color: rgb(2, 41, 6);
  text-decoration: none;
}

.subnav-content a:hover {
  background-color: #eee;
  color: rgb(157, 58, 8);
}

.subnav:hover .subnav-content,
.subnav-content:hover {
  display: block;
}