/* Menú centralizado sin frames ni franja superior */
:root {
  --menu-width: 290px;
  --menu-bg: #071c2c;
  --menu-bg-2: #0c293e;
  --menu-line: rgba(255,255,255,.12);
  --menu-text: #eef6fb;
  --menu-muted: #a9c1d1;
  --menu-accent: #35a9e0;
  --menu-active: #1676a5;
  --menu-radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

/* Reserva el espacio del menú en pantallas grandes. */
body.menu-central-activo { padding-left: var(--menu-width); }

.menu-central {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1000;
  width: var(--menu-width);
  overflow-y: auto;
  color: var(--menu-text);
  background: linear-gradient(180deg, var(--menu-bg), #03121d);
  border-right: 1px solid var(--menu-line);
  box-shadow: 8px 0 28px rgba(0,0,0,.18);
  font: 500 15px/1.35 Arial, Helvetica, sans-serif;
}

.menu-central__encabezado {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 16px 18px;
  background: rgba(7,28,44,.96);
  border-bottom: 1px solid var(--menu-line);
  backdrop-filter: blur(8px);
}

.menu-central__marca {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
}
.menu-central__marca small {
  display: block;
  margin-top: 2px;
  color: var(--menu-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.menu-central__lista,
.menu-central__sublista { margin: 0; padding: 0; list-style: none; }
.menu-central__lista { padding: 12px; }
.menu-central__item { margin: 3px 0; }

.menu-central__enlace,
.menu-central__boton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--menu-text);
  background: transparent;
  border: 0;
  border-radius: var(--menu-radius);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu-central__enlace:hover,
.menu-central__boton:hover { background: rgba(255,255,255,.08); }
.menu-central__enlace:focus-visible,
.menu-central__boton:focus-visible,
.menu-central__movil:focus-visible {
  outline: 3px solid rgba(53,169,224,.55);
  outline-offset: 2px;
}
.menu-central__enlace[aria-current="page"] {
  color: #fff;
  background: var(--menu-active);
  font-weight: 700;
}

.menu-central__flecha { transition: transform .18s ease; }
.menu-central__boton[aria-expanded="true"] .menu-central__flecha { transform: rotate(90deg); }
.menu-central__sublista[hidden] { display: none; }
.menu-central__sublista {
  margin: 3px 0 5px 12px;
  padding-left: 8px;
  border-left: 1px solid var(--menu-line);
}
.menu-central__sublista .menu-central__enlace,
.menu-central__sublista .menu-central__boton {
  min-height: 38px;
  padding: 8px 10px;
  color: var(--menu-muted);
  font-size: 14px;
}
.menu-central__sublista .menu-central__sublista { margin-left: 8px; }

.menu-central__movil,
.menu-central__fondo { display: none; }

@media (max-width: 820px) {
  body.menu-central-activo { padding-left: 0; }
  .menu-central {
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform .22s ease;
  }
  .menu-central.abierto { transform: translateX(0); }
  .menu-central__movil {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1002;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: white;
    background: var(--menu-bg);
    border: 1px solid var(--menu-line);
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    cursor: pointer;
    font-size: 23px;
  }
  .menu-central__fondo {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,.5);
  }
  .menu-central__fondo.visible { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-central, .menu-central__flecha { transition: none; }
}

/* Fila con enlace a la marca y control independiente del submenú. */
.menu-central__fila { display: flex; align-items: stretch; gap: 4px; }
.menu-central__fila .menu-central__enlace--rama { flex: 1; min-width: 0; }
.menu-central__fila span.menu-central__enlace--rama { cursor: default; }
.menu-central__boton--flecha {
  flex: 0 0 40px;
  width: 40px;
  justify-content: center;
  padding-inline: 0;
}
