/* Home: navegación flotante y panel lateral móvil. */
.kja-mobile-bar { display: none; }
.kja-mobile-drawer { display: none; border: 0; }
.kja-page { position: relative; background: #fff; }
@media (max-width: 768px) {
  .kja-page > header, .kja-page > header.scrolled { inset: 0 0 auto; width: 100%; padding: max(12px, env(safe-area-inset-top)) 16px 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
  .kja-page > header::before { display: none; }
  .kja-page > header .nav-desktop-only { display: none !important; }
  header .kja-mobile-bar { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: max-content; max-width: 100%; margin: 0; padding: 6px 18px 6px 6px; border-radius: 32px; background: rgba(255,255,255,.94); box-shadow: 0 6px 24px rgba(9,36,76,.16); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); pointer-events: auto; }
  .kja-menu-toggle, .kja-drawer-close { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: 0; border-radius: 50%; background: #edf2f8; color: #004fb0; cursor: pointer; touch-action: pan-y; }
  .kja-menu-toggle:active, .kja-drawer-close:active { background: #dce7f5; }
  .kja-mobile-brand { display: flex; align-items: center; min-height: 44px; }
  .kja-mobile-brand img { width: 100px; height: auto; }
  .kja-mobile-drawer { position: fixed; inset: 0 auto 0 0; margin: 0; width: min(70vw, 280px); max-width: none; height: 100vh; height: 100dvh; max-height: none; padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); background: #fff; color: #09244c; border-radius: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
  .kja-drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 36px; }
  .kja-drawer-top > a { display: flex; align-items: center; min-height: 44px; }
  .kja-drawer-top img { width: 112px; height: auto; }
  .kja-mobile-drawer nav { display: block; width: 100%; margin: 0; padding: 0; }
  .kja-drawer-links { display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; }
  .kja-drawer-links a { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 12px 16px; color: #09244c; font-size: 16px; font-weight: 600; text-decoration: none; border-radius: 14px; }
  .kja-drawer-links a.active { color: #004fb0; background: #edf3fb; }
  .kja-drawer-links a:hover { background: #f1f5fa; }
  .kja-drawer-links svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .kja-drawer-bottom { margin-top: auto; padding-top: 36px; }
  .kja-drawer-cta { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 12px 20px; border-radius: 26px; background: #d60068; color: #fff; font-weight: 600; text-decoration: none; }
  html.kja-menu-open, html.kja-menu-open body { overflow: hidden; }
}
@media (prefers-reduced-transparency: reduce) { header .kja-mobile-bar { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Clip the entire foreground, including fixed controls and its dimming shield.
   Overflow + border-radius alone can leave composited fixed layers square in Safari. */
@media (max-width: 768px) {
  .kja-mobile-drawer { display: flex; flex-direction: column; z-index: 1; visibility: hidden; }
  /* A full-viewport backing fills the cut-out corners beyond the menu width. */
  html.kja-reveal-active, html.kja-reveal-active body { background: #fff; }
  .kja-reveal-active body::before { content: ''; position: fixed; inset: 0; background: #fff; z-index: 0; pointer-events: none; }
  .kja-reveal-active .kja-mobile-drawer { visibility: visible; }
  .kja-reveal-active .kja-page { position: fixed; inset: 0; height: 100vh; height: 100dvh; width: 100%; overflow: hidden; z-index: 2; transform: translate3d(var(--kja-reveal-x, 0px), 0, 0); border-radius: var(--kja-reveal-radius, 0px) 0 0 var(--kja-reveal-radius, 0px); clip-path: inset(0 round var(--kja-reveal-radius, 0px) 0 0 var(--kja-reveal-radius, 0px)); isolation: isolate; box-shadow: -12px 0 40px rgba(6,26,56,.16); transition: transform 360ms cubic-bezier(.22,1,.36,1), border-radius 360ms cubic-bezier(.22,1,.36,1), clip-path 360ms cubic-bezier(.22,1,.36,1); }
  .kja-page-shield { display: none; }
  .kja-reveal-active .kja-page-shield { display: block; position: fixed; inset: 0; z-index: 2147483647; border: 0; border-radius: inherit; background: rgba(6,26,56,var(--kja-reveal-dim, 0)); cursor: pointer; transition: background 360ms ease; }
  .kja-reveal-dragging .kja-page, .kja-reveal-dragging .kja-page-shield { transition: none; }
  html.kja-reveal-active, html.kja-reveal-active body { overflow: hidden; }
}
.kja-page-shield { display: none; }
@media (prefers-reduced-motion: reduce) { .kja-reveal-active .kja-page, .kja-reveal-active .kja-page-shield { transition: none; } }
