/* VLENET V1.1 · Navegación. Se carga después de styles.css.
   Conserva las alturas originales del encabezado y las dimensiones del logo.
   >=1200 px: pestañas. 641–1199 px: panel flotante. <=640 px: panel lateral.
   Mantener estos dos puntos de corte sincronizados con navigation.js. */
:root {
  --nav-text-size: 13px;
  --nav-tab-pad-x: 15px;
  --nav-panel-width: 366px;
  --nav-panel-top: 88px;
  --nav-panel-right: 28px;
  --nav-enter: 300ms;
  --nav-exit: 220ms;
  --nav-ease: cubic-bezier(.22,.8,.25,1);
  --nav-sky-soft: #e1f4ff;
  --nav-sky-edge: #8bcef2;
  --nav-sky-light: #edf9ff;
}

/* Más superficie y mejor lectura dentro de la misma fila, nunca escalado visual. */
.desktop-nav {
  flex-shrink: 0;
  padding: 6px;
  gap: 4px;
  border-radius: 15px;
  background: #f6f7f8;
  border-color: #ebedef;
  box-shadow: inset 0 1px 0 #ffffffd9;
}
.nav-tab {
  font-size: var(--nav-text-size);
  line-height: 1.4;
  padding: 11px var(--nav-tab-pad-x);
  min-height: 44px;
  border-radius: 10px;
  color: #656b71;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.nav-tab:hover, .nav-tab.is-active {
  background: #fff;
  box-shadow: 0 2px 7px #1724320b, 0 1px 2px #17243204;
}

