/* Iconos 3D del menu lateral (nav-icons.js). */
.sidebar .has-3d-icon::before { display: none !important; }
.sidebar :is(.nav-main, .nav-parent).has-3d-icon { position: relative; padding-left: 48px !important; }
.sidebar .nav-icon-3d {
  position: absolute; left: 11px; top: 50%; width: 28px; height: 28px; margin-top: -14px;
  overflow: visible; pointer-events: none; --nav-icon-shadow: #0f2a22;
}
html[data-theme="dark"] .sidebar .nav-icon-3d { --nav-icon-shadow: #000; }
.nav-icon-3d * { transform-box: fill-box; transform-origin: center; }
.nav-icon-3d .sh { fill: var(--nav-icon-shadow); opacity: .2; filter: url(#oni-fBlur); }
.nav-icon-3d .a-pencil { transform-origin: 50% 95%; }
.nav-icon-3d :is(.a-book, .a-bag, .a-bar) { transform-origin: 50% 100%; }
.nav-icon-3d .a-tag2 { transform-origin: 15% 50%; }

/* Animacion al pasar el mouse o al enfocar con teclado. */
.has-3d-icon:is(:hover, :focus-visible) .a-roof { animation: nav3d-hop .9s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-pencil { animation: nav3d-scribble .9s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-plane { animation: nav3d-takeoff 1s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-cal { animation: nav3d-flip .8s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-coin { animation: nav3d-coin 1s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-drawer { animation: nav3d-drawer 1.1s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-stamp { animation: nav3d-stamp .8s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-book { animation: nav3d-tilt .9s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-bag { animation: nav3d-bounce .9s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-tag2 { animation: nav3d-swing 1s ease; }
.has-3d-icon:is(:hover, :focus-visible) .a-bar { animation: nav3d-grow .9s ease both; }
.has-3d-icon:is(:hover, :focus-visible) .a-bar:nth-of-type(2) { animation-delay: .08s; }
.has-3d-icon:is(:hover, :focus-visible) .a-bar:nth-of-type(3) { animation-delay: .16s; }

/* La seccion activa flota suavemente. */
.sidebar .nav-main.active > .nav-icon-3d,
.sidebar .nav-group:has(.nav-item.active) > .nav-parent > .nav-icon-3d { animation: nav3d-float 2.8s ease-in-out infinite; }

@keyframes nav3d-hop { 35% { transform: translateY(-3px); } 60% { transform: translateY(.6px); } }
@keyframes nav3d-scribble { 25% { transform: rotate(-9deg); } 50% { transform: rotate(7deg); } 75% { transform: rotate(-4deg); } }
@keyframes nav3d-takeoff { 45% { transform: translate(3.5px, -3.5px); } 70% { transform: translate(-1px, 1px); } }
@keyframes nav3d-flip { 40%, 41% { transform: scaleY(.15); } }
@keyframes nav3d-coin { 30% { transform: translateY(-4px) scaleX(.12); } 60% { transform: translateY(-4px) scaleX(1); } 80% { transform: translateY(.5px); } }
@keyframes nav3d-drawer { 35%, 70% { transform: translateY(3px); } }
@keyframes nav3d-stamp { 30% { transform: scale(1.35) rotate(-12deg); } 55% { transform: scale(.9); } }
@keyframes nav3d-tilt { 40% { transform: rotate(-9deg); } 70% { transform: rotate(3deg); } }
@keyframes nav3d-bounce { 30% { transform: translateY(-3.5px); } 55% { transform: scale(1.07, .93); } 75% { transform: scale(.97, 1.03); } }
@keyframes nav3d-swing { 30% { transform: rotate(16deg); } 60% { transform: rotate(-9deg); } 80% { transform: rotate(4deg); } }
@keyframes nav3d-grow { 30% { transform: scaleY(.45); } }
@keyframes nav3d-float { 50% { transform: translateY(-1.5px); } }
@media (prefers-reduced-motion: reduce) { .nav-icon-3d, .nav-icon-3d * { animation: none !important; } }
/* La rotacion del avion y del lapiz se mide desde el icono, no desde su propia caja. */
.nav-icon-3d :is(.plane-body, .pencil-body) { transform-box: view-box; transform-origin: 0 0; }
