h1, h2, h3, h4, h5, h6 {
  font-family: 'Nourd BOLD', sans-serif;
  margin: 10px; 
}

button, input[type="button"], button[type="submit"], input[type="submit"] {
  font-family: 'Nourd BOLD', sans-serif;
}

body, p, span, div, input, label {
  font-family: 'Caladea', serif;
}

p, ul{
  margin-left: 32px;
  margin-right: 32px;
}

    ul {
      list-style-type: disc;
    }
    li {
      margin-bottom: 10px;
    }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body {
  font-size: 16px; /* Base font size for mobile */
}

body.no-scroll {
  overflow-y: hidden;
 /* height: 100vh; */
}


button, input[type="button"], input[type="submit"] {
  font-family: 'Nourd BOLD', sans-serif;
  font-size: 1em;
  padding: 12px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #004AAD;
  color: #ffffff;
  transition: background-color 0.3s ease;
}

button:hover, input[type="button"]:hover, input[type="submit"]:hover {
  background-color: #F9DC5C;
}

button:active, input[type="button"]:active, input[type="submit"]:active {
  background-color: #004AAD;
}

input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Caladea', serif;
  font-size: 1em;
}

#map {
  position: relative;
  z-index: 0; /* Base layer */
  height: 100vh;
  width: 100%;
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
  overflow: hidden; 
}

.loader-container {
    display: block;
    justify-content: center;
    align-items: center;
    height: 100vh;

    z-index: 100000;
}

.bouncing-dots {
    display: flex;
    justify-content: space-between;
    width: 60px;
}

.dot {
    width: 15px;
    height: 15px;
    background-color: #FF5C35;
    border-radius: 50%;
    animation: bounce 1.5s infinite;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.3s;
}

.dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}


/* --- MOBILE: Selected Bathroom Panel (Slide-up) --- */
#selectedBR {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 70vh;
  background-color: #ffffff;
  padding: 0;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  box-shadow: 0px -4px 12px rgba(0, 0, 0, 0.15);
  z-index: 950; /* Above map & floatingPanel, below banner & dialogs */
  overflow-y: auto;
  overflow-x:hidden; 
  transform: translateY(100%); /* Initially hidden below screen */
  transition: transform 0.3s ease-in-out;
  box-sizing: border-box; 
  margin: 0; 
  flex-direction: column; /* Stack elements vertically */
  display: flex; /* Ensure it's a flex container */
}

#selectedBR.visible {
  transform: translateY(0); /* Slide up into view */
}

#selectedBR h3 {
  font-size: 1.25em; /* Approx 20px if base is 16px */
  margin-bottom: 10px;
}

#selectedBR p {
  font-size: 1em; /* Approx 16px */
  margin-bottom: 8px;
}

#selectedBR #closePopOutButton {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5em; /* Large, easy to tap */
  color: #eee;
  background-color: #004AAD;
  padding: 5px;
  line-height: 1; /* Prevents button from being too tall */
}

#selectedBR #closePopOutButton:hover {
  background-color: #F9DC5C;
}

#handicapBigThing,
#genderNeutralBigThing,
#babyChangingBigThing {
  display: flex;
  align-items: center;
  gap: 8px; /* Optional: space between icon and text */
}

#selectedBR span{
  display: inline-flex; 
  align-items: center;
}
/* --- DIALOG Base Styles (Mobile & Desktop) --- */
dialog {  
  display: none; /* Hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%; /* More suitable for mobile */
  max-width: 500px; /* Max width for larger mobile / smaller desktop */
  max-height: 90vh;
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000; /* Highest */
  overflow-y: auto;
  overflow-x: hidden; 
  box-sizing: border-box;
}

dialog[open]{
  display: flex; /* Show dialog when open */
  flex-direction: column; /* Stack elements vertically */
  justify-content: center; /* Center content vertically */
  align-items: center; /* Center content horizontally */

}
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

dialog h2, dialog h3 {
  margin-top: 0;
}

dialog form button[type="submit"],
dialog button {
  display: block;
  width: 100%;
  margin-top: 15px;
}
dialog form button[type="submit"] {
    margin-bottom: 10px;
}
dialog button.cancel-button {
    background-color: #004AAD;
}
dialog button.cancel-button:hover {
    background-color: #F9DC5C;
}

