/* Shared prev / home / next navigation (site-wide) */

.nav-container,
.explain-nav {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  padding: 8px 0 0;
  gap: 10px;
}

.nav-container .prev {
  position: absolute;
  left: 0;
}

.nav-container .next {
  position: absolute;
  right: 0;
}

.nav-container .home {
  position: relative;
}

.nav-container a {
  text-decoration: none;
  color: #111;
  font-weight: 900;
  font-style: italic;
  font-size: 0.85rem;
  padding: 8px 14px;
  min-height: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 2px solid #111;
  background: #fff;
  box-shadow: none;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.nav-container a:hover {
  color: #00a2ff;
  text-decoration: none;
  background: #f3faff;
}

.nav-container a.home {
  background: #0d1420;
  color: #fff;
}

.nav-container a.home:hover {
  color: #7dffa3;
  background: #0d1420;
}

.nav-container a.prev:empty,
.nav-container a.next:empty,
.nav-container span.prev,
.nav-container span.next {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  min-height: 0;
  pointer-events: none;
}

@media (max-width: 640px) {
  .nav-container {
    flex-direction: column;
    gap: 8px;
  }

  .nav-container .prev,
  .nav-container .next,
  .nav-container .home {
    position: static;
  }
}
