/* Menu de celular y tableta (hasta 960 px), comun a la portada (.vd-topbar) y a las paginas interiores (.vd-header).
   El boton lo crea assets/js/menu-movil.js; sin JavaScript el menu solo se acomoda en varios renglones. */
.vd-menu-btn { display: none; }

@media (max-width: 960px) {
    /* Sin JavaScript: nada se sale de la pantalla */
    html body .vd-header-inner { flex-wrap: wrap; padding: 8px 16px; }
    html body .vd-header-right { flex-wrap: wrap; margin-left: 0; max-width: 100%; }
    html body .vd-header-right .vd-nav { flex-wrap: wrap; gap: 4px 14px; }
    html body .vd-logo { height: 40px; }

    /* Con el boton */
    html body .vd-menu-ready .vd-menu-btn {
        display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0;
        margin-left: auto; padding: 0; background: transparent; border: 1px solid currentColor; border-radius: 8px; cursor: pointer;
    }
    html body .vd-header.vd-menu-ready .vd-menu-btn { color: #1B2A5E; }
    html body .vd-topbar.vd-menu-ready .vd-menu-btn { color: #fff; }

    html body .vd-header.vd-menu-ready .vd-header-right,
    html body .vd-topbar.vd-menu-ready .vd-topbar-nav,
    html body .vd-topbar.vd-menu-ready .vd-topbar-social { display: none; }

    /* Paginas interiores: panel desplegable bajo el encabezado */
    html body .vd-header.vd-menu-ready.vd-menu-open .vd-header-right {
        display: block; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 4px 16px 16px;
        border-bottom: 3px solid #1B2A5E; box-shadow: 0 12px 24px rgba(16, 26, 61, .18); max-height: calc(100vh - 64px); overflow-y: auto;
    }
    html body .vd-header.vd-menu-open .vd-header-right .vd-nav { display: flex; flex-direction: column; gap: 0; width: 100%; }
    html body .vd-header.vd-menu-open .vd-header-right .vd-nav a { font-size: 15px; padding: 13px 0; border-bottom: 1px solid #EEF0F4; }
    html body .vd-header.vd-menu-open .vd-header-right .vd-nav a.active { border-left: 4px solid #E4232C; padding-left: 10px; }
    html body .vd-header.vd-menu-open .vd-social { margin: 16px 0 0; padding: 0; border: 0; gap: 20px; justify-content: center; }

    /* Portada */
    html body .vd-topbar { position: relative; z-index: 100; }
    html body .vd-topbar.vd-menu-ready.vd-menu-open { flex-wrap: wrap; height: auto; min-height: 58px; align-content: flex-start; }
    html body .vd-topbar.vd-menu-open .vd-topbar-logo { display: flex; align-items: center; height: 58px; }
    html body .vd-topbar.vd-menu-ready.vd-menu-open .vd-topbar-nav { display: flex; flex-direction: column; order: 3; width: 100%; gap: 0; padding-bottom: 8px; }
    html body .vd-topbar.vd-menu-open .vd-topbar-nav a { font-size: 17px; padding: 12px 4px; border-radius: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
    html body .vd-topbar.vd-menu-ready.vd-menu-open .vd-topbar-social { display: flex; order: 4; width: 100%; justify-content: center; gap: 22px; padding: 6px 0 16px; }
    html body .vd-topbar.vd-menu-open .vd-topbar-social svg { width: 22px; height: 22px; }
}
