/* =========================
   Base Layout & Background
   ========================= */
html, body {
  width: 100%;
  height: 100vh; /* Full viewport height */
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  text-align: center;
  color: #ebdb08;
  display: flex;
  flex-direction: column; /* Vertical stack */
}

/* Background image + overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('images/AD-Flag.webp') no-repeat center center fixed;
  background-size: cover;
  background-color: #2c3e23;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 42, 31, 0.7); /* Dark overlay */
  z-index: -1;
}

/* =========================
   Header (Banner)
   ========================= */
header {
  flex: none; /* Fixed height, no stretching */
  width: 100%;
    height: auto; /* Default height: 15% of viewport height */
  background: url('images/wm-logo.jpg') no-repeat center center;
  background-size: cover;
  box-sizing: border-box; /* Ensure padding/borders are included in width */
  padding: 0 1px; /* Match wrapper's horizontal padding */
}

/* =========================
   Main Content
   ========================= */
#wrapper {
  flex: 1; /* Take remaining space */
  padding: 20px 1px;
  font-size: 18px;
  line-height: 1.6;
  box-sizing: border-box;
  overflow-y: auto; /* Allow scrolling within wrapper */
  min-height: 0; /* Prevent flex item from ignoring overflow */
}

/* =========================
   Footer
   ========================= */
footer {
  flex: none; /* Fixed height, no stretching */
  width: 100%;
  height: 10vh; /* Default height: 10% of viewport height */
  background-color: #2c3e23;
  color: #ebdb08;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-sizing: border-box; /* Ensure padding/borders are included */
  padding: 0 15px; /* Match wrapper's horizontal padding */
  position: relative;
  z-index: 2;
}

/* =========================
   End-of-Article Nav (in-flow reveal)
   ========================= */
.nav {
  --reveal: 0;
  background-color: rgba(26, 42, 31, 0.95);
  border-top: 2px solid #6f7b2c;
  margin-top: 20px;
  padding: 12px 16px 20px;
  max-height: 45vh;
  overflow: hidden;
  box-sizing: border-box;
}

.nav .nav-inner {
  opacity: var(--reveal);
  transform: scale(calc(0.85 + (0.15 * var(--reveal))));
  filter: blur(calc((1 - var(--reveal)) * 2px));
  transform-origin: top center;
  transition: opacity 0.15s linear, transform 0.15s linear, filter 0.15s linear;
  padding: 8px 6px 12px;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li {
  margin: 6px 0;
}

.nav a {
  color: #ffff03;
  text-decoration: none;
  font-size: 18px;
  display: block;
  padding: 2px 4px;
}

.nav a:hover {
  color: #ffffff;
}

@media (max-width: 768px) {
  .nav {
    max-height: 90vh;
  }
  .nav a {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav .nav-inner {
    transition: none;
    filter: none;
    transform: none;
    opacity: 1;
  }
}

/* =========================
   Utilities
   ========================= */
.highlight {
  font-weight: bold;
  color: #ffff03; /* Bright Gold */
}
