@font-face {
  font-family: standard;
  src: url(assets/Open_Sans/standard.ttf);
}

/* Make body a flex container to push footer down */
html,
body {
  font-family: standard;
  height: 100%; /* Full height */
  margin: 0;
  display: flex;
  flex-direction: column;
  user-select: none;
  overflow-x: hidden;
}

/* Main content should grow to fill space */
main {
  flex: 1;
}

/* divider titles*/
.divider_title {
  background-color: black;
  color: white;
  padding: 20px;
  margin: 0;
  text-align: center;
}

/* Navbar container */
.navbar {
  display: flex;
  background-color: #fff;
  padding: 35px 40px 20px 0px;
  margin: auto;
}

/* Logo */
.navbar .logo img {
  width: 60%;
  justify-content: left;
}

/* Navbar container */
.navbar_buttons {
  list-style: none;
  display: flex;
  flex-direction: row;
  justify-content: right;
  gap: 10px;
  margin: 0;
  padding: 0;
}

/* Base link style */
.navbar li a {
  display: flex;
  height: 30px;
  gap: 5px;
  align-items: center;
  text-decoration: none;
  font-weight: bold;
  color: black;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #df1f26;
  transition: transform 0.3s ease, color 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Hover effect */
.navbar li a:hover {
  color: white;
  background-color: #df1f26;
  border-color: #df1f26;
  transform: translateY(-6px);
  box-shadow: 0 5px 10px 0 rgba(223, 31, 38, 0.6);
}

.navbar li a:hover img.icon {
  filter: brightness(0) invert(1);
}

/* Selected (active page) */
.navbar li a.selected {
  color: white;
  background-color: #df1f26;
  border-color: #df1f26;
  box-shadow: 0 5px 10px 0 rgba(223, 31, 38, 0.6);
  transform: none; /* don’t float the active one */
}

.navbar li a.selected img.icon {
  filter: brightness(0) invert(1);
}

/* Icons */
.navbar img.icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  filter: invert(1); /* base is white */
}

/* Footer styles */
footer {
  background-color: black;
  color: white;
  text-align: center;
  padding: 20px 0;
  font-size: 16px;
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.15);
}

footer a {
  text-decoration: none;
  color: white;
}

.footer_grid {
  display: grid;
  width: 80%;
  gap: 40px;
  margin: 0px auto 0px auto;
  grid-template-columns: 40% 20% 40%;
}

.footer_icon_row {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
}

.footer_icon_row img {
  width: 40px;
  padding: 0;
  margin: 0;
}

.footer_icons {
  display: grid;
  align-items: center;
  grid-template-columns: 25% 75%;
  width: 100%;
  margin: 0px auto 0px auto;
}

.footer_icons {
  text-align: left;
}

.map-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 0 auto;
  overflow: hidden;
}

.disclaimer_section {
  font-size: 14px;
  padding: 0px 20px 0px 20px;
}

#back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #df1f26; /* red logo color */
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 50px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
}

#back-to-top .btn-text {
  max-width: 0;
  opacity: 0;
  margin-left: 8px;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-size: 16px;
}

#back-to-top:hover {
  padding: 12px 20px; /* expand horizontally */
  border-radius: 50px;
}

#back-to-top:hover .btn-text {
  max-width: 200px; /* enough to show text */
  opacity: 1;
}

/* Responsive layout for tablets */
@media (max-width: 900px) {
  /* Place logo above navbar and show icon-only buttons on mobile */
  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 20px 0 10px 0;
    gap: 12px;
  }

  /* Put logo on its own row above the buttons */
  .navbar .logo {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 8px;
  }
  .navbar .logo img {
    width: 80%;
    height: auto;
  }

  /* Center the buttons row and make it full width */
  .navbar_buttons {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 10px;
  }

  /* Compact circular buttons and hide textual labels */
  .navbar li a {
    padding: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    justify-content: center;
    gap: 0;
    font-size: 0; /* hides text labels while keeping icon images visible */
    align-items: center;
  }

  /* Ensure icons remain visible and properly sized */
  .navbar img.icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    filter: invert(1);
    margin: 0;
  }

  /* Keep hover/selected visuals working but adapted to compact buttons */
  .navbar li a:hover {
    transform: translateY(-6px);
    box-shadow: 0 5px 10px 0 rgba(223, 31, 38, 0.6);
  }
  .navbar li a.selected {
    transform: none;
    box-shadow: 0 5px 10px 0 rgba(223, 31, 38, 0.6);
  }

  .divider_title {
    font-size: 12px;
  }

  /* Footer styles */
  footer {
    background-color: black;
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 12px;
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.15);
  }

  .footer_grid {
    display: grid;
    width: 80%;
    gap: 40px;
    margin: 0px auto 0px auto;
    grid-template-columns: 1fr;
  }

  .footer_icon_row {
    grid-template-rows: 1fr;
  }

  .footer_icon_row img {
    width: 40px;
    padding: 0;
    margin: 0;
  }

  .footer_icons {
    display: grid;
    align-items: center;
    grid-template-columns: 25% 75%;
    width: 100%;
    margin: 0px auto 0px auto;
  }

  .footer_icons {
    text-align: left;
  }

  .map-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 0 auto;
    overflow: hidden;
  }

  .disclaimer_section {
    padding: 0px 20px 0px 20px;
  }
}