/* Specifics for #addDialog */
#addDialog #location {
  margin-bottom: 15px;
}
#addDialog #results {
  list-style-type: none;
  padding: 0;
  margin: 0 0 15px 0;
  max-height: 30vh; /* Adjusted from 40vh for better fit */
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 4px;
}
#addDialog #results li {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
#addDialog #results li:last-child {
  border-bottom: none;
}
#addDialog #results li:hover {
  background-color: #f0f0f0;
}
#addDialog #title { /* This was inside #addDialog in CSS, assuming it's a general title style */
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 5px;
}


/* --- MOBILE: Floating Panel --- */
#floatingPanel {
  margin: 0; 
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 900; /* Above map, below selectedBR slide-up */
  background-color: #ffffff;
  padding: 10px;
  border-top: 1px solid #ddd;
  box-shadow: 0px -2px 8px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

#floatingPanel section {
  flex: 1;
  padding: 0 5px;
}

#floatingPanel input[type="button"],
#floatingPanel button {
  width: 100%;
  padding: 12px 5px;
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slider styles */
.slidecontainer {
  width: 100%;
  margin-bottom: 15px;
}
#myRange { /* The slider itself */
  width: 100%;
}


#filterPanel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%; /* More suitable for mobile */
  max-width: 500px; /* Max width for larger mobile / smaller desktop */
  max-height: 90vh;
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000; /* Highest */

  overflow-x: hidden;
  overflow-y: auto;
  align-items: center;
}

/* Filter Panel (treated as a dialog) general label */
#filterPanel label { /* This is for the filterPanel dialog */
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

#filterField, #filterInputContainer {
  width: 100%;
  font-family: 'Caladea', serif;
  font-size: 1em;
  align-self: center;
}

/* --- NAVBAR (Professional Styling) --- */
.navbar {
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .logo {
  font-size: 1.5em;
  font-weight: 700;
  color: #004AAD;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
}

.nav-list li {
  margin: 0;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1em;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  padding-bottom: 5px;
}

.nav-link:hover {
  color: #004AAD;
  border-bottom-color: #F9DC5C;
}

.nav-link.active {
  color: #004AAD;
  border-bottom-color: #F9DC5C;
}

/* --- MOBILE MENU TOGGLE --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: #004AAD;
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(12.5px) rotate(45deg); 
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-12.5px) rotate(-45deg); /* Adjusted */
}


.grid {
  display: grid;
  gap: 20px; /* Space between grid items */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
  margin: 20px;
}

.grid-item {
  text-align: center; /* Center-align content */
}

.grid-item img {
  width: 100%; /* Make images responsive */
  height: auto; /* Maintain aspect ratio */
  border-radius: 8px; /* Optional: Rounded corners */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Optional: Add shadow */
}

.grid-item figcaption {
  margin-top: 10px; /* Space between image and caption */
  font-size: 1em; /* Adjust font size */
}

