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

  /* HERO crest: same visual size as v4_1 (84px), centered row, no overlap */
  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: 12px !important;
    flex-wrap: nowrap !important;
  }
  header.hero img[alt="Escudo"] {
    transform: none !important;
    height: 84px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  /* Remove decorative hero lines if any */
  header.hero::before,
  header.hero::after { content: none !important; display: none !important; }
  header.hero { background-image: none !important; }

  /* ---- HARD FIX: whitespace below footer ----
     Root cause: min-height set by the scaling CSS (vh variants) excede el alto real visible.
     Solución: anular min-height y forzar que el documento termine en el footer. */
  html, body { height: auto !important; overflow-y: auto !important; }
  body { min-height: 0 !important; }
  /* Quita márgenes/paddings finales de los últimos elementos */
  body > :last-child { margin-bottom: 0 !important; padding-bottom: 0 !important; }
  footer.black-footer { margin-bottom: 0 !important; padding-bottom: 0 !important; }
  /* Si existe cualquier bloque después del footer, ocultarlo en móvil */
  body > footer.black-footer ~ * {
    display: none !important;
    margin: 0 !important; padding: 0 !important; height: 0 !important; overflow: hidden !important;
  }
  /* Evita pseudo-elementos espaciadores */
  body::after, body::before { content: none !important; display: none !important; }

}
