/* ===================================================
   RESPONSIVE.CSS - equiser.com
   =================================================== */

/* ---------- TABLETS (601px - 990px) ---------- */
@media screen and (max-width: 990px) and (min-width: 601px) {
  #ppal, .entero, #internos, .linea {
    width: 100% !important;
    height: auto !important;
  }
  .tercio {
    width: 45% !important;
    float: left;
    box-sizing: border-box;
    margin: 1.5% !important;
    height: auto !important;
  }
  .mitad {
    width: 100% !important;
    float: none !important;
  }
}

/* ---------- CELULARES (hasta 768px) ---------- */
@media screen and (max-width: 768px) {

  html, body { width: 100%; overflow-x: hidden; }

  /* --- index.php: tabla principal y header --- */
  table { width: 100% !important; }

  #header table, #header tr, #header td {
    display: block !important;
    width: 100% !important;
  }

  /* Excepción: la fila de íconos sociales se mantiene en línea */
  #header tr.fila-social {
    display: flex !important;
    width: 100% !important;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }
  #header tr.fila-social td {
    display: inline-flex !important;
    width: auto !important;
    align-items: center;
  }

  #contenidos iframe {
    width: 100% !important;
    height: 1400px; /* ajustar al alto real del contenido */
  }

  /* --- index.php: botones de navegación --- */
  #a, #b, #c, #d,
  #a:link, #b:link, #c:link, #d:link,
  #a:visited, #b:visited, #c:visited, #d:visited {
    width: 22%;
    box-sizing: border-box;
    font-size: 10px;
    padding: 2px 0;
    margin: 1px;
  }

  /* --- Servicios.html y subpáginas: contenedores --- */
  .mitad, .tercio {
    width: 100% !important;
    float: none !important;
    display: block !important;
    height: auto !important;
    margin: 0 0 10px 0 !important;
    box-sizing: border-box;
  }

  /* --- consulta.htm: formulario --- */
  .tabla-consulta,
  .tabla-consulta table {
    width: 100% !important;
    height: auto !important;
  }
  .tabla-consulta td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .tabla-consulta input:not([type="submit"]):not([type="reset"]):not([type="hidden"]),
  .tabla-consulta textarea {
    width: 90% !important;
    box-sizing: border-box;
    font-size: 16px; /* evita zoom automático de iOS */
  }

  /* --- Imágenes fluidas en todo el sitio --- */
  img { max-width: 100% !important; height: auto !important; }

  /* --- Texto: menos margen lateral --- */
  .textentero, .textenteroit {
    margin-left: 12px !important;
    margin-right: 12px !important;
    text-indent: 15px;
  }
  p { margin-left: 5px; margin-right: 5px; }
  
  /* --- entretmain.html y hermanas (sismain, electmain, noraccmain): menú lateral --- */
  
  .menu-lateral table {
    width: 100% !important;
  }
  .menu-lateral a {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    text-align: center;
  }
  #centro {
    display: block !important;
    width: 100% !important;
    height: auto !important;
  }
  #centro iframe {
    width: 100% !important;
    height: 1400px; /* ajustar según contenido real */
  }
}