@media screen and (max-width: 768px) {

  html, body { width: 100%; overflow-x: hidden; }

  /* index.html: tabla principal y header */
  table { width: 100% !important; }
  #header table, #header tr, #header td {
    display: block !important;
    width: 100% !important;
  }
  #contenidos iframe {
    width: 100% !important;
    height: 1400px; /* ajustar al alto real del contenido */
  }

  /* index.html: 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: contenedores de layout */
  #ppal, .entero, #internos, .linea {
    width: 100% !important;
    height: auto !important;
  }
  .mitad, .tercio {
    width: 100% !important;
    float: none !important;
    display: block !important;
    height: auto !important;
    margin-left: 0 !important;
    box-sizing: border-box;
  }

  /* 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; }
  
  /* 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;
}
}