body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background-color: #fafafa;
  color: #333;
  line-height: 1.6;
}

/* Header */
#header {
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
  padding: 0.2rem 0.2rem;
  border-bottom: 2px solid #ccc;
  text-align: center;
}

#header img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#header h1 {
  font-size: 2rem;
  color: #222;
  margin: 0.25rem 0 0.5rem;
  letter-spacing: 0.5px;
}

/* ------------------------------
   Navigation Bar
------------------------------ */
.main-nav {
  margin-top: 1rem;
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.main-nav li {
  display: inline;
}

.main-nav a {
  text-decoration: none;
  color: #007aff;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover {
  color: #005ecb;
  border-bottom: 2px solid #005ecb;
}

/* Active page link */
.main-nav a.active {
  color: #005ecb;
  border-bottom: 2px solid #005ecb;
}

/* Base nav layout */
.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.main-nav li {
  position: relative;
}

/* Dropdown menu styling */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%; /* directly below parent */
  left: 0;
  background-color: #fff;
  min-width: 180px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  z-index: 1000;
  flex-direction: column;
  padding: 0.25rem 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

/* dropdown link styles */
.dropdown-content li a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #333;
}

.dropdown-content li a:hover {
  background: #f1f1f1;
}

/* Fix flicker: use :hover on BOTH parent and submenu */
@media (hover: hover) and (pointer: fine) {
  .dropdown:hover > .dropdown-content,
  .dropdown-content:hover {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

/* Mobile/touch open state via JS */
.dropdown.open > .dropdown-content {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Optional arrow/caret visual */
.dropdown-toggle::after {
  content: " ▾";
  font-size: 0.8em;
}


/* Footer */
#footer {
  background: #f1f1f1;
  padding: 1.5rem;
  border-top: 2px solid #ccc;
  text-align: center;
  margin-top: 2rem;
}

#footer h4 {
  margin: 0.3rem 0;
  color: #444;
  font-weight: 500;
  font-size: 0.95rem;
}

#footer h4:last-child {
  font-style: italic;
}
