/* responsive.css */
/* Estilos completos para pantallas pequeñas (móviles) */

@media (max-width: 768px) {

  /* General */
  body {
    font-size: 14px !important;
    line-height: 1.4 !important;
    padding: 10px !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
  }

  h1, h2, h3 {
    font-size: 1.2em !important;
    text-align: center !important;
  }

  p {
    font-size: 1em !important;
    text-align: justify !important;
  }

  /* Layouts de columnas -> columnas verticales */
  [class*="row"], [class*="cols"], [class*="column"], [class*="grid"], .contenedor, .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  /* Menús */
  nav, .menu, .navbar, header ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
  }

  nav a, .menu a, .navbar a {
    font-size: 1em !important;
    padding: 8px 0 !important;
    display: block !important;
  }

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

  /* Galerías y secciones de máquinas */
  .maquinas img,
  .galeria img,
  .productos img,
  .machine img,
  .machines img {
    display: block !important;
    width: 90% !important;
    margin: 0 auto 20px auto !important;
    height: auto !important;
  }

  .maquinas, .galeria, .productos, .machine, .machines {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
  }

  /* Banners y secciones grandes */
  .banner, .hero, .slider {
    width: 100% !important;
    height: auto !important;
    overflow: hidden !important;
  }

  /* Botones */
  button, .btn, input[type="button"], input[type="submit"] {
    width: 100% !important;
    padding: 12px !important;
    font-size: 1em !important;
  }

  /* Formularios */
  form, input, textarea, select {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Videos y iframes */
  iframe, video {
    width: 100% !important;
    height: auto !important;
  }

  /* Tablas */
  table {
    width: 100% !important;
    display: block !important;
    overflow-x: auto !important;
  }

  /* Ajuste de pie de página */
  footer {
    text-align: center !important;
    padding: 15px !important;
  }
}


/* Reglas adicionales para corregir fallos comunes en móvil */

/* Caja universal */
*, *::before, *::after {
  box-sizing: border-box !important;
}

/* Asegurar que los contenedores no tengan anchuras fijas que desborden */
div, section, article, aside, header, main {
  max-width: 100% !important;
  width: 100% !important;
}

/* Forzar que elementos con style="width:XYZpx" no provoquen scroll */
[style*="width:"] {
  max-width: 100% !important;
  width: auto !important;
}

/* Reglas para columnas que usan float */
[class*="col"], [class*="grid"], [class*="column"], .col {
  float: none !important;
  width: 100% !important;
  display: block !important;
}

/* Evitar márgenes/paddings enormes */
*[style*="margin"], *[style*="padding"] {
  margin: 0 !important;
  padding: 0.5rem !important;
}

/* Evitar imágenes muy pequeñas por inline width attribute */
img[width], img[height] {
  width: 90% !important;
  height: auto !important;
}

/* Forzar que sliders y carruseles no desborden */
.slick-track, .owl-stage, .carousel-inner, .slides {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

/* Inputs y botones */
input, textarea, select, button {
  max-width: 100% !important;
}

/* Evitar overflow horizontal */
html, body {
  overflow-x: hidden !important;
}

/* Ajustes para elementos absolutamente posicionados que salgan de la pantalla */
[style*="position: absolute"], [style*="position:absolute"], .absolute, .pos-absolute {
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
}

/* Para menús pegados a la derecha/izquierda */
nav, .navbar, .menu {
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

/* Detectar y adaptar contenedores de ancho fijo comunes */
.container-fixed, .fixed-width, .wrap-fixed {
  width: 100% !important;
}

/* Ajuste adicional para iframes incrustados (maps, widgets) */
iframe[width], iframe[height], embed, object {
  width: 100% !important;
  height: auto !important;
}

/* Evitar que tablas rompan layout */
table, thead, tbody, tr, td, th {
  display: block !important;
  width: 100% !important;
}


/* ========================================= */
/* Ajustes finos por página (solicitud usuario) */
/* ========================================= */

@media (max-width: 768px) {

  /* Página QUIÉNES SOMOS */
  .contacto-info a[href^="mailto"],
  .contacto-info a[href^="tel"],
  .correo, .telefono {
    white-space: nowrap !important; /* evitar saltos */
    word-break: keep-all !important;
    font-size: 1em !important;
  }
  .contacto-info a[href^="mailto"] {
    overflow-wrap: anywhere !important;
  }

  /* Página ONDAS DE CHOQUE FOCALES */
  .beneficios, .beneficios-principales, .datos-tecnicos {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important; /* separación moderada */
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }

  /* Página TECAR BACK */
  .beneficios-tecar, .datos-tecar {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }

  /* Página SISTEMA SUPERINDUCTIVO (SIS) */
  .beneficios-sis, .datos-sis {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
  .btn-manual, .ver-manual {
    display: block !important;
    width: 80% !important;
    margin: 1rem auto !important;
    text-align: center !important;
  }

  /* Página CONTACTO */
  .form-contacto label[for*="correo"], .form-contacto label[for*="email"],
  .correo-label {
    margin-bottom: 0.2rem !important;
  }
  .form-contacto input[type="email"], .form-contacto input[name*="correo"] {
    margin-top: 0 !important;
  }
}
