/* ============================================================
   MENÚ PRINCIPAL — Nido del AVE®
   Un solo archivo para toda la web (lo pinta menu.js).
   ============================================================ */
header.nm-header {
    --nm-primary: #0d3d45;
    --nm-accent: #2ab5c0;
    --nm-light: #f4f9f9;
    background: var(--nm-light);
    padding: 12px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    font-family: 'Lato', sans-serif;
    flex-wrap: nowrap;
}
header.nm-header .nm-logo { display: flex; align-items: center; flex-shrink: 0; }
header.nm-header .nm-logo img { height: 72px; width: auto; display: block; }

/* Botón hamburguesa (móvil) */
.nm-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 6px; z-index: 1100; }
.nm-burger span { display: block; width: 25px; height: 2.5px; background: #0d3d45; border-radius: 2px; transition: all 0.3s; }
.nm-burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nm-burger.open span:nth-child(2) { opacity: 0; }
.nm-burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Lista principal */
.nm-nav { display: flex; align-items: center; }
.nm-nav ul { list-style: none; margin: 0; padding: 0; }
.nm-list { display: flex; align-items: center; gap: 4px; }
.nm-item { position: relative; }
.nm-link, .nm-drop-btn {
    display: flex; align-items: center; gap: 6px;
    color: #0d3d45; text-decoration: none; font-weight: 600; font-size: 14px;
    font-family: 'Lato', sans-serif;
    background: none; border: none; cursor: pointer; line-height: 1.3;
    padding: 10px 9px; border-radius: 8px; white-space: nowrap;
    transition: color 0.25s, background 0.25s;
}
.nm-link:hover, .nm-drop-btn:hover, .nm-item.open > .nm-drop-btn { color: #2ab5c0; }
.nm-item.activo > .nm-link, .nm-item.activo > .nm-drop-btn { color: #2ab5c0; }
.nm-drop-btn .nm-caret { font-size: 10px; transition: transform 0.25s; }
.nm-item.open > .nm-drop-btn .nm-caret { transform: rotate(180deg); }

/* Desplegable (escritorio) */
.nm-sub {
    position: absolute; top: calc(100% + 4px); left: 0;
    min-width: 250px; background: #fff; border-radius: 14px;
    box-shadow: 0 14px 34px rgba(13,61,69,0.16); border: 1px solid rgba(42,181,192,0.18);
    padding: 8px; display: none; z-index: 1200;
}
.nm-sub::before { content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.nm-item.open > .nm-sub { display: block; }
@media (hover: hover) {
    header.nm-header:not(.nm-movil) .nm-item.has-sub:hover > .nm-sub { display: block; }
    header.nm-header:not(.nm-movil) .nm-item.has-sub:hover > .nm-drop-btn .nm-caret { transform: rotate(180deg); }
}
.nm-sub a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 9px;
    color: #0d3d45; text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.nm-sub a i { width: 18px; text-align: center; color: #2ab5c0; font-size: 14px; }
.nm-sub a small { display: block; font-weight: 400; font-size: 12px; color: #6a7c7a; margin-top: 1px; white-space: normal; }
.nm-sub a:hover, .nm-sub a.activo { background: #f4f9f9; color: #2ab5c0; }
.nm-sub .nm-sep { height: 1px; background: #e3eded; margin: 6px 8px; }

/* Botones */
.nm-btns { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.nm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    color: #fff !important; text-decoration: none; font-weight: 700; font-size: 13px;
    padding: 9px 15px; border-radius: 30px; white-space: nowrap;
    transition: transform 0.25s, box-shadow 0.25s;
}
.nm-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,0.12); }
.nm-btn.academia { background: #0d3d45; }
.nm-btn.acceso { background: #0a2a6e; }
.nm-btn.chequeo { background: #e87030; }
.nm-btn.icono { width: 38px; height: 38px; padding: 0; font-size: 18px; }
.nm-btn.telegram { background: #0088cc; }
.nm-btn.whatsapp { background: #25D366; }
.nm-btn .nm-txt-movil { display: none; }

/* Pantallas medianas: un poco más compacto */
@media (min-width: 1181px) and (max-width: 1360px) {
    .nm-link, .nm-drop-btn { font-size: 13.5px; padding: 10px 6px; }
    .nm-btn { padding: 8px 12px; font-size: 12px; }
    .nm-btn.icono { width: 34px; height: 34px; font-size: 16px; padding: 0; }
    header.nm-header .nm-logo img { height: 64px; }
}

/* Móvil y tablet (o cuando el menú no cabe): panel a pantalla completa.
   menu.js pone la clase .nm-movil por debajo de 1180px o si no cabe. */
header.nm-header.nm-movil .nm-logo img { height: 62px; }
header.nm-header.nm-movil .nm-burger { display: flex; }
header.nm-header.nm-movil .nm-nav {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; height: 100dvh;
        background: #fff; z-index: 1060; transition: right 0.35s ease;
        padding: 86px 28px 40px; overflow-y: auto; display: block;
    }
header.nm-header.nm-movil .nm-nav.open { right: 0; }
header.nm-header.nm-movil .nm-list { flex-direction: column; align-items: stretch; gap: 0; }
header.nm-header.nm-movil .nm-item { border-bottom: 1px solid #eef4f4; }
header.nm-header.nm-movil .nm-link, header.nm-header.nm-movil .nm-drop-btn { width: 100%; justify-content: space-between; font-size: 18px; padding: 16px 2px; }
header.nm-header.nm-movil .nm-sub {
        position: static; display: none; box-shadow: none; border: none; border-radius: 0;
        padding: 0 0 12px 8px; min-width: 0; background: transparent;
    }
header.nm-header.nm-movil .nm-item.open > .nm-sub { display: block; }
header.nm-header.nm-movil .nm-sub::before { display: none; }
header.nm-header.nm-movil .nm-sub a { font-size: 16px; padding: 11px 10px; white-space: normal; }
header.nm-header.nm-movil .nm-btns { flex-direction: column; align-items: stretch; margin: 22px 0 0; gap: 10px; }
header.nm-header.nm-movil .nm-btn { padding: 15px 20px; font-size: 15px; }
header.nm-header.nm-movil .nm-btn.icono { width: auto; height: auto; padding: 15px 20px; font-size: 15px; }
header.nm-header.nm-movil .nm-btn .nm-txt-movil { display: inline; }
body.nm-bloqueo { overflow: hidden; }
