/* =====================================================
   MAGUTEC — SOLUCIONES
   Responsive específico de soluciones.html
   ===================================================== */


/* =====================================================
   AJUSTES GENERALES
   ===================================================== */

html,
body {
  overflow-x: hidden;
}

.intro-section h1,
.intro-section p {
  max-width: 100%;
}


/* Evita que los grids internos provoquen
   desbordamiento horizontal */
#sol-grid-1,
#sol-grid-2 {
  min-width: 0;
}


/* Las columnas pueden encogerse correctamente */
#sol-grid-1 > *,
#sol-grid-2 > * {
  min-width: 0;
}


/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 991px) {

  /* ---------------------------------------------
     INTRO
     --------------------------------------------- */

  .intro-section h1 {
    font-size: clamp(3rem, 8vw, 4rem) !important;
    line-height: 0.98;
    max-width: 720px !important;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .intro-section p {
    font-size: 1.15rem !important;
    line-height: 1.6;
    max-width: 620px !important;
  }


  /* ---------------------------------------------
     SOLUCIONES
     --------------------------------------------- */

  #sol-grid-1,
  #sol-grid-2 {
    grid-template-columns: 1fr !important;
    gap: var(--space-4) !important;
  }


  /* ---------------------------------------------
     ORDEN DE IMÁGENES
     --------------------------------------------- */

  #sol-grid-1 .sol-image-wrap,
  #sol-grid-2 .sol-image-wrap {
    order: initial !important;
  }


  #sol-grid-1 > div:first-child {
    order: 1;
  }

  #sol-grid-1 .sol-image-wrap {
    order: 2;
  }


  #sol-grid-2 .sol-image-wrap {
    order: 1 !important;
  }

  #sol-grid-2 > div:last-child {
    order: 2 !important;
  }


  /* ---------------------------------------------
     IMÁGENES
     --------------------------------------------- */

  .sol-image {
    min-height: 300px !important;
  }


  /* ---------------------------------------------
     TEXTOS
     --------------------------------------------- */

  #sol-grid-1 h2,
  #sol-grid-2 h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.05;
  }

  #sol-grid-1 p,
  #sol-grid-2 p {
    line-height: 1.6;
  }


  /* ---------------------------------------------
     BLOQUE BESS
     --------------------------------------------- */

  .section .blueprint-corner > div[style*="position: relative"] {
    padding: var(--space-4) !important;
  }

}


/* =====================================================
   MÓVIL
   ===================================================== */

@media (max-width: 767px) {

  /* ---------------------------------------------
     INTRO
     --------------------------------------------- */

  .intro-section h1 {
    font-size: clamp(2.7rem, 11vw, 3.5rem) !important;
    line-height: 0.98;
    letter-spacing: -0.03em;
    max-width: 100% !important;
    overflow-wrap: break-word;
  }

  .intro-section p {
    font-size: 1.05rem !important;
    line-height: 1.6;
    max-width: 100% !important;
  }


  /* ---------------------------------------------
     SECCIONES DE SOLUCIONES
     --------------------------------------------- */

  #sol-grid-1,
  #sol-grid-2 {
    grid-template-columns: 1fr !important;
    gap: var(--space-4) !important;
  }


  /* ---------------------------------------------
     CONECTIVIDAD
     Texto → Imagen
     --------------------------------------------- */

  #sol-grid-1 > div:first-child {
    order: 1;
  }

  #sol-grid-1 .sol-image-wrap {
    order: 2;
  }


  /* ---------------------------------------------
     SEGURIDAD
     Imagen → Texto
     --------------------------------------------- */

  #sol-grid-2 .sol-image-wrap {
    order: 1 !important;
  }

  #sol-grid-2 > div:last-child {
    order: 2 !important;
  }


  /* ---------------------------------------------
     TÍTULOS
     --------------------------------------------- */

  #sol-grid-1 h2,
  #sol-grid-2 h2 {
    font-size: clamp(1.9rem, 8vw, 2.5rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
  }


  /* ---------------------------------------------
     PÁRRAFOS
     --------------------------------------------- */

  #sol-grid-1 p,
  #sol-grid-2 p {
    font-size: 0.98rem;
    line-height: 1.65;
  }


  /* ---------------------------------------------
     CASOS DE USO
     --------------------------------------------- */

  #sol-grid-1 .eyebrow,
  #sol-grid-2 .eyebrow {
    line-height: 1.3;
  }

  #sol-grid-1 > div:first-child > div:last-child,
  #sol-grid-2 > div:last-child > div:last-child {
    font-size: 0.95rem;
    line-height: 1.55;
  }


  /* ---------------------------------------------
     IMÁGENES
     --------------------------------------------- */

  .sol-image {
    min-height: 230px !important;
  }


  /* ---------------------------------------------
     BESS
     --------------------------------------------- */

  .section .blueprint-corner > div[style*="position: relative"] {
    padding: var(--space-3) !important;
    max-width: none !important;
  }


  .section .blueprint-corner > div[style*="position: relative"] h2 {
    font-size: 1.8rem !important;
    line-height: 1.1;
  }


  .section .blueprint-corner > div[style*="position: relative"] p {
    font-size: 0.98rem;
    line-height: 1.6;
  }


  /* ---------------------------------------------
   CTA FINAL
   --------------------------------------------- */

.section h2 {
  font-size: 2rem;
  line-height: 1.1;
}


/* Contenedor del CTA */

main > section:last-of-type .container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}


/* Botón */

main > section:last-of-type .btn.btn-primary {
  display: flex;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  box-sizing: border-box;

  justify-content: center;
  align-items: center;

  padding: 1rem 1.25rem;

  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;

  text-align: center;
  line-height: 1.25;
}


}


/* =====================================================
   MÓVILES PEQUEÑOS
   ===================================================== */

@media (max-width: 480px) {

  /* ---------------------------------------------
     INTRO
     --------------------------------------------- */

  .intro-section h1 {
    font-size: clamp(2.45rem, 11vw, 3rem) !important;
    line-height: 1;
    letter-spacing: -0.035em;
  }

  .intro-section p {
    font-size: 1rem !important;
    line-height: 1.6;
  }


  /* ---------------------------------------------
     TÍTULOS DE SOLUCIONES
     --------------------------------------------- */

  #sol-grid-1 h2,
  #sol-grid-2 h2 {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
    line-height: 1.1;
  }


  /* ---------------------------------------------
     TEXTO
     --------------------------------------------- */

  #sol-grid-1 p,
  #sol-grid-2 p {
    font-size: 0.95rem;
    line-height: 1.6;
  }


  /* ---------------------------------------------
     IMÁGENES
     --------------------------------------------- */

  .sol-image {
    min-height: 200px !important;
  }


  /* ---------------------------------------------
     BESS
     --------------------------------------------- */

  .section .blueprint-corner > div[style*="position: relative"] h2 {
    font-size: 1.65rem !important;
  }

  .section .blueprint-corner > div[style*="position: relative"] p {
    font-size: 0.94rem;
    line-height: 1.6;
  }


  /* ---------------------------------------------
     CTA
     --------------------------------------------- */

  .section h2 {
    font-size: 1.8rem;
  }

  main > section:last-of-type .btn.btn-primary {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;

  font-size: 1rem;
  padding: 1rem 1.1rem;

  white-space: normal;
}

}
