/* Ajustes de optimización móvil - No más Ransomware! */
@media (max-width: 760px) {
  /* Colapsar cualquier grilla multi-columna a una sola columna */
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Formularios: que los campos ocupen todo el ancho disponible */
  input, textarea, select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  label {
    max-width: 100% !important;
    position: relative !important; /* evita que inputs ocultos (type=file) se posicionen fuera del viewport */
  }

  /* Evitar que imágenes y videos se salgan del viewport */
  img, video, svg {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Header: en desktop es un overlay transparente (position:absolute) sobre la imagen oscura del hero.
     En mobile el nav se envuelve en varias líneas y "flota" fuera de esa imagen, dejando el texto
     blanco invisible sobre fondo blanco. Lo pasamos a flujo normal con fondo oscuro para que siga siendo legible. */
  header {
    position: sticky !important;
    top: 0 !important;
    background: #0E1023 !important;
    z-index: 60 !important;
    box-shadow: 0 6px 18px rgba(14, 16, 35, 0.35);
  }
  header > div {
      padding-top: 12px !important;
      padding-bottom: 12px !important;
  }
 

  /* El script de la página mide la altura del header (pensado para overlay position:fixed) y la suma
     como padding-top a la sección del hero. Como en mobile el header ya no es overlay (ver arriba),
     ese padding queda duplicado y deja un bloque en blanco enorme antes del contenido. Lo normalizamos. */
  header + section {
    padding-top: clamp(28px, 6vw, 48px) !important;
    min-height: auto !important;
  }

  /* Reducir el tamaño de los círculos decorativos borrosos de fondo para que no generen scroll/peso extra en mobile */
  div[style*="filter:blur"],
  div[style*="filter: blur"] {
    width: 60vw !important;
    height: 60vw !important;
  }

  /* Botones e íconos: asegurar tamaño táctil mínimo cómodo */
  a[style*="border-radius:999px"], a[style*="border-radius: 999px"],
  button {
    min-height: 40px;
  }

  /* Tarjetas dentro de columnas colapsadas: que no se estiren de más */
  div[style*="grid-template-columns"] > * {
    min-width: 0 !important;
  }

  /* Menú hamburguesa: el <nav> con los links y el botón "Ayuda inmediata" se ocultan por
     defecto y solo se muestran cuando mobile-menu.js agrega la clase nmr-menu-open al
     contenedor del header (el div que agrupa logo + nav + CTA). */
  header > div > nav {
    display: none !important;
    width: 100%;
    flex-direction: column !important;
    align-items: stretch;
    gap: 8px !important;
    margin: 14px 0 0 !important;
    order: 3;
  }
  header > div > nav a {
    text-align: center;
  }
  header > div > a:last-of-type {
    display: none !important;
    width: 100%;
    justify-content: center;
    margin-top: 12px;
    order: 4;
    flex: 1 1 100% !important;
  }
  header > div.nmr-menu-open > nav {
    display: flex !important;
  }
  header > div.nmr-menu-open > a:last-of-type {
    display: flex !important;
  }
  header > div > a:first-child {
    order: 1;
  }
  header > div {
    position: relative;
  }

  .nmr-hamburger {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }
}

@media (min-width: 761px) {
  /* En desktop nunca se muestra el botón hamburguesa, aunque el JS ya lo haya insertado */
  .nmr-hamburger {
    display: none !important;
  }
}

@media (max-width: 480px) {
  /* Títulos muy grandes: dar un poco más de aire de línea en pantallas muy chicas */
  h1, h2 {
    line-height: 1.15 !important;
  }
}

/* Header en anchos intermedios (761-1400 px): evita que el menú se parta y se monte sobre el hero — 2026-09-29 */
@media (min-width:761px) and (max-width:1400px){
  header .hd .logo img{height:30px;padding:5px 8px}
  header .hd .btn-help{padding:10px 16px;font-size:13.5px;white-space:nowrap}
  header .hd nav{flex-wrap:nowrap;gap:0;font-size:15px}
  header .hd nav a,header .hd nav .nmr-dd>a{padding:7px 9px!important;white-space:nowrap}
}
@media (min-width:1101px) and (max-width:1400px){
  header .hd{flex-wrap:nowrap;gap:12px}
}
@media (min-width:761px) and (max-width:1100px){
  header .hd{flex-wrap:wrap;row-gap:12px;column-gap:12px}
  header .hd .btn-help{margin-left:auto}
  header .hd nav{order:3;flex:1 0 100%;justify-content:center;margin:0}
  .hero:has(> .hero-in){padding-top:200px!important}
}

/* 2026-10-26 Fix scroll: support.js (x-dc) inyecta html,body{height:100%}; con overflow-x:hidden el body se volvia el contenedor de scroll y la ventana no scrolleaba */
html,body{height:auto!important;overflow-x:clip!important}
#dc-root,#dc-root>.sc-host{height:auto!important}