.grid-item a {
  text-decoration: none; /* Remove underline from links */
  color: #004AAD; /* Link color */
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
  .navbar {
    padding: 15px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-list.active {
    max-height: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-list li {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: 10px 0;
  }
}

/* --- DESKTOP STYLES (min-width: 768px) --- */
@media (min-width: 768px) {

  .nav-list li {
    display: flex; 
    transform: translateY(0); 
    align-items: center; /* Center items vertically */
    height: 100%;
  }

  .menu-toggle {
    display: none; /* Hide hamburger menu on desktop */
  }

  .nav-list {
    height: 100%;
    display: flex; /* Show nav items in a row on desktop */
    align-items: center; /* Center items vertically */
    flex-direction: row; /* Align items horizontally */
    position: static; /* Reset position for desktop */
    gap: 20px; /* Add spacing between items */
    opacity: 1; /* Ensure visibility */
    pointer-events: auto; /* Ensure links are clickable */
    transform: none; /* Reset transform */
    padding-bottom: 0;
  }

  body {
    font-size: 17px; /* Slightly larger base font for desktop */
  }

  /* --- DESKTOP: Selected Bathroom Panel (Static Info Box) --- */
  #selectedBR {
    display: none; /* Ensure it's block for desktop */
    position: absolute; /* Relative to map or a positioned ancestor */
    top: 120px;  /* Below banner (banner max-height 100px + padding) */
    left: 20px;
    width: auto; /* Let content define width up to max-width */
    max-width: 380px; /* Or desired fixed width e.g. 30% */
    max-height: calc(100vh - 140px); /* Viewport height minus top offset & some margin */
    bottom: auto; /* Override mobile `bottom: 0` */
    
    padding: 20px; /* Reset padding if different from mobile (e.g. padding-bottom) */
    border: 1px solid #ddd; /* Add border for desktop */
    border-radius: 8px; /* Standard border-radius for desktop box */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 990; /* Below banner/dialogs, but above map. Ensure it's above map markers if they have z-index. */
    
  /*flex-direction: row; */
  }


  #selectedBR h3 {
    font-size: 20px;
    width: 100%;
    color: #333;
  }

  #selectedBR p {
    width: auto;
    font-size: 16px;
    color: #555;
  }

  /* For the close button within #selectedBR on desktop */
  #selectedBR #closePopOutButton {
    margin: auto; 
    position: static; /* Default position in flow */
    display: block; /* Or inline-block if preferred */
    width: 100%; /* Make it full width of its container */
    margin-top: 15px;
    padding: 10px 20px; /* Standard button padding */
    font-size: 1em; /* Match other buttons */
    color: #ffffff;
    background-color: #004AAD; /* Standard button color */
    border: none;
    border-radius: 5px;
  }
  #selectedBR #closePopOutButton:hover {
    background-color:#F9DC5C;
  }

  /* Dialogs on Desktop */
  dialog {
    width: 50%; /* Larger default width for dialogs on desktop */
    max-width: 600px; /* But not excessively wide */
  }
  */
  #addDialog #location { /* No specific desktop changes needed if mobile is fine */
    width: 100%; /* Already 100% from general input style */
  }
  #addDialog #results { /* No specific desktop changes needed if mobile is fine */
    max-height: 40vh; /* Can be taller on desktop */
  }
  #addDialog #title { /* No specific desktop changes needed if mobile is fine */
    font-size: 24px; /* Larger title for desktop dialog */
  }


  /* --- DESKTOP: Floating Panel (Static Control Box) --- */
  #floatingPanel {
    position: absolute; /* Position relative to map or a container */
    bottom: 20px;
    left: 20px;
    width: auto; /* Adjust width based on content */
    flex-direction: row; /* Default is row, ensure items are side-by-side */
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 990; /* Same level as desktop #selectedBR or slightly above/below as needed */
  }

  #floatingPanel section {
    flex: 0 1 auto; /* Don't grow, allow shrink, base on content */
    margin: 0 5px; /* Spacing between sections/buttons */
  }
  #floatingPanel input[type="button"],
  #floatingPanel button {
    width: auto; /* Fit content */
    padding: 10px 15px; /* Adjust padding */
    font-size: 1em; /* Reset from mobile's 0.9em if needed */
  }

  /* Input field 'notes' assuming it's in myDialog or similar */
  #notes { /* Usually an id for a textarea or input */
    width: 100%; /* Already 100% from general input style */
  }

  /* Slider range for desktop, if needs change */
  #myRange {
    width: 100%; /* Usually fine, but can be constrained if needed e.g. 80% */
  }

  #filterPanel {
      /* Example: if you want filter panel to be narrower on desktop than other dialogs */
      /* width: 350px; */
      /* max-width: 40%; */
  }
  #filterPanel h3 {
    font-size: 20px;
    color: #333;
  }
  #filterPanel label {
    font-size: 16px;
    color: #555;
  }
  #filterPanel input[type="text"], /* Already styled by general input */
  #filterPanel select { /* Already styled by general select */
    font-size: 1em; /* Ensure consistency */
  }
  #filterPanel button { /* Already styled by general dialog button */
    font-size: 1em;
  }
}

/* --- TEXT PAGES (About & Guidelines) --- */
.text-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  line-height: 1.8;
}

.text-page h1 {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #004AAD;
  border-bottom: 3px solid #F9DC5C;
  padding-bottom: 15px;
}

.text-page h2 {
  font-size: 1.8em;
  margin-top: 40px;
  margin-bottom: 15px;
  color: #004AAD;
}

.text-page p {
  font-size: 1.05em;
  line-height: 1.8;
  color: #333;
  margin-bottom: 15px;
}

.text-page ul {
  margin-left: 40px;
  margin-right: 20px;
}

.text-page li {
  margin-bottom: 15px;
  line-height: 1.7;
  color: #333;
}

.text-page strong {
  color: #004AAD;
  font-weight: 600;
}

.text-page a {
  color: #004AAD;
  text-decoration: none;
  border-bottom: 1px solid #F9DC5C;
  transition: all 0.3s ease;
}

.text-page a:hover {
  color: #F9DC5C;
  border-bottom-color: #004AAD;
}

.contact-section {
  background-color: #f9f9f9;
  padding: 25px;
  border-left: 4px solid #004AAD;
  border-radius: 5px;
  margin-top: 30px;
}