/* ================================
   FIX SCROLL GENERAL (MÓVIL)
================================ */
html, body {
  width: 100%;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ================================
   MODO MÓVIL
================================ */
@media (max-width: 768px) {

  /* Quitar menú lateral */
  #siteNav {
    position: static !important;
    width: 100% !important;
    float: none !important;
    margin: 0;
  }

  /* Contenedor principal en una columna */
  #content,
  #main-wrapper,
  #main {
    width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    box-sizing: border-box;
  }

  /* Evitar anchos fijos heredados */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Imágenes responsive */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Figuras flotantes: que no rompan el texto */
  .float-left,
  .float-right {
    float: none !important;
    margin: 0 auto 1em auto !important;
    display: block;
  }

  /* Tipografía legible */
  body {
    font-size: 16px;
  }

  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1.05rem; }
}

@media (max-width: 768px) {
  /* Botón hamburguesa */
  .menuToggle{
    display: block;
    width: calc(100% - 20px);
    margin: 10px auto 0 auto;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 10px;
  }

  /* Menú cerrado por defecto */
  #siteNav{
    display: none;
  }

  /* Menú abierto */
  #siteNav.is-open{
    display: block;
    margin-top: 10px;
  }

  /* Enlaces más “tocables” */
  #siteNav a{
    display: block;
    padding: 10px 12px;
  }

  /* Submenús: que no queden raros */
  #siteNav ul{
    padding-left: 10px;
  }
}

@media (max-width: 768px) {
  /* Evita que títulos enormes desborden */
  #headerContent { padding: 10px; }

  /* Que el contenido no quede pegado */
  .iDevice { margin-bottom: 14px; }

  /* Si hay tablas, que no rompan el móvil */
  table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
}

/* Evitar scroll anidado que bloquea al subir en móvil */
html, body {
  overflow-y: auto !important;
  height: auto !important;
}

/* Fuerza a que el contenido NO sea un contenedor con scroll propio */
#content, #main-wrapper, #main {
  height: auto !important;
  overflow: visible !important;
  position: static !important;
}

/* Si algún elemento está capturando el gesto táctil */
body, #content, #main-wrapper, #main {
  touch-action: pan-y;
}

@media (max-width: 768px) {
  #header, #siteNav {
    position: static !important;
  }
}
