/* Fase 15f · encabezado estable */
@media(min-width:1241px){
#site-header.sh-scrolled .sh-topbar-in{padding:.5rem 2rem}
#site-header.sh-scrolled .sh-mainbar-in{padding:.7rem 1.5rem}
#site-header.sh-scrolled .sh-logo-icon{height:66px}
#site-header.sh-scrolled .sh-logo-word{height:36px}
.sh-topbar-in,.sh-mainbar-in,.sh-logo-icon,.sh-logo-word{transition:none}
}
#site-header{will-change:box-shadow}

/* botón «Matrículas 2027» igual en todas las páginas */
.sh-mainbar-right .ds-nav-cta{display:inline-flex;align-items:center;min-height:40px;padding:0 1.1rem;border-radius:99px;background:#0060D4;color:#fff;font-weight:800;font-size:.85rem;text-decoration:none;white-space:nowrap}.sh-mainbar-right .ds-nav-cta:hover{background:#002784}
/* Fase 15g · encabezado de escritorio desde 1161 px (antes se pasaba a menú móvil bajo 1400 px) */
@media(min-width:1241px) and (max-width:1400px){
.sh-topbar-in{padding:.4rem 1.2rem}.sh-topnav{gap:1.1rem}
.sh-mainbar-in{padding:.6rem 1rem;gap:.8rem}
.sh-logo-icon{height:54px}.sh-logo-word{height:30px}
.sh-mainlinks{gap:.2rem .9rem;flex-wrap:nowrap}.sh-mainlinks>li>a{font-size:.8rem}
.sh-mainbar-right{gap:.6rem}.sh-mainbar-right .ds-nav-cta{padding:0 .9rem;font-size:.8rem}
.sh-pqrsf-btn{padding:.6rem 1rem;font-size:.82rem}
#site-header.sh-scrolled .sh-logo-icon{height:54px}#site-header.sh-scrolled .sh-logo-word{height:30px}
}
/* Fase 15g · mismo menú en una sola línea en todas las páginas (antes solo en las que cargaban v3-home.css) */
@media(min-width:1241px){
#site-header .sh-mainlinks{flex-wrap:nowrap;gap:clamp(.55rem,1vw,1.2rem)}
#site-header .sh-mainlinks>li>a{font-size:.82rem}
#site-header .sh-mainbar-in{gap:.8rem}
}
/* Fase 15i · páginas de programa: el encabezado se oculta al bajar (más espacio de lectura) y reaparece al subir */
#site-header{transition:transform .28s ease,box-shadow .25s}
html.sh-away #site-header{transform:translateY(-100%);box-shadow:none}
.pg .pg-nav{transition:top .28s ease}
html.sh-away .pg .pg-nav{top:0}

/* Fase 16 · menú móvil de Técnicos igual al de Bachillerato:
   el botón del menú siempre queda dentro de la pantalla, la barra es compacta y el panel pone los enlaces principales primero y «Accesos rápidos» al final */
@media(max-width:1240px){
.sh-mainbar-right{margin-left:auto}
#site-header.sh-open .sh-mobile-panel{display:flex;flex-direction:column;max-height:calc(100vh - 72px);max-height:calc(100dvh - 72px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.sh-mobile-panel>.sh-mobile-group{order:10}
.sh-mobile-panel>.sh-mobile-group:nth-child(-n+4){order:20}
.sh-mobile-panel>.sh-mobile-group:nth-child(1){margin-top:.6rem;border-top:1px solid rgba(6,40,88,.12);padding-top:.7rem}
.sh-mobile-panel>.sh-mobile-group:nth-child(1)::before{content:"Accesos rápidos";display:block;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#6b7a99;margin-bottom:.1rem}
.sh-mobile-panel>.sh-mobile-pqrsf{order:30}
}
@media(max-width:560px){
.sh-mainbar-in{padding:.5rem .8rem;gap:.4rem}
.sh-logo{gap:.4rem;min-width:0}
.sh-logo-icon,#site-header.sh-scrolled .sh-logo-icon{height:42px}
.sh-logo-word,#site-header.sh-scrolled .sh-logo-word{height:22px}
.sh-mainbar-right{gap:.4rem}
.sh-mainbar-right .ds-nav-cta{min-height:34px;padding:0 .75rem;font-size:.74rem}
}
@media(max-width:400px){
.sh-mainbar-in{padding:.45rem .6rem}
.sh-logo-icon,#site-header.sh-scrolled .sh-logo-icon{height:38px}
.sh-logo-word,#site-header.sh-scrolled .sh-logo-word{height:19px}
.sh-mainbar-right .ds-nav-cta{padding:0 .6rem;font-size:.7rem}
}
@media(max-width:340px){.sh-logo-word{display:none}}