/* El color queda en el contorno; se mantiene el interior claro y el texto oscuro. */
.login-btn {
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 13px;
  color: #253947;
  background: linear-gradient(115deg,#fff,#fcfeff) padding-box,
              linear-gradient(125deg,var(--nav-sky-soft) 2%,var(--nav-sky-edge) 43%,#c4e8fc 69%,var(--nav-sky-light)) border-box;
  box-shadow: 0 2px 7px #61b8e90b, inset 0 1px 0 #ffffff;
  transition: box-shadow .2s, color .2s, transform .2s var(--nav-ease);
}
.login-btn:hover {
  color: #164e70;
  box-shadow: 0 4px 14px #59b4e926, 0 0 0 3px #dbf2ff45, inset 0 1px 0 #fff;
  transform: translateY(-1px);
}
.login-btn:active { transform: translateY(0); }
.login-btn:focus-visible, .nav-panel :focus-visible {
  outline: 2px solid #3297c9;
  outline-offset: 3px;
}

/* Fuera del header: el backdrop-filter del sticky no recorta ni contiene el menú. */
.nav-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  isolation: isolate;
}
.nav-layer[hidden] { display: none !important; }
.nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(20 29 41 / 27%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity var(--nav-exit) ease;
  touch-action: none;
}
.nav-panel {
  position: absolute;
  top: var(--nav-panel-top);
  right: var(--nav-panel-right);
  width: min(var(--nav-panel-width), calc(100vw - 36px));
  max-height: calc(100dvh - var(--nav-panel-top) - 18px);
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e9edf1;
  border-radius: 22px;
  background: linear-gradient(155deg,#ffffff 60%,#f9fcff);
  color: var(--ink);
  box-shadow: 0 30px 95px -20px #12203338, 0 8px 25px #101c3020, 0 1px 3px #101c300d;
  opacity: 0;
  transform: translateY(-9px) scale(.975);
  transform-origin: top right;
  transition: transform var(--nav-exit) var(--nav-ease), opacity var(--nav-exit) ease;
}
.nav-panel:focus { outline: none; }
.nav-layer.is-open .nav-backdrop { opacity: 1; transition-duration: var(--nav-enter); }
.nav-layer.is-open .nav-panel { opacity: 1; transform: none; transition-duration: var(--nav-enter); }
.nav-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 22px 16px;
  flex-shrink: 0;
}
.nav-panel-eyebrow {
  display: block;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 1.5px;
  color: #747e87;
  line-height: 1.5;
  margin-bottom: 5px;
}
.nav-panel-head h2 { font-size: 20px; font-weight: 750; line-height: 1.35; letter-spacing: -.65px; margin: 0; }
.nav-panel-head h2 span { color: #9bcbe6; }
.nav-close { width: 34px; height: 34px; flex-shrink: 0; color: #78828b; background: #f6f8fa; border-color: #ecf0f3; }
.nav-close .icon { width: 17px; height: 17px; }
.nav-close:hover { background: #eaf4fb; color: #293f51; }
.nav-panel-body {
  padding: 0 12px 7px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d4dbe2 transparent;
}
.panel-navigation { display: grid; gap: 3px; }
.nav-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  min-height: 51px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  transition: background .16s, border-color .16s;
}
.nav-entry-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #626d78;
  background: #f3f5f7;
  border: 1px solid #eef1f4;
}
.nav-entry-icon .icon { width: 16px; height: 16px; flex-basis: 16px; }
.nav-entry-copy { flex: 1; min-width: 0; }
.nav-entry-copy strong { display: block; font-size: 12px; font-weight: 650; line-height: 1.45; letter-spacing: -.1px; color: #333c44; }
.nav-entry-copy small { display: block; font-size: 10px; line-height: 1.55; color: #79838c; margin-top: 1px; }
.nav-entry-arrow { display: flex; color: #929ca5; opacity: .65; transition: transform .18s, opacity .18s; }
.nav-entry-arrow .icon { width: 14px; height: 14px; flex-basis: 14px; }
.nav-entry:hover, .nav-entry.is-active { background: #f5f7f9; border-color: #e9edf0; }
.nav-entry:hover .nav-entry-arrow { transform: translateX(2px); opacity: 1; }
.nav-entry.is-active .nav-entry-icon { background: #1f252c; border-color: #1f252c; color: #fff; }
.nav-entry.is-active .nav-entry-copy strong { color: #171c21; }
.nav-panel-download { border-top: 1px solid #edf0f2; margin: 10px 0 0; padding-top: 9px; }
.nav-panel-footer {
  flex-shrink: 0;
  padding: 12px 22px 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.nav-panel-footer > .btn { min-height: 43px; width: 100%; font-size: 12px; padding: 10px 15px; border-radius: 11px; }
.nav-panel .nav-login { width: 100%; justify-content: space-between; min-height: 39px; font-size: 11px; padding: 9px 13px; }
.nav-panel .nav-login .icon { display: inline-block; width: 14px; height: 14px; flex-basis: 14px; }

@media (min-width:1200px) and (max-width:1280px) {
  .desktop-nav { gap: 3px; }
  .nav-tab { font-size: 12.5px; padding-inline: 13px; }
}
@media (min-width:1200px) {
  .desktop-nav { display: flex; }
  .mobile-toggle { display: none; }
}
@media (max-width:1199px) {
  .desktop-nav { display: none; }
  .mobile-toggle { display: inline-grid; }
}
/* Ventanas estrechas: compacto, no un panel móvil estirado. */
@media (min-width:641px) and (max-width:1199px) {
  .nav-panel { width: min(352px, calc(100vw - 36px)); }
  .nav-panel-head { padding: 18px 20px 14px; }
  .nav-panel-head h2 { font-size: 18px; }
  .panel-navigation { gap: 2px; }
  .panel-navigation .nav-entry { min-height: 44px; padding: 6px 10px; }
  .panel-navigation .nav-entry-copy small { display: none; }
  .nav-entry-icon { width: 29px; height: 29px; }
  .nav-panel-download { margin-top: 8px; padding-top: 8px; }
  .nav-panel-download .nav-entry { padding-block: 7px; min-height: 46px; }
  .nav-panel-footer { padding: 8px 20px 20px; gap: 8px; }
}
@media (max-width:640px) {
  .header-actions > .login-btn { padding: 8px 10px; }
  .nav-panel {
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, calc(100vw - 24px));
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-left: 1px solid #ffffffb3;
    border-radius: 23px 0 0 23px;
    transform: translateX(104%);
    opacity: 1;
    transition: transform var(--nav-exit) var(--nav-ease);
    box-shadow: -15px 0 65px #13203326;
  }
  .nav-panel-head { padding: max(27px,env(safe-area-inset-top)) 22px 22px; }
  .nav-panel-head h2 { font-size: 22px; }
  .nav-panel-eyebrow { font-size: 8px; letter-spacing: 1.7px; margin-bottom: 6px; }
  .nav-close { width: 39px; height: 39px; border-radius: 12px; }
  .nav-close .icon { width: 19px; height: 19px; }
  .nav-panel-body { flex: 1; padding: 0 12px 12px; }
  .panel-navigation { gap: 5px; }
  .nav-entry { min-height: 60px; gap: 12px; padding: 11px 10px; border-radius: 13px; }
  .nav-entry-icon { width: 35px; height: 35px; border-radius: 11px; }
  .nav-entry-icon .icon { width: 18px; height: 18px; }
  .nav-entry-copy strong { font-size: 13px; }
  .nav-entry-copy small { font-size: 10px; margin-top: 2px; }
  .nav-entry-arrow .icon { width: 15px; height: 15px; }
  .nav-panel-download { margin-top: 14px; padding-top: 12px; }
  .nav-panel-footer { padding: 17px 22px max(24px,env(safe-area-inset-bottom)); background: #ffffffef; border-top: 1px solid #eef1f3; gap: 11px; }
  .nav-panel-footer > .btn { min-height: 47px; font-size: 12px; }
  .nav-panel .nav-login { min-height: 44px; font-size: 12px; }
}
@media (max-width:370px) {
  .header-actions > .login-btn { padding-inline: 8px; }
  .nav-panel-head { padding-inline: 19px; }
  .nav-panel-footer { padding-inline: 19px; }
  .nav-entry { gap: 9px; }
  .nav-entry-copy strong { font-size: 12px; }
  .nav-entry-copy small { font-size: 9px; }
}
@media (prefers-reduced-motion:reduce) {
  .nav-panel, .nav-backdrop, .nav-entry-arrow, .login-btn { transition: none !important; }
}
@media (forced-colors:active) {
  .login-btn { border-color: ButtonText; }
  .nav-panel { border: 1px solid CanvasText; }
  .nav-entry.is-active { outline: 1px solid Highlight; }
}
@media print { .nav-layer { display:none !important; } }
