/* Menú móvil a pantalla completa y botón volver arriba.
   Reutiliza las variables de color/tipografía ya definidas en cada página
   (--ink, --ink2, --gold, --gold2, --white, --border) — no se declaran aquí. */

.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--ink2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}
.nav-overlay.active { opacity: 1; visibility: visible; }

.nav-overlay-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.nav-overlay-logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-overlay-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.nav-overlay-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 600;
  opacity: 0.85;
  transition: opacity .2s, color .2s;
}
.nav-overlay-links a:hover { opacity: 1; color: var(--gold2); }

.nav-overlay-cta {
  background: var(--gold);
  color: var(--ink);
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}
.nav-overlay-cta:hover { background: var(--gold2); }

body.nav-locked { overflow: hidden; }

.back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink2);
  color: var(--gold2);
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .nav-overlay, .nav-burger span, .back-to-top { transition: none; }
}

@media (max-width: 768px) {
  .nav-burger { display: flex; }
  nav .nav-cta { display: none; }
}
