/* QUÍMICA V20 · Menú principal desplegable en diálogo accesible. */
.navigation-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.7rem;
  padding-inline: .95rem;
  border-color: #45617e;
  color: #e7f0fb;
  background: linear-gradient(145deg, #1a3450, #12263d);
  font-weight: 760;
  white-space: nowrap;
}
.navigation-trigger svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.navigation-trigger:hover {
  color: #ffffff;
  border-color: #66c9c4;
  background: #20435c;
}
.navigation-dialog {
  width: min(37rem, calc(100vw - 1.5rem));
  max-width: none;
  max-height: min(86vh, 46rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #36516d;
  border-radius: 1.35rem;
  color: #e7f0fa;
  background: linear-gradient(155deg, #172e48 0%, #0d1c2f 78%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255,255,255,.05);
}
.navigation-dialog::backdrop {
  background: rgba(3, 9, 18, .72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.navigation-dialog-shell { padding: clamp(1.1rem, 3vw, 1.65rem); }
.navigation-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.navigation-dialog-heading { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.navigation-dialog-mark {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 2.8rem;
  place-items: center;
  border: 1px solid rgba(107, 222, 214, .28);
  border-radius: .9rem;
  color: #8ce7dd;
  background: rgba(22, 153, 145, .13);
  font-size: 1.2rem;
}
.navigation-dialog-kicker { color: #7edbd3; font: 800 .61rem/1.3 var(--font-mono); letter-spacing: .13em; text-transform: uppercase; }
.navigation-dialog-heading h2 { margin: .12rem 0 0; color: #f0f6ff; font-size: clamp(1.25rem, 3vw, 1.65rem); letter-spacing: -.04em; }
.navigation-dialog-close {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 2.45rem;
  place-items: center;
  border: 1px solid #405b77;
  border-radius: .75rem;
  color: #e3edf8;
  background: #1a324c;
  font-size: 1.45rem;
  cursor: pointer;
}
.navigation-dialog-close:hover { border-color: #75d9d0; background: #23445d; }
.navigation-dialog-description { margin: .9rem 0 1.1rem; color: #aec1d6; font-size: .83rem; line-height: 1.65; }
.navigation-menu-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.navigation-menu-link {
  display: grid;
  min-width: 0;
  min-height: 3.65rem;
  grid-template-columns: 2rem minmax(0,1fr) auto;
  align-items: center;
  gap: .6rem;
  padding: .7rem .75rem;
  border: 1px solid #314b66;
  border-radius: .85rem;
  color: #e2edf8;
  background: linear-gradient(145deg, rgba(28, 54, 80, .94), rgba(17, 36, 57, .96));
  font-size: .84rem;
  font-weight: 740;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.navigation-menu-link:hover { transform: translateY(-1px); border-color: #63c6c1; background: #1d4059; }
.navigation-menu-link:focus-visible { outline: 3px solid #77e0d5; outline-offset: 3px; }
.navigation-menu-link[aria-current="page"] { border-color: #55c8c2; color: #f1fffd; background: linear-gradient(135deg, #14535d, #183c55); box-shadow: inset 0 0 0 1px rgba(120, 231, 221, .1); }
.navigation-menu-index { display: grid; width: 1.85rem; height: 1.85rem; place-items: center; border: 1px solid rgba(144, 177, 205, .18); border-radius: .58rem; color: #8db3d0; background: rgba(5, 18, 32, .28); font: 700 .62rem/1 var(--font-mono); }
.navigation-menu-arrow { color: #79d9d0; font-size: 1rem; }
.navigation-dialog-footer { display: flex; align-items: center; gap: .55rem; margin-top: 1.05rem; padding-top: .85rem; border-top: 1px solid #2b435c; color: #9eb4ca; font-size: .7rem; }
.navigation-dialog-status-dot { width: .42rem; height: .42rem; border-radius: 50%; background: #65dfba; box-shadow: 0 0 0 4px rgba(101, 223, 186, .1); }
@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; padding-block: .55rem; }
  .header-tools { width: 100%; justify-content: flex-end; }
  .header-note { display: none; }
  .navigation-menu-list { grid-template-columns: 1fr; }
  .navigation-dialog { width: calc(100vw - 1rem); max-height: 90vh; border-radius: 1rem; }
  .navigation-dialog-shell { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .navigation-menu-link { transition: none; }
  .navigation-menu-link:hover { transform: none; }
}

/* El diálogo conserva la preferencia de apariencia cuando el estudiante elige tema claro. */
html[data-theme="light"] .navigation-trigger {
  border-color: #cbd9e9;
  color: #183858;
  background: linear-gradient(145deg, #ffffff, #edf4fb);
}
html[data-theme="light"] .navigation-trigger:hover { border-color: #7bb9bd; color: #075e68; background: #eaf7f6; }
html[data-theme="light"] .navigation-dialog {
  border-color: #d2dfed;
  color: #18314c;
  background: linear-gradient(155deg, #ffffff 0%, #f2f7fd 78%);
  box-shadow: 0 28px 90px rgba(18, 43, 76, .28);
}
html[data-theme="light"] .navigation-dialog-close { border-color: #d3deeb; color: #294761; background: #edf3fa; }
html[data-theme="light"] .navigation-dialog-close:hover { border-color: #73b9b7; color: #075e68; background: #e5f4f2; }
html[data-theme="light"] .navigation-dialog-heading h2 { color: #173552; }
html[data-theme="light"] .navigation-dialog-description { color: #637891; }
html[data-theme="light"] .navigation-menu-link { border-color: #d7e2ef; color: #25415e; background: linear-gradient(145deg, #ffffff, #f0f5fb); }
html[data-theme="light"] .navigation-menu-link:hover { border-color: #80bab9; background: #eaf6f5; }
html[data-theme="light"] .navigation-menu-link[aria-current="page"] { border-color: #76bebb; color: #075b64; background: linear-gradient(135deg, #e3f4f2, #eaf2ff); }
html[data-theme="light"] .navigation-menu-index { border-color: #dbe5ef; color: #54718e; background: #edf3fa; }
html[data-theme="light"] .navigation-menu-arrow { color: #087f83; }
html[data-theme="light"] .navigation-dialog-footer { border-color: #dbe5ef; color: #6b8096; }
html[data-theme="light"] .navigation-dialog-mark { border-color: #cde7e3; color: #087f83; background: #e8f6f4; }
html[data-theme="light"] .navigation-dialog-kicker { color: #087f83; }
