/* Nereus v47.8: uniformidad visual de las páginas interiores. */
body:not(.ns-home):not(.equipo-preview) {
  background: linear-gradient(90deg,#c5c0bb 0%,#c1bbb5 48%,#bbb5af 100%) !important;
}
/* Las plantillas especiales ya aplican el cristal en .nav; las demás lo aplican al header. */
body:not(.ns-home):not(.equipo-preview):not(.specialty-v36):not(.nc-v41) .site-header,
body:not(.ns-home):not(.equipo-preview):not(.specialty-v36):not(.nc-v41) .site-header.scrolled {
  background: rgba(248,247,245,.52);
  border: 0;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(9px) saturate(115%);
  backdrop-filter: blur(9px) saturate(115%);
  box-shadow: 0 10px 28px rgba(12,30,61,.10);
}
@media (prefers-reduced-motion: reduce) {
  body:not(.ns-home):not(.equipo-preview):not(.specialty-v36):not(.nc-v41) .site-header,
  body:not(.ns-home):not(.equipo-preview):not(.specialty-v36):not(.nc-v41) .site-header.scrolled {
    background: rgba(248,247,245,.88);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
/* En filas de tarjetas, igualamos también la altura cuando hay espacio. */
@media (min-width:621px) {
  body:not(.ns-home):not(.equipo-preview):not(.specialty-v36):not(.nc-v41) .practice-grid.expanded {
    grid-auto-rows: 1fr;
  }
}
/* En cuadrículas de seis pistas, la última tarjeta ocupa dos pistas completas. */
@media (min-width:981px) {
  body:not(.ns-home):not(.equipo-preview):not(.specialty-v36):not(.nc-v41) .practice-grid.expanded > .practice:last-child:nth-child(3n + 1) {
    grid-column: 3 / span 2;
  }
}
@media (min-width:621px) and (max-width:980px) {
  body:not(.ns-home):not(.equipo-preview):not(.specialty-v36):not(.nc-v41) .practice-grid.expanded > .practice:last-child:nth-child(odd) {
    width: calc((100% - clamp(14px, 2vw, 22px)) / 2);
  }
}
/* Tras quitar los números, los títulos recuperan su separación normal. */
body:not(.ns-home):not(.equipo-preview) .area-card-top:empty { display:none; }
body:not(.ns-home):not(.equipo-preview) .area-card-top:empty + h3,
body:not(.ns-home):not(.equipo-preview) .practice > h3:first-child,
body:not(.ns-home):not(.equipo-preview) .approach-card > h3:first-child,
body:not(.ns-home):not(.equipo-preview) .urgent-step > h3:first-child { margin-top:0; }
body:not(.ns-home):not(.equipo-preview) .step { grid-template-columns:1fr; }
body:not(.ns-home):not(.equipo-preview) .step::before { content:none; }
/* Los botones del panel azul de contacto conservan contraste en todas las plantillas. */
body:not(.ns-home):not(.equipo-preview) .contact-card .button,
body:not(.ns-home):not(.equipo-preview) .contact-card .button:hover,
body:not(.ns-home):not(.equipo-preview) .contact-card .button:focus-visible {
  background:#fff !important;
  color:#0d1e3a !important;
  border-color:#fff !important;
}

/* Nereus v47.9: el menú conserva espacio propio en especialidades y actualidad/contacto. */
body.specialty-v36 .site-header,
body.nc-v41 .site-header {
  margin-bottom: 0 !important;
}

/* Los títulos largos en gallego y portugués no ensanchan el panel en móvil. */
@media (max-width:620px) {
  body:not(.ns-home):not(.equipo-preview) .page-hero h1 { overflow-wrap:anywhere; }
}
@media (max-width:620px) {
  body.minor-responsibility .page-hero h1 { font-size:clamp(2rem,10vw,3rem); }
}
