/**
 * Navegación global LIPA Studios — escritorio + panel móvil
 */
.site-nav {
  background: rgba(0, 0, 0, 0.9);
  padding: 15px 20px;
  border-bottom: 2px solid #00ffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.site-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.site-nav__brand {
  color: #00ffff;
  font-size: 1.3rem;
  font-weight: bold;
  text-decoration: none;
  font-family: "Orbitron", system-ui, -apple-system, sans-serif;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  background: rgba(0, 255, 255, 0.08);
  border: 2px solid #00ffff;
  color: #00ffff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Orbitron", system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.nav-toggle .nav-toggle__icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.nav-toggle .nav-toggle__icon span {
  display: block;
  height: 2px;
  background: #00ffff;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.nav-links a {
  color: #e8f6ff;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  background: rgba(0, 255, 255, 0.12);
  color: #fff;
}

.nav-links a[aria-current="page"] {
  color: #39ff14;
  font-weight: 700;
}

.site-nav a:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid #39ff14;
  outline-offset: 3px;
}

@media (min-width: 1100px) {
  .nav-links {
    flex-wrap: wrap;
  }
}

.site-nav__top {
  display: contents;
}

@media (max-width: 900px) {
  .site-nav__inner {
    flex-wrap: nowrap;
    position: relative;
    z-index: 1003;
  }

  .site-nav__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-offset, 0px);
    right: 0;
    width: min(320px, 92vw);
    height: calc(100dvh - var(--nav-offset, 0px));
    max-width: none;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
    overflow-y: auto;
    padding: 20px 20px 28px;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    background: rgba(6, 6, 18, 0.98);
    border-left: 2px solid #00ffff;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 1002;
    gap: 4px;
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-links a {
    white-space: normal;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }
}

body.nav-drawer-open {
  overflow: hidden;
}
