/*
 EIC Academy - ajuste de portada 2026-11-06, sobre base v36.20.1.
 Solo se aplica cuando #portal tiene la clase n17-home-mode.
 Preserva el aspecto actual, rutas y permisos.
*/
/* Menú flotante: 56 -> 45 px (aprox. -20 %); el posicionamiento se ajusta también en JS. */
#n9-nav.e3614-floating-nav {
  width:45px!important; min-width:45px!important; height:45px!important; min-height:45px!important;
}
#n9-nav .e3614-orb {
  width:45px!important; height:45px!important; border-radius:14px!important;
}
#n9-nav .e3614-burger {width:22px!important;height:20px!important}
#n9-nav .e3614-burger i{height:3px!important}
#n9-nav .e3614-burger i:nth-child(1){top:2px;left:0;width:12px}
#n9-nav .e3614-burger i:nth-child(2){top:9px;left:0;width:22px}
#n9-nav .e3614-burger i:nth-child(3){top:16px;left:10px;width:12px}
#n9-nav[data-open="true"] .e3614-burger i:nth-child(1){top:9px;left:0;width:22px}
#n9-nav[data-open="true"] .e3614-burger i:nth-child(2){opacity:0}
#n9-nav[data-open="true"] .e3614-burger i:nth-child(3){top:9px;left:0;width:22px}

/* Escritorio: tercera columna dedicada a la ilustración de cada categoría.
   Los botones permanecen compactos, sin poder invadir las láminas. */
@media (min-width:781px){
  body #portal.n17-home-mode .e3615-groups{gap:12px!important}
  body #portal.n17-home-mode .e3615-section{
    display:grid!important;
    grid-template-columns:clamp(156px,16vw,214px) minmax(0,1fr) 100px!important;
    grid-template-rows:auto!important;
    column-gap:clamp(11px,1.6vw,22px)!important;
    min-height:145px!important; padding:16px clamp(16px,2vw,27px)!important;
  }
  body #portal.n17-home-mode .e3615-section-heading{grid-column:1;grid-row:1;min-width:0}
  body #portal.n17-home-mode .e3615-tile-grid{
    grid-column:2;grid-row:1;
    grid-template-columns:repeat(auto-fit,minmax(min(100%,100px),1fr))!important;
    gap:8px!important;
    align-items:center;
  }
  body #portal.n17-home-mode .e3615-tile{
    min-height:86px!important;
    height:88px!important;
    padding:8px 5px!important;
    gap:5px!important;
    border-radius:13px!important;
  }
  body #portal.n17-home-mode .e3615-tile-icon{
    width:31px!important;height:31px!important;flex:0 0 31px!important;border-radius:10px!important;
  }
  body #portal.n17-home-mode .e3615-tile-icon .n9-icon{width:18px!important;height:18px!important;flex-basis:18px!important}
  body #portal.n17-home-mode .e3615-tile-title{font-size:11px!important;line-height:1.13!important}
  body #portal.n17-home-mode .e3615-art{
    grid-column:3;grid-row:1;
    position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
    justify-self:center!important;align-self:center!important;
    margin:0!important;width:110px!important;height:122px!important;
    transform:scale(.70) rotate(-7deg)!important;
    transform-origin:center center!important;
  }
  body #portal.n17-home-mode .e3615-tile.pre30-card-locked{
    min-height:88px!important;padding:5px 3px!important;gap:2px!important;
  }
  body #portal.n17-home-mode .pre30-card-content{gap:2px!important}
  body #portal.n17-home-mode .pre30-card-locked>.pre29-unlock{
    margin:2px 0 0!important;min-height:23px!important;padding:4px 6px!important;
    font-size:9px!important;line-height:1!important;
  }
}
@media(min-width:781px) and (max-width:1100px){
  body #portal.n17-home-mode .e3615-section{
    grid-template-columns:158px minmax(0,1fr) 74px!important;
    column-gap:11px!important;
  }
  body #portal.n17-home-mode .e3615-tile-grid{
    grid-template-columns:repeat(auto-fit,minmax(min(100%,75px),1fr))!important;
  }
  body #portal.n17-home-mode .e3615-tile-title{font-size:10px!important}
  body #portal.n17-home-mode .e3615-art{transform:scale(.57) rotate(-7deg)!important}
}

/* Portada tipo app web en móvil: no mostrar LOGO NI eslogan (solo en Inicio).
   Cuatro sectores ajustados al alto útil; el panel conserva el scroll en módulos internos. */
