/* Menú lateral: el mismo en toda la web (inicio y páginas legales). Extraído de styles.css + mejoras-ux.css */
:root{--rose:#e11d48}
#sidebar-overlay[hidden]{display:none}
.side-legal{display:grid;grid-template-columns:1fr 1fr;gap:0 .5rem;margin-top:.5rem;padding-top:.4rem;border-top:1px solid #e2e8f0}
.side-legal a{display:flex;align-items:center;min-height:40px;padding:0 .5rem;font-size:.78rem;font-weight:700;color:#475569;text-decoration:none;border-radius:10px}
.side-legal a:hover{background:#f7fee7;color:#14532d}
#sidebar-overlay { transition: opacity .3s ease-in-out; }
#sidebar-menu { transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.side-link {
  width: 100%; padding: .85rem .5rem; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  color: #1e293b; text-decoration: none;
}
.side-link:hover { color: #000; }
.side-link .count { background: var(--rose); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 8px; font-weight: 800; }

#sidebar-menu {
  background: radial-gradient(18rem 12rem at 100% 0%, rgba(163,230,53,.28), transparent 70%), radial-gradient(16rem 14rem at 0% 100%, rgba(16,185,129,.14), transparent 70%), #fff;
  overflow-y: auto;
}
.side-here { display: inline-flex; align-items: center; gap: .5rem; margin: .9rem 0 .2rem; padding: .35rem .8rem; border-radius: 999px; background: #ecfccb; color: #3f6212; font-size: .78rem; font-weight: 700; }
.side-here[hidden] { display: none; }
.side-here b { font-weight: 800; color: #14532d; }
.side-here__dot { width: 8px; height: 8px; border-radius: 50%; background: #65a30d; position: relative; flex: none; }
.side-here__dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #84cc16; animation: side-ping 1.6s ease-out infinite; }
@keyframes side-ping { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.side-link { position: relative; border-radius: 14px; padding: .8rem .8rem; margin: .1rem 0; transition: background .2s ease, transform .2s ease, color .2s ease; }
.side-link i { transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.side-link:hover { background: #f7fee7; transform: translateX(4px); }
.side-link:hover i { transform: scale(1.18) rotate(-6deg); }
.side-link:active { transform: scale(.98); }
.side-link.is-active { background: linear-gradient(90deg, #ecfccb, #f7fee7 85%); color: #14532d; box-shadow: inset 0 0 0 1px rgba(132,204,22,.35); }
.side-link.is-active::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: #65a30d; animation: side-bar .45s cubic-bezier(.2,.8,.2,1) .25s both; transform-origin: center; }
.side-link.is-active i { color: #3f6212 !important; animation: side-pop .6s cubic-bezier(.3,1.6,.5,1) .3s both; }
.side-link.is-active::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #65a30d; margin-left: auto; box-shadow: 0 0 0 0 rgba(101,163,13,.55); animation: side-pulse 1.8s ease-out infinite; }
.side-link .count + * { margin-left: .4rem; }
@keyframes side-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes side-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes side-pulse { 70% { box-shadow: 0 0 0 9px rgba(101,163,13,0); } 100% { box-shadow: 0 0 0 0 rgba(101,163,13,0); } }
/* entrada escalonada al abrir el menú */
#sidebar-menu:not(.-translate-x-full) .side-link, #sidebar-menu:not(.-translate-x-full) .side-here, #sidebar-menu:not(.-translate-x-full) #sidebar-auth > * {
  animation: side-in .5s cubic-bezier(.2,.8,.2,1) both;
}
#sidebar-menu:not(.-translate-x-full) .side-here { animation-delay: .1s; }
#sidebar-menu:not(.-translate-x-full) nav .side-link:nth-child(1) { animation-delay: .12s; }
#sidebar-menu:not(.-translate-x-full) nav .side-link:nth-child(2) { animation-delay: .17s; }
#sidebar-menu:not(.-translate-x-full) nav .side-link:nth-child(3) { animation-delay: .22s; }
#sidebar-menu:not(.-translate-x-full) nav .side-link:nth-child(4) { animation-delay: .27s; }
#sidebar-menu:not(.-translate-x-full) nav .side-link:nth-child(5) { animation-delay: .32s; }
#sidebar-menu:not(.-translate-x-full) nav .side-link:nth-child(6) { animation-delay: .37s; }
#sidebar-menu:not(.-translate-x-full) nav .side-link:nth-child(7) { animation-delay: .42s; }
#sidebar-menu:not(.-translate-x-full) #sidebar-auth > *:nth-child(1) { animation-delay: .35s; }
#sidebar-menu:not(.-translate-x-full) #sidebar-auth > *:nth-child(2) { animation-delay: .42s; }
#sidebar-menu:not(.-translate-x-full) #sidebar-auth > *:nth-child(3) { animation-delay: .49s; }
@keyframes side-in { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
#sidebar-menu [data-close-sidebar] { transition: transform .3s ease, background .2s ease; border-radius: 50%; }
#sidebar-menu [data-close-sidebar]:hover { transform: rotate(90deg); background: #f1f5f9; }
#sidebar-menu .side-admin.is-active { box-shadow: 0 0 0 2px #f59e0b; }
#sidebar-auth a:first-child { border-radius: 14px; transition: background .2s; }
@media (prefers-reduced-motion: reduce) {
  #sidebar-menu *, #sidebar-menu *::before, #sidebar-menu *::after { animation: none !important; transition: none !important; }
}

/* con el menú móvil abierto, el botón de accesibilidad no tapa los botones de abajo */
body:has(#sidebar-menu:not(.-translate-x-full)) .a11y-btn { opacity: 0; pointer-events: none; transition: opacity .2s; }
.lang-btn--side { width: 100%; justify-content: space-between; padding: .5rem .6rem .5rem .9rem; border-radius: 16px; font-size: .9rem; color: #1e293b; background: #f7fee7; border-color: #d9eab1; }
.lang-btn--side .lang-btn__lbl { margin-right: auto; margin-left: .5rem; }
.lang-btn--side .lang-btn__seg { display: inline-flex; background: #fff; border-radius: 999px; padding: 3px; border: 1px solid #e2e8f0; }
.lang-btn--side i { color: #4d7c0f; font-size: 1.05rem; }
.lang-btn span[data-l] { padding: .38rem .52rem; }
.lang-btn--side { padding: .45rem .5rem .45rem .8rem; }
.lang-btn--side .lang-btn__lbl { margin-left: .4rem; }
.lang-btn--side .lang-btn__seg span[data-l] { padding: .34rem .5rem; }
/* ===== Menú lateral móvil ===== */
#side-here{display:none !important}
#sidebar-menu nav .py-2{padding-top:.35rem;padding-bottom:.35rem}
#sidebar-menu .side-link{min-height:46px}
#sidebar-menu .side-link.is-active{background:#ecfccb;color:#365314;font-weight:800;box-shadow:inset 3px 0 0 #84cc16}
/* Idioma: segmento seleccionado más evidente */
#sidebar-menu .lang-btn--side .lang-btn__seg span[data-l]{min-width:2.4rem;text-align:center;color:#64748b}
#sidebar-menu .lang-btn--side .lang-btn__seg span[data-l].on{box-shadow:0 0 0 2px #fff,0 0 0 3.5px #1e293b;transform:scale(1.06);position:relative;z-index:1}
/* Zona de usuario separada */
#sidebar-auth{margin-top:.75rem;padding:.9rem;border-top:0 !important;background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;display:flex;flex-direction:column;gap:.9rem}
#sidebar-auth .side-user{padding:0 0 .8rem;border-bottom:1px solid #e2e8f0}
#sidebar-auth .side-admin{margin:0}
#sidebar-auth .side-logout{background:#fff;color:#b91c1c;border:1.5px solid #fecaca;margin-top:.35rem}
#sidebar-auth .side-logout:hover{background:#fef2f2}
#sidebar-auth .side-logout i{margin-right:.3rem}
@media (max-height:760px){#sidebar-menu{overflow-y:auto}}
#sidebar-menu .lang-btn--side .lang-btn__seg span[data-l="es"].on,#sidebar-menu .lang-btn--side .lang-btn__seg span[data-l="en"].on{color:#fff}
#sidebar-menu .lang-btn--side .lang-btn__seg span[data-l="an"].on{color:#14532d}
