/* =====================================================
   MAGUTEC — CONTACTO
   Responsive específico de contacto.html
   ===================================================== */


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

.contacto-page {
  overflow-x: hidden;
}

.contacto-page main {
  min-width: 0;
}

.contacto-page .container {
  min-width: 0;
  box-sizing: border-box;
}

.contacto-page input,
.contacto-page select,
.contacto-page textarea {
  box-sizing: border-box;
  max-width: 100%;
}

.contacto-page #contact-grid {
  min-width: 0;
}

.contacto-page #contact-grid > * {
  min-width: 0;
}


/* =====================================================
   INTRO
   ===================================================== */

.contacto-page .intro-section h1,
.contacto-page .intro-section p {
  overflow-wrap: break-word;
  word-break: normal;
}


/* =====================================================
   FORMULARIO
   ===================================================== */

.contacto-page #contact-form {
  min-width: 0;
  box-sizing: border-box;
}

.contacto-page #contact-form input,
.contacto-page #contact-form select,
.contacto-page #contact-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.contacto-page #contact-form button {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}


/* =====================================================
   INFORMACIÓN DE CONTACTO
   ===================================================== */

.contacto-page #contact-grid > div:last-child {
  min-width: 0;
}

.contacto-page #contact-grid > div:last-child > div {
  min-width: 0;
  box-sizing: border-box;
}

.contacto-page #contact-grid a {
  overflow-wrap: anywhere;
  word-break: break-word;
}


/* =====================================================
   TABLET
   992px → 768px
   ===================================================== */

@media (max-width: 991px) {

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

  .contacto-page .intro-section h1 {
    font-size: clamp(3rem, 8vw, 4rem) !important;
    line-height: 1;
    max-width: 720px !important;
    letter-spacing: -0.03em;
  }

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


  /* ---------- FORMULARIO + INFO ---------- */

  #contact-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-5) !important;
  }


  /* ---------- FILAS DEL FORMULARIO ---------- */

  #form-row-1,
  #form-row-2 {
    grid-template-columns: 1fr 1fr !important;
  }


  /* ---------- INFORMACIÓN ---------- */

  .contacto-page #contact-grid > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .contacto-page #contact-grid > div:last-child > div {
    margin-bottom: 0 !important;
  }

  .contacto-page #contact-grid > div:last-child > .btn {
    grid-column: 1 / -1;
  }
}


/* =====================================================
   MÓVIL
   767px o menos
   ===================================================== */

@media (max-width: 767px) {

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

  .contacto-page .intro-section h1 {
    font-size: clamp(2.6rem, 11vw, 3.5rem) !important;
    line-height: 0.98;
    letter-spacing: -0.035em;
    max-width: 100% !important;
  }

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


  /* ---------- CONTENEDOR PRINCIPAL ---------- */

  .contacto-page #contact-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-4) !important;
  }


  /* ---------- FORMULARIO ---------- */

  .contacto-page #contact-form {
    padding: var(--space-3) !important;
  }


  /* ---------- FILAS ---------- */

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


  /* ---------- CAMPOS ---------- */

  .contacto-page #contact-form input,
  .contacto-page #contact-form select,
  .contacto-page #contact-form textarea {
    font-size: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }


  /* ---------- BOTÓN ---------- */

  .contacto-page #btnEnviar {
    width: 100% !important;
    max-width: 100%;
    min-width: 0 !important;
    box-sizing: border-box;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }


  /* ---------- INFORMACIÓN DE CONTACTO ---------- */

  .contacto-page #contact-grid > div:last-child {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }

  .contacto-page #contact-grid > div:last-child > div {
    margin-bottom: 0 !important;
    padding: var(--space-3) !important;
  }

  .contacto-page #contact-grid > div:last-child > .btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }
}


/* =====================================================
   MÓVILES PEQUEÑOS
   480px o menos
   ===================================================== */

@media (max-width: 480px) {

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

  .contacto-page .intro-section h1 {
    font-size: clamp(2.35rem, 11vw, 3rem) !important;
    line-height: 1;
  }

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


  /* ---------- FORMULARIO ---------- */

  .contacto-page #contact-form {
    padding: 1rem !important;
  }

  .contacto-page #contact-form label {
    font-size: 0.7rem !important;
  }

  .contacto-page #contact-form input,
  .contacto-page #contact-form select,
  .contacto-page #contact-form textarea {
    padding: 0.7rem !important;
    font-size: 0.95rem;
  }


  /* ---------- INFORMACIÓN ---------- */

  .contacto-page #contact-grid > div:last-child > div {
    padding: 1rem !important;
  }

  .contacto-page #contact-grid > div:last-child h4 {
    font-size: 0.7rem !important;
  }

  .contacto-page #contact-grid > div:last-child a {
    font-size: 1rem !important;
  }


  /* ---------- BOTONES ---------- */

  .contacto-page #btnEnviar,
  .contacto-page #contact-grid > div:last-child > .btn {
    font-size: 0.95rem;
    padding: 0.95rem 1rem;
  }
}