/* === Mobile-only overrides v4_1_fix5 (solo móvil; desktop intacto) === */
@media (max-width: 1024px) {

  /* HERO crest 100x110 (centrado, sin solapar) */
  header.hero .container.content.grid.grid-2 > div:first-child > div:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    flex-wrap: nowrap !important;
  }
  header.hero img[alt="Escudo"] {
    transform: none !important;
    width: 100px !important;
    height: 110px !important;
    object-fit: contain !important;
  }

  /* Footer whitespace: ultra-hard fix */
  html, body { height: auto !important; min-height: 0 !important; overflow-y: auto !important; }
  body { padding-bottom: 0 !important; margin-bottom: 0 !important; }
  main, #main, .main, .wrapper, #wrap, .wrap, .page, .content, .container, .container.content {
    min-height: auto !important; height: auto !important; padding-bottom: 0 !important; margin-bottom: 0 !important;
  }
  /* Neutraliza cualquier definición de min-height inline o de escalado */
  *[style*="min-height"] { min-height: 0 !important; }
  /* Neutraliza los min-height de nuestro CSS de escalado (si quedaron vigentes) */
  body { min-height: auto !important; }

  /* El footer termina la página; no permitas nada después en móvil */
  footer.black-footer { margin-bottom: 0 !important; padding-bottom: 0 !important; }
  body > :last-child { margin-bottom: 0 !important; padding-bottom: 0 !important; }
  body > footer.black-footer ~ * {
    display: none !important;
    height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important;
  }

  /* Evita pseudo-espaciadores */
  body::after, body::before, html::after, html::before { content: none !important; display: none !important; }

  /* Plan B (opcional): si algún navegador aún pinta 1-2px, iguala el fondo final al footer
     (comentado por defecto para no cambiar color de página)
  */
  /* html, body { background-color: #0b0b0b !important; } */
}
