/* ============================
   GLOBAL RESET
============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================
   BODY
============================ */
body {
  font-family: Verdana, Arial, sans-serif;
  min-height: 100vh;
  background: #f0f0f0 url('/graphics/town-hall-back.webp') center / cover fixed;
  color: white;
  display: flex;
  flex-direction: column;
}

/* ============================
   NAVBAR (DESKTOP)
============================ */
.navbar {
  background-color: #444;
  padding: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-size: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(5px);
}

/* Main nav links */
.navbar a {
  color: white;
  text-decoration: none;
  padding: 4px 16px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.navbar a:hover {
  background-color: rgba(255,255,255,0.2);
  color: white;
}

.navbar a.active {
  background-color: rgba(255,255,255,0.2);
  border: 1px solid white;
}

/* Dropdown */
.navbar .dropdown {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  border-radius: 0 0 5px 5px;
}

.navbar .dropbtn {
  cursor: pointer;
}

.navbar .dropbtn::after {
  content: " ▼";
  font-size: 0.7em;
  margin-left: 3px;
}

/* Submenu hidden by default */
.navbar .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 7px;
  min-width: 115px;
  padding: 5px 0;
  background-color: #444;
  z-index: 100;
  text-align: left;
  flex-direction: column;
}

/* Open by hover (desktop) */
.navbar .dropdown:hover .submenu,
.navbar .dropdown.open .submenu {
  display: flex;
}

/* Submenu links */
.navbar .submenu a {
  display: block;
  padding: 8px 16px;
  color: white;
  text-decoration: none;
  border-radius: 0;
  transition: background-color 0.2s;
}

.navbar .submenu a:hover {
  background-color: rgba(255,255,255,0.2);
}

/* Hamburger hidden on desktop */
.menu-toggle {
  display: none;
}

.nav-links {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* ============================
   MAIN CONTENT
============================ */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.overlay {
  background-color: rgba(0,0,0,0.7);
  padding: 25px 40px 40px 40px;
  border-radius: 15px;
  max-width: 800px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.heading {
  text-align: center;
  color: white;
  font-size: 2.5rem;
  background-color: rgba(0,0,0,0.7);
  padding: 5px;
  border-radius: 15px;
  max-width: 800px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.subheading {
  font-size: 1.9rem;
  color: #dddd00;
}

h1 {
  font-size: 3.5rem;
  color: #88ccff;
  margin-bottom: 20px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

h2 {
  margin-bottom: 0;
}

p {
  font-size: 1.3rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

table {
  background: transparent;
  border: none;
}

td {
  text-align: left;
}

a {
  color: orange;
  text-decoration: none;
}

a:hover {
  color: orangered;
}

/* ============================
   FOOTER
============================ */
footer {
  width: 100%;
  background-color: rgba(0,0,0,0.7);
  font-size: 0.75rem;
  text-align: center;
  padding: 10px 0;
  z-index: 100;
}

/* ============================
   MOBILE
============================ */
@media screen and (max-width: 768px) {

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .menu-toggle {
    display: block;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
    padding: 6px 0;
    width: fit-content;
    min-width: 120px;
    max-width: 90vw;
    align-items: stretch;
    background: rgba(40,40,40,0.88);
    border-radius: 8px;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a,
  .nav-links .dropdown,
  .navbar .dropbtn {
    display: block;
    width: 100%;
    text-align: left;
    color: yellow;
  }

  /* Disable hover opening on mobile */
  .navbar .dropdown:hover .submenu {
    display: none;
  }

/* JS click opening takes priority */
.navbar .dropdown.open:hover .submenu,
.navbar .dropdown.open .submenu {
    display: flex;
    position: static;
    margin-top: 0;
}

/* Touch devices */
@media (hover: none) {
  .navbar .dropdown:hover .submenu {
    display: none;
  }
}
