:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666;
  --accent: #2d5dd0;
  --accent-contrast: #fff;
  --border: #e6e6e6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  min-width: 60vw;
  display: flex;
  flex-direction: column;
}

/* Background image overlay with fade */
#bg-layer {
  position: fixed;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 600ms ease;
  z-index: -1;
}
#bg-layer.show { opacity: 1; }

.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

.site-header, .site-footer {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  background: rgba(255,255,255,0.7);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
}
.site-header { position: sticky; top: 0; z-index: 5; }
.site-footer { border-top: 1px solid var(--border); border-bottom: 0; margin-top: 2rem; }

/* Content card for readability over background */
main.container {
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width:60vw;
  padding: 1rem;
  margin-top: 1rem;
}
main { flex: 1 0 auto; }

.brand { font-weight: 700; text-decoration: none; color: var(--fg); font-size: 1.1rem; }
.nav a { margin-left: 1rem; text-decoration: none; color: var(--fg); padding: 0.25rem 0; }
.nav a:hover { color: var(--accent); }

/* Desktop dropdown for Locations */
.dropdown { position: relative; }
.dropdown-toggle { display: inline-block; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--border);
  border-radius: 8px;
  list-style: none;
  padding: 0.4rem 0;
  margin: 0.25rem 0 0 0;
  min-width: 240px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  display: none;
  z-index: 10;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li { padding: 0; }
.dropdown-menu a { display: block; margin: 0; padding: 0.5rem 0.8rem; }
.dropdown-menu a:hover { background: rgba(45,93,208,0.08); }

h1, h2, h3 { line-height: 1.25; }
a { color: var(--accent); }
a:hover { opacity: 0.9; }

.button, button, input[type="submit"] {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
input, textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
}
label { display: block; margin: 0.5rem 0 0.25rem 0; }
.form-row { margin-bottom: 0.9rem; }
.form-help { color: var(--muted); font-size: 0.9rem; }
.alert { padding: 0.6rem 0.8rem; border-radius: 6px; }
.alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.hidden { display: none !important; }

/* Responsive header + mobile overlay menu */
.nav-toggle { display: none; background: transparent; color: black; border: 1px solid black; padding: 0.35rem 0.55rem; border-radius: 6px; }
.mobile-menu {
  position: fixed; inset: 0;
  background: rgba(255,255,255,0.98);
  display: none;
  z-index: 20;
}

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
.card { display: block; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: inherit; background: rgba(255,255,255,0.75); }
.card:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.mobile-menu.open { display: block; }
.mobile-menu .mobile-menu-inner { max-width: 960px; margin: 0 auto; padding: 1rem; }
.mobile-menu .mobile-close { background: transparent; border: 0; font-size: 2rem; line-height: 1; float: right; }
.mobile-nav { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 2.5rem; }
.mobile-nav a { color: var(--fg); text-decoration: none; font-size: 1.25rem; }
.mobile-nav details { font-size: 1.25rem; }
.mobile-nav details summary { cursor: pointer; margin-bottom: 0.25rem; }
.mobile-nav ul { list-style: none; padding-left: 1rem; margin: 0.25rem 0 0 0; }
.mobile-nav li { margin: 0.25rem 0; }
@media (max-width: 768px) {
  .nav-toggle { display: inline-block; }
  /* Hide desktop nav in header (overlay replaces it) */
  nav#site-nav { display: none !important; }
}