@media (max-width:780px){
  html:has(#portal.n17-home-mode), body:has(#portal.n17-home-mode){
    height:100%!important; min-height:100%!important; overflow-y:hidden!important;
  }
  body #portal.n17-home-mode{
    height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;
    overflow:hidden!important;
    padding:max(7px,env(safe-area-inset-top)) 8px max(7px,env(safe-area-inset-bottom))!important;
  }
  body #portal.n17-home-mode .portal-shell,
  body #portal.n17-home-mode #n9-panel,
  body #portal.n17-home-mode .e3615-home{
    height:100%!important;min-height:0!important;max-height:100%!important;
    overflow:hidden!important;
  }
  body #portal.n17-home-mode .e3615-home{display:block!important}
  body #portal.n17-home-mode .e3615-brand-row{display:none!important}
  body #portal.n17-home-mode .e3615-groups{
    display:grid!important;
    height:100%!important;max-height:100%!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:none!important;
    grid-auto-rows:minmax(0,1fr)!important;
    gap:clamp(4px,.85svh,7px)!important;
    overflow:hidden!important;
  }
  body #portal.n17-home-mode .e3615-section{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    justify-content:flex-start!important;
    height:100%!important;min-height:0!important;max-height:100%!important;
    padding:clamp(6px,1svh,10px) 8px!important;
    border-radius:17px!important;gap:clamp(3px,.6svh,6px)!important;
    overflow:hidden!important;
  }
  body #portal.n17-home-mode .e3615-section-heading{
    align-self:stretch!important;min-height:0!important;
    padding:0 64px 0 2px!important;margin:0!important;
    gap:3px!important;flex:0 0 auto!important;
  }
  body #portal.n17-home-mode .e3615-short-line{height:2px!important;width:24px!important}
  body #portal.n17-home-mode .e3615-section-heading h2{
    font-size:clamp(14px,2.1svh,18px)!important;line-height:1.05!important;
  }
  body #portal.n17-home-mode .e3615-art{
    position:absolute!important;top:3px!important;right:7px!important;left:auto!important;
    width:59px!important;height:46px!important;
    transform:rotate(-7deg)!important;transform-origin:top right!important;
    z-index:1!important;pointer-events:none!important;
  }
  body #portal.n17-home-mode .e3615-art-sheet{
    width:34px!important;height:28px!important;border-radius:7px!important;
  }
  body #portal.n17-home-mode .e3615-art-back{left:24px!important;top:0!important}
  body #portal.n17-home-mode .e3615-art-middle{left:13px!important;top:4px!important}
  body #portal.n17-home-mode .e3615-art-front{left:1px!important;top:9px!important}
  body #portal.n17-home-mode .e3615-art-front .n9-icon{width:17px!important;height:17px!important;flex-basis:17px!important}
  body #portal.n17-home-mode .e3615-tile-grid{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    align-self:stretch!important;flex:0 0 auto!important;
    gap:5px!important;margin:0!important;padding:0!important;
    width:100%!important;min-width:0!important;
  }
  body #portal.n17-home-mode .e3615-admin .e3615-tile-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:4px!important;
  }
  body #portal.n17-home-mode .e3615-tile{
    min-width:0!important;
    min-height:clamp(53px,8.6svh,76px)!important;
    height:clamp(53px,8.6svh,76px)!important;
    max-height:76px!important;
    padding:4px 2px!important;gap:3px!important;
    border-radius:11px!important;
    overflow:hidden!important;
  }
  body #portal.n17-home-mode .e3615-tile-icon{
    width:clamp(22px,3.65svh,30px)!important;
    height:clamp(22px,3.65svh,30px)!important;
    flex:0 0 clamp(22px,3.65svh,30px)!important;
    border-radius:9px!important;
  }
  body #portal.n17-home-mode .e3615-tile-icon .n9-icon{
    width:clamp(13px,2svh,17px)!important;height:clamp(13px,2svh,17px)!important;
    flex-basis:clamp(13px,2svh,17px)!important;
  }
  body #portal.n17-home-mode .e3615-tile-title{
    font-size:clamp(8.5px,1.25svh,10.5px)!important;line-height:1.1!important;
    max-width:100%!important;overflow-wrap:anywhere!important;
  }
  body #portal.n17-home-mode .e3615-admin .e3615-tile-title{
    font-size:clamp(7.6px,1.1svh,9.5px)!important;line-height:1.06!important;
  }
  /* Contratos pendientes: mantener botón DESBLOQUEAR accesible y dentro de su tarjeta. */
  body #portal.n17-home-mode .e3615-tile.pre30-card-locked{
    justify-content:center!important;gap:1px!important;padding:3px 2px!important;
  }
  body #portal.n17-home-mode .pre30-card-content{gap:2px!important;width:100%!important}
  body #portal.n17-home-mode .pre30-card-locked .e3615-tile-icon{
    width:21px!important;height:21px!important;flex-basis:21px!important;
  }
  body #portal.n17-home-mode .pre30-card-locked>.pre29-unlock{
    width:93%!important;max-width:100%!important;min-height:23px!important;
    margin:2px auto 0!important;padding:3px 1px!important;
    border-radius:6px!important;font-size:clamp(7.3px,1.15svh,9px)!important;
    line-height:1!important;white-space:nowrap!important;
  }
}
/* Acomodación para dispositivos muy estrechos. */
@media (max-width:360px){
  body #portal.n17-home-mode .e3615-section{padding-inline:6px!important}
  body #portal.n17-home-mode .e3615-admin .e3615-tile-grid{gap:3px!important}
  body #portal.n17-home-mode .e3615-admin .e3615-tile-title{font-size:7.5px!important}
}
/* Por accesibilidad, en alturas extremadamente pequeñas o zoom alto es preferible
   permitir scroll a ocultar accesos: no se pierden botones. */
@media (max-width:780px) and (max-height:570px){
  html:has(#portal.n17-home-mode),body:has(#portal.n17-home-mode){height:auto!important;overflow-y:auto!important}
  body #portal.n17-home-mode{height:auto!important;min-height:100dvh!important;max-height:none!important;overflow:visible!important}
  body #portal.n17-home-mode .portal-shell,
  body #portal.n17-home-mode #n9-panel,
  body #portal.n17-home-mode .e3615-home{height:auto!important;max-height:none!important;overflow:visible!important}
  body #portal.n17-home-mode .e3615-groups{
    height:auto!important;max-height:none!important;
    grid-auto-rows:minmax(135px,auto)!important;overflow:visible!important;
  }
  body #portal.n17-home-mode .e3615-section{height:auto!important;min-height:135px!important;max-height:none!important}
}
