/* =========================================
   LAYOUT — layout.css
   ─────────────────────────────────────────
   Top-level structural regions:
   site-header · main-content · site-footer
   ========================================= */

/* ── Site header ──────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500; /* Well above the map canvas and nodes */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: linear-gradient(
    to bottom,
    rgba(6, 12, 6, 0.75) 0%,
    transparent 100%
  );
  backdrop-filter: blur(2px);
  overflow: visible;
}

.logo {
  display: flex;
  align-items: center;
}

/* Logo anchor — controls the flex gap between icon and name */
.logo-link {
  display: flex;
  align-items: center;
  gap: 1.2rem; /* Proper spacing between icon and text */
  text-decoration: none;
  color: inherit;
}

.logo-icon-img {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.5));
  transform: translateY(1px);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1; /* Normalizes the bounding box center */
  color: var(--cream);
  letter-spacing: 0.04em;
}

.logo-text em {
  color: var(--gold-light);
  font-style: italic;
}

/* ── Desktop Nav ──────────────────────── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(245, 240, 232, 0.8);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: var(--gold-light);
}

.nav-link.active {
  color: var(--gold-light);
  font-weight: 500;
}

.nav-link.active svg {
  fill: rgba(201, 168, 76, 0.3);
  stroke: var(--gold-light);
  stroke-width: 2.2;
}

/* ── Mobile Icon-only Nav ─────────────── */
@media (max-width: 700px) {
  /* Reduced header padding + relative positioning context for the nav */
  .site-header {
    padding: 0.75rem 1rem;
    position: fixed; /* keep fixed */
  }

  /* Brand name disappears — only the icon logo remains */
  .logo-text {
    display: none;
  }

  /* Nav labels (text) hide — only SVG icons remain */
  .nav-label {
    display: none;
  }

  /* Absolutely anchor the nav to the right edge of the header — never disappears */
  .header-nav {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
  }

  /* Icon nav links: fixed-size circular touch targets */
  .header-nav .nav-link {
    flex-shrink: 0;
    display: flex;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    gap: 0;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 76, 0.3);
    transition: border-color 0.2s ease, background 0.2s ease;
    color: rgba(245, 240, 232, 0.85);
  }

  .header-nav .nav-link:hover {
    border-color: rgba(201, 168, 76, 0.7);
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold-light, #c9a84c);
  }

  /* Force SVG to always render at fixed size */
  .header-nav .nav-link svg {
    display: block;
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
  }
}


/* ── Main content area ────────────────── */
.main-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 10rem;
  gap: 2rem;
}

/* ── Site footer ──────────────────────── */
.site-footer {
  position: relative;
  z-index: 10;
  padding: 2rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(to top, rgba(6, 12, 6, 0.98) 0%, transparent 100%);
}
